Class StaticGroup

    • Field Detail

      • LEVEL_DIRECT

        public static final int LEVEL_DIRECT
        Level indicator for no nesting of group membership. Use this level indicator for getting direct membership in a group.
        See Also:
        Constant Field Values
      • LEVEL_ALL

        public static final int LEVEL_ALL
        Level indicator for expanding nested membership to the fullest. Use this level indicator in getting all direct and indirect members through nested group behavior.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StaticGroup

        protected StaticGroup()
        Default constructor
      • StaticGroup

        public StaticGroup​(CreationTemplate template,
                           AttrSet attrSet)
                    throws UMSException
        Constructs a StaticGroup object in memory with a given template. This one simply creates a Group object in memory; the save method must be called to save the new object to persistent storage.
        Parameters:
        template - Template for creating a group
        attrSet - Attribute/value set
        Throws:
        UMSException - on failure to instantiate from persistent storage
    • Method Detail

      • addMember

        public void addMember​(Guid guid)
                       throws UMSException
        Adds a member to the group. The change is saved to persistent storage.
        Specified by:
        addMember in interface IAssignableMembership
        Parameters:
        guid - Globally unique identifier for the member to be added
        Throws:
        UMSException - on failure to save to persistent storage
      • addMembers

        public void addMembers​(Guid[] guids)
                        throws UMSException
        Adds a list of members to the group. The change is saved to persistent storage.
        Specified by:
        addMembers in interface IAssignableMembership
        Parameters:
        guids - Array of member guids to be added as members to the group
        Throws:
        UMSException - on failure to save to persistent storage
      • getMembers

        public SearchResults getMembers​(int level)
                                 throws UMSException
        Get members of the group.
        Parameters:
        level - Nesting level
        Returns:
        SearchResults for members of the group
        Throws:
        Not - thrown by this class
        UMSException
      • getMemberCount

        public int getMemberCount​(int level)
                           throws UMSException
        Gets the member count.
        Parameters:
        level - Nesting level
        Returns:
        Number of members of the group
        Throws:
        Not - thrown by this class
        UMSException
      • getMemberIDAt

        public Guid getMemberIDAt​(int index)
                           throws UMSException
        Gets a member given an index (zero-based).
        Specified by:
        getMemberIDAt in interface IMembership
        Parameters:
        index - Zero-based index into the group container
        Returns:
        The unique identifier for a member
        Throws:
        Not - thrown by this class
        UMSException
      • getMemberIDAt

        public Guid getMemberIDAt​(int index,
                                  int level)
                           throws UMSException
        Gets a member given an index (zero-based).
        Parameters:
        index - Zero-based index into the group container
        level - Nesting level
        Returns:
        The unique identifier for a member
        Throws:
        Not - thrown by this class
        UMSException
      • removeMember

        public void removeMember​(Guid guid)
                          throws UMSException
        Removes a member from the group. The change is saved to persistent storage.
        Specified by:
        removeMember in interface IAssignableMembership
        Parameters:
        guid - Unique identifier for the member to be removed
        Throws:
        UMSException - on failure to save to persistent storage
      • hasMember

        public boolean hasMember​(Guid guid)
                          throws UMSException
        Checks if a given identifier is a member of the group.
        Specified by:
        hasMember in interface IMembership
        Parameters:
        guid - Identity of member to be checked for membership
        Returns:
        true if it is a member
        Throws:
        Not - thrown by this class
        UMSException - on failure to evaluate membership
      • hasMember

        public boolean hasMember​(Guid guid,
                                 int level)
                          throws UMSException
        Checks if a given identifier is a member of the group.
        Parameters:
        guid - Identity of member to be checked for membership
        level - Nesting level
        Returns:
        true if it is a member
        Throws:
        Not - thrown by this class
        UMSException