Package org.opencms.gwt.shared
Class CmsCoreData
- java.lang.Object
-
- org.opencms.gwt.shared.CmsCoreData
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
public class CmsCoreData extends java.lang.Object implements com.google.gwt.user.client.rpc.IsSerializable
Runtime data bean for prefetching.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsCoreData.AdeContext
A enumeration for the ADE context.static class
CmsCoreData.ModuleKey
The available client modules.static class
CmsCoreData.UserInfo
Bean class containing info about the current user.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DICT_NAME
Name of the used js variable.static java.lang.String
KEY_GWT_BUILDID
The key for the GWT build id property.protected long
m_serverTime
The time sent from the server when loading the data.protected CmsCoreData.UserInfo
m_userInfo
A bean with information about the current user.static java.lang.String
META_PARAM_MODULE_KEY
The meta element name to the requested module key.static java.lang.String
PARAM_PATH
The parameter name for path.static java.lang.String
PARAM_RETURNCODE
The parameter name for the return code.
-
Constructor Summary
Constructors Constructor Description CmsCoreData()
Constructor.CmsCoreData(java.lang.String contentEditorUrl, java.lang.String contentEditorBacklinkUrl, java.lang.String loginUrl, java.lang.String vfsPrefix, java.lang.String fileExplorerLink, java.lang.String workplaceResourcesPrefix, java.lang.String embeddedDialogsUrl, java.lang.String siteRoot, java.lang.String sharedFolder, CmsUUID projectId, java.lang.String locale, java.lang.String wpLocale, java.lang.String uri, java.lang.String navigationUri, CmsUUID structureId, java.util.Map<java.lang.String,java.lang.String> extensionMapping, java.util.Map<java.lang.String,java.lang.String> iconMapping, long serverTime, boolean isShowEditorHelp, boolean toolbarVisible, java.lang.String defaultWorkplaceLink, java.lang.String aboutLink, CmsCoreData.UserInfo userInfo, long uploadFileSizeLimit, boolean isKeepAlive, boolean uploadDisabled, java.util.Map<java.lang.String,java.lang.String> adeParameters, CmsUploadRestrictionInfo uploadRestriction, java.lang.String categoryBaseFolder, boolean hideDisabledGalleryTypes)
Constructor.CmsCoreData(CmsCoreData clone)
Clone constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAboutLink()
Gets the "About" link.java.util.Map<java.lang.String,java.lang.String>
getAdeParameters()
Gets the map of ADE configuration parameters.java.lang.String
getCategoryBaseFolder()
Gets the category folder name.java.lang.String
getContentEditorBacklinkUrl()
Returns the XML content editor back-link URL.java.lang.String
getContentEditorUrl()
Returns the XML content editor URL.java.lang.String
getDefaultWorkplaceLink()
Gets the default link to use for opening the workplace.java.lang.String
getEmbeddedDialogsUrl()
Returns the embeddedDialogsUrl.java.util.Map<java.lang.String,java.lang.String>
getExtensionMapping()
Returns the extensionMapping.protected java.lang.String
getFileExplorerLink()
Returns the file explorer link prefix.java.util.Map<java.lang.String,java.lang.String>
getIconMapping()
Returns the resource icon mapping.java.lang.String
getLocale()
Returns the current request locale.java.lang.String
getLoginURL()
Returns the login URL.java.lang.String
getNavigationUri()
Returns the current navigation (sitemap) URI.CmsUUID
getProjectId()
Gets the project id.long
getServerTime()
Returns the time of the server when the data was loaded.java.lang.String
getSharedFolder()
Gets the shared folder.java.lang.String
getSiteRoot()
Returns the current site root.CmsUUID
getStructureId()
Gets the structure id of the current resource.CmsTinyMCEData
getTinymce()
Gets the data for the TinyMCE editor.long
getUploadFileSizeLimit()
Returns the file upload size limit.CmsUploadRestrictionInfo
getUploadRestriction()
Gets the upload restriction data.java.lang.String
getUri()
Returns the current uri.CmsCoreData.UserInfo
getUserInfo()
Gets the information about the current user.java.lang.String
getVfsPrefix()
Returns the OpenCms VFS prefix.java.lang.String
getWorkplaceResourcesPrefix()
Returns the workplace resources path prefix.java.lang.String
getWpLanguage()
Gets the language part of the workplace locale.java.lang.String
getWpLocale()
Returns the current workplace locale.boolean
isHideDisabledGalleryTypes()
Returns true if deactivated types should be hidden in the gallery dialog.boolean
isKeepAlive()
Returns true if the session should be kept alive even without user actions.boolean
isShowEditorHelp()
Returns the show editor help flag.boolean
isToolbarVisible()
Returns true if the toolbar should be visible initially.boolean
isUploadDisabled()
Checks if uploads are disabled.protected void
setShowEditorHelp(boolean show)
Sets the show editor help flag.void
setTinymce(CmsTinyMCEData tinyMceData)
Sets the data for the TinyMCE editor.
-
-
-
Field Detail
-
DICT_NAME
public static final java.lang.String DICT_NAME
Name of the used js variable.- See Also:
- Constant Field Values
-
KEY_GWT_BUILDID
public static final java.lang.String KEY_GWT_BUILDID
The key for the GWT build id property.- See Also:
- Constant Field Values
-
META_PARAM_MODULE_KEY
public static final java.lang.String META_PARAM_MODULE_KEY
The meta element name to the requested module key.- See Also:
- Constant Field Values
-
PARAM_PATH
public static final java.lang.String PARAM_PATH
The parameter name for path.- See Also:
- Constant Field Values
-
PARAM_RETURNCODE
public static final java.lang.String PARAM_RETURNCODE
The parameter name for the return code.- See Also:
- Constant Field Values
-
m_serverTime
protected long m_serverTime
The time sent from the server when loading the data.
-
m_userInfo
protected CmsCoreData.UserInfo m_userInfo
A bean with information about the current user.
-
-
Constructor Detail
-
CmsCoreData
public CmsCoreData()
Constructor.
-
CmsCoreData
public CmsCoreData(CmsCoreData clone)
Clone constructor.- Parameters:
clone
- the instance to clone
-
CmsCoreData
public CmsCoreData(java.lang.String contentEditorUrl, java.lang.String contentEditorBacklinkUrl, java.lang.String loginUrl, java.lang.String vfsPrefix, java.lang.String fileExplorerLink, java.lang.String workplaceResourcesPrefix, java.lang.String embeddedDialogsUrl, java.lang.String siteRoot, java.lang.String sharedFolder, CmsUUID projectId, java.lang.String locale, java.lang.String wpLocale, java.lang.String uri, java.lang.String navigationUri, CmsUUID structureId, java.util.Map<java.lang.String,java.lang.String> extensionMapping, java.util.Map<java.lang.String,java.lang.String> iconMapping, long serverTime, boolean isShowEditorHelp, boolean toolbarVisible, java.lang.String defaultWorkplaceLink, java.lang.String aboutLink, CmsCoreData.UserInfo userInfo, long uploadFileSizeLimit, boolean isKeepAlive, boolean uploadDisabled, java.util.Map<java.lang.String,java.lang.String> adeParameters, CmsUploadRestrictionInfo uploadRestriction, java.lang.String categoryBaseFolder, boolean hideDisabledGalleryTypes)
Constructor.- Parameters:
contentEditorUrl
- the XML content editor URLcontentEditorBacklinkUrl
- the XML content editor back-link URLloginUrl
- the login JSP URLvfsPrefix
- the OpenCms VFS prefixfileExplorerLink
- the file explorer linkworkplaceResourcesPrefix
- the workplace resources path prefixembeddedDialogsUrl
- the embedded dialogs URLsiteRoot
- the current site rootsharedFolder
- the shared folderprojectId
- the project idlocale
- the current request localewpLocale
- the workplace localeuri
- the current uristructureId
- the structure id of tbe resourcenavigationUri
- the current navigation URIextensionMapping
- the mappings of file extensions to resource typesiconMapping
- the resource icon mappingserverTime
- the current timeisShowEditorHelp
- the show editor help flagtoolbarVisible
- a flag to indicate whether the toolbar should be visible initiallydefaultWorkplaceLink
- the default link to use for opening the workplaceaboutLink
- the link to the "About" pageuserInfo
- information about the current useruploadFileSizeLimit
- the file upload size limitisKeepAlive
- the keep-alive modeuploadDisabled
- true if upload buttons should be disabledadeParameters
- the map of ADE configuration parametersuploadRestriction
- the upload restriction datacategoryBaseFolder
- the category base folderhideDisabledGalleryTypes
- true if deactivated types should be hidden in the gallery dialog
-
-
Method Detail
-
getAboutLink
public java.lang.String getAboutLink()
Gets the "About" link.- Returns:
- the "about" link
-
getAdeParameters
public java.util.Map<java.lang.String,java.lang.String> getAdeParameters()
Gets the map of ADE configuration parameters.- Returns:
- the ADE configuration parameters
-
getCategoryBaseFolder
public java.lang.String getCategoryBaseFolder()
Gets the category folder name.- Returns:
- the category folder name
-
getContentEditorBacklinkUrl
public java.lang.String getContentEditorBacklinkUrl()
Returns the XML content editor back-link URL.- Returns:
- the XML content editor back-link URL
-
getContentEditorUrl
public java.lang.String getContentEditorUrl()
Returns the XML content editor URL.- Returns:
- the XML content editor URL
-
getDefaultWorkplaceLink
public java.lang.String getDefaultWorkplaceLink()
Gets the default link to use for opening the workplace.- Returns:
- the default workplace link
-
getEmbeddedDialogsUrl
public java.lang.String getEmbeddedDialogsUrl()
Returns the embeddedDialogsUrl.- Returns:
- the embeddedDialogsUrl
-
getExtensionMapping
public java.util.Map<java.lang.String,java.lang.String> getExtensionMapping()
Returns the extensionMapping.- Returns:
- the extensionMapping
-
getIconMapping
public java.util.Map<java.lang.String,java.lang.String> getIconMapping()
Returns the resource icon mapping.- Returns:
- the resource icon mapping
-
getLocale
public java.lang.String getLocale()
Returns the current request locale.- Returns:
- the current request locale
-
getLoginURL
public java.lang.String getLoginURL()
Returns the login URL.- Returns:
- the login URL
-
getNavigationUri
public java.lang.String getNavigationUri()
Returns the current navigation (sitemap) URI.- Returns:
- the current navigation URI
-
getProjectId
public CmsUUID getProjectId()
Gets the project id.- Returns:
- the project id
-
getServerTime
public long getServerTime()
Returns the time of the server when the data was loaded.- Returns:
- the time of the server when the data was loaded
-
getSharedFolder
public java.lang.String getSharedFolder()
Gets the shared folder.- Returns:
- the shared folder
-
getSiteRoot
public java.lang.String getSiteRoot()
Returns the current site root.- Returns:
- the current site root
-
getStructureId
public CmsUUID getStructureId()
Gets the structure id of the current resource.- Returns:
- the structure id of the current resource
-
getTinymce
public CmsTinyMCEData getTinymce()
Gets the data for the TinyMCE editor.- Returns:
- the data for TinyMCE
-
getUploadFileSizeLimit
public long getUploadFileSizeLimit()
Returns the file upload size limit.- Returns:
- the file upload size limit
-
getUploadRestriction
public CmsUploadRestrictionInfo getUploadRestriction()
Gets the upload restriction data.- Returns:
- the upload restriction data
-
getUri
public java.lang.String getUri()
Returns the current uri.- Returns:
- the current uri
-
getUserInfo
public CmsCoreData.UserInfo getUserInfo()
Gets the information about the current user.- Returns:
- the information about the current user
-
getVfsPrefix
public java.lang.String getVfsPrefix()
Returns the OpenCms VFS prefix.- Returns:
- the OpenCms VFS prefix
-
getWorkplaceResourcesPrefix
public java.lang.String getWorkplaceResourcesPrefix()
Returns the workplace resources path prefix.- Returns:
- the workplace resources path prefix
-
getWpLanguage
public java.lang.String getWpLanguage()
Gets the language part of the workplace locale.- Returns:
- the language part of the workplace locale
-
getWpLocale
public java.lang.String getWpLocale()
Returns the current workplace locale.- Returns:
- the current workplace locale
-
isHideDisabledGalleryTypes
public boolean isHideDisabledGalleryTypes()
Returns true if deactivated types should be hidden in the gallery dialog.- Returns:
- true if deactivated types should be hidden
-
isKeepAlive
public boolean isKeepAlive()
Returns true if the session should be kept alive even without user actions.- Returns:
- true if keep-alive mode is active
-
isShowEditorHelp
public boolean isShowEditorHelp()
Returns the show editor help flag.- Returns:
- the show editor help flag
-
isToolbarVisible
public boolean isToolbarVisible()
Returns true if the toolbar should be visible initially.- Returns:
- true if the toolbar should be visible initially
-
isUploadDisabled
public boolean isUploadDisabled()
Checks if uploads are disabled.- Returns:
- true if uploads are disabled
-
setTinymce
public void setTinymce(CmsTinyMCEData tinyMceData)
Sets the data for the TinyMCE editor.- Parameters:
tinyMceData
- the data for TinyMCE
-
getFileExplorerLink
protected java.lang.String getFileExplorerLink()
Returns the file explorer link prefix. Append resource site path for complete link.- Returns:
- the file explorer link prefix
-
setShowEditorHelp
protected void setShowEditorHelp(boolean show)
Sets the show editor help flag.- Parameters:
show
-true
to show editor help
-
-