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
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  GroupDB.ObjectDefinition
      Object rights within group
    • 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)  
    • Method Summary

      Modifier and Type Method Description
      void addChild​(GroupDB group)
      Add a group in children
      void addDomain​(java.lang.String 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 proc)  
      void addProfile​(GroupDB group)
      Add a group in profile
      void addShortcut​(Shortcut sc)  
      void addSimpleView​(View view)  
      void addWebZone​(WebZone wz)  
      void clearShortcuts()  
      void clearWebZones()  
      java.util.List<GroupDB> getChildren()
      Get the children
      java.lang.String getDisplay​(java.lang.String lang)
      Group translation
      java.util.List<java.lang.String> getDomains()
      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)
      Short description
      java.lang.String getHomePage()
      Related home page to determine a scope
      java.lang.String getId()
      Get the group id
      static java.lang.String getModuleId​(java.lang.String name)
      Returns module ID for specified name
      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()
      Accessible objects for the group
      GroupDB getParent()
      Get the parent
      java.util.List<java.lang.String> getProcesses()
      List all accessible Processes for the group
      java.util.List<GroupDB> getProfile()
      Get the profile (set of groups)
      java.util.List<Shortcut> getShortcuts()
      List all accessible Shortcuts for the group
      java.util.List<View> getSimpleViews()
      List all accessible Views for the group
      static java.lang.String getUserId​(java.lang.String login)
      Returns user ID for specified login
      static java.lang.String getUserLogin​(java.lang.String userId)
      Returns user login for specified id
      static java.lang.String getUserModuleId​(java.lang.String login)
      Returns module ID for specified login
      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()
      List all accessible Web zones for the group
      boolean hasType​(java.lang.String type)  
      static boolean isDesignerUser​(java.lang.String usr)  
      static boolean isPublicUser​(java.lang.String usr)  
      static boolean isSystemGroup​(java.lang.String name)
      Indicates whether specified group is a system group
      static boolean isSystemUser​(java.lang.String usr)  
      void removeChild​(GroupDB group)
      Remove a group in children
      void removeProfile​(GroupDB group)
      Remove a group in profile
      void setDisplay​(java.lang.String lang, java.lang.String label)  
      void setHelp​(java.lang.String lang, java.lang.String help)  
      void setHomePage​(java.lang.String viewName)  
      void setParent​(GroupDB group)  
      void setType​(java.lang.String type)  
      java.lang.String toString()  
      • 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)
    • Method Detail

      • getId

        public java.lang.String getId()
        Get the group id
      • getName

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

        public java.lang.String getDisplay​(java.lang.String lang)
        Group translation
      • setDisplay

        public void setDisplay​(java.lang.String lang,
                               java.lang.String label)
      • getHelp

        public java.lang.String getHelp​(java.lang.String lang)
        Short description
      • setHelp

        public void setHelp​(java.lang.String lang,
                            java.lang.String help)
      • setType

        public void setType​(java.lang.String type)
      • hasType

        public boolean hasType​(java.lang.String type)
      • getParent

        public GroupDB getParent()
        Get the parent
      • setParent

        public void setParent​(GroupDB group)
      • getChildren

        public java.util.List<GroupDB> getChildren()
        Get the children
      • addChild

        public void addChild​(GroupDB group)
        Add a group in children
      • removeChild

        public void removeChild​(GroupDB group)
        Remove a group in children
      • getProfile

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

        public void addProfile​(GroupDB group)
        Add a group in profile
      • removeProfile

        public void removeProfile​(GroupDB group)
        Remove a group in profile
      • getHomePage

        public java.lang.String getHomePage()
        Related home page to determine a scope
      • setHomePage

        public void setHomePage​(java.lang.String viewName)
      • getDomains

        public java.util.List<java.lang.String> getDomains()
        Accessible domains
      • addDomain

        public void addDomain​(java.lang.String domain)
      • getObjects

        public java.util.Map<java.lang.String,​GroupDB.ObjectDefinition> getObjects()
        Accessible objects for the group
      • getObject

        public GroupDB.ObjectDefinition getObject​(java.lang.String object)
        Get an accessible object 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()
        List all accessible Views for the group
      • addSimpleView

        public void addSimpleView​(View view)
      • getProcesses

        public java.util.List<java.lang.String> getProcesses()
        List all accessible Processes for the group
      • addProcess

        public void addProcess​(java.lang.String proc)
      • getShortcuts

        public java.util.List<Shortcut> getShortcuts()
        List all accessible Shortcuts for the group
      • clearShortcuts

        public void clearShortcuts()
      • addShortcut

        public void addShortcut​(Shortcut sc)
      • getWebZones

        public java.util.List<WebZone> getWebZones()
        List all accessible Web zones for the group
      • clearWebZones

        public void clearWebZones()
      • addWebZone

        public void addWebZone​(WebZone wz)
      • 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
      • getModuleId

        public static java.lang.String getModuleId​(java.lang.String name)
        Returns module ID for specified name
        Parameters:
        name - Module name
      • isSystemUser

        public static boolean isSystemUser​(java.lang.String usr)
      • isPublicUser

        public static boolean isPublicUser​(java.lang.String usr)
      • isDesignerUser

        public static boolean isDesignerUser​(java.lang.String usr)
      • getUserLogin

        public static java.lang.String getUserLogin​(java.lang.String userId)
        Returns user login for specified id
        Parameters:
        userId - User ID
      • getUserId

        public static java.lang.String getUserId​(java.lang.String login)
        Returns user ID for specified login
        Parameters:
        login - User login
      • getUserModuleId

        public static java.lang.String getUserModuleId​(java.lang.String login)
        Returns module ID for specified login
        Parameters:
        login - User login
      • 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()
        Overrides:
        toString in class java.lang.Object