Package org.opencms.acacia.shared
Class CmsType
java.lang.Object
org.opencms.acacia.shared.CmsType
- All Implemented Interfaces:
Serializable
CmsEntity attribute type data.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String attributeName, CmsType attributeType, int minOccurrence, int maxOccurrence) Adds an attribute to the type.intgetAttributeMaxOccurrence(String attributeName) Returns the maximum occurrence of the given attribute.intgetAttributeMinOccurrence(String attributeName) Returns the minimum occurrence of the given attribute.The names of the attributes of this type.getAttributeType(String attributeName) Returns the type of the given attribute.getAttributeTypeName(String attributeName) Returns the type name of the given attribute.intReturns the maximum choice occurrence.getId()Returns the name of the type.booleanisChoice()Returns if this is a choice type.booleanReturns if this is a simple type.voidsetChoiceMaxOccurrence(int choiceMaxOccurrence) Sets the maximum choice occurrence.
-
Field Details
-
CHOICE_ATTRIBUTE_NAME
The choice attribute name.- See Also:
-
-
Constructor Details
-
CmsType
Constructor.- Parameters:
id- the type id/name
-
CmsType
protected CmsType()Constructor. For serialization only.
-
-
Method Details
-
getAttributeMaxOccurrence
Returns the maximum occurrence of the given attribute.- Parameters:
attributeName- the attribute name- Returns:
- the maximum occurrence
-
getAttributeMinOccurrence
Returns the minimum occurrence of the given attribute.- Parameters:
attributeName- the attribute name- Returns:
- the minimum occurrence
-
getAttributeNames
The names of the attributes of this type.- Returns:
- the attribute names
-
getAttributeType
Returns the type of the given attribute.- Parameters:
attributeName- the attribute name- Returns:
- the type of the given attribute
-
getAttributeTypeName
Returns the type name of the given attribute.- Parameters:
attributeName- the attribute name- Returns:
- the type name of the given attribute
-
getChoiceMaxOccurrence
Returns the maximum choice occurrence.- Returns:
- the maximum choice occurrence
-
getId
Returns the name of the type.- Returns:
- the name of the type
-
isChoice
Returns if this is a choice type.- Returns:
trueif this is a choice type
-
isSimpleType
Returns if this is a simple type. Simple types have no attributes.- Returns:
trueif this is a simple type
-
setChoiceMaxOccurrence
Sets the maximum choice occurrence.- Parameters:
choiceMaxOccurrence- the maximum choice occurrence