org.opencms.workplace.explorer
Class CmsExplorerContextMenuItem

java.lang.Object
  extended by org.opencms.workplace.explorer.CmsExplorerContextMenuItem

public class CmsExplorerContextMenuItem
extends java.lang.Object

Provides information about a single context menu item for a resource type in the OpenCms explorer view.

An item can be a context menu entry or a separator line.

Since:
6.0.0

Field Summary
static java.lang.String TYPE_ENTRY
          The name for an entry type.
static java.lang.String TYPE_SEPARATOR
          The name for a separator type.
 
Constructor Summary
CmsExplorerContextMenuItem()
          Empty constructor that creates a single context menu entry.
 
Method Summary
 void addContextMenuEntry(CmsExplorerContextMenuItem item)
          Adds a menu sub entry to this context menu item.
 void addContextMenuSeparator(CmsExplorerContextMenuItem item)
          Adds a menu separator to this context menu item.
protected  void addSubItem(CmsExplorerContextMenuItem item, java.lang.String type)
          Adds a sub item entry to this context menu item.
 java.lang.String getIcon()
          Returns the icon.
 java.lang.String getKey()
          Returns the key for localization.
 java.lang.String getName()
          Returns the name.
 java.lang.String getParams()
          Gets the parameters for the context menu command.
 java.util.Map<java.lang.String,java.lang.String> getParamsMap()
          Gets the parameters as a map of strings.
 CmsExplorerContextMenuItem getParent()
          Returns the parent context menu entry item of a sub menu item.
 java.lang.String getRule()
          Returns the name of the menu rule set.
 java.lang.String getRules()
          Returns the set of display rules.
 java.util.List<CmsExplorerContextMenuItem> getSubItems()
          Returns the sub item entries of this context menu item.
 java.lang.String getTarget()
          Returns the frame target of the current item.
 java.lang.String getType()
          Returns the type of the current item.
 java.lang.String getUri()
          Returns the dialog URI of the current item.
 boolean isParentItem()
          Returns if the item is a main item with configured sub items.
 boolean isSubItem()
          Returns if the item is a sub item.
 void setIcon(java.lang.String iconPath)
          Sets the icon path.
 void setKey(java.lang.String key)
          Sets the key for localization.
 void setName(java.lang.String name)
          Sets the name.
 void setParams(java.lang.String params)
          Sets the parameter string for the context menu command.
protected  void setParent(CmsExplorerContextMenuItem parent)
          Sets the parent context menu item for sub menu items.
 void setRule(java.lang.String rule)
          Sets the name of the menu rule set.
 void setRules(java.lang.String rules)
          Sets the set of display rules.
 void setTarget(java.lang.String target)
          Sets the frame target of the current item.
 void setType(java.lang.String type)
          Sets the type of the current item.
 void setUri(java.lang.String uri)
          Sets the dialog URI of the current item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ENTRY

public static final java.lang.String TYPE_ENTRY
The name for an entry type.

See Also:
Constant Field Values

TYPE_SEPARATOR

public static final java.lang.String TYPE_SEPARATOR
The name for a separator type.

See Also:
Constant Field Values
Constructor Detail

CmsExplorerContextMenuItem

public CmsExplorerContextMenuItem()
Empty constructor that creates a single context menu entry.

Method Detail

addContextMenuEntry

public void addContextMenuEntry(CmsExplorerContextMenuItem item)
Adds a menu sub entry to this context menu item.

Parameters:
item - the entry item to add to this context menu item

addContextMenuSeparator

public void addContextMenuSeparator(CmsExplorerContextMenuItem item)
Adds a menu separator to this context menu item.

Parameters:
item - the separator item to add to this context menu item

getIcon

public java.lang.String getIcon()
Returns the icon.

Returns:
the icon

getKey

public java.lang.String getKey()
Returns the key for localization.

Returns:
the key for localization

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

getParams

public java.lang.String getParams()
Gets the parameters for the context menu command.

Returns:
the parameter string for the context menu command

getParamsMap

public java.util.Map<java.lang.String,java.lang.String> getParamsMap()
Gets the parameters as a map of strings.

Returns:
the parameters as a map of strings

getParent

public CmsExplorerContextMenuItem getParent()
Returns the parent context menu entry item of a sub menu item.

Returns:
the parent context menu entry item

getRule

public java.lang.String getRule()
Returns the name of the menu rule set.

Returns:
the name of the menu rule set

getRules

public java.lang.String getRules()
Returns the set of display rules.

Returns:
the set of display rules

getSubItems

public java.util.List<CmsExplorerContextMenuItem> getSubItems()
Returns the sub item entries of this context menu item.

Returns:
the sub item entries of this context menu item

getTarget

public java.lang.String getTarget()
Returns the frame target of the current item.

Returns:
the frame target of the current item

getType

public java.lang.String getType()
Returns the type of the current item.

Returns:
the type of the current item

getUri

public java.lang.String getUri()
Returns the dialog URI of the current item.

Returns:
the dialog URI of the current item

isParentItem

public boolean isParentItem()
Returns if the item is a main item with configured sub items.

Returns:
true if the item is a main entry item with configured sub items, otherwise false

isSubItem

public boolean isSubItem()
Returns if the item is a sub item.

Returns:
true if the item is a sub entry item, otherwise false

setIcon

public void setIcon(java.lang.String iconPath)
Sets the icon path.

Parameters:
iconPath - the icon path for a menu entry

setKey

public void setKey(java.lang.String key)
Sets the key for localization.

Parameters:
key - the key for localization

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the name to set

setParams

public void setParams(java.lang.String params)
Sets the parameter string for the context menu command.

Parameters:
params - the parameter string for the context menu command

setRule

public void setRule(java.lang.String rule)
Sets the name of the menu rule set.

Parameters:
rule - the name of the menu rule set

setRules

public void setRules(java.lang.String rules)
Sets the set of display rules.

Parameters:
rules - the set of display rules

setTarget

public void setTarget(java.lang.String target)
Sets the frame target of the current item.

Parameters:
target - the frame target of the current item

setType

public void setType(java.lang.String type)
Sets the type of the current item.

Parameters:
type - the type of the current item

setUri

public void setUri(java.lang.String uri)
Sets the dialog URI of the current item.

Parameters:
uri - the dialog URI of the current item

addSubItem

protected void addSubItem(CmsExplorerContextMenuItem item,
                          java.lang.String type)
Adds a sub item entry to this context menu item.

Parameters:
item - the item to add to this context menu item
type - the item type to add

setParent

protected void setParent(CmsExplorerContextMenuItem parent)
Sets the parent context menu item for sub menu items.

Parameters:
parent - the parent context menu item