Package com.logicaldoc.core.security
Class Menu
- java.lang.Object
-
- com.logicaldoc.core.PersistentObject
-
- com.logicaldoc.core.security.Menu
-
- All Implemented Interfaces:
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
-
-
Field Summary
Fields Modifier and Type Field Description static long
ACCOUNT
static long
ADMIN_SESSIONS
static long
ADMINISTRATION
static long
ALIASES
static long
CHAT
static long
CONTACTS
static long
CUSTOM_ACTIONS
static long
DASHBOARD
static long
DOCUMENTS
static long
FRONTEND
static long
INTERFACE_DENSITY
static long
LOGS
static long
MAINMENU
static long
MESSAGES
static long
PARAMETERS
static long
PREVIEW
static long
RATING
static long
ROOT
static long
SEARCH
static long
SECURITY
static long
SESSIONS
static long
SETTINGS
static long
SUBSCRIPTIONS
static int
TYPE_CUSTOM_ACTION
static int
TYPE_DEFAULT
static long
VERSIONS
-
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 void
addMenuGroup(MenuGroup mg)
Adds a new element, substituting a previous one with the same groupId.void
clearMenuGroups()
int
compareTo(Menu o)
String
getAutomation()
String
getDescription()
int
getEnabled()
String
getIcon()
long
getId()
Unique identifier in the data storeMenuGroup
getMenuGroup(long groupId)
long[]
getMenuGroupIds()
Set<MenuGroup>
getMenuGroups()
String
getName()
long
getParentId()
int
getPosition()
Long
getRoutineId()
Long
getSecurityRef()
int
getType()
void
setAutomation(String automation)
void
setDescription(String description)
void
setEnabled(int enabled)
void
setIcon(String icon)
void
setId(long id)
void
setMenuGroup(long[] groups)
Adds MenuGroup object given in a String array to the ArrayList of MenuGroups.void
setMenuGroups(Set<MenuGroup> mgroup)
void
setName(String name)
void
setParentId(long parentId)
void
setPosition(int position)
void
setRoutineId(Long routineId)
void
setSecurityRef(Long securityRef)
void
setType(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:PersistentObject
Unique identifier in the data store- Overrides:
getId
in 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:
setId
in 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:
compareTo
in 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)
-
-