Class CmsToolRootHandler
- All Implemented Interfaces:
I_CmsToolHandler
- Since:
- 6.0.0
-
Field Summary
Fields inherited from class org.opencms.workplace.tools.A_CmsToolHandler
ARG_PARAM_NAME, ARG_PATH_NAME, ARGS_PROPERTY_DEFINITION, ARGUMENT_SEPARATOR, DEFAULT_DISABLED_HELPTEXT, VALUE_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Returns the key.getUri()Returns the uri.booleanReturns the state of the admin tool for a given cms context.booleanReturns the visibility flag for a given cms context.voidSets the key.booleansetup(CmsObject cms, CmsToolRootHandler root, String resourcePath) Default implementation.voidSets the uri.Methods inherited from class org.opencms.workplace.tools.A_CmsToolHandler
getConfirmationMessage, getDisabledHelpText, getGroup, getHelpText, getIconPath, getLink, getName, getParameters, getPath, getPosition, getShortName, getSmallIconPath, isEnabled, isVisible, setConfirmationMessage, setDisabledHelpText, setGroup, setHelpText, setIconPath, setLink, setLink, setName, setParameters, setParameterString, setPath, setPosition, setShortName, setSmallIconPath, toString
-
Constructor Details
-
CmsToolRootHandler
public CmsToolRootHandler()
-
-
Method Details
-
getKey
Returns the key.- Returns:
- the key
-
getUri
Returns the uri.- Returns:
- the uri
-
isEnabled
Description copied from interface:I_CmsToolHandlerReturns the state of the admin tool for a given cms context.- Parameters:
cms- the cms context- Returns:
trueif enabled- See Also:
-
isVisible
Description copied from interface:I_CmsToolHandlerReturns the visibility flag for a given cms context.- Parameters:
cms- the cms context- Returns:
trueif visible- See Also:
-
setKey
Sets the key.- Parameters:
key- the key to set
-
setup
Description copied from class:A_CmsToolHandlerDefault implementation.It takes the icon path from
property, or uses a default icon if undefined, the name is taken from theCmsPropertyDefinition.PROPERTY_NAVIMAGEproperty, or uses theCmsPropertyDefinition.PROPERTY_NAVTEXTproperty if undefined, or an default text, if still undefined. if you want 2 different names, one for the big icon tools and one for the menu/navbar entries, use aCmsPropertyDefinition.PROPERTY_TITLEto separate them in the property. (if you do so, the first one is for big icons and the second one for menu/navbar entries). the help text is taken from theA_CmsToolHandler.VALUE_SEPARATORproperty or a default text if undefined, if you want to customize a help text while disabled, use aCmsPropertyDefinition.PROPERTY_DESCRIPTIONas a separator in the same property.A_CmsToolHandler.VALUE_SEPARATORThe group is taken from the
property, the position from theCmsPropertyDefinition.PROPERTY_NAVINFOand the install path is given by the folder structure if theCmsPropertyDefinition.PROPERTY_NAVPOSproperty does not include path information.A_CmsToolHandler.ARGS_PROPERTY_DEFINITIONFor the icon path you can specify 2 paths separated by a
, the first one will be used as a group icon (32x32), and the second as an menu icon (16x16). The paths are relative to the /system/workplace/resources/ folder. If the tool is disabled, the names of the icons are composed as ${name}_disabled.${ext}A_CmsToolHandler.VALUE_SEPARATORThe confirmation message is taken from the
with keyA_CmsToolHandler.ARGS_PROPERTY_DEFINITION#ARG_CONFIRMATION_NAME- Specified by:
setupin interfaceI_CmsToolHandler- Overrides:
setupin classA_CmsToolHandler- Parameters:
cms- the admin context (at opencms-workplace (re-)initialization time)root- the root contextresourcePath- the resource path of the file/folder to use as admin tool- Returns:
falseif something goes wrong- See Also:
-
setUri
Sets the uri.- Parameters:
uri- the uri to set
-