Package org.opencms.acacia.shared
Class CmsContentDefinition
java.lang.Object
org.opencms.acacia.shared.CmsContentDefinition
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
- Direct Known Subclasses:
CmsContentDefinition
public class CmsContentDefinition
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable
Contains all information defining a content entity type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe member name for the form rendering function.static final StringThe member name for the inline rendering function.static final StringThe name of the native renderer.static final StringThe parameter name for the initialization function. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.CmsContentDefinition(String entityId, Map<String, CmsEntity> entities, Map<String, CmsAttributeConfiguration> configurations, Map<String, CmsType> types, List<CmsTabInfo> tabInfos, boolean groupOptionalFields, String locale) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic intextractIndex(String attributeName) Extracts the attribute index from the given attribute name where the index is appended to the name like 'attributename[1]'.Returns the attribute configurations.Returns the locale specific entities of the content.Returns the entity.Returns the entity id.Returns the entity type name.Returns the locale.Returns the tab information beans.getTypes()Returns the types.static booleanChecks if the given XPATH component has an index.booleanReturns if optional fields should be grouped together.static StringremoveIndex(String attributeName) Removes an attribute index suffix from the given attribute name.
-
Field Details
-
NATIVE_RENDERER
The name of the native renderer.- See Also:
-
FUNCTION_RENDER_FORM
The member name for the form rendering function.- See Also:
-
FUNCTION_RENDER_INLINE
The member name for the inline rendering function.- See Also:
-
PARAM_INIT_CALL
The parameter name for the initialization function.- See Also:
-
-
Constructor Details
-
CmsContentDefinition
public CmsContentDefinition(String entityId, Map<String, CmsEntity> entities, Map<String, CmsAttributeConfiguration> configurations, Map<String, CmsType> types, List<CmsTabInfo> tabInfos, boolean groupOptionalFields, String locale) Constructor.- Parameters:
entityId- the entity identities- the locale specific entitiesconfigurations- the attribute configurationstypes- the typestabInfos- the tab information beansgroupOptionalFields-trueif optional fields should be grouped togetherlocale- the content locale
-
CmsContentDefinition
protected CmsContentDefinition()Constructor. Used for serialization only.
-
-
Method Details
-
extractIndex
Extracts the attribute index from the given attribute name where the index is appended to the name like 'attributename[1]'.- Parameters:
attributeName- the attribute name- Returns:
- the extracted index
-
hasIndex
Checks if the given XPATH component has an index.- Parameters:
pathComponent- the path component- Returns:
- true if the argument contains an index
-
removeIndex
Removes an attribute index suffix from the given attribute name.- Parameters:
attributeName- the attribute name- Returns:
- the attribute name
-
getConfigurations
Returns the attribute configurations.- Returns:
- the attribute configurations
-
getEntities
Returns the locale specific entities of the content.- Returns:
- the locale specific entities of the content
-
getEntity
Returns the entity.- Returns:
- the entity
-
getEntityId
Returns the entity id.- Returns:
- the entity id
-
getEntityTypeName
Returns the entity type name.- Returns:
- the entity type name
-
getLocale
Returns the locale.- Returns:
- the locale
-
getTabInfos
Returns the tab information beans.- Returns:
- the tab information beans
-
getTypes
Returns the types.- Returns:
- the types
-
isGroupOptionalFields
Returns if optional fields should be grouped together.- Returns:
trueif optional fields should be grouped together
-