Package org.opencms.ui.editors
Interface I_CmsEditor
-
- All Known Implementing Classes:
A_CmsFrameEditor
,CmsAcaciaEditor
,CmsMessageBundleEditor
,CmsSourceEditor
,CmsXmlContentEditor
,CmsXmlPageEditor
public interface I_CmsEditor
Interface for resource editors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPriority()
Gets the priority.void
initUI(I_CmsAppUIContext context, CmsResource resource, java.lang.String backLink, java.util.Map<java.lang.String,java.lang.String> params)
Within this method the editor UI should be initialized.boolean
matchesResource(CmsObject cms, CmsResource resource, boolean plainText)
Checks whether the editor is available for the given resource.boolean
matchesType(I_CmsResourceType type, boolean plainText)
Checks whether the editor is available for the given resource type.I_CmsEditor
newInstance()
Returns a new editor instance.
-
-
-
Method Detail
-
getPriority
int getPriority()
Gets the priority.If multiple editors for the same resource type are available, the one with the highest priority will be picked.
- Returns:
- the priority
-
initUI
void initUI(I_CmsAppUIContext context, CmsResource resource, java.lang.String backLink, java.util.Map<java.lang.String,java.lang.String> params)
Within this method the editor UI should be initialized.Use the context to add the app's components to the UI.
- Parameters:
context
- the UI contextresource
- the resource to editbackLink
- the link to return to when closing the editorparams
- optional parameters
-
matchesResource
boolean matchesResource(CmsObject cms, CmsResource resource, boolean plainText)
Checks whether the editor is available for the given resource.- Parameters:
cms
- the CMS contextresource
- the resource to editplainText
- if plain text editing is required- Returns:
true
if the editor is available for the given resource
-
matchesType
boolean matchesType(I_CmsResourceType type, boolean plainText)
Checks whether the editor is available for the given resource type.- Parameters:
type
- the resource type to editplainText
- if plain text editing is required- Returns:
true
if the editor is available for the given resource
-
newInstance
I_CmsEditor newInstance()
Returns a new editor instance.- Returns:
- the editor instance
-
-