public class CmsContentDefinition extends CmsContentDefinition
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SETTINGS_TAB_ID
The id of the element settings tab.
|
FUNCTION_RENDER_FORM, FUNCTION_RENDER_INLINE, NATIVE_RENDERER, PARAM_INIT_CALL| Modifier | Constructor and Description |
|---|---|
protected |
CmsContentDefinition()
Constructor for serialization only.
|
|
CmsContentDefinition(java.util.List<CmsModelResourceInfo> modelInfos,
java.lang.String newLink,
CmsUUID referenceId,
java.lang.String locale)
Constructor for model file informations object.
|
|
CmsContentDefinition(java.lang.String entityId,
java.util.Map<java.lang.String,CmsEntity> entities,
java.util.Map<java.lang.String,CmsAttributeConfiguration> configurations,
java.util.Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations,
java.util.Map<java.lang.String,CmsComplexWidgetData> complexWidgetData,
java.util.Map<java.lang.String,CmsType> types,
java.util.List<CmsTabInfo> tabInfos,
java.lang.String locale,
java.util.List<java.lang.String> contentLocales,
java.util.Map<java.lang.String,java.lang.String> availableLocales,
java.util.List<java.lang.String> synchronizations,
java.util.Map<java.lang.String,java.lang.String> syncValues,
java.util.Collection<java.lang.String> skipPaths,
java.lang.String title,
java.lang.String sitePath,
java.lang.String resourceType,
java.lang.String iconClasses,
boolean performedAutocorrection,
boolean autoUnlock,
java.util.Set<java.lang.String> editorChangeScopes)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static CmsEntity |
createDefaultValueEntity(CmsType entityType,
java.util.Map<java.lang.String,CmsType> entityTypes,
java.util.Map<java.lang.String,CmsAttributeConfiguration> attributeConfigurations)
Creates an entity object containing the default values configured for it's type.
|
static CmsUUID |
entityIdToUuid(java.lang.String entityId)
Returns the UUID according to the given entity id.
|
java.util.Map<java.lang.String,java.lang.String> |
getAvailableLocales()
Returns the available locales.
|
java.util.Map<java.lang.String,CmsComplexWidgetData> |
getComplexWidgetData()
Gets the complex widget configurations.
|
java.util.List<java.lang.String> |
getContentLocales()
Returns the content locales.
|
java.util.Set<java.lang.String> |
getEditorChangeScopes()
Returns the editor change handler scopes.
|
java.util.List<CmsExternalWidgetConfiguration> |
getExternalWidgetConfigurations()
Returns the external widget configurations.
|
java.lang.String |
getIconClasses()
Returns the resource icon classes.
|
static java.lang.String |
getLocaleFromId(java.lang.String entityId)
Extracts the locale from the entity id.
|
java.util.List<CmsModelResourceInfo> |
getModelInfos()
Returns the model file informations.
|
java.lang.String |
getNewLink()
Returns the new link.
|
CmsUUID |
getReferenceResourceId()
Returns the reference resource structure id.
|
java.lang.String |
getResourceType()
Returns the resource type.
|
java.lang.String |
getSitePath()
Returns the site path.
|
java.util.Collection<java.lang.String> |
getSkipPaths()
Returns the paths to skip during locale synchronization.
|
java.util.List<java.lang.String> |
getSynchronizations()
Returns the elements that require a synchronization across all locales.
|
java.util.Map<java.lang.String,java.lang.String> |
getSyncValues()
Returns the locale synchronization values.
|
java.lang.String |
getTitle()
Returns the title.
|
static java.lang.String |
getValueForPath(CmsEntity entity,
java.lang.String path)
Returns the value for the given XPath expression.
|
boolean |
hasEditorChangeHandlers()
Returns
true if any editor change handlers have been configured for this content type. |
boolean |
hasSynchronizedElements()
Returns if there are locale synchronized elements configured.
|
boolean |
isAutoUnlock()
Returns the value of the acacia-unlock configuration option.
|
boolean |
isDeleteOnCancel()
Returns if the resource needs to removed on cancel.
|
boolean |
isDirectEdit()
Returns true if the direct edit flag is set, which means that the editor was opened from the classic direct edit mode.
|
boolean |
isModelInfo()
Returns if the model file informations are present, in this case no additional data is contained.
|
boolean |
isPerformedAutocorrection()
Returns if auto correction was performed.
|
void |
setDeleteOnCancel(boolean deleteOnCancel)
Sets if the resource needs to removed on cancel.
|
void |
setDirectEdit(boolean isDirectEdit)
Sets the value of the direct edit flag.
|
static void |
transferValues(CmsEntity original,
CmsEntity target,
java.util.List<java.lang.String> transferAttributes,
java.util.Map<java.lang.String,CmsType> entityTypes,
java.util.Map<java.lang.String,CmsAttributeConfiguration> attributeConfigurations,
boolean considerDefaults)
Transfers values from the original entity to the given target entity.
|
static java.lang.String |
uuidToEntityId(CmsUUID uuid,
java.lang.String locale)
Returns the entity id according to the given UUID.
|
extractIndex, getConfigurations, getEntities, getEntity, getEntityId, getEntityTypeName, getLocale, getTabInfos, getTypes, hasIndex, isGroupOptionalFields, removeIndexpublic static final java.lang.String SETTINGS_TAB_ID
public CmsContentDefinition(java.util.List<CmsModelResourceInfo> modelInfos, java.lang.String newLink, CmsUUID referenceId, java.lang.String locale)
modelInfos - the model file informationsnewLink - the new linkreferenceId - the reference resource structure idlocale - the localepublic CmsContentDefinition(java.lang.String entityId, java.util.Map<java.lang.String,CmsEntity> entities, java.util.Map<java.lang.String,CmsAttributeConfiguration> configurations, java.util.Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations, java.util.Map<java.lang.String,CmsComplexWidgetData> complexWidgetData, java.util.Map<java.lang.String,CmsType> types, java.util.List<CmsTabInfo> tabInfos, java.lang.String locale, java.util.List<java.lang.String> contentLocales, java.util.Map<java.lang.String,java.lang.String> availableLocales, java.util.List<java.lang.String> synchronizations, java.util.Map<java.lang.String,java.lang.String> syncValues, java.util.Collection<java.lang.String> skipPaths, java.lang.String title, java.lang.String sitePath, java.lang.String resourceType, java.lang.String iconClasses, boolean performedAutocorrection, boolean autoUnlock, java.util.Set<java.lang.String> editorChangeScopes)
entityId - the entity identities - the locale specific entities of the contentconfigurations - the attribute configurationsexternalWidgetConfigurations - the external widget configurationscomplexWidgetData - the complex widget configurationstypes - the typestabInfos - the tab informationlocale - the content localecontentLocales - the content localesavailableLocales - the available localessynchronizations - the elements that require a synchronization across all localessyncValues - the locale synchronization valuesskipPaths - the paths to skip during locale synchronizationtitle - the content titlesitePath - the site pathresourceType - the resource type nameiconClasses - the resource icon classesperformedAutocorrection - flag indicating the current content has an invalid XML structure and was auto correctedautoUnlock - false if the editor should not unlock resources automatically in standalone modeeditorChangeScopes - the editor change handler scopesprotected CmsContentDefinition()
public static CmsUUID entityIdToUuid(java.lang.String entityId)
entityId - the entity idpublic static java.lang.String getLocaleFromId(java.lang.String entityId)
entityId - the entity idpublic static java.lang.String getValueForPath(CmsEntity entity, java.lang.String path)
entity - the entitypath - the pathpublic static void transferValues(CmsEntity original, CmsEntity target, java.util.List<java.lang.String> transferAttributes, java.util.Map<java.lang.String,CmsType> entityTypes, java.util.Map<java.lang.String,CmsAttributeConfiguration> attributeConfigurations, boolean considerDefaults)
original - the original entitytarget - the target entitytransferAttributes - the attributes to consider for the value transferentityTypes - the entity typesattributeConfigurations - the attribute configurationsconsiderDefaults - if default values should be added according to minimum occurrence settingspublic static java.lang.String uuidToEntityId(CmsUUID uuid, java.lang.String locale)
uuid - the UUIDlocale - the content localeprotected static CmsEntity createDefaultValueEntity(CmsType entityType, java.util.Map<java.lang.String,CmsType> entityTypes, java.util.Map<java.lang.String,CmsAttributeConfiguration> attributeConfigurations)
entityType - the entity typeentityTypes - the entity typesattributeConfigurations - the attribute configurationspublic java.util.Map<java.lang.String,java.lang.String> getAvailableLocales()
public java.util.Map<java.lang.String,CmsComplexWidgetData> getComplexWidgetData()
public java.util.List<java.lang.String> getContentLocales()
public java.util.Set<java.lang.String> getEditorChangeScopes()
public java.util.List<CmsExternalWidgetConfiguration> getExternalWidgetConfigurations()
public java.lang.String getIconClasses()
public java.util.List<CmsModelResourceInfo> getModelInfos()
public java.lang.String getNewLink()
public CmsUUID getReferenceResourceId()
public java.lang.String getResourceType()
public java.lang.String getSitePath()
public java.util.Collection<java.lang.String> getSkipPaths()
public java.util.List<java.lang.String> getSynchronizations()
public java.util.Map<java.lang.String,java.lang.String> getSyncValues()
public java.lang.String getTitle()
public boolean hasEditorChangeHandlers()
true if any editor change handlers have been configured for this content type.true if any editor change handlers have been configured for this content type.public boolean hasSynchronizedElements()
true if there are locale synchronized elements configuredpublic boolean isAutoUnlock()
public boolean isDeleteOnCancel()
true if the resource needs to removed on cancelpublic boolean isDirectEdit()
public boolean isModelInfo()
true if the definition contains the model file informationspublic boolean isPerformedAutocorrection()
true if auto correction was performedpublic void setDeleteOnCancel(boolean deleteOnCancel)
deleteOnCancel - true if the resource needs to removed on cancelpublic void setDirectEdit(boolean isDirectEdit)
isDirectEdit - the new value for the direct edit flag