org.opencms.workplace.tools
Class CmsRootToolHandler

java.lang.Object
  extended byorg.opencms.workplace.tools.A_CmsToolHandler
      extended byorg.opencms.workplace.tools.CmsRootToolHandler
All Implemented Interfaces:
I_CmsToolHandler

public class CmsRootToolHandler
extends A_CmsToolHandler

Default admin tool handler.

Always enabled and visible.

Since:
6.0.0
Version:
$Revision: 1.5 $
Author:
Michael Moossen

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
CmsRootToolHandler()
           
 
Method Summary
 boolean isEnabled(CmsObject cms)
          Returns the state of the admin tool for a given cms context.
 boolean isVisible(CmsObject cms)
          Returns the visibility flag for a given cms context.
 boolean setup(CmsObject cms, String resourcePath)
          Default implementation.
 
Methods inherited from class org.opencms.workplace.tools.A_CmsToolHandler
getDisabledHelpText, getGroup, getHelpText, getIconPath, getLink, getName, getParameters, getPath, getPosition, getShortName, getSmallIconPath, setDisabledHelpText, setGroup, setHelpText, setIconPath, setLink, setName, setParameters, setPath, setPosition, setShortName, setSmallIconPath, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsRootToolHandler

public CmsRootToolHandler()
Method Detail

isEnabled

public boolean isEnabled(CmsObject cms)
Description copied from interface: I_CmsToolHandler
Returns the state of the admin tool for a given cms context.

Parameters:
cms - the cms context
Returns:
true if enabled
See Also:
I_CmsToolHandler.isEnabled(org.opencms.file.CmsObject)

isVisible

public boolean isVisible(CmsObject cms)
Description copied from interface: I_CmsToolHandler
Returns the visibility flag for a given cms context.

Parameters:
cms - the cms context
Returns:
true if visible
See Also:
I_CmsToolHandler.isVisible(org.opencms.file.CmsObject)

setup

public boolean setup(CmsObject cms,
                     String resourcePath)
Description copied from class: A_CmsToolHandler
Default implementation. It takes the icon path from CmsPropertyDefinition.PROPERTY_NAVIMAGE property, or uses a default icon if undefined, the name is taken from the CmsPropertyDefinition.PROPERTY_NAVTEXT property, or uses the CmsPropertyDefinition.PROPERTY_TITLE 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 a A_CmsToolHandler.VALUE_SEPARATOR 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 the CmsPropertyDefinition.PROPERTY_DESCRIPTION property or a default text if undefined, if you want to custumize a help text while disabled, use a A_CmsToolHandler.VALUE_SEPARATOR as a separator in the same property.

The group is taken from the CmsPropertyDefinition.PROPERTY_NAVINFO property, the position from the CmsPropertyDefinition.PROPERTY_NAVPOS and the install path is given by the folder structure if the A_CmsToolHandler.ARGS_PROPERTY_DEFINITION property does not include path information.

For the icon path you can specify 2 paths separated by a A_CmsToolHandler.VALUE_SEPARATOR, the first one will be used as a group icon (32x32), and the second as an menu icon (16x16).

Specified by:
setup in interface I_CmsToolHandler
Overrides:
setup in class A_CmsToolHandler
See Also:
A_CmsToolHandler.setup(org.opencms.file.CmsObject, java.lang.String)