public class CmsWorkplaceEditorManager extends java.lang.Object
This class provides methods and constants to select the right editor according to:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EDITOR_CONFIGURATION_FILENAME
The filename of the editor configuration XML file.
|
static java.lang.String |
EDITOR_FILENAME
The filename of the editor JSP.
|
| Constructor and Description |
|---|
CmsWorkplaceEditorManager(CmsObject cms)
Creates a new editor manager.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkAcaciaEditorAvailable(CmsObject cms,
CmsResource resource)
Checks whether GWT widgets are available for all fields of a content.
|
java.util.Map<java.lang.String,java.util.SortedMap<java.lang.Float,CmsWorkplaceEditorConfiguration>> |
getConfigurableEditors()
Returns a map of configurable editors for the workplace preferences dialog.
|
protected java.lang.String |
getDefaultEditorUri(CmsRequestContext context,
java.lang.String resourceType,
java.lang.String userAgent)
Returns the default editor URI for the current resource type.
|
CmsWorkplaceEditorConfiguration |
getEditorConfiguration(java.lang.String name)
Gets the editor configuration with the given name.
|
protected java.util.List<CmsWorkplaceEditorConfiguration> |
getEditorConfigurations()
Returns the editor configuration objects.
|
java.lang.String |
getEditorParameter(CmsObject cms,
java.lang.String editor,
java.lang.String param)
Gets the value of a global editor configuration parameter.
|
protected java.lang.String |
getEditorUri(CmsRequestContext context,
java.lang.String resourceType,
java.lang.String userAgent)
Returns the editor URI for the current resource type.
|
java.lang.String |
getWidgetEditor(CmsRequestContext context,
java.lang.String userAgent)
Returns the editor URI for the current resource type.
|
boolean |
isEditorAvailableForResource(CmsResource res)
Checks if there is an editor which can process the given resource.
|
public static final java.lang.String EDITOR_CONFIGURATION_FILENAME
public static final java.lang.String EDITOR_FILENAME
public CmsWorkplaceEditorManager(CmsObject cms)
cms - an OpenCms context object that must have been initialized with "Admin" permissionspublic static boolean checkAcaciaEditorAvailable(CmsObject cms, CmsResource resource)
cms - the current CMS contextresource - the resource to checkCmsException - if something goes wrongpublic java.util.Map<java.lang.String,java.util.SortedMap<java.lang.Float,CmsWorkplaceEditorConfiguration>> getConfigurableEditors()
This map has the resource type name as key, the value is a sorted map with the ranking as key and a CmsWorkplaceEditorConfiguration object as value.
public CmsWorkplaceEditorConfiguration getEditorConfiguration(java.lang.String name)
name - the name of the editor configurationpublic java.lang.String getEditorParameter(CmsObject cms, java.lang.String editor, java.lang.String param)
cms - the CMS contexteditor - the editor nameparam - the name of the parameterpublic java.lang.String getWidgetEditor(CmsRequestContext context, java.lang.String userAgent)
context - the request contextuserAgent - the user agent String that identifies the browserpublic boolean isEditorAvailableForResource(CmsResource res)
res - the resourceprotected java.lang.String getDefaultEditorUri(CmsRequestContext context, java.lang.String resourceType, java.lang.String userAgent)
context - the request contextresourceType - the current resource typeuserAgent - the user agent String that identifies the browserprotected java.util.List<CmsWorkplaceEditorConfiguration> getEditorConfigurations()
protected java.lang.String getEditorUri(CmsRequestContext context, java.lang.String resourceType, java.lang.String userAgent)
context - the request contextresourceType - the current resource typeuserAgent - the user agent String that identifies the browser