org.opencms.ade.contenteditor.shared
Class CmsContentDefinition

java.lang.Object
  extended by com.alkacon.acacia.shared.ContentDefinition
      extended by org.opencms.ade.contenteditor.shared.CmsContentDefinition
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class CmsContentDefinition
extends com.alkacon.acacia.shared.ContentDefinition

Contains all information needed for editing an XMLContent.


Constructor Summary
protected CmsContentDefinition()
          Constructor for serialization only.
  CmsContentDefinition(com.alkacon.acacia.shared.Entity entity, java.util.Map<java.lang.String,com.alkacon.acacia.shared.AttributeConfiguration> configurations, java.util.Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations, java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> types, java.util.List<com.alkacon.acacia.shared.TabInfo> tabInfos, java.lang.String locale, java.util.List<java.lang.String> contentLocales, java.util.Map<java.lang.String,java.lang.String> availableLocales, java.lang.String title, java.lang.String sitePath, java.lang.String resourceType, boolean performedAutocorrection)
          Constructor.
  CmsContentDefinition(java.util.List<CmsModelResourceInfo> modelInfos, java.lang.String newLink, CmsUUID referenceId, java.lang.String locale)
          Constructor for model file informations object.
 
Method Summary
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.List<java.lang.String> getContentLocales()
          Returns the content locales.
 java.util.List<CmsExternalWidgetConfiguration> getExternalWidgetConfigurations()
          Returns the external widget configurations.
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.lang.String getTitle()
          Returns the title.
static java.lang.String getValueForPath(com.alkacon.vie.shared.I_Entity entity, java.lang.String path)
          Returns the value for the given XPath expression.
 boolean isDeleteOnCancel()
          Returns if the resource needs to removed on cancel.
 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.
static java.lang.String uuidToEntityId(CmsUUID uuid, java.lang.String locale)
          Returns the entity id according to the given UUID.
 
Methods inherited from class com.alkacon.acacia.shared.ContentDefinition
extractIndex, getConfigurations, getEntity, getEntityId, getEntityTypeName, getLocale, getTabInfos, getTypes, removeIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsContentDefinition

public CmsContentDefinition(com.alkacon.acacia.shared.Entity entity,
                            java.util.Map<java.lang.String,com.alkacon.acacia.shared.AttributeConfiguration> configurations,
                            java.util.Collection<CmsExternalWidgetConfiguration> externalWidgetConfigurations,
                            java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> types,
                            java.util.List<com.alkacon.acacia.shared.TabInfo> tabInfos,
                            java.lang.String locale,
                            java.util.List<java.lang.String> contentLocales,
                            java.util.Map<java.lang.String,java.lang.String> availableLocales,
                            java.lang.String title,
                            java.lang.String sitePath,
                            java.lang.String resourceType,
                            boolean performedAutocorrection)
Constructor.

Parameters:
entity - the entity
configurations - the attribute configurations
externalWidgetConfigurations - the external widget configurations
types - the types
tabInfos - the tab information
locale - the content locale
contentLocales - the content locales
availableLocales - the available locales
title - the content title
sitePath - the site path
resourceType - the resource type name
performedAutocorrection - flag indicating the current content has an invalid XML structure and was auto corrected

CmsContentDefinition

public CmsContentDefinition(java.util.List<CmsModelResourceInfo> modelInfos,
                            java.lang.String newLink,
                            CmsUUID referenceId,
                            java.lang.String locale)
Constructor for model file informations object.

Parameters:
modelInfos - the model file informations
newLink - the new link
referenceId - the reference resource structure id
locale - the locale

CmsContentDefinition

protected CmsContentDefinition()
Constructor for serialization only.

Method Detail

entityIdToUuid

public static CmsUUID entityIdToUuid(java.lang.String entityId)
Returns the UUID according to the given entity id.

Parameters:
entityId - the entity id
Returns:
the entity id

getLocaleFromId

public static java.lang.String getLocaleFromId(java.lang.String entityId)
Extracts the locale from the entity id.

Parameters:
entityId - the entity id
Returns:
the locale

getValueForPath

public static java.lang.String getValueForPath(com.alkacon.vie.shared.I_Entity entity,
                                               java.lang.String path)
Returns the value for the given XPath expression.

Parameters:
entity - the entity
path - the path
Returns:
the value

uuidToEntityId

public static java.lang.String uuidToEntityId(CmsUUID uuid,
                                              java.lang.String locale)
Returns the entity id according to the given UUID.

Parameters:
uuid - the UUID
locale - the content locale
Returns:
the entity id

getAvailableLocales

public java.util.Map<java.lang.String,java.lang.String> getAvailableLocales()
Returns the available locales.

Returns:
the available locales

getContentLocales

public java.util.List<java.lang.String> getContentLocales()
Returns the content locales.

Returns:
the content locales

getExternalWidgetConfigurations

public java.util.List<CmsExternalWidgetConfiguration> getExternalWidgetConfigurations()
Returns the external widget configurations.

Returns:
the external widget configurations

getModelInfos

public java.util.List<CmsModelResourceInfo> getModelInfos()
Returns the model file informations.

Returns:
the model file informations

getNewLink

public java.lang.String getNewLink()
Returns the new link.

Returns:
the new link

getReferenceResourceId

public CmsUUID getReferenceResourceId()
Returns the reference resource structure id.

Returns:
the reference resource structure id

getResourceType

public java.lang.String getResourceType()
Returns the resource type.

Returns:
the resource type

getSitePath

public java.lang.String getSitePath()
Returns the site path.

Returns:
the site path

getTitle

public java.lang.String getTitle()
Returns the title.

Returns:
the title

isDeleteOnCancel

public boolean isDeleteOnCancel()
Returns if the resource needs to removed on cancel.

Returns:
true if the resource needs to removed on cancel

isModelInfo

public boolean isModelInfo()
Returns if the model file informations are present, in this case no additional data is contained.

Returns:
true if the definition contains the model file informations

isPerformedAutocorrection

public boolean isPerformedAutocorrection()
Returns if auto correction was performed.

Returns:
true if auto correction was performed

setDeleteOnCancel

public void setDeleteOnCancel(boolean deleteOnCancel)
Sets if the resource needs to removed on cancel.

Parameters:
deleteOnCancel - true if the resource needs to removed on cancel