Class AssociatedGroup


  • public class AssociatedGroup
    extends Object
    The Group tag for roles.xml Named as to not conflict with Group but still be clear for what it is
    Author:
    mikejritter
    • Constructor Detail

      • AssociatedGroup

        protected AssociatedGroup()
        Default constructor for jaxb
      • AssociatedGroup

        public AssociatedGroup​(org.dspace.core.Context context,
                               org.dspace.content.DSpaceObject dso,
                               org.dspace.eperson.Group group)
                        throws SQLException,
                               org.dspace.content.packager.PackageException
        Constructor to create an AssociatedGroup from a Group
        Parameters:
        context - the context to use
        dso - the related DSpaceObject
        group - the group to use
        Throws:
        SQLException - if there is an error translating a Group's name
        org.dspace.content.packager.PackageException - if there is an error translating a Group's name
    • Method Detail

      • getId

        public String getId()
        Returns:
        the id of the group, the string value of DSpaceObject.getID()
      • getName

        public String getName()
        Returns:
        the name of the group, Group.getName()
      • getMembers

        public List<Member> getMembers()
        The Members in the group. When converting to XML a parent group Members is created and each list item is in a single Member tag.
        Returns:
        the members associated with the group Group.getMembers()
      • addMember

        public void addMember​(Member member)
        Add a single member to the Members
        Parameters:
        member - the Member to add
      • getMemberGroups

        public List<Member> getMemberGroups()
        The groups associated with this AssociatedGroup. When converting to XML a parent group MemberGroups is created and each list item is in a single MemberGroup tag.
        Returns:
        the members associated with the group Group.getMemberGroups()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object