|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplaceManager
Manages the global OpenCms workplace settings for all users.
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.
Field Summary | |
static java.lang.String |
DEFAULT_WORKPLACE_ENCODING
The default encoding for the workplace (UTF-8). |
static java.lang.String |
PARAM_LOGIN_REQUESTED_RESOURCE
The id of the "requestedResource" parameter for the OpenCms login form. |
static java.lang.String |
SESSION_WORKPLACE_SETTINGS
Key name for the session workplace settings. |
Constructor Summary | |
CmsWorkplaceManager()
Creates a new instance for the workplace manager, will be called by the workplace configuration manager. |
Method Summary | |
void |
addDialogHandler(I_CmsDialogHandler clazz)
Adds a dialog handler instance to the list of configured dialog handlers. |
void |
addExplorerTypeSetting(CmsExplorerTypeSettings settings)
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(java.lang.String uri,
java.lang.String destination)
Adds newly created export point to the workplace configuration. |
void |
addLabeledFolder(java.lang.String uri)
Adds a folder to the list of labeled folders. |
void |
addLocalizedFolder(java.lang.String uri)
Adds a new folder to the list of localized workplace folders. |
boolean |
autoLockResources()
Returns if the autolock resources feature is enabled. |
void |
cmsEvent(CmsEvent event)
Implements the event listener of this class. |
CmsExplorerTypeAccess |
getDefaultAccess()
Gets the access object of the type settings. |
java.util.Locale |
getDefaultLocale()
Returns the Workplace default locale. |
CmsDefaultUserSettings |
getDefaultUserSettings()
Returns the Workplace default user settings. |
java.util.Map |
getDialogHandler()
Returns all instanciated dialog handlers for the workplace. |
java.lang.Object |
getDialogHandler(java.lang.String key)
Returns the instanciated dialog handler class for the key or null, if there is no mapping for the key. |
I_CmsEditorActionHandler |
getEditorActionHandler()
Returns the instanciated editor action handler class. |
CmsEditorDisplayOptions |
getEditorDisplayOptions()
Returns the instanciated editor display option class. |
I_CmsEditorHandler |
getEditorHandler()
Returns the instanciated editor handler class. |
java.lang.String |
getEncoding()
Returns the configured workplace encoding. |
CmsExplorerTypeSettings |
getExplorerTypeSetting(java.lang.String type)
Returns the explorer type settings for the specified resource type. |
java.util.List |
getExplorerTypeSettings()
Returns the list of explorer type settings. |
java.util.Set |
getExportPoints()
Returns the set of configured export points for the workplace. |
long |
getFileBytesMaxUploadSize(CmsObject cms)
Returns the value (in bytes) for the maximum file upload size of the current user. |
int |
getFileMaxUploadSize()
Returns the value (in kb) for the maximum file upload size. |
CmsRfsFileViewer |
getFileViewSettings()
Returns the system-wide file view settings for the workplace. |
java.util.Map |
getGalleries()
Returns a collection of all available galleries. |
CmsI18nInfo |
getI18nInfo(javax.servlet.http.HttpServletRequest req,
CmsUser user,
CmsProject project,
java.lang.String resource)
Returns the i18n information to use in the request context. |
java.util.List |
getLabelSiteFolders()
Returns a list of site folders which generate labeled links. |
java.util.List |
getLocales()
Returns the list of available workplace locales, sorted ascending. |
java.util.List |
getLocalizedFolders()
Returns the configured list of localized workplace folders. |
CmsWorkplaceMessages |
getMessages(java.util.Locale locale)
Returns the CmsWorkplaceMessages for the given locale. |
CmsExplorerContextMenu |
getMultiContextMenu()
Returns the configured multi context menu to use in the Explorer view. |
int |
getTempFileProjectId()
Returns the id of the temporary file project required by the editors. |
CmsToolManager |
getToolManager()
Returns the tool manager. |
java.util.List |
getViews()
Returns the map of configured workplace views. |
CmsWorkplaceEditorManager |
getWorkplaceEditorManager()
Returns the instanciated workplace editor manager class. |
void |
initHandler(CmsObject cms)
Will be called during system startup. |
void |
initialize(CmsObject cms)
Initializes the workplace manager with the OpenCms system configuration. |
boolean |
isDefaultPropertiesOnStructure()
Returns the default property editing mode on resources. |
boolean |
isEnableAdvancedPropertyTabs()
Returns if tabs in the advanced property dialog are enabled. |
boolean |
isEnableWorkflowMessages()
Returns if messages should be includes in workflow mails. |
static boolean |
isWorkplaceUser(javax.servlet.http.HttpServletRequest req)
Returns true if the provided request was done by a Workplace user. |
void |
removeExplorerTypeSettings(CmsModule module)
Removes the list of explorer type settings from the given module. |
void |
setAutoLock(java.lang.String value)
Sets if the autolock resources feature is enabled. |
void |
setDefaultAccess(CmsExplorerTypeAccess access)
Sets the access object of the type settings. |
void |
setDefaultLocale(java.lang.String locale)
Sets the Workplace default locale. |
void |
setDefaultPropertiesOnStructure(java.lang.String defaultPropertiesOnStructure)
Sets the default property editing mode on resources. |
void |
setDefaultUserSettings(CmsDefaultUserSettings defaultUserSettings)
Sets the Workplace default user settings. |
void |
setEditorAction(I_CmsEditorActionHandler clazz)
Sets the editor action class. |
void |
setEditorDisplayOptions(CmsEditorDisplayOptions clazz)
Sets the editor display option class. |
void |
setEditorHandler(I_CmsEditorHandler clazz)
Sets the editor handler class. |
void |
setEnableAdvancedPropertyTabs(java.lang.String enableAdvancedPropertyTabs)
Sets if tabs in the advanced property dialog are enabled. |
void |
setFileMaxUploadSize(java.lang.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 |
setMultiContextMenu(CmsExplorerContextMenu multiContextMenu)
Sets the configured multi context menu to use in the Explorer view. |
void |
setToolManager(CmsToolManager toolManager)
Sets the tool Manager object. |
void |
setUserManagementEnabled(java.lang.String value)
Controls if the user/group icon in the administration view should be shown. |
void |
setWorkflowMessage(java.lang.String workflowMessage)
Sets if workflow message emails contain the message text. |
boolean |
showUserGroupIcon()
Returns if the user/group icon in the administration view should be shown. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_WORKPLACE_ENCODING
public static final java.lang.String PARAM_LOGIN_REQUESTED_RESOURCE
public static final java.lang.String SESSION_WORKPLACE_SETTINGS
Constructor Detail |
public CmsWorkplaceManager()
Method Detail |
public static boolean isWorkplaceUser(javax.servlet.http.HttpServletRequest req)
req
- the request to check
public void addDialogHandler(I_CmsDialogHandler clazz)
clazz
- the instanciated dialog handler to addpublic void addExplorerTypeSetting(CmsExplorerTypeSettings settings)
settings
- the explorer type settingspublic void addExplorerTypeSettings(CmsModule module)
module
- the module witch contains the explorer type settings to addpublic void addExportPoint(java.lang.String uri, java.lang.String destination)
uri
- the export point uridestination
- the export point destinationpublic void addLabeledFolder(java.lang.String uri)
uri
- the folder uri to addpublic void addLocalizedFolder(java.lang.String uri)
uri
- a new folder to add to the list of localized workplace folderspublic boolean autoLockResources()
public void cmsEvent(CmsEvent event)
cmsEvent
in interface I_CmsEventListener
event
- CmsEvent that has occurredI_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)
public CmsExplorerTypeAccess getDefaultAccess()
public java.util.Locale getDefaultLocale()
public CmsDefaultUserSettings getDefaultUserSettings()
public java.util.Map getDialogHandler()
public java.lang.Object getDialogHandler(java.lang.String key)
key
- the key whose associated value is to be returned
public I_CmsEditorActionHandler getEditorActionHandler()
public CmsEditorDisplayOptions getEditorDisplayOptions()
public I_CmsEditorHandler getEditorHandler()
public java.lang.String getEncoding()
public CmsExplorerTypeSettings getExplorerTypeSetting(java.lang.String type)
type
- the resource type for which the settings are required
public java.util.List getExplorerTypeSettings()
These settings provide information for the new resource dialog and the context menu appearance.
public java.util.Set getExportPoints()
public long getFileBytesMaxUploadSize(CmsObject cms)
cms
- the initialized CmsObject
public int getFileMaxUploadSize()
public CmsRfsFileViewer getFileViewSettings()
Note that this instance may not modified (invocation of setters) directly or a
will be thrown.
It has to be cloned first and then may be written back to the workplace settings using
method CmsRuntimeException
setFileViewSettings(CmsObject, org.opencms.util.CmsRfsFileViewer)
.
public java.util.Map getGalleries()
The Map has the gallery type name as key and an instance of the gallery class (not completely initialized) as value.
public CmsI18nInfo getI18nInfo(javax.servlet.http.HttpServletRequest req, CmsUser user, CmsProject project, java.lang.String resource)
I_CmsLocaleHandler
getI18nInfo
in interface I_CmsLocaleHandler
req
- the current http requestuser
- the current userproject
- the current projectresource
- the URI of the requested resource (with full site root added)
I_CmsLocaleHandler.getI18nInfo(javax.servlet.http.HttpServletRequest, org.opencms.file.CmsUser, org.opencms.file.CmsProject, java.lang.String)
public java.util.List getLabelSiteFolders()
public java.util.List getLocales()
Please note: Be careful not to modify the returned Set as it is not a clone.
public java.util.List getLocalizedFolders()
public CmsWorkplaceMessages getMessages(java.util.Locale locale)
CmsWorkplaceMessages
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.
locale
- the locale to get the messages for
CmsWorkplaceMessages
for the given localepublic CmsExplorerContextMenu getMultiContextMenu()
public int getTempFileProjectId()
public CmsToolManager getToolManager()
public java.util.List getViews()
public CmsWorkplaceEditorManager getWorkplaceEditorManager()
public void initHandler(CmsObject cms)
I_CmsLocaleHandler
initHandler
in interface I_CmsLocaleHandler
cms
- an initialized cms permission context for VFS accessI_CmsLocaleHandler.initHandler(org.opencms.file.CmsObject)
public void initialize(CmsObject cms) throws CmsException, CmsRoleViolationException
cms
- an OpenCms context object that must have been initialized with "Admin" permissions
CmsRoleViolationException
- if the provided OpenCms user context does
not have CmsRole.WORKPLACE_MANAGER
role permissions
CmsException
- if something goes wrongpublic boolean isDefaultPropertiesOnStructure()
public boolean isEnableAdvancedPropertyTabs()
public boolean isEnableWorkflowMessages()
public void removeExplorerTypeSettings(CmsModule module)
module
- the module witch contains the explorer type settings to removepublic void setAutoLock(java.lang.String value)
value
- "true"
if the autolock resources feature is enabled, otherwise falsepublic void setDefaultAccess(CmsExplorerTypeAccess access)
access
- access objectpublic void setDefaultLocale(java.lang.String locale)
locale
- the locale to setpublic void setDefaultPropertiesOnStructure(java.lang.String defaultPropertiesOnStructure)
defaultPropertiesOnStructure
- the default property editing mode on resourcespublic void setDefaultUserSettings(CmsDefaultUserSettings defaultUserSettings)
defaultUserSettings
- the user settings to setpublic void setEditorAction(I_CmsEditorActionHandler clazz)
clazz
- the editor action class to setpublic void setEditorDisplayOptions(CmsEditorDisplayOptions clazz)
clazz
- the editor display option class to setpublic void setEditorHandler(I_CmsEditorHandler clazz)
clazz
- the editor handler class to setpublic void setEnableAdvancedPropertyTabs(java.lang.String enableAdvancedPropertyTabs)
enableAdvancedPropertyTabs
- true if tabs should be enabled, otherwise falsepublic void setFileMaxUploadSize(java.lang.String value)
value
- the value (in kb) for the maximum file upload sizepublic void setFileViewSettings(CmsObject cms, CmsRfsFileViewer fileViewSettings) throws CmsRoleViolationException
cms
- the CmsObject for ensuring security constraints.fileViewSettings
- the system-wide file view settings for the workplace to set
CmsRoleViolationException
- if the current user does not own the administrator role (CmsRole.ADMINISTRATOR
)public void setMultiContextMenu(CmsExplorerContextMenu multiContextMenu)
multiContextMenu
- the configured multi context menu to use in the Explorer viewpublic void setToolManager(CmsToolManager toolManager)
toolManager
- the tool Manager object to setpublic void setUserManagementEnabled(java.lang.String value)
value
- "true"
if the user/group icon in the administration view should be shown, otherwise falsepublic void setWorkflowMessage(java.lang.String workflowMessage)
workflowMessage
- true if messages should be includes, otherwise falsepublic boolean showUserGroupIcon()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |