Package org.opencms.acacia.shared
Class CmsEntityAttribute
- java.lang.Object
-
- org.opencms.acacia.shared.CmsEntityAttribute
-
- All Implemented Interfaces:
java.io.Serializable
public class CmsEntityAttribute extends java.lang.Object implements java.io.Serializable
Serializable entity attribute implementation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsEntityAttribute()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsEntityAttribute
createEntityAttribute(java.lang.String name, java.util.List<CmsEntity> values)
Creates a entity type attribute.static CmsEntityAttribute
createSimpleAttribute(java.lang.String name, java.util.List<java.lang.String> values)
Creates a simple type attribute.java.lang.String
getAttributeName()
Returns the attribute name.CmsEntity
getComplexValue()
Returns the first complex value in the list.java.util.List<CmsEntity>
getComplexValues()
Returns the list of complex values.java.lang.String
getSimpleValue()
Returns the first simple value in the list.java.util.List<java.lang.String>
getSimpleValues()
Returns the list of simple values.int
getValueCount()
Returns the number of values set for this attribute.boolean
isComplexValue()
Returns if the is a complex type value.boolean
isSimpleValue()
Returns if the is a simple type value.boolean
isSingleValue()
Returns if this is a single value attribute.
-
-
-
Constructor Detail
-
CmsEntityAttribute
protected CmsEntityAttribute()
Constructor. For serialization only.
-
-
Method Detail
-
createEntityAttribute
public static CmsEntityAttribute createEntityAttribute(java.lang.String name, java.util.List<CmsEntity> values)
Creates a entity type attribute.- Parameters:
name
- the attribute namevalues
- the attribute values- Returns:
- the newly created attribute
-
createSimpleAttribute
public static CmsEntityAttribute createSimpleAttribute(java.lang.String name, java.util.List<java.lang.String> values)
Creates a simple type attribute.- Parameters:
name
- the attribute namevalues
- the attribute values- Returns:
- the newly created attribute
-
getAttributeName
public java.lang.String getAttributeName()
Returns the attribute name.- Returns:
- the attribute name
-
getComplexValue
public CmsEntity getComplexValue()
Returns the first complex value in the list.- Returns:
- the first complex value
-
getComplexValues
public java.util.List<CmsEntity> getComplexValues()
Returns the list of complex values.- Returns:
- the list of complex values
-
getSimpleValue
public java.lang.String getSimpleValue()
Returns the first simple value in the list.- Returns:
- the first simple value
-
getSimpleValues
public java.util.List<java.lang.String> getSimpleValues()
Returns the list of simple values.- Returns:
- the list of simple values
-
getValueCount
public int getValueCount()
Returns the number of values set for this attribute.- Returns:
- the number of values
-
isComplexValue
public boolean isComplexValue()
Returns if the is a complex type value.- Returns:
true
if this is a complex type value
-
isSimpleValue
public boolean isSimpleValue()
Returns if the is a simple type value.- Returns:
true
if this is a simple type value
-
isSingleValue
public boolean isSingleValue()
Returns if this is a single value attribute.- Returns:
true
if this is a single value attribute
-
-