public class MenuNode extends Object
Constructor and Description |
---|
MenuNode(int level) |
Modifier and Type | Method and Description |
---|---|
void |
add(String path,
String vendor,
String serviceClass) |
int |
add(String path,
String vendor,
String serviceClass,
String iconURL)
Add a new node to the menu.
|
Iterable<MenuNode> |
children()
Get an iterator for all children of this node.
|
String |
getIconURL() |
String |
getLabel()
Get the label of this node.
|
MenuNode |
getParent()
Get the parent of this node.
|
String |
getPath()
Get the path of this node.
|
ServiceRequest |
getService(Resource user)
Create a service request with the user as well as service class and
vendor of this node (if this node a leaf node and has an associated
service).
|
boolean |
hasChild()
Determines whether this node has children.
|
boolean |
hasService()
Determines whether a service (and a vendor) is bound to this node.
|
protected MenuNode |
newMenuNode(int level) |
public int add(String path, String vendor, String serviceClass, String iconURL)
path
- The path of possibly multiple labels according to the
different levels in the menu.vendor
- The vendor of the service.serviceClass
- The class the service implements.protected MenuNode newMenuNode(int level)
public Iterable<MenuNode> children()
public String getLabel()
public MenuNode getParent()
public String getPath()
public ServiceRequest getService(Resource user)
user
- The user.public boolean hasChild()
public boolean hasService()
public String getIconURL()
Copyright © 2018 universAAL Consortium. All rights reserved.