Package org.opencms.workplace.editors
Class CmsEditorCssHandlerDefault
- java.lang.Object
-
- org.opencms.workplace.editors.CmsEditorCssHandlerDefault
-
- All Implemented Interfaces:
I_CmsEditorCssHandler
public class CmsEditorCssHandlerDefault extends java.lang.Object implements I_CmsEditorCssHandler
A default editor CSS handler to obtain the CSS style sheet path from the template property value of the template itself.- Since:
- 6.9.2
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_TEMPLATE_EDITOR_CSS
Sitemap attribute that can be used to configure the editor stylesheet.static java.lang.String
ATTRIBUTE_EDITOR_STYLESHEET
Request context attribute used to pass the editor stylesheet (normally defined as a meta tag) to the CSS handler.
-
Constructor Summary
Constructors Constructor Description CmsEditorCssHandlerDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getUriStyleSheet(CmsObject cms, java.lang.String editedResourcePath)
Returns the absolute VFS path of the CSS style sheet to use.boolean
matches(CmsObject cms, java.lang.String editedResourcePath)
Checks if the handler can be used to determine the CSS style sheet based on the edited resource.
-
-
-
Field Detail
-
ATTR_TEMPLATE_EDITOR_CSS
public static final java.lang.String ATTR_TEMPLATE_EDITOR_CSS
Sitemap attribute that can be used to configure the editor stylesheet.- See Also:
- Constant Field Values
-
ATTRIBUTE_EDITOR_STYLESHEET
public static final java.lang.String ATTRIBUTE_EDITOR_STYLESHEET
Request context attribute used to pass the editor stylesheet (normally defined as a meta tag) to the CSS handler.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsEditorCssHandlerDefault
public CmsEditorCssHandlerDefault()
-
-
Method Detail
-
getUriStyleSheet
public java.lang.String getUriStyleSheet(CmsObject cms, java.lang.String editedResourcePath)
Description copied from interface:I_CmsEditorCssHandler
Returns the absolute VFS path of the CSS style sheet to use.- Specified by:
getUriStyleSheet
in interfaceI_CmsEditorCssHandler
- Parameters:
cms
- the current OpenCms user contexteditedResourcePath
- the absolute VFS path of the currently edited resource- Returns:
- the absolute VFS path of the CSS style sheet to use
- See Also:
I_CmsEditorCssHandler.getUriStyleSheet(org.opencms.file.CmsObject, java.lang.String)
-
matches
public boolean matches(CmsObject cms, java.lang.String editedResourcePath)
Description copied from interface:I_CmsEditorCssHandler
Checks if the handler can be used to determine the CSS style sheet based on the edited resource.- Specified by:
matches
in interfaceI_CmsEditorCssHandler
- Parameters:
cms
- the current OpenCms user contexteditedResourcePath
- the absolute VFS path of the currently edited resource- Returns:
- true if the handler matches, otherwise false
- See Also:
I_CmsEditorCssHandler.matches(org.opencms.file.CmsObject, java.lang.String)
-
-