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
Modifier and TypeMethodDescriptionint
Gets the priority.void
initUI
(I_CmsAppUIContext context, CmsResource resource, String backLink, Map<String, 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.Returns a new editor instance.
-
Method Details
-
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, String backLink, Map<String, 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
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
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
Returns a new editor instance.- Returns:
- the editor instance
-