Class MenuItem
- java.lang.Object
-
- org.silverpeas.core.web.treemenu.model.MenuItem
-
- All Implemented Interfaces:
Serializable
public class MenuItem extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MenuItem(String label)default constructorMenuItem(String label, String key, int level, NodeType type, boolean leaf, MenuItem father, String componentId)minimal constructor allows building menu item with all essential attributesMenuItem(ArrayList<MenuItem> children, String label, String key, int level, NodeType type, String target, String url, int nbObjects, boolean leaf, String labelStyle, MenuItem father, String componentId)full constructor allows building menu item with all his attributes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<MenuItem>getChildren()StringgetComponentId()StringgetComponentName()MenuItemgetFather()StringgetKey()StringgetLabel()StringgetLabelStyle()intgetLevel()intgetNbObjects()StringgetTarget()NodeTypegetType()StringgetUrl()inthashCode()booleanisLeaf()voidsetChildren(ArrayList<MenuItem> children)voidsetComponentId(String componentId)voidsetComponentName(String componentName)voidsetFather(MenuItem father)voidsetKey(String key)voidsetLabel(String label)voidsetLabelStyle(String labelStyle)voidsetLeaf(boolean leaf)voidsetLevel(int level)voidsetNbObjects(int nbObjects)voidsetTarget(String target)voidsetType(NodeType type)voidsetUrl(String url)StringtoString()
-
-
-
Constructor Detail
-
MenuItem
public MenuItem(String label)
default constructor
-
MenuItem
public MenuItem(ArrayList<MenuItem> children, String label, String key, int level, NodeType type, String target, String url, int nbObjects, boolean leaf, String labelStyle, MenuItem father, String componentId)
full constructor allows building menu item with all his attributes- Parameters:
children- the children of current menu elementlabel- the label to display for current element label must be in the correct languagekey- unique key to identify the itemlevel- item level in the tree menutype- type of node (component, space or theme)target- value of The HTML Target Attribute for Anchors (<a>) possible values = _blank, _self, _parent, _top.url- URL to call when click on a menu itemnbObjects- number of results contained in a nodeleaf- indicates if a node is a leaf or a branchlabelStyle- style to apply on labelfather- father node of current itemcomponentId- component identifier for example "kmelia1". This attribute is used only to identify the theme component's
-
MenuItem
public MenuItem(String label, String key, int level, NodeType type, boolean leaf, MenuItem father, String componentId)
minimal constructor allows building menu item with all essential attributes- Parameters:
label- the label to display for current element label must be in the correct languagekey- unique key to identify the itemlevel- item level in the tree menutype- type of node (component, space or theme)leaf- indicates if a node is a leaf or a branchfather- father node of current itemcomponentId- component identifier for example "kmelia1". This attribute is used only to identify the theme component's
-
-
Method Detail
-
getComponentName
public String getComponentName()
- Returns:
- the componentName
-
setComponentName
public void setComponentName(String componentName)
- Parameters:
componentName- the componentName to set
-
setChildren
public void setChildren(ArrayList<MenuItem> children)
- Parameters:
children- the children to set
-
getLabel
public String getLabel()
- Returns:
- the label
-
setLabel
public void setLabel(String label)
- Parameters:
label- the label to set
-
getKey
public String getKey()
- Returns:
- the key
-
setKey
public void setKey(String key)
- Parameters:
key- the key to set
-
getLevel
public int getLevel()
- Returns:
- the level
-
setLevel
public void setLevel(int level)
- Parameters:
level- the level to set
-
getType
public NodeType getType()
- Returns:
- the type
-
setType
public void setType(NodeType type)
- Parameters:
type- the type to set
-
getTarget
public String getTarget()
- Returns:
- the target
-
setTarget
public void setTarget(String target)
- Parameters:
target- the target to set
-
getUrl
public String getUrl()
- Returns:
- the url
-
setUrl
public void setUrl(String url)
- Parameters:
url- the url to set
-
getNbObjects
public int getNbObjects()
- Returns:
- the nbObjects
-
setNbObjects
public void setNbObjects(int nbObjects)
- Parameters:
nbObjects- the nbObjects to set
-
isLeaf
public boolean isLeaf()
- Returns:
- the leaf
-
setLeaf
public void setLeaf(boolean leaf)
- Parameters:
leaf- the leaf to set
-
getLabelStyle
public String getLabelStyle()
- Returns:
- the labelStyle
-
setLabelStyle
public void setLabelStyle(String labelStyle)
- Parameters:
labelStyle- the labelStyle to set
-
getFather
public MenuItem getFather()
- Returns:
- the father
-
setFather
public void setFather(MenuItem father)
- Parameters:
father- the father to set
-
getComponentId
public String getComponentId()
- Returns:
- the componentId
-
setComponentId
public void setComponentId(String componentId)
- Parameters:
componentId- the componentId to set
-
-