Package org.opencms.workplace.tools
Class CmsTool
- java.lang.Object
-
- org.opencms.workplace.tools.CmsTool
-
public class CmsTool extends java.lang.Object
Implementation of an administration tool.An admin tool can be a link to itself through the
method, as also a group ofbuttonHtml(CmsWorkplace)
s through theCmsToolGroup
method.groupHtml(CmsWorkplace)
- Since:
- 6.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsTool(java.lang.String id, I_CmsToolHandler handler)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToolGroup(CmsToolGroup group)
Adds a group.void
addToolGroup(CmsToolGroup group, float position)
Adds a group at the given position.java.lang.String
buttonHtml(CmsWorkplace wp)
Returns the necessary html code for a link to this tool.boolean
equals(java.lang.Object obj)
Compares two tools by name.I_CmsToolHandler
getHandler()
Returns the handler.java.lang.String
getId()
Returns the dhtml unique id.CmsToolGroup
getToolGroup(java.lang.String name)
Returns the requested group.java.util.List<CmsToolGroup>
getToolGroups()
Returns a list of groups.java.lang.String
groupHtml(CmsWorkplace wp)
Returns the necessary html code for the tool subgroups.int
hashCode()
-
-
-
Constructor Detail
-
CmsTool
public CmsTool(java.lang.String id, I_CmsToolHandler handler)
Default Constructor.- Parameters:
id
- a unique idhandler
- the handler that represents this tool
-
-
Method Detail
-
addToolGroup
public void addToolGroup(CmsToolGroup group)
Adds a group.- Parameters:
group
- the group- See Also:
CmsIdentifiableObjectContainer.addIdentifiableObject(String, Object)
-
addToolGroup
public void addToolGroup(CmsToolGroup group, float position)
Adds a group at the given position.- Parameters:
group
- the groupposition
- the position- See Also:
CmsIdentifiableObjectContainer.addIdentifiableObject(String, Object, float)
-
buttonHtml
public java.lang.String buttonHtml(CmsWorkplace wp)
Returns the necessary html code for a link to this tool.- Parameters:
wp
- the jsp page to write the code to- Returns:
- html code
-
equals
public boolean equals(java.lang.Object obj)
Compares two tools by name.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the other tool- Returns:
true
if the tools have the same name
-
getHandler
public I_CmsToolHandler getHandler()
Returns the handler.- Returns:
- the handler
-
getId
public java.lang.String getId()
Returns the dhtml unique id.- Returns:
- the dhtml unique id
-
getToolGroup
public CmsToolGroup getToolGroup(java.lang.String name)
Returns the requested group.- Parameters:
name
- the name of the group- Returns:
- the group
- See Also:
CmsIdentifiableObjectContainer.getObject(String)
-
getToolGroups
public java.util.List<CmsToolGroup> getToolGroups()
Returns a list of groups.- Returns:
- a list of
CmsToolGroup
-
groupHtml
public java.lang.String groupHtml(CmsWorkplace wp)
Returns the necessary html code for the tool subgroups.- Parameters:
wp
- the jsp page to write the code to- Returns:
- html code
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
-