Package de.xima.fc.gui.common.model
Class MenuEntryModel
- java.lang.Object
-
- de.xima.fc.gui.common.model.MenuEntryModel
-
- All Implemented Interfaces:
IMenuEntryModel
,Serializable
- Direct Known Subclasses:
SubMenuEntryModel
public class MenuEntryModel extends Object implements IMenuEntryModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MenuEntryModel.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
MenuEntryModel()
-
Method Summary
-
-
-
Method Detail
-
getText
public String getText()
- Specified by:
getText
in interfaceIMenuEntryModel
- Returns:
- The name of this menu entry, as shown in the menu.
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIMenuEntryModel
- Returns:
- A long description or explanation for this menu entry.
-
getChildren
public List<IMenuEntryModel> getChildren()
- Specified by:
getChildren
in interfaceIMenuEntryModel
- Returns:
- All children of this menu entry.
-
addChild
public IMenuEntryModel addChild(IMenuEntryModel child)
- Specified by:
addChild
in interfaceIMenuEntryModel
-
addChild
public IMenuEntryModel addChild(org.apache.commons.lang3.builder.Builder<IMenuEntryModel> child)
- Specified by:
addChild
in interfaceIMenuEntryModel
-
getId
public String getId()
- Specified by:
getId
in interfaceIMenuEntryModel
- Returns:
- The unique ID of this menu entry. Can be used as an HTML id.
-
getIcon
public IGuiIcon getIcon()
- Specified by:
getIcon
in interfaceIMenuEntryModel
- Returns:
- Icon this menu entry if it has one, or
null
.
-
getHref
public String getHref()
- Specified by:
getHref
in interfaceIMenuEntryModel
- Returns:
- The link to this menu entry. For internal pages, this is the relative link.
-
getHelpID
public String getHelpID()
- Specified by:
getHelpID
in interfaceIMenuEntryModel
- Returns:
- The ID for the help page for this menu entry. The help pages are currently located at http://help.formcycle.eu
-
isRendered
public boolean isRendered()
- Specified by:
isRendered
in interfaceIMenuEntryModel
- Returns:
- Whether this menu entry is displayed. Note that a menu entry may not be displayed on a particular page, but
still be
IMenuEntryModel.isAccessable()
by that user.
-
isExternal
public boolean isExternal()
- Specified by:
isExternal
in interfaceIMenuEntryModel
- Returns:
- the external
-
isRenderedOnDash
public boolean isRenderedOnDash()
- Specified by:
isRenderedOnDash
in interfaceIMenuEntryModel
- Returns:
- Whether this item is available on the client (normal) dashboard.
-
isAccessable
public boolean isAccessable()
- Specified by:
isAccessable
in interfaceIMenuEntryModel
- Returns:
- Whether the current user is allowed to access this menu entry.
-
getAdminDashCategory
public EAdminDashCategory getAdminDashCategory()
- Specified by:
getAdminDashCategory
in interfaceIMenuEntryModel
- Returns:
- If
null
, this item is not available on the sadmin dashboard. Otherwise, it is available under that category.
-
setText
public void setText(String text)
-
setDescription
public void setDescription(String description)
-
setId
public void setId(String id)
-
setIcon
public void setIcon(IGuiIcon icon)
-
getStyleClass
public String getStyleClass()
-
setStyleClass
public void setStyleClass(String styleClass)
-
setHref
public void setHref(String href)
-
setHelpID
public void setHelpID(String helpID)
-
setRendered
public void setRendered(boolean rendered)
-
setRenderedOnDash
public void setRenderedOnDash(boolean renderedOnDash)
-
setAdminDashCategory
public void setAdminDashCategory(EAdminDashCategory adminDashCategory)
-
setExternal
public void setExternal(boolean external)
-
setAccessable
public void setAccessable(boolean accessable)
-
getTarget
public String getTarget()
- Specified by:
getTarget
in interfaceIMenuEntryModel
-
setTarget
public void setTarget(String target)
-
getParent
public IMenuEntryModel getParent()
- Specified by:
getParent
in interfaceIMenuEntryModel
- Returns:
- The parent of this entry, or
null
if it is a root entry.
-
setParent
public void setParent(MenuEntryModel parent)
- Specified by:
setParent
in interfaceIMenuEntryModel
- Parameters:
parent
- The parent of this entry, ornull
if it is a root entry.
-
isHasRenderedChildren
public boolean isHasRenderedChildren()
- Specified by:
isHasRenderedChildren
in interfaceIMenuEntryModel
- Returns:
- Whether this entry contains any child that is rendered.
-
isLicensed
@Deprecated public boolean isLicensed()
Deprecated.- Specified by:
isLicensed
in interfaceIMenuEntryModel
- Returns:
true
if the license allows this feature,false
otherwise.
-
setLicensed
@Deprecated public void setLicensed(boolean licensed)
Deprecated.
-
-