Class GroupDB

  • All Implemented Interfaces:
    java.io.Serializable

    public class GroupDB
    extends java.lang.Object
    implements java.io.Serializable
    Group rights and hierarchy
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TYPE_DOCUMENT
      Document rights
      static java.lang.String TYPE_GRANT
      Objects rights
      static java.lang.String TYPE_NOTIFICATION
      Notification group or topic
      static java.lang.String TYPE_REGISTRY
      Registration rights
      static java.lang.String TYPE_WORKFLOW
      Workflow rights
    • Constructor Summary

      Constructors 
      Constructor Description
      GroupDB​(java.lang.String id, java.lang.String name, java.lang.String type)
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addChild​(GroupDB group)
      Add a group to children
      void addDomain​(java.lang.String domain)
      Add an accessible domain
      GroupDB.ObjectDefinition addObject​(java.lang.String object, boolean intern, java.lang.String module, java.lang.String scriptId, java.lang.String dbtable, java.lang.String location)
      Add an object in group
      void addProcess​(java.lang.String process)
      Add a process to accessible processes for the group
      void addProfile​(GroupDB group)
      Add a group to profile
      void addShortcut​(Shortcut shortcut)
      Add a shortcut to accessible shortcuts
      void addSimpleView​(View view)
      Add simple view
      void addUserFilter​(java.lang.String field, java.lang.String object)
      Add user filter to accessible user filters
      void addWebZone​(WebZone webzone)
      Add a web zone to accessible web zones
      void clearShortcuts()
      Clear accessible shortcuts
      void clearWebZones()
      Clear accessible web zones
      java.util.List<GroupDB> getChildren()
      Get the children
      java.lang.String getDisplay​(java.lang.String lang)
      Get group display label
      java.util.List<java.lang.String> getDomains()
      Get Accessible domains
      static java.lang.String getGroupId​(java.lang.String name)
      Returns group ID for specified name
      static java.util.List<java.lang.String[]> getGroups​(java.lang.String type, java.lang.String lang)
      List non-cached groups
      java.lang.String getHelp​(java.lang.String lang)
      Get short description
      java.lang.String getHomePage()
      Get related home page to determine a scope
      java.lang.String getId()
      Get the group ID
      java.lang.String getName()
      Get the group name
      GroupDB.ObjectDefinition getObject​(java.lang.String object)
      Get an accessible object for the group
      java.util.Map<java.lang.String,​GroupDB.ObjectDefinition> getObjects()
      Get all accessible objects for the group
      GroupDB getParent()
      Get the parent group
      java.util.List<java.lang.String> getProcesses()
      Get all accessible processes for the group
      java.util.List<GroupDB> getProfile()
      Get the profile (set of groups)
      java.util.List<Shortcut> getShortcuts()
      Get all accessible Shortcuts for the group
      java.util.List<View> getSimpleViews()
      Get all accessible Views for the group
      java.util.List<GroupDB.GroupUserFilter> getUserFilters()
      Get all accessible user filters
      static java.lang.String getUserId​(java.lang.String login)
      Deprecated.
      Use Grant.getUserId
      static java.lang.String getUserLogin​(java.lang.String userId)
      Deprecated.
      Use Grant.getUserLogin
      static java.lang.String getUserModuleId​(java.lang.String login)
      Deprecated.
      Use Grant.getUserModuleId
      static java.util.List<java.lang.String> getUsers​(java.lang.String group, java.lang.String date, java.lang.Boolean activ)
      List users granted to one group
      java.util.List<WebZone> getWebZones()
      Get all accessible web zones for the group
      boolean hasDateRangeFilter()
      Does the group contains at least one object with a date range for the user filtering?
      boolean hasType​(java.lang.String type)
      Has type?
      static boolean isDesignerUser​(java.lang.String login)
      Deprecated.
      Use Grant.isDesignerUser
      static boolean isPublicUser​(java.lang.String login)
      Deprecated.
      Use Grant.isPublicUser
      static boolean isSystemGroup​(java.lang.String name)
      Indicates whether specified group is a system group
      static boolean isSystemUser​(java.lang.String login)
      Deprecated.
      Use Grant.isSystemUser
      void removeChild​(GroupDB group)
      Remove a group from children
      void removeProfile​(GroupDB group)
      Remove a group in profile
      void setDateRangeFilter​(boolean b)
      Set whether the group contains at least one object with a date range for the user filtering
      void setDisplay​(java.lang.String lang, java.lang.String label)
      Set group display label
      void setHelp​(java.lang.String lang, java.lang.String help)
      Set short description
      void setHomePage​(java.lang.String home)
      Set related home page to determine a scope
      void setParent​(GroupDB group)
      Set the parent group
      void setType​(java.lang.String type)
      Set type
      java.lang.String toString()
      Get string representation
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TYPE_GRANT

        public static final java.lang.String TYPE_GRANT
        Objects rights
        See Also:
        Constant Field Values
      • TYPE_DOCUMENT

        public static final java.lang.String TYPE_DOCUMENT
        Document rights
        See Also:
        Constant Field Values
      • TYPE_WORKFLOW

        public static final java.lang.String TYPE_WORKFLOW
        Workflow rights
        See Also:
        Constant Field Values
      • TYPE_REGISTRY

        public static final java.lang.String TYPE_REGISTRY
        Registration rights
        See Also:
        Constant Field Values
      • TYPE_NOTIFICATION

        public static final java.lang.String TYPE_NOTIFICATION
        Notification group or topic
        See Also:
        Constant Field Values
    • Constructor Detail

      • GroupDB

        public GroupDB​(java.lang.String id,
                       java.lang.String name,
                       java.lang.String type)
        Constructor
        Parameters:
        id - ID
        name - Name
        type - Type
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the group ID
        Returns:
        Group ID
      • getName

        public java.lang.String getName()
        Get the group name
        Returns:
        Group name
      • getDisplay

        public java.lang.String getDisplay​(java.lang.String lang)
        Get group display label
        Returns:
        Display label
      • setDisplay

        public void setDisplay​(java.lang.String lang,
                               java.lang.String label)
        Set group display label
        Parameters:
        lang - Language
        label - Display label
      • getHelp

        public java.lang.String getHelp​(java.lang.String lang)
        Get short description
        Parameters:
        lang - Language
        Returns:
        SHort description
      • setHelp

        public void setHelp​(java.lang.String lang,
                            java.lang.String help)
        Set short description
        Parameters:
        lang - Language
        help - Short description
      • setType

        public void setType​(java.lang.String type)
        Set type
        Parameters:
        type - Type (one of GroupDB.TYPE_*)
      • hasType

        public boolean hasType​(java.lang.String type)
        Has type?
        Parameters:
        type - Type (one of GroupDB.TYPE_*)
        Returns:
        True if has type
      • getParent

        public GroupDB getParent()
        Get the parent group
        Returns:
        Parent group
      • setParent

        public void setParent​(GroupDB group)
        Set the parent group
        Parameters:
        group - Parent group
      • getChildren

        public java.util.List<GroupDB> getChildren()
        Get the children
        Returns:
        List of childern groups
      • addChild

        public void addChild​(GroupDB group)
        Add a group to children
        Parameters:
        group - Child group to add
      • removeChild

        public void removeChild​(GroupDB group)
        Remove a group from children
        Parameters:
        group - Child group to remove
      • getProfile

        public java.util.List<GroupDB> getProfile()
        Get the profile (set of groups)
        Returns:
        Profile
      • addProfile

        public void addProfile​(GroupDB group)
        Add a group to profile
        Parameters:
        group - Group to add
      • removeProfile

        public void removeProfile​(GroupDB group)
        Remove a group in profile
        Parameters:
        group - Group to remove
      • getHomePage

        public java.lang.String getHomePage()
        Get related home page to determine a scope
        Returns:
        Home page name
      • setHomePage

        public void setHomePage​(java.lang.String home)
        Set related home page to determine a scope
        Parameters:
        home - Home page name
      • getDomains

        public java.util.List<java.lang.String> getDomains()
        Get Accessible domains
        Returns:
        List of accessible domains
      • addDomain

        public void addDomain​(java.lang.String domain)
        Add an accessible domain
        Parameters:
        domain - Domain to add
      • getObjects

        public java.util.Map<java.lang.String,​GroupDB.ObjectDefinition> getObjects()
        Get all accessible objects for the group
        Returns:
        All accessible objects definitions for the group
      • getObject

        public GroupDB.ObjectDefinition getObject​(java.lang.String object)
        Get an accessible object for the group
        Returns:
        An accessible object definitions for the group
      • addObject

        public GroupDB.ObjectDefinition addObject​(java.lang.String object,
                                                  boolean intern,
                                                  java.lang.String module,
                                                  java.lang.String scriptId,
                                                  java.lang.String dbtable,
                                                  java.lang.String location)
        Add an object in group
        Parameters:
        object - Object name
        intern - Internal or External
        module - Module name
        scriptId - Optional script
        dbtable - Table name definition (may be in the form datasource;table)
        location - Implementation location
      • getSimpleViews

        public java.util.List<View> getSimpleViews()
        Get all accessible Views for the group
      • addSimpleView

        public void addSimpleView​(View view)
        Add simple view
        Parameters:
        view - View
      • getProcesses

        public java.util.List<java.lang.String> getProcesses()
        Get all accessible processes for the group
        Returns:
        List of processes
      • addProcess

        public void addProcess​(java.lang.String process)
        Add a process to accessible processes for the group
        Parameters:
        process - Process
      • getShortcuts

        public java.util.List<Shortcut> getShortcuts()
        Get all accessible Shortcuts for the group
        Returns:
        List of shortcuts
      • clearShortcuts

        public void clearShortcuts()
        Clear accessible shortcuts
      • addShortcut

        public void addShortcut​(Shortcut shortcut)
        Add a shortcut to accessible shortcuts
        Parameters:
        shortcut - Shortcut
      • getWebZones

        public java.util.List<WebZone> getWebZones()
        Get all accessible web zones for the group
        Returns:
        List of web zones
      • clearWebZones

        public void clearWebZones()
        Clear accessible web zones
      • addWebZone

        public void addWebZone​(WebZone webzone)
        Add a web zone to accessible web zones
        Parameters:
        webzone - Web zone
      • getUserFilters

        public java.util.List<GroupDB.GroupUserFilter> getUserFilters()
        Get all accessible user filters
        Returns:
        List of user filters
      • addUserFilter

        public void addUserFilter​(java.lang.String field,
                                  java.lang.String object)
        Add user filter to accessible user filters
        Parameters:
        field - Field
        object - Object
      • hasDateRangeFilter

        public boolean hasDateRangeFilter()
        Does the group contains at least one object with a date range for the user filtering?
        Returns:
        True if the group contains at least one object with a date range for the user filtering
      • setDateRangeFilter

        public void setDateRangeFilter​(boolean b)
        Set whether the group contains at least one object with a date range for the user filtering
        Parameters:
        b - Contains?
      • isSystemGroup

        public static boolean isSystemGroup​(java.lang.String name)
        Indicates whether specified group is a system group
        Parameters:
        name - Group name
      • getGroupId

        public static java.lang.String getGroupId​(java.lang.String name)
        Returns group ID for specified name
        Parameters:
        name - Group name
      • isSystemUser

        @Deprecated
        public static boolean isSystemUser​(java.lang.String login)
        Deprecated.
        Use Grant.isSystemUser
      • isPublicUser

        @Deprecated
        public static boolean isPublicUser​(java.lang.String login)
        Deprecated.
        Use Grant.isPublicUser
      • isDesignerUser

        @Deprecated
        public static boolean isDesignerUser​(java.lang.String login)
        Deprecated.
        Use Grant.isDesignerUser
      • getUserId

        @Deprecated
        public static java.lang.String getUserId​(java.lang.String login)
        Deprecated.
        Use Grant.getUserId
      • getUserLogin

        @Deprecated
        public static java.lang.String getUserLogin​(java.lang.String userId)
        Deprecated.
        Use Grant.getUserLogin
      • getUserModuleId

        @Deprecated
        public static java.lang.String getUserModuleId​(java.lang.String login)
        Deprecated.
        Use Grant.getUserModuleId
      • getUsers

        public static java.util.List<java.lang.String> getUsers​(java.lang.String group,
                                                                java.lang.String date,
                                                                java.lang.Boolean activ)
        List users granted to one group
        Parameters:
        group - Group name
        date - Optional responsibility date YYYY-MM-DD
        activ - Optional responsibility active flag
        Returns:
        List of logins
      • getGroups

        public static java.util.List<java.lang.String[]> getGroups​(java.lang.String type,
                                                                   java.lang.String lang)
        List non-cached groups
        Parameters:
        type - optional group type (ex TYPE_GRANT)
        lang - optional language
        Returns:
        List of groups name + label
      • toString

        public java.lang.String toString()
        Get string representation
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation