com.silverpeas.treeMenu.model
Class MenuItem
java.lang.Object
com.silverpeas.treeMenu.model.MenuItem
- All Implemented Interfaces:
- Serializable
public class MenuItem
- extends Object
- implements Serializable
- See Also:
- Serialized Form
Constructor Summary |
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 |
MenuItem(String label)
default constructor |
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 |
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
getComponentName
public String getComponentName()
- Returns:
- the componentName
setComponentName
public void setComponentName(String componentName)
- Parameters:
componentName
- the componentName to set
getChildren
public List<MenuItem> getChildren()
- Returns:
- the children
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
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2016 Silverpeas. All Rights Reserved.