Class A_CmsToolHandler
- All Implemented Interfaces:
I_CmsToolHandler
- Direct Known Subclasses:
CmsDefaultToolHandler
,CmsInvisibleToolHandler
,CmsOnlyAdminToolHandler
,CmsToolRootHandler
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property for the parameters argument.static final String
Property for the path argument.static final String
Property definition for the arguments.static final String
Argument separator.static final String
Default disabled help text constant.static final String
Argument name and value separator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the confirmation Message.Returns the help text if disabled.getGroup()
Returns the group.Returns the help text.Returns the path to the icon.getLink()
Returns the link to the tool.getName()
Returns the displayed name.Returns the evaluated map of parameters.getPath()
Returns the tool path to install the tool in.float
Returns the relative position in the group.Returns the name for the menu or navbar.Returns the path to an optional small(16x16) icon.boolean
Returns the state of the admin tool for a given workplace context.boolean
Returns the visibility flag for a given workplace context.void
setConfirmationMessage
(String confirmationMessage) Sets the confirmation Message.void
setDisabledHelpText
(String disabledHelpText) Sets the help text if disabled.void
Sets the group.void
setHelpText
(String helpText) Sets the help text.void
setIconPath
(String iconPath) Sets the icon path.void
Sets the link.protected void
Sets the link for the given resource.void
Sets the name.protected void
setParameters
(CmsObject cms, String resourcePath) Sets the needed properties from theARGS_PROPERTY_DEFINITION
property of the given resource.void
setParameterString
(String paramString) Sets the parameter string.void
Sets the path.void
setPosition
(float position) Sets the position.void
setShortName
(String shortName) Sets the short name.void
setSmallIconPath
(String smallIconPath) Sets the small icon path.boolean
setup
(CmsObject cms, CmsToolRootHandler root, String resourcePath) Default implementation.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opencms.workplace.tools.I_CmsToolHandler
isEnabled, isVisible
-
Field Details
-
ARG_PARAM_NAME
Property for the parameters argument.- See Also:
-
ARG_PATH_NAME
Property for the path argument.- See Also:
-
ARGS_PROPERTY_DEFINITION
Property definition for the arguments.- See Also:
-
ARGUMENT_SEPARATOR
Argument separator.- See Also:
-
DEFAULT_DISABLED_HELPTEXT
Default disabled help text constant.- See Also:
-
VALUE_SEPARATOR
Argument name and value separator.- See Also:
-
-
Constructor Details
-
A_CmsToolHandler
public A_CmsToolHandler()
-
-
Method Details
-
getConfirmationMessage
Returns the confirmation Message.- Specified by:
getConfirmationMessage
in interfaceI_CmsToolHandler
- Returns:
- the confirmation Message
-
getDisabledHelpText
Description copied from interface:I_CmsToolHandler
Returns the help text if disabled.- Specified by:
getDisabledHelpText
in interfaceI_CmsToolHandler
- Returns:
- the help text if disabled
- See Also:
-
getGroup
Description copied from interface:I_CmsToolHandler
Returns the group.- Specified by:
getGroup
in interfaceI_CmsToolHandler
- Returns:
- the group
- See Also:
-
getHelpText
Description copied from interface:I_CmsToolHandler
Returns the help text.- Specified by:
getHelpText
in interfaceI_CmsToolHandler
- Returns:
- the help text
- See Also:
-
getIconPath
Description copied from interface:I_CmsToolHandler
Returns the path to the icon.- Specified by:
getIconPath
in interfaceI_CmsToolHandler
- Returns:
- the path to the icon
- See Also:
-
getLink
Description copied from interface:I_CmsToolHandler
Returns the link to the tool.- Specified by:
getLink
in interfaceI_CmsToolHandler
- Returns:
- the link
- See Also:
-
getName
Description copied from interface:I_CmsToolHandler
Returns the displayed name.- Specified by:
getName
in interfaceI_CmsToolHandler
- Returns:
- the name
- See Also:
-
getParameters
Description copied from interface:I_CmsToolHandler
Returns the evaluated map of parameters.- Specified by:
getParameters
in interfaceI_CmsToolHandler
- Parameters:
wp
- the workplace context- Returns:
- the parameters map
- See Also:
-
getPath
Description copied from interface:I_CmsToolHandler
Returns the tool path to install the tool in.- Specified by:
getPath
in interfaceI_CmsToolHandler
- Returns:
- the path
- See Also:
-
getPosition
Description copied from interface:I_CmsToolHandler
Returns the relative position in the group.- Specified by:
getPosition
in interfaceI_CmsToolHandler
- Returns:
- the position
- See Also:
-
getShortName
Description copied from interface:I_CmsToolHandler
Returns the name for the menu or navbar.- Specified by:
getShortName
in interfaceI_CmsToolHandler
- Returns:
- the short name
- See Also:
-
getSmallIconPath
Description copied from interface:I_CmsToolHandler
Returns the path to an optional small(16x16) icon.- Specified by:
getSmallIconPath
in interfaceI_CmsToolHandler
- Returns:
- the path to an optional small(16x16) icon
- See Also:
-
isEnabled
Description copied from interface:I_CmsToolHandler
Returns the state of the admin tool for a given workplace context.- Specified by:
isEnabled
in interfaceI_CmsToolHandler
- Parameters:
wp
- the workplace context- Returns:
true
if enabled- See Also:
-
isVisible
Description copied from interface:I_CmsToolHandler
Returns the visibility flag for a given workplace context.- Specified by:
isVisible
in interfaceI_CmsToolHandler
- Parameters:
wp
- the workplace context- Returns:
true
if visible- See Also:
-
setConfirmationMessage
Sets the confirmation Message.- Parameters:
confirmationMessage
- the confirmation Message to set
-
setDisabledHelpText
Sets the help text if disabled.- Parameters:
disabledHelpText
- the help text to set
-
setGroup
Sets the group.- Parameters:
group
- the group to set
-
setHelpText
Sets the help text.- Parameters:
helpText
- the help text to set
-
setIconPath
Sets the icon path.- Parameters:
iconPath
- the icon path to set
-
setLink
Sets the link.- Parameters:
link
- the link to set
-
setName
Sets the name.- Parameters:
name
- the name to set
-
setParameterString
Sets the parameter string.- Parameters:
paramString
- the parameter string to set
-
setPath
Sets the path.- Parameters:
path
- the path to set
-
setPosition
Sets the position.- Parameters:
position
- the position to set
-
setShortName
Sets the short name.- Parameters:
shortName
- the short name to set
-
setSmallIconPath
Sets the small icon path.- Parameters:
smallIconPath
- the samll icon path to set
-
setup
Default implementation.It takes the icon path from
property, or uses a default icon if undefined, the name is taken from theCmsPropertyDefinition.PROPERTY_NAVIMAGE
property, or uses theCmsPropertyDefinition.PROPERTY_NAVTEXT
property 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_TITLE
to 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 theVALUE_SEPARATOR
property or a default text if undefined, if you want to customize a help text while disabled, use aCmsPropertyDefinition.PROPERTY_DESCRIPTION
as a separator in the same property.VALUE_SEPARATOR
The group is taken from the
property, the position from theCmsPropertyDefinition.PROPERTY_NAVINFO
and the install path is given by the folder structure if theCmsPropertyDefinition.PROPERTY_NAVPOS
property does not include path information.ARGS_PROPERTY_DEFINITION
For 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}VALUE_SEPARATOR
The confirmation message is taken from the
with keyARGS_PROPERTY_DEFINITION
#ARG_CONFIRMATION_NAME
- Specified by:
setup
in interfaceI_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:
false
if something goes wrong- See Also:
-
toString
-
setLink
Sets the link for the given resource.Use the
resourcePath
as link if it is not a folder. If it is a folder, try to use the folder default file property value as link. if not use theCmsToolManager.VIEW_JSPPAGE_LOCATION
.- Parameters:
cms
- the cms contextresourcePath
- the path to the resource to set the link for
-
setParameters
Sets the needed properties from theARGS_PROPERTY_DEFINITION
property of the given resource.- Parameters:
cms
- the cms contextresourcePath
- the path to the resource to read the property from
-