Class CmsWorkplaceManager
- All Implemented Interfaces:
I_CmsLocaleHandler
,I_CmsEventListener
This class reads the settings from the "opencms.properties" and stores them in member variables. For each setting one or more get methods are provided.
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default encoding for the workplace (UTF-8).static final String
The workplace localization manifest attribute name.static final String
The manifest file resource name.static final String
The id of the "requestedResource" parameter for the OpenCms login form.static final String
Key name for the session workplace settings.Fields inherited from interface org.opencms.main.I_CmsEventListener
EVENT_BEFORE_PUBLISH_PROJECT, EVENT_CLEAR_CACHES, EVENT_CLEAR_OFFLINE_CACHES, EVENT_CLEAR_ONLINE_CACHES, EVENT_CLEAR_PRINCIPAL_CACHES, EVENT_FLEX_CACHE_CLEAR, EVENT_FLEX_PURGE_JSP_REPOSITORY, EVENT_FULLSTATIC_EXPORT, EVENT_GROUP_MODIFIED, EVENT_LOGIN_USER, EVENT_OU_MODIFIED, EVENT_PROJECT_MODIFIED, EVENT_PROPERTY_DEFINITION_CREATED, EVENT_PROPERTY_DEFINITION_MODIFIED, EVENT_PROPERTY_MODIFIED, EVENT_PUBLISH_PROJECT, EVENT_REBUILD_SEARCHINDEXES, EVENT_REINDEX_OFFLINE, EVENT_REINDEX_ONLINE, EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, EVENT_RESOURCE_COPIED, EVENT_RESOURCE_CREATED, EVENT_RESOURCE_DELETED, EVENT_RESOURCE_MODIFIED, EVENT_RESOURCE_MOVED, EVENT_RESOURCES_AND_PROPERTIES_MODIFIED, EVENT_RESOURCES_MODIFIED, EVENT_SITEMAP_CHANGED, EVENT_UPDATE_EXPORTS, EVENT_USER_MODIFIED, KEY_CHANGE, KEY_DBCONTEXT, KEY_GROUP_ID, KEY_GROUP_NAME, KEY_INDEX_NAMES, KEY_IS_ONLINE, KEY_OU_ID, KEY_OU_NAME, KEY_PROJECTID, KEY_PUBLISHID, KEY_PUBLISHLIST, KEY_REINDEX_RELATED, KEY_REPORT, KEY_RESOURCE, KEY_RESOURCES, KEY_SKIPINDEX, KEY_USER_ACTION, KEY_USER_CHANGES, KEY_USER_ID, KEY_USER_NAME, LISTENERS_FOR_ALL_EVENTS, VALUE_CREATE_SIBLING, VALUE_GROUP_MODIFIED_ACTION_CREATE, VALUE_GROUP_MODIFIED_ACTION_DELETE, VALUE_GROUP_MODIFIED_ACTION_WRITE, VALUE_OU_MODIFIED_ACTION_CREATE, VALUE_OU_MODIFIED_ACTION_DELETE, VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP, VALUE_USER_MODIFIED_ACTION_CREATE_USER, VALUE_USER_MODIFIED_ACTION_DELETE_USER, VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP, VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD, VALUE_USER_MODIFIED_ACTION_SET_OU, VALUE_USER_MODIFIED_ACTION_WRITE_USER
-
Constructor Summary
ConstructorDescriptionCreates a new instance for the workplace manager, will be called by the workplace configuration manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccountInfo
(String field, String addInfoKey, String editable) Adds an account info.void
addAccountInfo
(CmsAccountInfo info) Adds an account info.void
Adds a dialog handler instance to the list of configured dialog handlers.void
addEditorCssHandler
(String editorCssHandlerClassName) Adds an editor CSS handler class to the list of handlers.void
addEditorCssHandlerToHead
(String editorCssHandlerClassName) Adds an editor CSS handler class at the first position of the list of handlers.void
Adds an explorer type setting object to the list of type settings.void
addExplorerTypeSettings
(CmsModule module) Adds the list of explorer type settings from the given module.void
addExportPoint
(String uri, String destination) Adds newly created export point to the workplace configuration.void
addLabeledFolder
(String uri) Adds a folder to the list of labeled folders.void
addLocalizedFolder
(String uri) Adds a new folder to the list of localized workplace folders.void
addPreEditorConditionDefinition
(String resourceTypeName, String preEditorConditionDefinitionClassName) Adds a condition definition class for a given resource type name that is triggered before opening the editor.void
addPreEditorConditionDefinition
(I_CmsPreEditorActionDefinition preEditorCondition) Adds an initialized condition definition class that is triggered before opening the editor.void
addSynchronizeExcludePattern
(String pattern) Adds a pattern to be excluded in VFS synchronization.boolean
Returns if the autolock resources feature is enabled.void
Checks if the user in the given context has permissions for uploading.void
checkWorkplaceRequest
(javax.servlet.http.HttpServletRequest request, CmsObject cms) Checks whether the workplace is accessed through the workplace server, and sends an error message otherwise.void
Implements the event listener of this class.createTempFile
(CmsObject cms, String resourceName, CmsUUID currentProjectId) Creates a temporary file which is needed while working in an editor with preview option.void
Flushes the cached workplace messages.Gets the value of the acacia-unlock configuration option (null if not set explicitly).Returns the account infos.Gets the additional log folder configuration.Returns the name of the local category folder(s).Returns the configured account infos.Gets the access object of the type settings.Returns the Workplace default locale.getDefaultNamePattern
(String type) Gets the default name pattern for the given type.Returns the Workplace default user settings.Returns all instantiated dialog handlers for the workplace.getDialogHandler
(String key) Returns the instantiated dialog handler class for the key or null, if there is no mapping for the key.Returns a new instance of the configured direct edit provider.Returns the instantiated editor action handler class.Returns the instantiated editor CSS handler classes.Returns the instantiated editor display option class.Returns the instantiated editor handler class.Returns the element delete mode.Returns the configured workplace encoding.getExplorerTypeSetting
(String type) Returns the explorer type settings for the specified resource type.Returns the list of explorer type settings.getExplorerTypesForView
(String viewName) Gets the explorer types for the given view name.Gets the element views generated from explorer types.Returns the set of configured export points for the workplace.long
Returns the value (in bytes) for the maximum file upload size of the current user.int
Returns the value (in kb) for the maximum file upload size.Returns the system-wide file view settings for the workplace.Returns a collection of all available galleries.Returns the gallery default scope.Gets the configured gallery default scope as a string.Returns the object used for translating group names.Returns the configured class name for translating group names.getI18nInfo
(javax.servlet.http.HttpServletRequest req, CmsUser user, CmsProject project, String resource) Returns the i18n information to use in the request context.Returns a list of site folders which generate labeled links.Returns the list of available workplace locales, sorted ascending.Returns the configured list of localized workplace folders.getMessages
(Locale locale) Returns theCmsWorkplaceMessages
for the given locale.Returns the post upload handler.getPreEditorConditionDefinition
(I_CmsResourceType resourceType) Returns the condition definition for the given resource type that is triggered before opening the editor.Returns the condition definitions for the different resource types which are triggered before opening the editor.Returns the repository folder handler.Gets the name of the role necessary for editing the sitemap configuration.Returns Regex patterns that should be excluded from synchronization.Returns the id of the temporary file project required by the editors.Returns the tool manager.getUploadHook
(CmsObject cms, String uploadFolder) Gets the upload hook URI which should be opened for an upload to a given folder.Gets the upload restriction.Returns the user additional information configuration Manager.Returns the user list mode as a string.getViews()
Returns the map of configured workplace views.Gets the configured virus scanner (may be null).Returns the instantiated workplace editor manager class.Returns the list of explorer type settings configured in the opencms-workplace.xml file.Returns the workplace locale from the current user's settings.getWorkplaceLocale
(CmsRequestContext requestContext) Gets the workplace locale for the given request context.getWorkplaceLocale
(CmsUser user) Returns the workplace locale for the user.void
initHandler
(CmsObject cms) Will be called during system startup.void
initialize
(CmsObject cms) Initializes the workplace manager with the OpenCms system configuration.boolean
Returns true if gallery upload is disabled for the user in the given context.boolean
Checks if element authors have special permission to work in galleries (upload/replace).boolean
Returns the default property editing mode on resources.boolean
Returns a flag, indicating if the categories should be displayed separated by repository in the category selection dialog.boolean
Returns a flag, indicating if the category selection dialog should have all entries completely collapsed when opened.boolean
Returns if tabs in the advanced property dialog are enabled.boolean
Returns true if "keep alive" mode is active.isKeepAlive
(boolean useDefault) Returns true if the session should be kept alive.boolean
Checks if the virus scanner is enabled.static boolean
isWorkplaceUser
(javax.servlet.http.HttpServletRequest req) Returns true if the provided request was done by a Workplace user.boolean
Returns if XML content is automatically corrected when opened with the editor.boolean
Returns if lazy user lists are enabled.void
removeExplorerTypeSettings
(CmsModule module) Removes the list of explorer type settings from the given module.void
setAcaciaUnlock
(String value) Sets the value of the acacia-unlock configuration option.void
Sets the additional log folder configuration.void
setAllowElementAuthorToWorkInGalleries
(boolean allowElementAuthorToWorkInGalleries) Enables/disables special permissions for element authors to work with galleries (upload/replace).void
setAutoLock
(String value) Sets if the autolock resources feature is enabled.void
setCategoryDisplayOptions
(String displayCategoriesByRepository, String displayCategorySelectionCollapsed) Sets the category display options that affect how the category selection dialog is shown.void
setCategoryFolder
(String categoryFolder) Sets the name of the local category folder(s).void
Sets the access object of the type settings.void
setDefaultLocale
(String locale) Sets the Workplace default locale.void
setDefaultPropertiesOnStructure
(String defaultPropertiesOnStructure) Sets the default property editing mode on resources.void
setDefaultUserSettings
(CmsDefaultUserSettings defaultUserSettings) Sets the Workplace default user settings.void
Sets the direct edit provider.void
Sets the editor action class.void
Sets the editor display option class.void
Sets the editor handler class.void
setElementDeleteMode
(String deleteMode) Sets the element delete mode.void
setEnableAdvancedPropertyTabs
(String enableAdvancedPropertyTabs) Sets if tabs in the advanced property dialog are enabled.void
setFileMaxUploadSize
(String value) Sets the value (in kb) for the maximum file upload size.void
setFileViewSettings
(CmsObject cms, CmsRfsFileViewer fileViewSettings) Sets the system-wide file view settings for the workplace.void
setGalleryDefaultScope
(String galleryDefaultScope) Sets the gallery default scope.void
setGroupTranslationClass
(String translationClassName) Sets the group translation class name.void
setKeepAlive
(String keepAlive) Sets the "keep alive" mode.void
setPostUploadHandler
(I_CmsPostUploadDialogHandler uploadHandler) Sets the post upload dialog handler.void
Sets the repository folder handler.void
setSitemapConfigEditRole
(String roleName) Sets the name of the role necessary for editing the sitemap configuration.void
setToolManager
(CmsToolManager toolManager) Sets the tool Manager object.void
setUploadRestriction
(I_CmsUploadRestriction uploadRestriction) Sets the upload restriciton.void
setUserInfoManager
(CmsWorkplaceUserInfoManager userInfoManager) Sets the user additional information configuration manager.void
setUserListMode
(String mode) Sets the user list mode.void
setUserManagementEnabled
(String value) Controls if the user/group icon in the administration view should be shown.void
setVirusScanner
(I_CmsVirusScanner virusScanner) Sets the virus scanner.void
setVirusScannerEnabled
(boolean enabled) Sets the virus scanner to enabled/disabled.void
setXmlContentAutoCorrect
(String xmlContentAutoCorrect) Sets the auto correction of XML contents when they are opened with the editor.boolean
Returns true if the Acacia editor in standalone mode should automatically unlock resources.boolean
Returns if the user/group icon in the administration view should be shown.boolean
Returns true if lazy user lists should be used.translateGroupName
(String groupName, boolean keepOu) Translates a group name using the configuredI_CmsGroupNameTranslation
.
-
Field Details
-
DEFAULT_WORKPLACE_ENCODING
The default encoding for the workplace (UTF-8).- See Also:
-
LOCALIZATION_ATTRIBUTE_NAME
The workplace localization manifest attribute name.- See Also:
-
MANIFEST_RESOURCE_NAME
The manifest file resource name.- See Also:
-
PARAM_LOGIN_REQUESTED_RESOURCE
The id of the "requestedResource" parameter for the OpenCms login form.- See Also:
-
SESSION_WORKPLACE_SETTINGS
Key name for the session workplace settings.- See Also:
-
-
Constructor Details
-
CmsWorkplaceManager
public CmsWorkplaceManager()Creates a new instance for the workplace manager, will be called by the workplace configuration manager.
-
-
Method Details
-
isWorkplaceUser
Returns true if the provided request was done by a Workplace user.- Parameters:
req
- the request to check- Returns:
- true if the provided request was done by a Workplace user
-
addAccountInfo
Adds an account info.- Parameters:
info
- the account info to add
-
addAccountInfo
Adds an account info.- Parameters:
field
- the fieldaddInfoKey
- the additional info keyeditable
- the editable flag
-
addDialogHandler
Adds a dialog handler instance to the list of configured dialog handlers.- Parameters:
clazz
- the instantiated dialog handler to add
-
addEditorCssHandler
Adds an editor CSS handler class to the list of handlers.- Parameters:
editorCssHandlerClassName
- full class name of the css handler class
-
addEditorCssHandlerToHead
Adds an editor CSS handler class at the first position of the list of handlers.- Parameters:
editorCssHandlerClassName
- full class name of the css handler class
-
addExplorerTypeSetting
Adds an explorer type setting object to the list of type settings.- Parameters:
settings
- the explorer type settings
-
addExplorerTypeSettings
Adds the list of explorer type settings from the given module.- Parameters:
module
- the module witch contains the explorer type settings to add
-
addExportPoint
Adds newly created export point to the workplace configuration.- Parameters:
uri
- the export point uridestination
- the export point destination
-
addLabeledFolder
Adds a folder to the list of labeled folders.- Parameters:
uri
- the folder uri to add
-
addLocalizedFolder
Adds a new folder to the list of localized workplace folders.- Parameters:
uri
- a new folder to add to the list of localized workplace folders
-
addPreEditorConditionDefinition
Adds an initialized condition definition class that is triggered before opening the editor.- Parameters:
preEditorCondition
- the initialized condition definition class
-
addPreEditorConditionDefinition
public void addPreEditorConditionDefinition(String resourceTypeName, String preEditorConditionDefinitionClassName) Adds a condition definition class for a given resource type name that is triggered before opening the editor.- Parameters:
resourceTypeName
- the name of the resource typepreEditorConditionDefinitionClassName
- full class name of the condition definition class
-
addSynchronizeExcludePattern
Adds a pattern to be excluded in VFS synchronization.- Parameters:
pattern
- a java regex to applied on the file name
-
autoLockResources
Returns if the autolock resources feature is enabled.- Returns:
- true if the autolock resources feature is enabled, otherwise false
-
checkAdeGalleryUpload
Checks if the user in the given context has permissions for uploading.- Parameters:
cms
- a CMS context- Throws:
CmsSecurityException
- if the user doesn't have permission
-
checkWorkplaceRequest
Checks whether the workplace is accessed through the workplace server, and sends an error message otherwise.- Parameters:
request
- the request to checkcms
- the CmsObject to use
-
cmsEvent
Implements the event listener of this class.- Specified by:
cmsEvent
in interfaceI_CmsEventListener
- Parameters:
event
- CmsEvent that has occurred- See Also:
-
createTempFile
public String createTempFile(CmsObject cms, String resourceName, CmsUUID currentProjectId) throws CmsException Creates a temporary file which is needed while working in an editor with preview option.Note: This method is synchronized to avoid rare issues that might be caused by double requests fired by some browser/OS combinations.
- Parameters:
cms
- the cms contextresourceName
- the name of the resource to copycurrentProjectId
- the id of the project to work with- Returns:
- the file name of the temporary file
- Throws:
CmsException
- if something goes wrong
-
flushMessageCache
Flushes the cached workplace messages. -
getAcaciaUnlock
Gets the value of the acacia-unlock configuration option (null if not set explicitly).- Returns:
- the value of the acacia-unlock configuration option
-
getAccountInfos
Returns the account infos.- Returns:
- the account infos
-
getAdditionalLogFolderConfiguration
Gets the additional log folder configuration.- Returns:
- the additional log folder configuration
-
getCategoryFolder
Returns the name of the local category folder(s).- Returns:
- the name of the local category folder(s)
-
getConfiguredAccountInfos
Returns the configured account infos.- Returns:
- the configured account infos
-
getDefaultAccess
Gets the access object of the type settings.- Returns:
- access object of the type settings
-
getDefaultLocale
Returns the Workplace default locale.- Returns:
- the Workplace default locale
-
getDefaultNamePattern
Gets the default name pattern for the given type.- Parameters:
type
- the type name- Returns:
- the default name pattern for the type
-
getDefaultUserSettings
Returns the Workplace default user settings.- Returns:
- the Workplace default user settings
-
getDialogHandler
Returns all instantiated dialog handlers for the workplace.- Returns:
- all instantiated dialog handlers for the workplace
-
getDialogHandler
Returns the instantiated dialog handler class for the key or null, if there is no mapping for the key.- Parameters:
key
- the key whose associated value is to be returned- Returns:
- the instantiated dialog handler class for the key
-
getDirectEditProvider
Returns a new instance of the configured direct edit provider.- Returns:
- a new instance of the configured direct edit provider
-
getEditorActionHandler
Returns the instantiated editor action handler class.- Returns:
- the instantiated editor action handler class
-
getEditorCssHandlers
Returns the instantiated editor CSS handler classes.- Returns:
- the instantiated editor CSS handler classes
-
getEditorDisplayOptions
Returns the instantiated editor display option class.- Returns:
- the instantiated editor display option class
-
getEditorHandler
Returns the instantiated editor handler class.- Returns:
- the instantiated editor handler class
-
getElementDeleteMode
Returns the element delete mode.- Returns:
- the element delete mode
-
getEncoding
Returns the configured workplace encoding.- Returns:
- the configured workplace encoding
-
getExplorerTypeSetting
Returns the explorer type settings for the specified resource type.- Parameters:
type
- the resource type for which the settings are required- Returns:
- the explorer type settings for the specified resource type
-
getExplorerTypeSettings
Returns the list of explorer type settings.These settings provide information for the new resource dialog and the context menu appearance.
- Returns:
- the list of explorer type settings
-
getExplorerTypesForView
Gets the explorer types for the given view name.- Parameters:
viewName
- the view name- Returns:
- the explorer names for the given view names
-
getExplorerTypeViews
Gets the element views generated from explorer types.- Returns:
- the map of element views from the explorer types
-
getExportPoints
Returns the set of configured export points for the workplace.- Returns:
- the set of configured export points for the workplace
-
getFileBytesMaxUploadSize
Returns the value (in bytes) for the maximum file upload size of the current user.- Parameters:
cms
- the initialized CmsObject- Returns:
- the value (in bytes) for the maximum file upload size
-
getFileMaxUploadSize
Returns the value (in kb) for the maximum file upload size.- Returns:
- the value (in kb) for the maximum file upload size
-
getFileViewSettings
Returns the system-wide file view settings for the workplace.Note that this instance may not modified (invocation of setters) directly or a
will be thrown.CmsRuntimeException
It has to be cloned first and then may be written back to the workplace settings using method
setFileViewSettings(CmsObject, org.opencms.util.CmsRfsFileViewer)
.- Returns:
- the system-wide file view settings for the workplace
-
getGalleries
Returns a collection of all available galleries.The Map has the gallery type name as key and an instance of the gallery class (not completely initialized) as value.
- Returns:
- a collection of all available galleries
-
getGalleryDefaultScope
Returns the gallery default scope.- Returns:
- the gallery default scope
-
getGalleryDefaultScopeString
Gets the configured gallery default scope as a string.- Returns:
- the gallery default scope as a string
-
getGroupNameTranslation
Returns the object used for translating group names.- Returns:
- the group name translator
-
getGroupTranslationClass
Returns the configured class name for translating group names.- Returns:
- the group translation class name
-
getI18nInfo
public CmsI18nInfo getI18nInfo(javax.servlet.http.HttpServletRequest req, CmsUser user, CmsProject project, String resource) Description copied from interface:I_CmsLocaleHandler
Returns the i18n information to use in the request context.- Specified by:
getI18nInfo
in interfaceI_CmsLocaleHandler
- Parameters:
req
- the current http requestuser
- the current userproject
- the current projectresource
- the URI of the requested resource (with full site root added)- Returns:
- the i18n information to use for the given request context
- See Also:
-
getLabelSiteFolders
Returns a list of site folders which generate labeled links.- Returns:
- a list of site folders which generate labeled links
-
getLocales
Returns the list of available workplace locales, sorted ascending.Please note: Be careful not to modify the returned Set as it is not a clone.
- Returns:
- the set of available workplace locales
-
getLocalizedFolders
Returns the configured list of localized workplace folders.- Returns:
- the configured list of localized workplace folders
-
getMessages
Returns theCmsWorkplaceMessages
for the given locale.The workplace messages are a collection of resource bundles, containing the messages for all OpenCms core bundles and of all initialized modules.
Please note that the message objects are cached internally. The returned message object should therefore never be modified directly in any way.
- Parameters:
locale
- the locale to get the messages for- Returns:
- the
CmsWorkplaceMessages
for the given locale
-
getPostUploadHandler
Returns the post upload handler.- Returns:
- the post upload handler
-
getPreEditorConditionDefinition
public I_CmsPreEditorActionDefinition getPreEditorConditionDefinition(I_CmsResourceType resourceType) Returns the condition definition for the given resource type that is triggered before opening the editor.- Parameters:
resourceType
- the resource type- Returns:
- the condition definition for the given resource type class name or null if none is found
-
getPreEditorConditionDefinitions
Returns the condition definitions for the different resource types which are triggered before opening the editor.- Returns:
- the condition definitions
-
getRepositoryFolderHandler
Returns the repository folder handler.- Returns:
- the repository folder handler
-
getSitemapConfigEditRole
Gets the name of the role necessary for editing the sitemap configuration.- Returns:
- the name of the role necessary for editing the sitemap configuration
-
getSynchronizeExcludePatterns
Returns Regex patterns that should be excluded from synchronization.- Returns:
- the exclude patterns
-
getTempFileProjectId
Returns the id of the temporary file project required by the editors.- Returns:
- the id of the temporary file project required by the editors
-
getToolManager
Returns the tool manager.- Returns:
- the tool manager
-
getUploadHook
Gets the upload hook URI which should be opened for an upload to a given folder.This method will return null if no upload hook should be used for the given upload folder.
The API for this upload hook is as follows: The upload hook will be called with the following parameters: resources (required): a comma separated list of the structure ids of the uploaded resources if this is omitted closelink (optional): a link which should be opened once the upload hook has finished whatever it is doing
- Parameters:
cms
- the current CMS contextuploadFolder
- the folder for which the upload hook should be found- Returns:
- the URI of the upload hook or null
-
getUploadRestriction
Gets the upload restriction.- Returns:
- the upload restriction
-
getUserInfoManager
Returns the user additional information configuration Manager.- Returns:
- the user additional information configuration manager
-
getUserListModeString
Returns the user list mode as a string.- Returns:
- the user list mode as a string
-
getViews
Returns the map of configured workplace views.- Returns:
- the map of configured workplace views
-
getVirusScanner
Gets the configured virus scanner (may be null).- Returns:
- the configured virus scanner
-
getWorkplaceEditorManager
Returns the instantiated workplace editor manager class.- Returns:
- the instantiated workplace editor manager class
-
getWorkplaceExplorerTypeSettings
Returns the list of explorer type settings configured in the opencms-workplace.xml file.- Returns:
- the list of explorer type settings
-
getWorkplaceLocale
Returns the workplace locale from the current user's settings.- Parameters:
cms
- the current cms object- Returns:
- the workplace locale
-
getWorkplaceLocale
Gets the workplace locale for the given request context.- Parameters:
requestContext
- the request context- Returns:
- the workplace locale for the request context
-
getWorkplaceLocale
Returns the workplace locale for the user.- Parameters:
user
- the user to get the workplace locale for.- Returns:
- the workplace locale for the user.
-
initHandler
Description copied from interface:I_CmsLocaleHandler
Will be called during system startup.- Specified by:
initHandler
in interfaceI_CmsLocaleHandler
- Parameters:
cms
- an initialized cms permission context for VFS access- See Also:
-
initialize
Initializes the workplace manager with the OpenCms system configuration.- Parameters:
cms
- an OpenCms context object that must have been initialized with "Admin" permissions- Throws:
CmsRoleViolationException
- if the provided OpenCms user context does not have
role permissionsCmsRole.WORKPLACE_MANAGER
CmsException
- if something goes wrong
-
isAdeGalleryUploadDisabled
Returns true if gallery upload is disabled for the user in the given context.- Parameters:
cms
- a CMS context- Returns:
- true if the upload is disabled
-
isAllowElementAuthorToWorkInGalleries
Checks if element authors have special permission to work in galleries (upload/replace).- Returns:
- true in the case above
-
isDefaultPropertiesOnStructure
Returns the default property editing mode on resources.- Returns:
- the default property editing mode on resources
-
isDisplayCategoriesByRepository
Returns a flag, indicating if the categories should be displayed separated by repository in the category selection dialog.- Returns:
- a flag, indicating if the categories should be displayed separated by repository in the category selection dialog.
-
isDisplayCategorySelectionCollapsed
Returns a flag, indicating if the category selection dialog should have all entries completely collapsed when opened.- Returns:
- a flag, indicating if the category selection dialog should have all entries completely collapsed when opened.
-
isEnableAdvancedPropertyTabs
Returns if tabs in the advanced property dialog are enabled.- Returns:
true
if tabs should be enabled, otherwisefalse
-
isKeepAlive
Returns true if "keep alive" mode is active.- Returns:
- true if the session should be kept alive
-
isKeepAlive
Returns true if the session should be kept alive.- Parameters:
useDefault
- if true, the default value will be returned if the "keep alive" setting is not explicitly configured- Returns:
- True if the "keep alive" mode is active
-
isVirusScannerEnabled
Checks if the virus scanner is enabled.- Returns:
- true if the virus scanner is enabled
-
isXmlContentAutoCorrect
Returns if XML content is automatically corrected when opened with the editor.- Returns:
true
if XML content is automatically corrected when opened with the editor, otherwisefalse
-
lazyUserListsEnabled
Returns if lazy user lists are enabled.- Returns:
true
if lazy user lists are enabled
-
removeExplorerTypeSettings
Removes the list of explorer type settings from the given module.- Parameters:
module
- the module witch contains the explorer type settings to remove
-
setAcaciaUnlock
Sets the value of the acacia-unlock configuration option.- Parameters:
value
- the value of the acacia-unlock configuration option
-
setAdditionalLogFolderConfiguration
Sets the additional log folder configuration.- Parameters:
logConfig
- the additional log folder configuration
-
setAllowElementAuthorToWorkInGalleries
Enables/disables special permissions for element authors to work with galleries (upload/replace).- Parameters:
allowElementAuthorToWorkInGalleries
- true if the special permissions should be enabled for element authors
-
setAutoLock
Sets if the autolock resources feature is enabled.- Parameters:
value
-"true"
if the autolock resources feature is enabled, otherwise false
-
setCategoryDisplayOptions
public void setCategoryDisplayOptions(String displayCategoriesByRepository, String displayCategorySelectionCollapsed) Sets the category display options that affect how the category selection dialog is shown.- Parameters:
displayCategoriesByRepository
- if true, the categories are shown separated by repository.displayCategorySelectionCollapsed
- if true, the selection dialog opens showing only the top-level categories (or the various repositories) in collapsed state.
-
setCategoryFolder
Sets the name of the local category folder(s).- Parameters:
categoryFolder
- the name of the local category folder(s)
-
setDefaultAccess
Sets the access object of the type settings.- Parameters:
access
- access object
-
setDefaultLocale
Sets the Workplace default locale.- Parameters:
locale
- the locale to set
-
setDefaultPropertiesOnStructure
Sets the default property editing mode on resources.- Parameters:
defaultPropertiesOnStructure
- the default property editing mode on resources
-
setDefaultUserSettings
Sets the Workplace default user settings.- Parameters:
defaultUserSettings
- the user settings to set
-
setDirectEditProvider
Sets the direct edit provider.- Parameters:
clazz
- the direct edit provider to set
-
setEditorAction
Sets the editor action class.- Parameters:
clazz
- the editor action class to set
-
setEditorDisplayOptions
Sets the editor display option class.- Parameters:
clazz
- the editor display option class to set
-
setEditorHandler
Sets the editor handler class.- Parameters:
clazz
- the editor handler class to set
-
setElementDeleteMode
Sets the element delete mode.- Parameters:
deleteMode
- the element delete mode
-
setEnableAdvancedPropertyTabs
Sets if tabs in the advanced property dialog are enabled.- Parameters:
enableAdvancedPropertyTabs
- true if tabs should be enabled, otherwise false
-
setFileMaxUploadSize
Sets the value (in kb) for the maximum file upload size.- Parameters:
value
- the value (in kb) for the maximum file upload size
-
setFileViewSettings
public void setFileViewSettings(CmsObject cms, CmsRfsFileViewer fileViewSettings) throws CmsRoleViolationException Sets the system-wide file view settings for the workplace.- Parameters:
cms
- the CmsObject for ensuring security constraints.fileViewSettings
- the system-wide file view settings for the workplace to set- Throws:
CmsRoleViolationException
- if the current user does not own the administrator role (CmsRole.ROOT_ADMIN
)
-
setGalleryDefaultScope
Sets the gallery default scope.- Parameters:
galleryDefaultScope
- the gallery default scope
-
setGroupTranslationClass
Sets the group translation class name.- Parameters:
translationClassName
- the group translation class name
-
setKeepAlive
Sets the "keep alive" mode.- Parameters:
keepAlive
- the keep-alive mode
-
setPostUploadHandler
Sets the post upload dialog handler.- Parameters:
uploadHandler
- the post upload handler
-
setRepositoryFolderHandler
Sets the repository folder handler.- Parameters:
clazz
- the repository folder handler
-
setSitemapConfigEditRole
Sets the name of the role necessary for editing the sitemap configuration.- Parameters:
roleName
- the name of the role necessary for editing the sitemap configuration
-
setToolManager
Sets the tool Manager object.- Parameters:
toolManager
- the tool Manager object to set
-
setUploadRestriction
Sets the upload restriciton.- Parameters:
uploadRestriction
- the upload restriction
-
setUserInfoManager
Sets the user additional information configuration manager.- Parameters:
userInfoManager
- the manager to set
-
setUserListMode
Sets the user list mode.- Parameters:
mode
- the user list mode
-
setUserManagementEnabled
Controls if the user/group icon in the administration view should be shown.- Parameters:
value
-"true"
if the user/group icon in the administration view should be shown, otherwise false
-
setVirusScanner
Sets the virus scanner.- Parameters:
virusScanner
- the virus scanner to set
-
setVirusScannerEnabled
Sets the virus scanner to enabled/disabled.- Parameters:
enabled
- true if the virus scanner should be enabled
-
setXmlContentAutoCorrect
Sets the auto correction of XML contents when they are opened with the editor.- Parameters:
xmlContentAutoCorrect
- if "true", the content will be corrected without notification, otherwise a confirmation is needed
-
shouldAcaciaUnlock
Returns true if the Acacia editor in standalone mode should automatically unlock resources.- Returns:
- true if resources should be automatically unlocked in standalone mode
-
showUserGroupIcon
Returns if the user/group icon in the administration view should be shown.- Returns:
- true if the user/group icon in the administration view should be shown, otherwise false
-
supportsLazyUserLists
Returns true if lazy user lists should be used.- Returns:
- true if lazy user lists should be used
-
translateGroupName
Translates a group name using the configuredI_CmsGroupNameTranslation
.- Parameters:
groupName
- the group namekeepOu
- if true, the OU will be appended to the translated name- Returns:
- the translated group name
-