org.opencms.workplace.explorer
Class CmsExplorerContextMenuItem

java.lang.Object
  extended byorg.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
Version:
$Revision: 1.12 $
Author:
Andreas Zahner

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 getKey()
          Returns the key for localization.
 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 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 setKey(java.lang.String key)
          Sets the key for localization.
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

getKey

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

Returns:
the key for localization

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 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

setKey

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

Parameters:
key - the key for localization

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