Class CmsContentDefinition
java.lang.Object
org.opencms.acacia.shared.CmsContentDefinition
org.opencms.ade.contenteditor.shared.CmsContentDefinition
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
Contains all information needed for editing an XMLContent.
-
Field Summary
FieldsFields inherited from class org.opencms.acacia.shared.CmsContentDefinition
FUNCTION_RENDER_FORM, FUNCTION_RENDER_INLINE, NATIVE_RENDERER, PARAM_INIT_CALL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for serialization only.CmsContentDefinition(String entityId, Map<String, CmsEntity> entities, Map<String, CmsAttributeConfiguration> configurations, Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations, Map<String, CmsComplexWidgetData> complexWidgetData, Map<String, CmsType> types, List<CmsTabInfo> tabInfos, String locale, List<String> contentLocales, Map<String, String> availableLocales, List<String> synchronizations, Map<String, String> syncValues, Collection<String> skipPaths, String title, String sitePath, String resourceType, String iconClasses, boolean performedAutocorrection, boolean autoUnlock, Set<String> editorChangeScopes) Constructor.CmsContentDefinition(List<CmsModelResourceInfo> modelInfos, String newLink, CmsUUID referenceId, String locale) Constructor for model file informations object. -
Method Summary
Modifier and TypeMethodDescriptionprotected static CmsEntitycreateDefaultValueEntity(CmsType entityType, Map<String, CmsType> entityTypes, Map<String, CmsAttributeConfiguration> attributeConfigurations) Creates an entity object containing the default values configured for it's type.static CmsUUIDentityIdToUuid(String entityId) Returns the UUID according to the given entity id.Returns the available locales.Gets the complex widget configurations.Returns the content locales.Returns the editor change handler scopes.Returns the external widget configurations.Returns the resource icon classes.static StringgetLocaleFromId(String entityId) Extracts the locale from the entity id.Returns the model file informations.Returns the new link.Returns the reference resource structure id.Returns the resource type.Returns the site path.Returns the paths to skip during locale synchronization.Returns the elements that require a synchronization across all locales.Returns the locale synchronization values.getTitle()Returns the title.static StringgetValueForPath(CmsEntity entity, String path) Returns the value for the given XPath expression.booleanReturnstrueif any editor change handlers have been configured for this content type.booleanReturns if there are locale synchronized elements configured.booleanReturns the value of the acacia-unlock configuration option.booleanReturns if the resource needs to removed on cancel.booleanReturns true if the direct edit flag is set, which means that the editor was opened from the classic direct edit mode.booleanReturns if the model file informations are present, in this case no additional data is contained.booleanReturns if auto correction was performed.booleanChecks if the element should be marked as 'reused' in the editor.voidsetDeleteOnCancel(boolean deleteOnCancel) Sets if the resource needs to removed on cancel.voidsetDirectEdit(boolean isDirectEdit) Sets the value of the direct edit flag.voidsetReusedElement(boolean reused) Enables / disables marking of the element as 'reused' in the content editor.static voidtransferValues(CmsEntity original, CmsEntity target, List<String> transferAttributes, Map<String, CmsType> entityTypes, Map<String, CmsAttributeConfiguration> attributeConfigurations, boolean considerDefaults) Transfers values from the original entity to the given target entity.static StringuuidToEntityId(CmsUUID uuid, String locale) Returns the entity id according to the given UUID.Methods inherited from class org.opencms.acacia.shared.CmsContentDefinition
extractIndex, getConfigurations, getEntities, getEntity, getEntityId, getEntityTypeName, getLocale, getTabInfos, getTypes, hasIndex, isGroupOptionalFields, removeIndex
-
Field Details
-
SETTINGS_TAB_ID
The id of the element settings tab.- See Also:
-
-
Constructor Details
-
CmsContentDefinition
public CmsContentDefinition(List<CmsModelResourceInfo> modelInfos, String newLink, CmsUUID referenceId, String locale) Constructor for model file informations object.- Parameters:
modelInfos- the model file informationsnewLink- the new linkreferenceId- the reference resource structure idlocale- the locale
-
CmsContentDefinition
public CmsContentDefinition(String entityId, Map<String, CmsEntity> entities, Map<String, CmsAttributeConfiguration> configurations, Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations, Map<String, CmsComplexWidgetData> complexWidgetData, Map<String, CmsType> types, List<CmsTabInfo> tabInfos, String locale, List<String> contentLocales, Map<String, String> availableLocales, List<String> synchronizations, Map<String, String> syncValues, Collection<String> skipPaths, String title, String sitePath, String resourceType, String iconClasses, boolean performedAutocorrection, boolean autoUnlock, Set<String> editorChangeScopes) Constructor.- Parameters:
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 scopes
-
CmsContentDefinition
protected CmsContentDefinition()Constructor for serialization only.
-
-
Method Details
-
entityIdToUuid
Returns the UUID according to the given entity id.- Parameters:
entityId- the entity id- Returns:
- the entity id
-
getLocaleFromId
Extracts the locale from the entity id.- Parameters:
entityId- the entity id- Returns:
- the locale
-
uuidToEntityId
Returns the entity id according to the given UUID.- Parameters:
uuid- the UUIDlocale- the content locale- Returns:
- the entity id
-
getAvailableLocales
Returns the available locales.- Returns:
- the available locales
-
getComplexWidgetData
Gets the complex widget configurations.- Returns:
- the complex widget configurations
-
getContentLocales
Returns the content locales.- Returns:
- the content locales
-
getEditorChangeScopes
Returns the editor change handler scopes.- Returns:
- the editor change handler scopes
-
getExternalWidgetConfigurations
Returns the external widget configurations.- Returns:
- the external widget configurations
-
getIconClasses
Returns the resource icon classes.- Returns:
- the resource icon classes
-
getModelInfos
Returns the model file informations.- Returns:
- the model file informations
-
getNewLink
Returns the new link.- Returns:
- the new link
-
getReferenceResourceId
Returns the reference resource structure id.- Returns:
- the reference resource structure id
-
getResourceType
Returns the resource type.- Returns:
- the resource type
-
getSitePath
Returns the site path.- Returns:
- the site path
-
getSkipPaths
Returns the paths to skip during locale synchronization.- Returns:
- the paths to skip during locale synchronization
-
getSynchronizations
Returns the elements that require a synchronization across all locales.- Returns:
- the element paths
-
getSyncValues
Returns the locale synchronization values.- Returns:
- the locale synchronization values
-
getTitle
Returns the title.- Returns:
- the title
-
hasEditorChangeHandlers
Returnstrueif any editor change handlers have been configured for this content type.- Returns:
trueif any editor change handlers have been configured for this content type.
-
hasSynchronizedElements
Returns if there are locale synchronized elements configured.- Returns:
trueif there are locale synchronized elements configured
-
isAutoUnlock
Returns the value of the acacia-unlock configuration option.- Returns:
- the value of the acacia-unlock configuration option
-
isDeleteOnCancel
Returns if the resource needs to removed on cancel.- Returns:
trueif the resource needs to removed on cancel
-
isDirectEdit
Returns true if the direct edit flag is set, which means that the editor was opened from the classic direct edit mode.- Returns:
- true if the direct edit flag is set
-
isModelInfo
Returns if the model file informations are present, in this case no additional data is contained.- Returns:
trueif the definition contains the model file informations
-
isPerformedAutocorrection
Returns if auto correction was performed.- Returns:
trueif auto correction was performed
-
isReusedElement
Checks if the element should be marked as 'reused' in the editor.- Returns:
- true if the element should be marked as 'reused' in the editor
-
setDeleteOnCancel
Sets if the resource needs to removed on cancel.- Parameters:
deleteOnCancel-trueif the resource needs to removed on cancel
-
setDirectEdit
Sets the value of the direct edit flag.- Parameters:
isDirectEdit- the new value for the direct edit flag
-
setReusedElement
Enables / disables marking of the element as 'reused' in the content editor.- Parameters:
reused- true if the element should be shown as 'reused'
-