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 java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable
Contains all information defining a content entity type.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FUNCTION_RENDER_FORM
The member name for the form rendering function.static java.lang.String
FUNCTION_RENDER_INLINE
The member name for the inline rendering function.static java.lang.String
NATIVE_RENDERER
The name of the native renderer.static java.lang.String
PARAM_INIT_CALL
The parameter name for the initialization function.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsContentDefinition()
Constructor.CmsContentDefinition(java.lang.String entityId, java.util.Map<java.lang.String,CmsEntity> entities, java.util.Map<java.lang.String,CmsAttributeConfiguration> configurations, java.util.Map<java.lang.String,CmsType> types, java.util.List<CmsTabInfo> tabInfos, boolean groupOptionalFields, java.lang.String locale)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
extractIndex(java.lang.String attributeName)
Extracts the attribute index from the given attribute name where the index is appended to the name like 'attributename[1]'.java.util.Map<java.lang.String,CmsAttributeConfiguration>
getConfigurations()
Returns the attribute configurations.java.util.Map<java.lang.String,CmsEntity>
getEntities()
Returns the locale specific entities of the content.CmsEntity
getEntity()
Returns the entity.java.lang.String
getEntityId()
Returns the entity id.java.lang.String
getEntityTypeName()
Returns the entity type name.java.lang.String
getLocale()
Returns the locale.java.util.List<CmsTabInfo>
getTabInfos()
Returns the tab information beans.java.util.Map<java.lang.String,CmsType>
getTypes()
Returns the types.static boolean
hasIndex(java.lang.String pathComponent)
Checks if the given XPATH component has an index.boolean
isGroupOptionalFields()
Returns if optional fields should be grouped together.static java.lang.String
removeIndex(java.lang.String attributeName)
Removes an attribute index suffix from the given attribute name.
-
-
-
Field Detail
-
NATIVE_RENDERER
public static final java.lang.String NATIVE_RENDERER
The name of the native renderer.- See Also:
- Constant Field Values
-
FUNCTION_RENDER_FORM
public static final java.lang.String FUNCTION_RENDER_FORM
The member name for the form rendering function.- See Also:
- Constant Field Values
-
FUNCTION_RENDER_INLINE
public static final java.lang.String FUNCTION_RENDER_INLINE
The member name for the inline rendering function.- See Also:
- Constant Field Values
-
PARAM_INIT_CALL
public static final java.lang.String PARAM_INIT_CALL
The parameter name for the initialization function.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsContentDefinition
public CmsContentDefinition(java.lang.String entityId, java.util.Map<java.lang.String,CmsEntity> entities, java.util.Map<java.lang.String,CmsAttributeConfiguration> configurations, java.util.Map<java.lang.String,CmsType> types, java.util.List<CmsTabInfo> tabInfos, boolean groupOptionalFields, java.lang.String locale)
Constructor.- Parameters:
entityId
- the entity identities
- the locale specific entitiesconfigurations
- the attribute configurationstypes
- the typestabInfos
- the tab information beansgroupOptionalFields
-true
if optional fields should be grouped togetherlocale
- the content locale
-
CmsContentDefinition
protected CmsContentDefinition()
Constructor. Used for serialization only.
-
-
Method Detail
-
extractIndex
public static int extractIndex(java.lang.String attributeName)
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
public static boolean hasIndex(java.lang.String pathComponent)
Checks if the given XPATH component has an index.- Parameters:
pathComponent
- the path component- Returns:
- true if the argument contains an index
-
removeIndex
public static java.lang.String removeIndex(java.lang.String attributeName)
Removes an attribute index suffix from the given attribute name.- Parameters:
attributeName
- the attribute name- Returns:
- the attribute name
-
getConfigurations
public java.util.Map<java.lang.String,CmsAttributeConfiguration> getConfigurations()
Returns the attribute configurations.- Returns:
- the attribute configurations
-
getEntities
public java.util.Map<java.lang.String,CmsEntity> getEntities()
Returns the locale specific entities of the content.- Returns:
- the locale specific entities of the content
-
getEntityId
public java.lang.String getEntityId()
Returns the entity id.- Returns:
- the entity id
-
getEntityTypeName
public java.lang.String getEntityTypeName()
Returns the entity type name.- Returns:
- the entity type name
-
getLocale
public java.lang.String getLocale()
Returns the locale.- Returns:
- the locale
-
getTabInfos
public java.util.List<CmsTabInfo> getTabInfos()
Returns the tab information beans.- Returns:
- the tab information beans
-
getTypes
public java.util.Map<java.lang.String,CmsType> getTypes()
Returns the types.- Returns:
- the types
-
isGroupOptionalFields
public boolean isGroupOptionalFields()
Returns if optional fields should be grouped together.- Returns:
true
if optional fields should be grouped together
-
-