Package com.logicaldoc.core.security.menu

# Class Menu

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.security.menu.Menu

All Implemented Interfaces:
  `Secure<AccessControlEntry>`, `Serializable`, `Comparable<Menu>`

@Entity public class Menu extends PersistentObject implements Secure<AccessControlEntry>, 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 final long`
`ACCOUNT`
`static final long`
`ADMIN_SESSIONS`
`static final long`
`ADMINISTRATION`
`static final long`
`ALIASES`
`static final long`
`AUDITING`
`static final long`
`CHAT`
`static final long`
`CONTACTS`
`static final long`
`CUSTOM_ACTIONS`
`static final long`
`DASHBOARD`
`static final long`
`DESTROY_DOCUMENTS`
`static final long`
`DOCUMENTS`
`static final long`
`FRONTEND`
`static final long`
`INTERFACE_DENSITY`
`static final long`
`LOGS`
`static final long`
`MAINMENU`
`static final long`
`MESSAGES`
`static final long`
`PARAMETERS`
`static final long`
`PREVIEW`
`static final long`
`RATING`
`static final long`
`ROOT`
`static final long`
`SEARCH`
`static final long`
`SECURITY`
`static final long`
`SESSIONS`
`static final long`
`SETTINGS`
`static final long`
`SUBSCRIPTIONS`
`static final long`
`TOOLS`
`static final int`
`TYPE_CUSTOM_ACTION`
`static final int`
`TYPE_DEFAULT`
`static final long`
`VERSIONS`

### Fields inherited from class com.logicaldoc.core.PersistentObject

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`Menu()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addAccessControlEntry(AccessControlEntry ace)`
Adds a new entry, replacing a previous one with the same groupId.
`int`
`compareTo(Menu other)`
`boolean`
`equals(Object obj)`
`Set<AccessControlEntry>`
`getAccessControlEntries(Set<Long> groupIds)`
Retrieves the set of entries related to whatever group within the specified set.
`AccessControlEntry`
`getAccessControlEntry(long groupId)`
`Set<AccessControlEntry>`
`getAccessControlList()`
`String`
`getAutomation()`
`String`
`getDescription()`
`String`
`getIcon()`
`String`
`getName()`
`long`
`getParentId()`
`int`
`getPosition()`
`Long`
`getRoutineId()`
`int`
`getType()`
`int`
`hashCode()`
`boolean`
`isEnabled()`
`void`
`removeAccessControlEntries(long groupId)`
Removes all the ACEs related to the given group.
`void`
`setAccessControlList(Set<AccessControlEntry> acl)`
`void`
`setAutomation(String automation)`
`void`
`setDescription(String description)`
`void`
`setEnabled(boolean enabled)`
`void`
`setIcon(String icon)`
`void`
`setName(String name)`
`void`
`setParentId(long parentId)`
`void`
`setPosition(int position)`
`void`
`setRoutineId(Long routineId)`
`void`
`setType(int type)`

### Methods inherited from class com.logicaldoc.core.PersistentObject

`getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### 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

### TOOLS

public static final long TOOLS

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

### AUDITING

public static final long AUDITING

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

### DESTROY_DOCUMENTS

public static final long DESTROY_DOCUMENTS

See Also:
  - Constant Field Values

## Constructor Details

### Menu

public Menu()

## Method Details

### getParentId

public long getParentId()

### getIcon

public String getIcon()

### getType

public int getType()

### setParentId

public void setParentId(long parentId)

### setIcon

public void setIcon(String icon)

### setType

public void setType(int type)

### getDescription

public String getDescription()

### setDescription

public void setDescription(String description)

### getPosition

public int getPosition()

### setPosition

public void setPosition(int position)

### getName

public String getName()

### setName

public void setName(String name)

### isEnabled

public boolean isEnabled()

### setEnabled

public void setEnabled(boolean enabled)

### getRoutineId

public Long getRoutineId()

### setRoutineId

public void setRoutineId(Long routineId)

### getAutomation

public String getAutomation()

### setAutomation

public void setAutomation(String automation)

### setAccessControlList

public void setAccessControlList(Set<AccessControlEntry> acl)

Specified by:
  `setAccessControlList` in interface `Secure<AccessControlEntry>`

### getAccessControlList

public Set<AccessControlEntry> getAccessControlList()

Specified by:
  `getAccessControlList` in interface `Secure<AccessControlEntry>`

### getAccessControlEntry

public AccessControlEntry getAccessControlEntry(long groupId)

Specified by:
  `getAccessControlEntry` in interface `Secure<AccessControlEntry>`

### getAccessControlEntries

public Set<AccessControlEntry> getAccessControlEntries(Set<Long> groupIds)
Description copied from interface: `Secure`
Retrieves the set of entries related to whatever group within the specified set.

Specified by:
  `getAccessControlEntries` in interface `Secure<AccessControlEntry>`
Parameters:
  `groupIds` - identifiers of groups
Returns:
  The set of matching entries

### addAccessControlEntry

public void addAccessControlEntry(AccessControlEntry ace)
Description copied from interface: `Secure`
Adds a new entry, replacing a previous one with the same groupId.

Specified by:
  `addAccessControlEntry` in interface `Secure<AccessControlEntry>`
Parameters:
  `ace` - the access control entry to add

### removeAccessControlEntries

public void removeAccessControlEntries(long groupId)
Description copied from interface: `Secure`
Removes all the ACEs related to the given group.

Specified by:
  `removeAccessControlEntries` in interface `Secure<AccessControlEntry>`
Parameters:
  `groupId` - Identifier of the group

### compareTo

public int compareTo(Menu other)

Specified by:
  `compareTo` in interface `Comparable<Menu>`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `PersistentObject`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `PersistentObject`