Package com.logicaldoc.core.security
Class Menu
- java.lang.Object
-
- com.logicaldoc.core.PersistentObject
-
- com.logicaldoc.core.security.Menu
-
- All Implemented Interfaces:
Serializable,Comparable<Menu>
public class Menu extends PersistentObject implements Comparable<Menu>
This class represents the key concept of security. A Menu not only models menus but also it is used as an element to build hierarchies. With menugroups you can associate groups to a given menu and grant some permissions. Also setting the recurityRef you can specify another reference menu that contains the security policies.- Version:
- 1.0
- Author:
- Michael Scholz, Marco Meschieri - LogicalDOC
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longACCOUNTstatic longADMIN_SESSIONSstatic longADMINISTRATIONstatic longALIASESstatic longCHATstatic longCONTACTSstatic longCUSTOM_ACTIONSstatic longDASHBOARDstatic longDOCUMENTSstatic longFRONTENDstatic longINTERFACE_DENSITYstatic longLOGSstatic longMAINMENUstatic longMESSAGESstatic longPARAMETERSstatic longPREVIEWstatic longRATINGstatic longROOTstatic longSEARCHstatic longSECURITYstatic longSESSIONSstatic longSETTINGSstatic longSUBSCRIPTIONSstatic intTYPE_CUSTOM_ACTIONstatic intTYPE_DEFAULTstatic longVERSIONS-
Fields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG
-
-
Constructor Summary
Constructors Constructor Description Menu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMenuGroup(MenuGroup mg)Adds a new element, substituting a previous one with the same groupId.voidclearMenuGroups()intcompareTo(Menu o)StringgetAutomation()StringgetDescription()intgetEnabled()StringgetIcon()longgetId()Unique identifier in the data storeMenuGroupgetMenuGroup(long groupId)long[]getMenuGroupIds()Set<MenuGroup>getMenuGroups()StringgetName()longgetParentId()intgetPosition()LonggetRoutineId()LonggetSecurityRef()intgetType()voidsetAutomation(String automation)voidsetDescription(String description)voidsetEnabled(int enabled)voidsetIcon(String icon)voidsetId(long id)voidsetMenuGroup(long[] groups)Adds MenuGroup object given in a String array to the ArrayList of MenuGroups.voidsetMenuGroups(Set<MenuGroup> mgroup)voidsetName(String name)voidsetParentId(long parentId)voidsetPosition(int position)voidsetRoutineId(Long routineId)voidsetSecurityRef(Long securityRef)voidsetType(int type)-
Methods inherited from class com.logicaldoc.core.PersistentObject
equals, getDeleted, getLastModified, getRecordVersion, getTenantId, hashCode, setDeleted, setLastModified, setRecordVersion, setTenantId, toString
-
-
-
-
Field Detail
-
ROOT
public static final long ROOT
- See Also:
- Constant Field Values
-
ADMINISTRATION
public static final long ADMINISTRATION
- See Also:
- Constant Field Values
-
FRONTEND
public static final long FRONTEND
- See Also:
- Constant Field Values
-
SETTINGS
public static final long SETTINGS
- See Also:
- Constant Field Values
-
SECURITY
public static final long SECURITY
- See Also:
- Constant Field Values
-
MAINMENU
public static final long MAINMENU
- See Also:
- Constant Field Values
-
DOCUMENTS
public static final long DOCUMENTS
- See Also:
- Constant Field Values
-
SEARCH
public static final long SEARCH
- See Also:
- Constant Field Values
-
DASHBOARD
public static final long DASHBOARD
- See Also:
- Constant Field Values
-
MESSAGES
public static final long MESSAGES
- See Also:
- Constant Field Values
-
SESSIONS
public static final long SESSIONS
- See Also:
- Constant Field Values
-
VERSIONS
public static final long VERSIONS
- See Also:
- Constant Field Values
-
ALIASES
public static final long ALIASES
- See Also:
- Constant Field Values
-
PREVIEW
public static final long PREVIEW
- See Also:
- Constant Field Values
-
RATING
public static final long RATING
- See Also:
- Constant Field Values
-
PARAMETERS
public static final long PARAMETERS
- See Also:
- Constant Field Values
-
ADMIN_SESSIONS
public static final long ADMIN_SESSIONS
- See Also:
- Constant Field Values
-
LOGS
public static final long LOGS
- See Also:
- Constant Field Values
-
SUBSCRIPTIONS
public static final long SUBSCRIPTIONS
- See Also:
- Constant Field Values
-
ACCOUNT
public static final long ACCOUNT
- See Also:
- Constant Field Values
-
CONTACTS
public static final long CONTACTS
- See Also:
- Constant Field Values
-
CHAT
public static final long CHAT
- See Also:
- Constant Field Values
-
INTERFACE_DENSITY
public static final long INTERFACE_DENSITY
- See Also:
- Constant Field Values
-
CUSTOM_ACTIONS
public static final long CUSTOM_ACTIONS
- See Also:
- Constant Field Values
-
TYPE_DEFAULT
public static final int TYPE_DEFAULT
- See Also:
- Constant Field Values
-
TYPE_CUSTOM_ACTION
public static final int TYPE_CUSTOM_ACTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public long getId()
Description copied from class:PersistentObjectUnique identifier in the data store- Overrides:
getIdin classPersistentObject- Returns:
- the unique identifier of this record
-
getParentId
public long getParentId()
-
getIcon
public String getIcon()
-
getType
public int getType()
-
clearMenuGroups
public void clearMenuGroups()
-
setId
public void setId(long id)
- Overrides:
setIdin classPersistentObject
-
setParentId
public void setParentId(long parentId)
-
setIcon
public void setIcon(String icon)
-
setType
public void setType(int type)
-
getMenuGroupIds
public long[] getMenuGroupIds()
-
setMenuGroup
public void setMenuGroup(long[] groups)
Adds MenuGroup object given in a String array to the ArrayList of MenuGroups.- Parameters:
groups- array of group ids
-
addMenuGroup
public void addMenuGroup(MenuGroup mg)
Adds a new element, substituting a previous one with the same groupId.- Parameters:
mg- the menu group
-
getMenuGroup
public MenuGroup getMenuGroup(long groupId)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getSecurityRef
public Long getSecurityRef()
-
setSecurityRef
public void setSecurityRef(Long securityRef)
-
compareTo
public int compareTo(Menu o)
- Specified by:
compareToin interfaceComparable<Menu>
-
getPosition
public int getPosition()
-
setPosition
public void setPosition(int position)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getEnabled
public int getEnabled()
-
setEnabled
public void setEnabled(int enabled)
-
getRoutineId
public Long getRoutineId()
-
setRoutineId
public void setRoutineId(Long routineId)
-
getAutomation
public String getAutomation()
-
setAutomation
public void setAutomation(String automation)
-
-