Class CmsCntPageData
- java.lang.Object
-
- org.opencms.ade.containerpage.shared.CmsCntPageData
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
public final class CmsCntPageData extends java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable
Convenience class to provide server-side information to the client.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsCntPageData.ElementDeleteMode
The element delte modes.static class
CmsCntPageData.ElementReuseMode
Enum representing the different ways dropping elements on a container page can be handled.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DICT_NAME
Name of the used dictionary.static java.lang.String
JSONKEY_DETAIL_ELEMENT_ID
Key 'detailElementId' for the detail content id.static java.lang.String
JSONKEY_DETAILONLY
Key 'isDetailOnly' used within the JSON representation of a container object.static java.lang.String
JSONKEY_DETAILVIEW
Key 'isDetailView' used within the JSON representation of a container object.static java.lang.String
JSONKEY_ELEMENT_ID
Key 'elementId' for the element id.static java.lang.String
JSONKEY_ELEMENTS
Key 'elements' used within the JSON representation of a container object.static java.lang.String
JSONKEY_ISDETAILVIEWCONTAINER
Key 'isDetailViewContainer' used within the JSON representation of a container object.static java.lang.String
JSONKEY_MAXELEMENTS
Key 'maxElements' used within the JSON representation of a container object.static java.lang.String
JSONKEY_NAME
Key 'name' used within the JSON representation of a container object.static java.lang.String
JSONKEY_PRESETS
JSON key for presets.static java.lang.String
JSONKEY_TYPE
Key 'type' used within the JSON representation of a container object.static java.lang.String
JSONKEY_WIDTH
Key 'width' used within the JSON representation of a container object.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsCntPageData()
Serialization constructor.CmsCntPageData(java.lang.String onlineLink, java.lang.String noEditReason, java.lang.String requestParams, java.lang.String sitemapUri, boolean sitemapManager, CmsUUID detailId, java.lang.String detailContainerPage, CmsUUID detailContainerPageId, java.util.Set<java.lang.String> detailTypes, long lastModified, java.lang.String lockInfo, CmsListInfoBean pageInfo, java.lang.String locale, boolean useClassicEditor, CmsTemplateContextInfo contextInfo, boolean showSmallElementsInitially, java.util.List<CmsElementViewInfo> elementViews, CmsElementViewInfo elementView, CmsCntPageData.ElementReuseMode reuseMode, CmsCntPageData.ElementDeleteMode deleteMode, boolean isModelPage, boolean isModelGroup, java.lang.String modelGroupEmenetId, java.lang.String mainLocale, java.util.Map<java.lang.String,CmsLocaleLinkBean> localeLinkBeans, java.lang.String appTitle, long loadTime)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowSettingsInEditor()
Returns whether editing settings in the content editor is allowed.java.lang.String
getAppTitle()
Gets the title to display in the toolbar.java.lang.String
getBacklinkUri()
Returns the xml-content editor back-link URI.long
getDateLastModified()
Gets the date at which the page was last modified.CmsCntPageData.ElementDeleteMode
getDeleteMode()
Returns the element delete mode.java.lang.String
getDetailContainerPage()
Returns the detail view container resource path.CmsUUID
getDetailContainerPageId()
Gets the structure id of the detail container page (or null if we are not on on a detail page, or there is no detail container page).CmsUUID
getDetailId()
Returns the detail structure id, if available.java.util.Set<java.lang.String>
getDetailTypes()
Gets the set of names of types for which the container page is registered as a detail page.CmsCntPageData.ElementReuseMode
getElementReuseMode()
Gets the element reuse mode.CmsElementViewInfo
getElementView()
Returns the current element view.java.util.List<CmsElementViewInfo>
getElementViews()
Returns the available element views.long
getLoadTime()
Returns the time off page load.java.lang.String
getLocale()
Returns the content locale.java.util.Map<java.lang.String,CmsLocaleLinkBean>
getLocaleLinkBeans()
Gets the locale link beans, with localized language names as keys.java.lang.String
getLockInfo()
Returns the lock information, if the page is locked by another user.java.lang.String
getMainLocale()
Returns the main locale to this page in case it is part of a locale group.java.lang.String
getModelGroupElementId()
Returns the model group base element id.java.lang.String
getNoEditReason()
Returns the no-edit reason.java.lang.String
getOnlineLink()
Returns the online link to the current page.CmsListInfoBean
getPageInfo()
Returns the current page info.java.lang.String
getRequestParams()
Returns the request parameters.CmsContainerPageRpcContext
getRpcContext()
Gets the RPC context.java.lang.String
getSitemapUri()
Returns the sitemap URI.CmsTemplateContextInfo
getTemplateContextInfo()
Gets the template context information.boolean
isEditSmallElementsInitially()
Returns true if small elements should be editable initially.boolean
isModelGroup()
Returns if the page is used for model groups.boolean
isModelPage()
True if the container page is a model page.boolean
isSitemapManager()
Returns if the current user has the sitemap manager role.boolean
isUseClassicEditor()
Returns if the classic XmlContent editor should be used.void
setAllowSettingsInEditor(boolean allowSettingsInEditor)
Sets whether editing settings in the content editor is allowed.void
setRpcContext(CmsContainerPageRpcContext context)
Sets the RPC context.
-
-
-
Field Detail
-
DICT_NAME
public static final java.lang.String DICT_NAME
Name of the used dictionary.- See Also:
- Constant Field Values
-
JSONKEY_DETAIL_ELEMENT_ID
public static final java.lang.String JSONKEY_DETAIL_ELEMENT_ID
Key 'detailElementId' for the detail content id.- See Also:
- Constant Field Values
-
JSONKEY_DETAILONLY
public static final java.lang.String JSONKEY_DETAILONLY
Key 'isDetailOnly' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_DETAILVIEW
public static final java.lang.String JSONKEY_DETAILVIEW
Key 'isDetailView' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_ELEMENT_ID
public static final java.lang.String JSONKEY_ELEMENT_ID
Key 'elementId' for the element id.- See Also:
- Constant Field Values
-
JSONKEY_ELEMENTS
public static final java.lang.String JSONKEY_ELEMENTS
Key 'elements' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_ISDETAILVIEWCONTAINER
public static final java.lang.String JSONKEY_ISDETAILVIEWCONTAINER
Key 'isDetailViewContainer' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_MAXELEMENTS
public static final java.lang.String JSONKEY_MAXELEMENTS
Key 'maxElements' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_NAME
public static final java.lang.String JSONKEY_NAME
Key 'name' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_PRESETS
public static final java.lang.String JSONKEY_PRESETS
JSON key for presets.- See Also:
- Constant Field Values
-
JSONKEY_TYPE
public static final java.lang.String JSONKEY_TYPE
Key 'type' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
JSONKEY_WIDTH
public static final java.lang.String JSONKEY_WIDTH
Key 'width' used within the JSON representation of a container object.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsCntPageData
public CmsCntPageData(java.lang.String onlineLink, java.lang.String noEditReason, java.lang.String requestParams, java.lang.String sitemapUri, boolean sitemapManager, CmsUUID detailId, java.lang.String detailContainerPage, CmsUUID detailContainerPageId, java.util.Set<java.lang.String> detailTypes, long lastModified, java.lang.String lockInfo, CmsListInfoBean pageInfo, java.lang.String locale, boolean useClassicEditor, CmsTemplateContextInfo contextInfo, boolean showSmallElementsInitially, java.util.List<CmsElementViewInfo> elementViews, CmsElementViewInfo elementView, CmsCntPageData.ElementReuseMode reuseMode, CmsCntPageData.ElementDeleteMode deleteMode, boolean isModelPage, boolean isModelGroup, java.lang.String modelGroupEmenetId, java.lang.String mainLocale, java.util.Map<java.lang.String,CmsLocaleLinkBean> localeLinkBeans, java.lang.String appTitle, long loadTime)
Constructor.- Parameters:
onlineLink
- the online link to the current pagenoEditReason
- the reason why the current user is not allowed to edit the current container pagerequestParams
- the original request parameterssitemapUri
- the current sitemap URIsitemapManager
- if the user has the sitemap manager roledetailId
- the detail resource id, if availabledetailContainerPage
- the detail view container resource pathdetailContainerPageId
- the detail view container page structure iddetailTypes
- the set of names of types for which this page is registered as detail pagelastModified
- the last modification date of the pagelockInfo
- lock information, if the page is locked by another userpageInfo
- the current page infolocale
- the content localeuseClassicEditor
-true
to use the classic XmlContent editorcontextInfo
- the template context informationshowSmallElementsInitially
- flag which controls whether small elements should be shown initiallyelementViews
- the element viewselementView
- the current element viewreuseMode
- the element reuse modedeleteMode
- the element delete modeisModelPage
- true if this is a model pageisModelGroup
- true if the page is used for model groupsmodelGroupEmenetId
- the model group base element idmainLocale
- the main locale to this page in case it is part of a locale grouplocaleLinkBeans
- beans for links to other pages in the locale groupappTitle
- the title to display in the toolbarloadTime
- the current time
-
CmsCntPageData
protected CmsCntPageData()
Serialization constructor.
-
-
Method Detail
-
allowSettingsInEditor
public boolean allowSettingsInEditor()
Returns whether editing settings in the content editor is allowed.- Returns:
true
in case editing settings in the content editor is allowed
-
getAppTitle
public java.lang.String getAppTitle()
Gets the title to display in the toolbar.- Returns:
- the title for the toolbar
-
getBacklinkUri
public java.lang.String getBacklinkUri()
Returns the xml-content editor back-link URI.- Returns:
- the back-link URI
-
getDateLastModified
public long getDateLastModified()
Gets the date at which the page was last modified.- Returns:
- the date at which the page was last modified
-
getDeleteMode
public CmsCntPageData.ElementDeleteMode getDeleteMode()
Returns the element delete mode.- Returns:
- the element delete mode
-
getDetailContainerPage
public java.lang.String getDetailContainerPage()
Returns the detail view container resource path.- Returns:
- the detail view container resource path
-
getDetailContainerPageId
public CmsUUID getDetailContainerPageId()
Gets the structure id of the detail container page (or null if we are not on on a detail page, or there is no detail container page).- Returns:
- the structure id of the detail container page
-
getDetailId
public CmsUUID getDetailId()
Returns the detail structure id, if available.- Returns:
- the detail structure id
-
getDetailTypes
public java.util.Set<java.lang.String> getDetailTypes()
Gets the set of names of types for which the container page is registered as a detail page.- Returns:
- the set of names of detail types
-
getElementReuseMode
public CmsCntPageData.ElementReuseMode getElementReuseMode()
Gets the element reuse mode.- Returns:
- the element reuse mode
-
getElementView
public CmsElementViewInfo getElementView()
Returns the current element view.- Returns:
- the current element view
-
getElementViews
public java.util.List<CmsElementViewInfo> getElementViews()
Returns the available element views.- Returns:
- the element views
-
getLoadTime
public long getLoadTime()
Returns the time off page load.- Returns:
- the time stamp
-
getLocale
public java.lang.String getLocale()
Returns the content locale.- Returns:
- the locale
-
getLocaleLinkBeans
public java.util.Map<java.lang.String,CmsLocaleLinkBean> getLocaleLinkBeans()
Gets the locale link beans, with localized language names as keys.The beans represent links to different locale variants of this page.
- Returns:
- the locale link bean map for this
-
getLockInfo
public java.lang.String getLockInfo()
Returns the lock information, if the page is locked by another user.- Returns:
- the lock infomation
-
getMainLocale
public java.lang.String getMainLocale()
Returns the main locale to this page in case it is part of a locale group.- Returns:
- the main locale to this page in case it is part of a locale group
-
getModelGroupElementId
public java.lang.String getModelGroupElementId()
Returns the model group base element id.- Returns:
- the model group base element id
-
getNoEditReason
public java.lang.String getNoEditReason()
Returns the no-edit reason.- Returns:
- the no-edit reason, if empty editing is allowed
-
getOnlineLink
public java.lang.String getOnlineLink()
Returns the online link to the current page.- Returns:
- the online link to the current page
-
getPageInfo
public CmsListInfoBean getPageInfo()
Returns the current page info.- Returns:
- the current page info
-
getRequestParams
public java.lang.String getRequestParams()
Returns the request parameters.- Returns:
- the request parameters
-
getRpcContext
public CmsContainerPageRpcContext getRpcContext()
Gets the RPC context.- Returns:
- the RPC context
-
getSitemapUri
public java.lang.String getSitemapUri()
Returns the sitemap URI.- Returns:
- the sitemap URI
-
getTemplateContextInfo
public CmsTemplateContextInfo getTemplateContextInfo()
Gets the template context information.- Returns:
- the template context information
-
isEditSmallElementsInitially
public boolean isEditSmallElementsInitially()
Returns true if small elements should be editable initially.- Returns:
- true if small elements should be editable initially
-
isModelGroup
public boolean isModelGroup()
Returns if the page is used for model groups.- Returns:
- true if the page is used for model groups
-
isModelPage
public boolean isModelPage()
True if the container page is a model page.- Returns:
- true if this is a model page
-
isSitemapManager
public boolean isSitemapManager()
Returns if the current user has the sitemap manager role.- Returns:
- if the current user has the sitemap manager role
-
isUseClassicEditor
public boolean isUseClassicEditor()
Returns if the classic XmlContent editor should be used.- Returns:
true
if the classic XmlContent editor should be used
-
setAllowSettingsInEditor
public void setAllowSettingsInEditor(boolean allowSettingsInEditor)
Sets whether editing settings in the content editor is allowed.- Parameters:
allowSettingsInEditor
-true
to set editing settings in the content editor is allowed
-
setRpcContext
public void setRpcContext(CmsContainerPageRpcContext context)
Sets the RPC context.- Parameters:
context
- the RPC context
-
-