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:
  • Field Details

  • Constructor Details

    • Menu

      public Menu()
  • Method Details

    • getId

      public long getId()
      Description copied from class: PersistentObject
      Unique identifier in the data store
      Overrides:
      getId in class PersistentObject
      Returns:
      the unique identifier of this record
    • getParentId

      public long getParentId()
    • getIcon

      public String getIcon()
    • getType

      public int getType()
    • getMenuGroups

      public Set<MenuGroup> getMenuGroups()
    • clearMenuGroups

      public void clearMenuGroups()
    • setId

      public void setId(long id)
      Overrides:
      setId in class PersistentObject
    • setParentId

      public void setParentId(long parentId)
    • setIcon

      public void setIcon(String icon)
    • setType

      public void setType(int type)
    • setMenuGroups

      public void setMenuGroups(Set<MenuGroup> mgroup)
    • 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 interface Comparable<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)