Class Member

java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.Member
All Implemented Interfaces:
AttributeAssignable, HibGrouperLifecycle, Hib3GrouperVersioned, GrouperCloneable, GrouperHasContext, GrouperId, GrouperUtil.FieldValuable, XmlImportable<Member>, XmlImportableBase<Member>, Serializable, Comparable<Member>, org.hibernate.classic.Lifecycle

A member within the Groups Registry. All immediate subjects, and effective members are members.
Version:
$Id: Member.java,v 1.135 2009-12-28 06:08:37 mchyzer Exp $
See Also:
  • Field Details

    • PROPERTY_SUBJECT_ID

      public static final String PROPERTY_SUBJECT_ID
      constant for property name for: subjectId
      See Also:
    • TABLE_GROUPER_MEMBERS

      public static final String TABLE_GROUPER_MEMBERS
      grouper_members table in the DB
      See Also:
    • COLUMN_MEMBER_UUID

      public static final String COLUMN_MEMBER_UUID
      uuid col in db
      See Also:
    • COLUMN_ID

      public static final String COLUMN_ID
      new uuid col in db
      See Also:
    • COLUMN_ID_INDEX

      public static final String COLUMN_ID_INDEX
      new id_index col in db
      See Also:
    • COLUMN_INTERNAL_ID

      public static final String COLUMN_INTERNAL_ID
      new internal_id col in db
      See Also:
    • COLUMN_OLD_ID

      public static final String COLUMN_OLD_ID
      old id col for id conversion
      See Also:
    • COLUMN_OLD_MEMBER_UUID

      public static final String COLUMN_OLD_MEMBER_UUID
      old uuid id col for id conversion
      See Also:
    • COLUMN_SUBJECT_IDENTIFIER0

      public static final String COLUMN_SUBJECT_IDENTIFIER0
      subjectIdentifier0
      See Also:
    • COLUMN_SUBJECT_IDENTIFIER1

      public static final String COLUMN_SUBJECT_IDENTIFIER1
      subjectIdentifier1
      See Also:
    • COLUMN_SUBJECT_IDENTIFIER2

      public static final String COLUMN_SUBJECT_IDENTIFIER2
      subjectIdentifier2
      See Also:
    • COLUMN_EMAIL0

      public static final String COLUMN_EMAIL0
      email0
      See Also:
    • COLUMN_SUBJECT_RESOLUTION_RESOLVABLE

      public static final String COLUMN_SUBJECT_RESOLUTION_RESOLVABLE
      subjectResolutionResolvable
      See Also:
    • COLUMN_SUBJECT_RESOLUTION_ELIGIBLE

      public static final String COLUMN_SUBJECT_RESOLUTION_ELIGIBLE
      subjectResolutionEligible
      See Also:
    • COLUMN_SUBJECT_RESOLUTION_DELETED

      public static final String COLUMN_SUBJECT_RESOLUTION_DELETED
      subjectResolutionDeleted
      See Also:
    • COLUMN_SORT_STRING0

      public static final String COLUMN_SORT_STRING0
      sortString0
      See Also:
    • COLUMN_SORT_STRING1

      public static final String COLUMN_SORT_STRING1
      sortString1
      See Also:
    • COLUMN_SORT_STRING2

      public static final String COLUMN_SORT_STRING2
      sortString2
      See Also:
    • COLUMN_SORT_STRING3

      public static final String COLUMN_SORT_STRING3
      sortString3
      See Also:
    • COLUMN_SORT_STRING4

      public static final String COLUMN_SORT_STRING4
      sortString4
      See Also:
    • COLUMN_SEARCH_STRING0

      public static final String COLUMN_SEARCH_STRING0
      searchString0
      See Also:
    • COLUMN_SEARCH_STRING1

      public static final String COLUMN_SEARCH_STRING1
      searchString1
      See Also:
    • COLUMN_SEARCH_STRING2

      public static final String COLUMN_SEARCH_STRING2
      searchString2
      See Also:
    • COLUMN_SEARCH_STRING3

      public static final String COLUMN_SEARCH_STRING3
      searchString3
      See Also:
    • COLUMN_SEARCH_STRING4

      public static final String COLUMN_SEARCH_STRING4
      searchString4
      See Also:
    • COLUMN_NAME

      public static final String COLUMN_NAME
      name
      See Also:
    • COLUMN_SUBJECT_ID

      public static final String COLUMN_SUBJECT_ID
      column
      See Also:
    • COLUMN_SUBJECT_SOURCE

      public static final String COLUMN_SUBJECT_SOURCE
      column
      See Also:
    • COLUMN_SUBJECT_TYPE

      public static final String COLUMN_SUBJECT_TYPE
      column
      See Also:
    • COLUMN_DESCRIPTION

      public static final String COLUMN_DESCRIPTION
      description
      See Also:
    • serialVersionUID

      public static final long serialVersionUID
      serial version
      See Also:
    • FIELD_DB_VERSION

      public static final String FIELD_DB_VERSION
      constant for field name for: dbVersion
      See Also:
    • FIELD_MEMBER_UUID

      public static final String FIELD_MEMBER_UUID
      constant for field name for: memberUUID
      See Also:
    • FIELD_SUBJECT_ID

      public static final String FIELD_SUBJECT_ID
      constant for field name for: subjectID
      See Also:
    • FIELD_SUBJECT_SOURCE_ID

      public static final String FIELD_SUBJECT_SOURCE_ID
      constant for field name for: subjectSourceID
      See Also:
    • FIELD_SUBJECT_TYPE_ID

      public static final String FIELD_SUBJECT_TYPE_ID
      constant for field name for: subjectTypeID
      See Also:
    • FIELD_SUBJECT_IDENTIFIER0

      public static final String FIELD_SUBJECT_IDENTIFIER0
      constant for field name for: subjectIdentifier0
      See Also:
    • FIELD_SUBJECT_IDENTIFIER1

      public static final String FIELD_SUBJECT_IDENTIFIER1
      constant for field name for: subjectIdentifier1
      See Also:
    • FIELD_SUBJECT_IDENTIFIER2

      public static final String FIELD_SUBJECT_IDENTIFIER2
      constant for field name for: subjectIdentifier2
      See Also:
    • FIELD_EMAIL0

      public static final String FIELD_EMAIL0
      constant for field name for: email0
      See Also:
    • FIELD_SUBJECT_RESOLUTION_ELIGIBLE

      public static final String FIELD_SUBJECT_RESOLUTION_ELIGIBLE
      constant for field name for: subjectResolutionEligible
      See Also:
    • FIELD_SUBJECT_RESOLUTION_RESOLVABLE

      public static final String FIELD_SUBJECT_RESOLUTION_RESOLVABLE
      constant for field name for: subjectResolutionResolvable
      See Also:
    • FIELD_SUBJECT_RESOLUTION_DELETED

      public static final String FIELD_SUBJECT_RESOLUTION_DELETED
      constant for field name for: subjectResolutionDeleted
      See Also:
    • FIELD_SORT_STRING0

      public static final String FIELD_SORT_STRING0
      constant for field name for: sortString0
      See Also:
    • FIELD_SORT_STRING1

      public static final String FIELD_SORT_STRING1
      constant for field name for: sortString1
      See Also:
    • FIELD_SORT_STRING2

      public static final String FIELD_SORT_STRING2
      constant for field name for: sortString2
      See Also:
    • FIELD_SORT_STRING3

      public static final String FIELD_SORT_STRING3
      constant for field name for: sortString3
      See Also:
    • FIELD_SORT_STRING4

      public static final String FIELD_SORT_STRING4
      constant for field name for: sortString4
      See Also:
    • FIELD_SEARCH_STRING0

      public static final String FIELD_SEARCH_STRING0
      constant for field name for: searchString0
      See Also:
    • FIELD_SEARCH_STRING1

      public static final String FIELD_SEARCH_STRING1
      constant for field name for: searchString1
      See Also:
    • FIELD_SEARCH_STRING2

      public static final String FIELD_SEARCH_STRING2
      constant for field name for: searchString2
      See Also:
    • FIELD_SEARCH_STRING3

      public static final String FIELD_SEARCH_STRING3
      constant for field name for: searchString3
      See Also:
    • FIELD_SEARCH_STRING4

      public static final String FIELD_SEARCH_STRING4
      constant for field name for: searchString4
      See Also:
    • FIELD_NAME

      public static final String FIELD_NAME
      constant for field name for: name
      See Also:
    • FIELD_DESCRIPTION

      public static final String FIELD_DESCRIPTION
      constant for field name for: description
      See Also:
    • FIELD_ID_INDEX

      public static final String FIELD_ID_INDEX
      constant for field name for: idIndex
      See Also:
    • FIELD_INTERNAL_ID

      public static final String FIELD_INTERNAL_ID
      constant for field name for: internalId
      See Also:
    • PROPERTY_UUID

      public static final String PROPERTY_UUID
      javabeans property for uuid
      See Also:
    • changeSubjectSameSubject

      public static int changeSubjectSameSubject
      change a subject to the same subject (for testing)
    • changeSubjectDidntExist

      public static int changeSubjectDidntExist
      change a subject to a subject which didnt exist
    • changeSubjectExist

      public static int changeSubjectExist
      change a subject to a subject which did exist
    • changeSubjectMembershipAddCount

      public static int changeSubjectMembershipAddCount
      number of memberships edited
    • changeSubjectMembershipDeleteCount

      public static int changeSubjectMembershipDeleteCount
      number of memberships deleted due to duplicates
    • DELETE_OLD_MEMBER

      public static final boolean DELETE_OLD_MEMBER
      boolean constant for gsh param
      See Also:
  • Constructor Details

    • Member

      public Member()
  • Method Details

    • resolveSubjects

      public static void resolveSubjects(Collection<Member> members, boolean resolveAllAlways)
      Deprecated.
      This method is deprecated and no longer needed because of subject caching. resolve subjects in one batch
      Parameters:
      members -
      resolveAllAlways - true to always resolve all no matter how many, false if there are more than 2000 or however many (e.g. for UI)
    • getAttributeDelegate

      public AttributeAssignMemberDelegate getAttributeDelegate()
      Description copied from interface: AttributeAssignable
      get the logic delegate
      Specified by:
      getAttributeDelegate in interface AttributeAssignable
      Returns:
      the delegate
    • getAttributeValueDelegate

      public AttributeValueDelegate getAttributeValueDelegate()
      this delegate works on attributes and values at the same time
      Specified by:
      getAttributeValueDelegate in interface AttributeAssignable
      Returns:
      the delegate
    • subjectIds

      public static String subjectIds(Collection<Member> collection)
      print out a collection of members
      Parameters:
      collection -
      Returns:
      the subject ids comma separated
    • changeSubject

      public void changeSubject(Subject newSubject) throws InsufficientPrivilegeException
      change the subject of a member to another subject. This new subject might already exist, and it might not. If it doesnt exist, then this member object will have its subject and source information updated. If it does, then all objects in the system which use this member_id will be queried, and the member_id updated to the new member_id, and the old member_id will be removed.
      Parameters:
      newSubject -
      Throws:
      InsufficientPrivilegeException - if not a root user
    • changeSubject

      public void changeSubject(Subject newSubject, boolean deleteOldMember) throws InsufficientPrivilegeException
      change the subject of a member to another subject. This new subject might already exist, and it might not. If it doesnt exist, then this member object will have its subject and source information updated. If it does, then all objects in the system which use this member_id will be queried, and the member_id updated to the new member_id, and the old member_id will be removed if deleteOldMember is true.
      Parameters:
      newSubject -
      deleteOldMember - is only applicable if the new member exists. If true, it will delete the old one. Generally you want this as true, and only set to false if there is a foreign key violation, and you want to get as far as you can.
      Throws:
      InsufficientPrivilegeException - if not a root user
    • changeSubjectReport

      public String changeSubjectReport(Subject newSubject, boolean deleteOldMember)
       This is the readonly dry run report version of this operation...  this will not call hooks
       
       change the subject of a member to another subject.  This new subject might already exist, and it
       might not.  If it doesnt exist, then this member object will have its subject and source information
       updated.  If it does, then all objects in the system which use this member_id will be queried, and
       the member_id updated to the new member_id, and the old member_id will be removed.
       
       
      Parameters:
      newSubject -
      deleteOldMember - is only applicable if the new member exists. If true, it will delete the old one. Generally you want this as true, and only set to false if there is a foreign key violation, and you want to get as far as you can.
      Returns:
      the report
    • inMemberChangeSubject

      public static boolean inMemberChangeSubject()
      Returns:
      if in member change subject
    • canAdmin

      public boolean canAdmin(Group g) throws IllegalArgumentException
      Can this Member ADMIN on this Group.
       boolean rv = m.canAdmin(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if admin
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canCreate

      public boolean canCreate(Stem ns) throws IllegalArgumentException
      Can this Member CREATE on this Stem.
       boolean rv = m.canCreate(ns);
       
      Parameters:
      ns - Check privileges on this Stem.
      Returns:
      if can create stem
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canOptin

      public boolean canOptin(Group g) throws IllegalArgumentException
      Can this Member OPTIN on this Group.
       boolean rv = m.canAdmin(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if can optin
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canOptout

      public boolean canOptout(Group g) throws IllegalArgumentException
      Can this Member OPTOUT on this Group.
       boolean rv = m.canOptout(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if can optout
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canRead

      public boolean canRead(Group g) throws IllegalArgumentException
      Can this Member READ on this Group.
       boolean rv = m.canRead(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if can read
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canStem

      public boolean canStem(Stem ns) throws IllegalArgumentException
      Can this Member STEM on this Stem.
       boolean rv = m.canStem(ns);
       
      Parameters:
      ns - Check privileges on this Stem.
      Returns:
      if can stem
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canUpdate

      public boolean canUpdate(Group g) throws IllegalArgumentException
      Can this Member UPDATE on this Group.
       boolean rv = m.canUpdate(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if can update
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canView

      public boolean canView(Group g) throws IllegalArgumentException
      Can this Member VIEW on this Group.
       boolean rv = m.canView(g);
       
      Parameters:
      g - Check privileges on this Group.
      Returns:
      if can view
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • getEffectiveGroups

      public Set<Group> getEffectiveGroups()
      Get groups where this member has an effective membership. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships
       // Get groups where this member is an effective member.
       Set effectives = m.getEffectiveGroups();
       
      Returns:
      Set of Group objects.
    • getEffectiveGroups

      public Set<Group> getEffectiveGroups(Field field)
      Get groups where this member has an effective membership. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships
       // Get groups where this member is an effective member.
       Set effectives = m.getEffectiveGroups();
       
      Parameters:
      field -
      Returns:
      Set of Group objects.
    • getEffectiveMemberships

      public Set<Membership> getEffectiveMemberships() throws GrouperException
      Get effective memberships. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set effectives = m.getEffectiveMemberships();
       
      Returns:
      Set of Membership objects.
      Throws:
      GrouperException
    • getEffectiveMemberships

      public Set<Membership> getEffectiveMemberships(Field f) throws SchemaException
      Get effective memberships. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set effectives = m.getEffectiveMemberships(f);
       
      Parameters:
      f - Get effective memberships in this list field.
      Returns:
      Set of Membership objects.
      Throws:
      SchemaException
    • getGroups

      public Set<Group> getGroups()
      Get groups where this member is a member.
       // Get groups where this member is a member.
       Set groups = m.getGroups();
       
      Returns:
      Set of Group objects.
    • getGroups

      public Set<Group> getGroups(Field field)
      Get groups where this member is a member.
       // Get groups where this member is a member.
       Set groups = m.getGroups();
       
      Parameters:
      field - to check, doesnt have to be list field
      Returns:
      Set of Group objects.
    • _internal_getGroupsHelper

      public Set<Group> _internal_getGroupsHelper(Field field, MembershipType membershipType, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
      Get groups where this member is a member.
       // Get groups where this member is a member.
       Set groups = m.getGroups();
       
      Parameters:
      field - to check, doesnt have to be list field
      membershipType - immediate, effective, non immediate, etc, or null for all
      scope - is a DB pattern that will have % appended to it, or null for all. e.g. school:whatever:parent:
      stem - is the stem to check in, or null if all. If has stem, must have stemScope
      stemScope - is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stem
      queryOptions - is what to sort/page to or null for all. Can sort on name, displayName, extension, displayExtension
      enabled - is null for all, true for enabled only, false for enabled and disabled
      Returns:
      Set of Group objects.
    • getGroups

      public Set<Group> getGroups(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
      Get groups where this member is a member.
      Parameters:
      field - to check, doesnt have to be list field
      scope - is a DB pattern that will have % appended to it, or null for all
      stem - is the stem to check in, or null if all
      stemScope - is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stem
      queryOptions - is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtension
      enabled - is null for all, true for enabled only, false for enabled and disabled
      Returns:
      Set of Group objects.
    • getEffectiveGroups

      public Set<Group> getEffectiveGroups(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
      Get groups where this member is an effective member.
      Parameters:
      field - to check, doesnt have to be list field
      scope - is a DB pattern that will have % appended to it, or null for all
      stem - is the stem to check in, or null if all
      stemScope - is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stem
      queryOptions - is what to sort/page to or null for all, can sort on name, displayName, extension, displayExtension
      enabled - is null for all, true for enabled only, false for enabled and disabled
      Returns:
      Set of Group objects.
    • getImmediateGroups

      public Set<Group> getImmediateGroups(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
      Get groups where this member is an immediate member.
      Parameters:
      field - to check, doesnt have to be list field
      scope - is a DB pattern that will have % appended to it, or null for all
      stem - is the stem to check in, or null if all
      stemScope - is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stem
      queryOptions - is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtension
      enabled - is null for all, true for enabled only, false for enabled and disabled
      Returns:
      Set of Group objects.
    • getNonImmediateGroups

      public Set<Group> getNonImmediateGroups(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
      Get groups where this member is a nonimmediate member.
      Parameters:
      field - to check, doesnt have to be list field
      scope - is a DB pattern that will have % appended to it, or null for all
      stem - is the stem to check in, or null if all
      stemScope - is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stem
      queryOptions - is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtension
      enabled - is null for all, true for enabled only, false for enabled and disabled
      Returns:
      Set of Group objects.
    • getImmediateGroups

      public Set<Group> getImmediateGroups()
      Get groups where this member has an immediate membership. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Get groups where this member is an immediate member.
       Set immediates = m.getImmediateGroups();
       
      Returns:
      Set of Group objects.
    • getNonImmediateGroups

      public Set<Group> getNonImmediateGroups()
      Get groups where this member has a non immediate membership. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Get groups where this member is a non immediate member.
       Set nonImmediates = m.getNonImmediateGroups();
       
      Returns:
      Set of Group objects.
    • getImmediateGroups

      public Set<Group> getImmediateGroups(Field field)
      Get groups where this member has an immediate membership. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Get groups where this member is an immediate member.
       Set immediates = m.getImmediateGroups();
       
      Parameters:
      field -
      Returns:
      Set of Group objects.
    • getImmediateMemberships

      public Set<Membership> getImmediateMemberships() throws GrouperException
      Get immediate memberships. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set immediates = m.getImmediateMemberships();
       
      Returns:
      Set of Membership objects.
      Throws:
      GrouperException
    • getNonImmediateMemberships

      public Set<Membership> getNonImmediateMemberships() throws GrouperException
      Get non-immediate memberships. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set immediates = m.getNonImmediateMemberships();
       
      Returns:
      Set of Membership objects.
      Throws:
      GrouperException
    • getImmediateMemberships

      public Set<Membership> getImmediateMemberships(Field f) throws SchemaException
      Get immediate memberships. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set immediates = m.getImmediateMemberships(f);
       
      Parameters:
      f - Get immediate memberships in this list field.
      Returns:
      Set of Membership objects.
      Throws:
      SchemaException
    • getNonImmediateMemberships

      public Set<Membership> getNonImmediateMemberships(Field f) throws SchemaException
      Get non-immediate memberships. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set immediates = m.getNonImmediateMemberships(f);
       
      Parameters:
      f - Get non-immediate memberships in this list field.
      Returns:
      Set of Membership objects.
      Throws:
      SchemaException
    • getMemberships

      public Set<Membership> getMemberships() throws GrouperException
      Get memberships. A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set groups = m.getMemberships();
       
      Returns:
      Set of Membership objects.
      Throws:
      GrouperException
    • getMemberships

      public Set<Membership> getMemberships(Field f) throws SchemaException
      Get memberships. A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set groups = m.getMemberships(f);
       
      Parameters:
      f - Get memberships in this list field.
      Returns:
      Set of Membership objects.
      Throws:
      SchemaException
    • getMemberships

      public Set<Membership> getMemberships(Field f, boolean requireListField) throws SchemaException
      Get memberships. A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership A membership is the object which represents a join of member and group. Has metadata like type and creator, and, if an effective membership, the parent membership
       Set groups = m.getMemberships(f);
       
      Parameters:
      f - Get memberships in this list field.
      requireListField - if list field must be a list field, and not privilege
      Returns:
      Set of Membership objects.
      Throws:
      SchemaException
    • getPrivs

      public Set<AccessPrivilege> getPrivs(Group g)
      Find access privileges held by this member on a Group.
       Set access = m.getPrivs(g);
       
      Parameters:
      g - Find Access Privileges on this Group
      Returns:
      A set of AccessPrivilege objects.
    • getPrivs

      public Set<NamingPrivilege> getPrivs(Stem ns)
      Find naming privileges held by this member on a Stem.
       Set naming = m.getPrivs(ns);
       
      Parameters:
      ns - Find Naming Privileges on this Stem
      Returns:
      A set of NamingPrivilege objects.
    • getSubject

      public Subject getSubject() throws SubjectNotFoundException
      Get Subject that maps to this member.
       // Convert a member back into a subject
       try {
         Subject subj = m.getSubject();
       }
       catch (SubjectNotFoundException e) {
         // Subject not found
       }
       
      Returns:
      A Subject object.
      Throws:
      SubjectNotFoundException
    • getSubjectSource

      public Source getSubjectSource() throws GrouperException
      Get the Source of the subject that maps to this member.
       Source sa = m.getSubjectSource();
       
      Returns:
      Subject's Source
      Throws:
      GrouperException
    • getSubjectSourceId

      public String getSubjectSourceId()
      Get the Source id of the subject that maps to this member.
       String id = m.getSubjectSourceId();
       
      Returns:
      Subject's Source id
    • getSubjectSourceIdDb

      public String getSubjectSourceIdDb()
      simple get subject source id
      Returns:
      subject source id
    • getSubjectType

      public SubjectType getSubjectType()
      Get the SubjectType of the subject that maps to this member.
       // Get this member's subject type.
       SubjectType type = m.getSubjectType();
       
      Returns:
      Subject's SubjectType
    • getSubjectTypeId

      public String getSubjectTypeId()
      Get the subject type id of the subject that maps to this member.
       // Get this member's subject type id.
       String type = m.getSubjectTypeId();
       
      Returns:
      Subject's type id.
    • getUuid

      public String getUuid()
      Get member's UUID.
       // Get UUID of member.
       String uuid = m.getUuid();
       
      Returns:
      Member's UUID.
    • getId

      public String getId()
      get a members id
      Specified by:
      getId in interface GrouperId
      Returns:
      the id
    • getInternalId

      public Long getInternalId()
      internal id
      Returns:
      internal id
    • setInternalId

      public void setInternalId(Long internalId1)
      internal id
      Parameters:
      internalId1 -
    • getIdIndex

      public Long getIdIndex()
      id of the member as a unique integer
      Returns:
      id
    • setIdIndex

      public void setIdIndex(Long idIndex1)
      id of the member as a unique integer
      Parameters:
      idIndex1 -
    • hasAdmin

      public Set<Group> hasAdmin() throws GrouperException
      Get groups where this member has the ADMIN privilege.
       Set admin = m.hasAdmin();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasAdminInStem

      public Set<Stem> hasAdminInStem() throws GrouperException
      Get stems where this member has the ADMIN privilege of a group inside.
       Set adminInStem = m.hasAdminInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasGroupAttrReadInStem

      public Set<Stem> hasGroupAttrReadInStem() throws GrouperException
      Get stems where this member has the GROUP_ATTR_READ privilege of a group inside.
       Set results = m.hasGroupAttrReadInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasGroupAttrUpdateInStem

      public Set<Stem> hasGroupAttrUpdateInStem() throws GrouperException
      Get stems where this member has the GROUP_ATTR_UPDATE privilege of a group inside.
       Set results = m.hasGroupAttrUpdateInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasOptoutInStem

      public Set<Stem> hasOptoutInStem() throws GrouperException
      Get stems where this member has the OPTOUT privilege of a group inside.
       Set optoutInStem = m.hasOptoutInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasOptinInStem

      public Set<Stem> hasOptinInStem() throws GrouperException
      Get stems where this member has the OPTIN privilege of a group inside.
       Set optinInStem = m.hasOptinInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasViewInStem

      public Set<Stem> hasViewInStem() throws GrouperException
      Get stems where this member has the VIEW privilege of a group inside.
       Set viewInStem = m.hasViewInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasReadInStem

      public Set<Stem> hasReadInStem() throws GrouperException
      Get stems where this member has the READ privilege of a group inside.
       Set readInStem = m.hasReadInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasUpdateInStem

      public Set<Stem> hasUpdateInStem() throws GrouperException
      Get stems where this member has the UPDATE privilege of a group inside.
       Set updateInStem = m.hasUpdateInStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasAdmin

      public boolean hasAdmin(Group g)
      Report whether this member has ADMIN on the specified group.
       // Check whether this member has ADMIN on the specified group.
       if (m.hasAdmin(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasCreate

      public Set<Stem> hasCreate() throws GrouperException
      Get stems where this member has the CREATE privilege.
       Set create = m.hasCreate();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasCreate

      public boolean hasCreate(Stem ns)
      Report whether this member has CREATE on the specified stem.
       // Check whether this member has CREATE on the specified stem.
       if (m.hasCreate(ns)) {
         // Member has privilege
       }
       
      Parameters:
      ns - Test for privilege on this Stem
      Returns:
      Boolean true if the member has the privilege.
    • hasOptin

      public Set<Group> hasOptin() throws GrouperException
      Get groups where this member has the OPTIN privilege.
       Set optin = m.hasOptin();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasOptin

      public boolean hasOptin(Group g)
      Report whether this member has OPTIN on the specified group.
       // Check whether this member has OPTIN on the specified group.
       if (m.hasOptin(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasOptout

      public Set<Group> hasOptout() throws GrouperException
      Get groups where this member has the OPTOUT privilege.
       Set optout = m.hasOptout();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasOptout

      public boolean hasOptout(Group g)
      Report whether this member has OPTOUT on the specified group.
       // Check whether this member has OPTOUT on the specified group.
       if (m.hasOptout(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasRead

      public Set<Group> hasRead() throws GrouperException
      Get groups where this member has the READ privilege.
       Set read = m.hasRead();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasRead

      public boolean hasRead(Group g)
      Report whether this member has READ on the specified group.
       // Check whether this member has READ on the specified group.
       if (m.hasRead(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasStem

      public Set<Stem> hasStem() throws GrouperException
      Get stems where this member has the STEM privilege.
       Set stem = m.hasStem();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasStem

      public boolean hasStem(Stem ns)
      Report whether this member has STEM on the specified stem.
       if (m.hasStem(ns)) {
         // Member has privilege
       }
       
      Parameters:
      ns - Test for privilege on this Stem
      Returns:
      Boolean true if the member has the privilege.
    • hasUpdate

      public Set<Group> hasUpdate() throws GrouperException
      Get groups where this member has the UPDATE privilege.
       Set update = m.hasUpdate();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasUpdate

      public boolean hasUpdate(Group g)
      Report whether this member has UPDATE on the specified group.
       // Check whether this member has UPDATE on the specified group.
       if (m.hasUpdate(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasView

      public Set<Group> hasView() throws GrouperException
      Get groups where this member has the VIEW privilege.
       Set view = m.hasView();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasView

      public boolean hasView(Group g)
      Report whether this member has VIEW on the specified group.
       // Check whether this member has VIEW on the specified group.
       if (m.hasView(g)) {
         // Member has privilege
       }
       
      Parameters:
      g - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • isEffectiveMember

      public boolean isEffectiveMember(Group g) throws GrouperException
      Test whether a member effectively belongs to a group. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships
       if (m.isEffectiveMember(g)) {
         // Is an effective member
       }
       
      Parameters:
      g - Test for membership in this group.
      Returns:
      Boolean true if is a member.
      Throws:
      GrouperException
    • isEffectiveMember

      public boolean isEffectiveMember(Group g, Field f) throws SchemaException
      Test whether a member effectively belongs to a group. An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships
       // Does this member effectively belong to the specified group?
       if (m.isEffectiveMember(g, f)) {
         // Is an effective member
       }
       
      Parameters:
      g - Test for membership in this group.
      f - Test for membership in this list field.
      Returns:
      Boolean true if is a member.
      Throws:
      SchemaException
    • isImmediateMember

      public boolean isImmediateMember(Group g) throws GrouperException
      Test whether a member immediately belongs to a group. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       if (m.isImmediateMember(g)) {
         // Is an immediate member
       }
       
      Parameters:
      g - Test for membership in this group.
      Returns:
      Boolean true if is a member.
      Throws:
      GrouperException
    • isImmediateMember

      public boolean isImmediateMember(Group g, Field f) throws SchemaException
      Test whether a member immediately belongs to a group. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Does this member immediately belong to the specified group?
       if (m.isImmediateMember(g, f)) {
         // Is an immediate member
       }
       
      Parameters:
      g - Test for membership in this group.
      f - Test for memberhip in this list field.
      Returns:
      Boolean true if is a member.
      Throws:
      SchemaException
    • isMember

      public boolean isMember(Group g)
      Test whether a member belongs to a group. A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership All immediate subjects, and effective members are members.
       if (m.isMember(g)) {
         // Is a member
       }
       
      Parameters:
      g - Test for membership in this group.
      Returns:
      Boolean true if is a member.
      Throws:
      GrouperException
    • isMember

      public boolean isMember(Group g, Field f) throws SchemaException
      Test whether a member belongs to the specified group list. A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership. All immediate subjects, and effective members are members.

       // Does this member belong to the specified group?
       if (m.isMember(g, f)) {
         // Is a member
       }
       
      Parameters:
      g - Test for membership in this group.
      f - Test for membership in this list Field.
      Returns:
      Boolean true if is a member.
      Throws:
      SchemaException
    • setSubjectIdDb

      public void setSubjectIdDb(String id)
      simple set subject id
      Parameters:
      id -
    • setSubjectId

      public void setSubjectId(String id) throws IllegalArgumentException, InsufficientPrivilegeException
      Change subject id associated with member.

      You must be a root-like Subject to use this method.

       try {
         m.setSubjectId("new id");
       }
       catch (InsufficientPrivilegeException eIP) {
         // not privileged to change subject id
       }
       
      Parameters:
      id - Set subject id to this.
      Throws:
      IllegalArgumentException
      InsufficientPrivilegeException
    • store

      public void store()
      will be implemented soon
    • setSubjectSourceIdDb

      public void setSubjectSourceIdDb(String id)
      simple set subject source id
      Parameters:
      id -
    • setSubjectSourceId

      public void setSubjectSourceId(String id) throws IllegalArgumentException, InsufficientPrivilegeException
      Change subject source id associated with member.

      You must be a root-like Subject to use this method.

       try {
         m.setSubjectSourceId("new source id");
       }
       catch (InsufficientPrivilegeException eIP) {
         // not privileged to change subject source id
       }
       
      Parameters:
      id - Set subject source id to this.
      Throws:
      IllegalArgumentException
      InsufficientPrivilegeException
      Since:
      1.1.0
    • toGroup

      public Group toGroup() throws GroupNotFoundException
      Convert this member back to a Group object.

       try {
         Group g = m.toGroup();
       }
       catch (GroupNotFoundException e) {
         // unable to convert member back to group
       }
       
      Returns:
      Member as a Group
      Throws:
      GroupNotFoundException
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • isMember

      public boolean isMember(String ownerUUID, Field f)
      Parameters:
      ownerUUID -
      f -
      Returns:
      if is member
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
      See Also:
    • getSubjectId

      public String getSubjectId()
      Returns:
      subject id
    • getSubjectIdDb

      public String getSubjectIdDb()
      Returns:
      subject id db
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • onDelete

      public boolean onDelete(org.hibernate.Session hs) throws org.hibernate.CallbackException
      Specified by:
      onDelete in interface org.hibernate.classic.Lifecycle
      Overrides:
      onDelete in class GrouperAPI
      Throws:
      org.hibernate.CallbackException
      See Also:
    • onSave

      public boolean onSave(org.hibernate.Session hs) throws org.hibernate.CallbackException
      Specified by:
      onSave in interface org.hibernate.classic.Lifecycle
      Overrides:
      onSave in class GrouperAPI
      Throws:
      org.hibernate.CallbackException
      See Also:
    • setSubjectTypeId

      public void setSubjectTypeId(String subjectTypeID)
      Parameters:
      subjectTypeID -
    • setUuid

      public void setUuid(String memberUUID)
      Parameters:
      memberUUID -
    • toStringDto

      public String toStringDto()
      Returns:
      string
    • onPostDelete

      public void onPostDelete(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after a delete occurs
      Specified by:
      onPostDelete in interface HibGrouperLifecycle
      Overrides:
      onPostDelete in class GrouperAPI
      See Also:
    • onPostSave

      public void onPostSave(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after a save (insert) occurs
      Specified by:
      onPostSave in interface HibGrouperLifecycle
      Overrides:
      onPostSave in class GrouperAPI
      See Also:
    • onPostUpdate

      public void onPostUpdate(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      after an update occurs
      Specified by:
      onPostUpdate in interface HibGrouperLifecycle
      Overrides:
      onPostUpdate in class GrouperAPI
      See Also:
    • onPreDelete

      public void onPreDelete(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before a delete (insert) occurs
      Specified by:
      onPreDelete in interface HibGrouperLifecycle
      Overrides:
      onPreDelete in class GrouperAPI
      See Also:
    • onPreSave

      public void onPreSave(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before a save (insert) occurs
      Specified by:
      onPreSave in interface HibGrouperLifecycle
      Overrides:
      onPreSave in class GrouperAPI
      See Also:
    • onPreUpdate

      public void onPreUpdate(HibernateSession hibernateSession)
      Description copied from interface: HibGrouperLifecycle
      before an update occurs
      Specified by:
      onPreUpdate in interface HibGrouperLifecycle
      Overrides:
      onPreUpdate in class GrouperAPI
      See Also:
    • dbVersion

      public Member dbVersion()
      save the state when retrieving from DB
      Overrides:
      dbVersion in class GrouperAPI
      Returns:
      the dbVersion
    • dbVersionDifferentFields

      public Set<String> dbVersionDifferentFields()
      note, these are massaged so that name, extension, etc look like normal fields. access with fieldValue()
      Overrides:
      dbVersionDifferentFields in class GrouperAPI
      Returns:
      a set of attributes changed, or empty set if none
      See Also:
    • dbVersionReset

      public void dbVersionReset()
      take a snapshot of the data since this is what is in the db
      Overrides:
      dbVersionReset in class GrouperAPI
    • clone

      public Member clone()
      deep clone the fields in this object
      Specified by:
      clone in interface GrouperCloneable
      Specified by:
      clone in class GrouperAPI
      Returns:
      the clone of the object
      See Also:
    • getContextId

      public String getContextId()
      context id of the transaction
      Returns:
      context id
    • setContextId

      public void setContextId(String contextId1)
      context id of the transaction
      Specified by:
      setContextId in interface GrouperHasContext
      Parameters:
      contextId1 -
    • canAttrAdmin

      public boolean canAttrAdmin(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_ADMIN on this AttributeDef.
       boolean rv = m.canAttrAdmin(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if admin
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrDefAttrRead

      public boolean canAttrDefAttrRead(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_DEF_ATTR_READ on this AttributeDef.
       boolean rv = m.canAttrDefAttrRead(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrDefAttrUpdate

      public boolean canAttrDefAttrUpdate(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_DEF_ATTR_UPDATE on this AttributeDef.
       boolean rv = m.canAttrDefAttrUpdate(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canGroupAttrUpdate

      public boolean canGroupAttrUpdate(Group group) throws IllegalArgumentException
      Can this Member GROUP_ATTR_UPDATE on this Group.
       boolean rv = m.canGroupAttrUpdate(group);
       
      Parameters:
      group - Check privileges on this Group.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canGroupAttrRead

      public boolean canGroupAttrRead(Group group) throws IllegalArgumentException
      Can this Member GROUP_ATTR_READ on this Group.
       boolean rv = m.canGroupAttrRead(group);
       
      Parameters:
      group - Check privileges on this Group.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Group
      Since:
      1.0
    • canStemAttrRead

      public boolean canStemAttrRead(Stem stem) throws IllegalArgumentException
      Can this Member STEM_ATTR_READ on this Stem.
       boolean rv = m.canStemAttrRead(stem);
       
      Parameters:
      stem - Check privileges on this Stem.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canStemView

      public boolean canStemView(Stem stem) throws IllegalArgumentException
      Can this Member STEM_VIEW on this Stem.
       boolean rv = m.canStemView(stem);
       
      Parameters:
      stem - Check privileges on this Stem.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canStemAdmin

      public boolean canStemAdmin(Stem stem) throws IllegalArgumentException
      Can this Member STEM_ADMIN on this Stem.
       boolean rv = m.canStemAdmin(stem);
       
      Parameters:
      stem - Check privileges on this Stem.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canStemAttrUpdate

      public boolean canStemAttrUpdate(Stem stem) throws IllegalArgumentException
      Can this Member STEM_ATTR_UPDATE on this Stem.
       boolean rv = m.canStemAttrUpdate(stem);
       
      Parameters:
      stem - Check privileges on this Stem.
      Returns:
      true if allowed
      Throws:
      IllegalArgumentException - if null Stem
      Since:
      1.0
    • canAttrOptin

      public boolean canAttrOptin(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_OPTIN on this AttributeDef.
       boolean rv = m.canAttrAdmin(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if can optin
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrOptout

      public boolean canAttrOptout(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_OPTOUT on this AttributeDef.
       boolean rv = m.canAttrOptout(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if can optout
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrRead

      public boolean canAttrRead(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_READ on this AttributeDef.
       boolean rv = m.canAttrRead(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if can read
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrUpdate

      public boolean canAttrUpdate(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_UPDATE on this AttributeDef.
       boolean rv = m.canAttrUpdate(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if can update
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • canAttrView

      public boolean canAttrView(AttributeDef attributeDef) throws IllegalArgumentException
      Can this Member ATTR_VIEW on this AttributeDef.
       boolean rv = m.canAttrView(attributeDef);
       
      Parameters:
      attributeDef - Check privileges on this AttributeDef.
      Returns:
      if can view
      Throws:
      IllegalArgumentException - if null AttributeDef
      Since:
      1.0
    • hasAttrAdmin

      public Set<AttributeDef> hasAttrAdmin() throws GrouperException
      Get attributeDefs where this member has the ATTR_ADMIN privilege.
       Set admins = hasAttrAdmin();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrAdmin

      public boolean hasAttrAdmin(AttributeDef attributeDef)
      Report whether this member has ATTR_ADMIN on the specified attributeDef.
       // Check whether this member has ATTR_ADMIN on the specified attributeDef.
       if (m.hasAttrAdmin(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      true if the member has the privilege.
    • hasGroupAttrRead

      public boolean hasGroupAttrRead(Group group)
      Report whether this member has GROUP_ATTR_READ on the specified group.
       // Check whether this member has GROUP_ATTR_READ on the specified group.
       if (m.hasGroupAttrRead(group)) {
         // Member has privilege
       }
       
      Parameters:
      group - Test for privilege on this Group
      Returns:
      true if the member has the privilege.
    • hasGroupAttrUpdate

      public boolean hasGroupAttrUpdate(Group group)
      Report whether this member has GROUP_ATTR_UPDATE on the specified group.
       // Check whether this member has GROUP_ATTR_UPDATE on the specified group.
       if (m.hasGroupAttrUpdate(group)) {
         // Member has privilege
       }
       
      Parameters:
      group - Test for privilege on this Group
      Returns:
      true if the member has the privilege.
    • hasStemAttrUpdate

      public boolean hasStemAttrUpdate(Stem stem)
      Report whether this member has STEM_ATTR_UPDATE on the specified stem.
       // Check whether this member has STEM_ATTR_UPDATE on the specified stem.
       if (m.hasStemAttrUpdate(stem)) {
         // Member has privilege
       }
       
      Parameters:
      stem - Test for privilege on this Stem
      Returns:
      true if the member has the privilege.
    • hasStemAttrRead

      public boolean hasStemAttrRead(Stem stem)
      Report whether this member has STEM_ATTR_READ on the specified stem.
       // Check whether this member has STEM_ATTR_READ on the specified stem.
       if (m.hasStemAttrRead(stem)) {
         // Member has privilege
       }
       
      Parameters:
      stem - Test for privilege on this Stem
      Returns:
      true if the member has the privilege.
    • hasStemAdmin

      public boolean hasStemAdmin(Stem stem)
      Report whether this member has STEM_ADMIN on the specified stem.
       // Check whether this member has STEM_ADMIN on the specified stem.
       if (m.hasStemAdmin(stem)) {
         // Member has privilege
       }
       
      Parameters:
      stem - Test for privilege on this Stem
      Returns:
      true if the member has the privilege.
    • hasAttrDefAttrRead

      public boolean hasAttrDefAttrRead(AttributeDef attributeDef)
      Report whether this member has ATTR_DEF_ATTR_READ on the specified attributeDef.
       // Check whether this member has ATTR_DEF_ATTR_READ on the specified attributeDef.
       if (m.hasAttrDefAttrRead(stem)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      true if the member has the privilege.
    • hasAttrDefAttrUpdate

      public boolean hasAttrDefAttrUpdate(AttributeDef attributeDef)
      Report whether this member has ATTR_DEF_ATTR_UPDATE on the specified attributeDef.
       // Check whether this member has ATTR_DEF_ATTR_UPDATE on the specified attributeDef.
       if (m.hasAttrDefAttrUpdate(stem)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      true if the member has the privilege.
    • hasAttrOptin

      public Set<AttributeDef> hasAttrOptin() throws GrouperException
      Get attribute defs where this member has the ATTR_OPTIN privilege.
       Set optin = m.hasAttrOptin();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrDefAttrRead

      public Set<AttributeDef> hasAttrDefAttrRead() throws GrouperException
      Get attribute defs where this member has the ATTR_DEF_ATTR_READ privilege.
       Set results = m.hasAttrDefAttrRead();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrDefAttrUpdate

      public Set<AttributeDef> hasAttrDefAttrUpdate() throws GrouperException
      Get attribute defs where this member has the ATTR_DEF_ATTR_UPDATE privilege.
       Set results = m.hasAttrDefAttrUpdate();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasGroupAttrUpdate

      public Set<Group> hasGroupAttrUpdate() throws GrouperException
      Get groups where this member has the GROUP_ATTR_UPDATE privilege.
       Set results = m.hasGroupAttrUpdate();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasGroupAttrRead

      public Set<Group> hasGroupAttrRead() throws GrouperException
      Get groups where this member has the GROUP_ATTR_READ privilege.
       Set results = m.hasGroupAttrRead();
       
      Returns:
      Set of Group objects.
      Throws:
      GrouperException
    • hasStemAttrRead

      public Set<Stem> hasStemAttrRead() throws GrouperException
      Get stems where this member has the STEM_ATTR_READ privilege.
       Set results = m.hasStemAttrRead();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasStemAdmin

      public Set<Stem> hasStemAdmin() throws GrouperException
      Get stems where this member has the STEM_ADMIN privilege.
       Set results = m.hasStemAdmin();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasStemAttrUpdate

      public Set<Stem> hasStemAttrUpdate() throws GrouperException
      Get stems where this member has the STEM_ATTR_UPDATE privilege.
       Set results = m.hasStemAttrUpdate();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasAttrOptin

      public boolean hasAttrOptin(AttributeDef attributeDef)
      Report whether this member has ATTR_OPTIN on the specified AttributeDef.
       // Check whether this member has ATTR_OPTIN on the specified AttributeDef.
       if (m.hasOptin(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      Boolean true if the member has the privilege.
    • hasAttrOptout

      public Set<AttributeDef> hasAttrOptout() throws GrouperException
      Get groups where this member has the ATTR_OPTOUT privilege.
       Set optout = m.hasOptout();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrOptout

      public boolean hasAttrOptout(AttributeDef attributeDef)
      Report whether this member has ATTR_OPTOUT on the specified AttributeDef.
       // Check whether this member has ATTR_OPTOUT on the specified AttributeDef.
       if (m.hasOptout(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      Boolean true if the member has the privilege.
    • hasAttrRead

      public Set<AttributeDef> hasAttrRead() throws GrouperException
      Get groups where this member has the ATTR_READ privilege.
       Set read = m.hasRead();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrRead

      public boolean hasAttrRead(AttributeDef attributeDef)
      Report whether this member has ATTR_READ on the specified AttributeDef.
       // Check whether this member has ATTR_READ on the specified AttributeDef.
       if (m.hasRead(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this Group
      Returns:
      Boolean true if the member has the privilege.
    • hasAttrUpdate

      public Set<AttributeDef> hasAttrUpdate() throws GrouperException
      Get groups where this member has the ATTR_UPDATE privilege.
       Set update = m.hasUpdate();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrUpdate

      public boolean hasAttrUpdate(AttributeDef attributeDef)
      Report whether this member has ATTR_UPDATE on the specified AttributeDef.
       // Check whether this member has ATTR_UPDATE on the specified AttributeDef.
       if (m.hasUpdate(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      Boolean true if the member has the privilege.
    • hasAttrView

      public Set<AttributeDef> hasAttrView() throws GrouperException
      Get groups where this member has the ATTR_VIEW privilege.
       Set view = m.hasView();
       
      Returns:
      Set of AttributeDef objects.
      Throws:
      GrouperException
    • hasAttrView

      public boolean hasAttrView(AttributeDef attributeDef)
      Report whether this member has ATTR_VIEW on the specified AttributeDef.
       // Check whether this member has ATTR_VIEW on the specified AttributeDef.
       if (m.hasView(attributeDef)) {
         // Member has privilege
       }
       
      Parameters:
      attributeDef - Test for privilege on this AttributeDef
      Returns:
      Boolean true if the member has the privilege.
    • isNonImmediateMember

      public boolean isNonImmediateMember(Group g) throws GrouperException
      Test whether a member nonimmediately belongs to a group. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       if (m.isNonImmediateMember(g)) {
         // Is an immediate member
       }
       
      Parameters:
      g - Test for membership in this group.
      Returns:
      Boolean true if is a member.
      Throws:
      GrouperException
    • isNonImmediateMember

      public boolean isNonImmediateMember(Group g, Field f) throws SchemaException
      Test whether a member nonimmediately belongs to a group. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Does this member nonimmediately belong to the specified group?
       if (m.isNonImmediateMember(g, f)) {
         // Is an immediate member
       }
       
      Parameters:
      g - Test for membership in this group.
      f - Test for memberhip in this list field.
      Returns:
      Boolean true if is a member.
      Throws:
      SchemaException
    • getNonImmediateGroups

      public Set<Group> getNonImmediateGroups(Field field)
      Get groups where this member has an immediate membership. An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships
       // Get groups where this member is an immediate member.
       Set immediates = m.getImmediateGroups();
       
      Parameters:
      field -
      Returns:
      Set of Group objects.
    • compareTo

      public int compareTo(Member o)
      Specified by:
      compareTo in interface Comparable<Member>
      See Also:
    • xmlDifferentBusinessProperties

      public boolean xmlDifferentBusinessProperties(Member other)
      Description copied from interface: XmlImportableBase
      see if the non update cols are different (e.g. name)
      Specified by:
      xmlDifferentBusinessProperties in interface XmlImportableBase<Member>
      Parameters:
      other - the one to compare with
      Returns:
      true if so
      See Also:
    • xmlDifferentUpdateProperties

      public boolean xmlDifferentUpdateProperties(Member other)
      Description copied from interface: XmlImportableBase
      see if the update cols are different (e.g. last updated)
      Specified by:
      xmlDifferentUpdateProperties in interface XmlImportableBase<Member>
      Parameters:
      other - the one to compare with
      Returns:
      true if so
      See Also:
    • xmlCopyBusinessPropertiesToExisting

      public void xmlCopyBusinessPropertiesToExisting(Member existingRecord)
      Description copied from interface: XmlImportableBase
      copy business (non update) properties to an existing record
      Specified by:
      xmlCopyBusinessPropertiesToExisting in interface XmlImportableBase<Member>
      See Also:
    • xmlRetrieveByIdOrKey

      public Member xmlRetrieveByIdOrKey()
      Description copied from interface: XmlImportable
      retrieve from db by id or key. throws exception if duplicate
      Specified by:
      xmlRetrieveByIdOrKey in interface XmlImportable<Member>
      Returns:
      the object or null if not found
      See Also:
    • xmlSaveBusinessProperties

      public Member xmlSaveBusinessProperties(Member existingRecord)
      Description copied from interface: XmlImportableBase
      save the business properties (not update properties)
      Specified by:
      xmlSaveBusinessProperties in interface XmlImportableBase<Member>
      Parameters:
      existingRecord - null if insert, the object if exists in DB generally just copy the hibernate version number, and last updated to the object and store it
      Returns:
      the new object or existing
      See Also:
    • xmlSaveUpdateProperties

      public void xmlSaveUpdateProperties()
      Description copied from interface: XmlImportableBase
      save the udpate properties (e.g. last updated). Note, this is done with a sql update statement, not with hibernate
      Specified by:
      xmlSaveUpdateProperties in interface XmlImportableBase<Member>
      See Also:
    • xmlToExportMember

      public XmlExportMember xmlToExportMember(GrouperVersion grouperVersion)
      convert to xml bean for export
      Parameters:
      grouperVersion -
      Returns:
      xml bean
    • xmlGetId

      public String xmlGetId()
      Description copied from interface: XmlImportableBase
      set id key in db
      Specified by:
      xmlGetId in interface XmlImportableBase<Member>
      Returns:
      id
      See Also:
    • xmlSetId

      public void xmlSetId(String theId)
      Description copied from interface: XmlImportableBase
      set id key in db
      Specified by:
      xmlSetId in interface XmlImportableBase<Member>
      See Also:
    • xmlToString

      public String xmlToString()
      Description copied from interface: XmlImportableBase
      convert to string for log
      Specified by:
      xmlToString in interface XmlImportableBase<Member>
      Returns:
      the string value for log
      See Also:
    • getSubjectIdentifier0

      public String getSubjectIdentifier0()
      Returns:
      the subjectIdentifier0
    • setSubjectIdentifier0

      public void setSubjectIdentifier0(String subjectIdentifier0)
      Parameters:
      subjectIdentifier0 - the subjectIdentifier0 to set
    • getSubjectIdentifier1

      public String getSubjectIdentifier1()
      Returns:
      the subjectIdentifier1
    • setSubjectIdentifier1

      public void setSubjectIdentifier1(String subjectIdentifier1)
      Parameters:
      subjectIdentifier1 -
    • getSubjectIdentifier2

      public String getSubjectIdentifier2()
      Returns:
      the subjectIdentifier2
    • setSubjectIdentifier2

      public void setSubjectIdentifier2(String subjectIdentifier2)
      Parameters:
      subjectIdentifier2 -
    • getEmail0

      public String getEmail0()
      Returns:
      the email0
    • setEmail0

      public void setEmail0(String email0)
      Parameters:
      email0 -
    • isSubjectResolutionEligible

      public boolean isSubjectResolutionEligible()
    • setSubjectResolutionEligible

      public void setSubjectResolutionEligible(boolean subjectResolutionEligible)
    • getSubjectResolutionEligibleDb

      public String getSubjectResolutionEligibleDb()
      Returns:
      T if eligible
    • setSubjectResolutionEligibleDb

      public void setSubjectResolutionEligibleDb(String subjectResolutionEligible)
      Parameters:
      subjectResolutionEligible -
    • getSubjectResolutionResolvableDb

      public String getSubjectResolutionResolvableDb()
      Returns:
      T if resolvable
    • setSubjectResolutionResolvableDb

      public void setSubjectResolutionResolvableDb(String subjectResolutionResolvable)
      Parameters:
      subjectResolutionResolvable -
    • getSubjectResolutionDeletedDb

      public String getSubjectResolutionDeletedDb()
      Returns:
      T if deleted
    • setSubjectResolutionDeletedDb

      public void setSubjectResolutionDeletedDb(String subjectResolutionDeleted)
      Parameters:
      subjectResolutionDeleted -
    • isSubjectResolutionResolvable

      public boolean isSubjectResolutionResolvable()
      Returns:
      true if resolvable
    • setSubjectResolutionResolvable

      public void setSubjectResolutionResolvable(boolean subjectResolutionResolvable)
      Parameters:
      subjectResolutionResolvable -
    • isSubjectResolutionDeleted

      public boolean isSubjectResolutionDeleted()
      Returns:
      true if deleted
    • setSubjectResolutionDeleted

      public void setSubjectResolutionDeleted(boolean subjectResolutionDeleted)
      Parameters:
      subjectResolutionDeleted -
    • getSortString0

      public String getSortString0()
      Returns:
      the sortString0
    • setSortString0

      public void setSortString0(String sortString0)
      Parameters:
      sortString0 - the sortString0 to set
    • getSortString1

      public String getSortString1()
      Returns:
      the sortString1
    • setSortString1

      public void setSortString1(String sortString1)
      Parameters:
      sortString1 - the sortString1 to set
    • getSortString2

      public String getSortString2()
      Returns:
      the sortString2
    • setSortString2

      public void setSortString2(String sortString2)
      Parameters:
      sortString2 - the sortString2 to set
    • getSortString3

      public String getSortString3()
      Returns:
      the sortString3
    • setSortString3

      public void setSortString3(String sortString3)
      Parameters:
      sortString3 - the sortString3 to set
    • getSortString4

      public String getSortString4()
      Returns:
      the sortString4
    • setSortString4

      public void setSortString4(String sortString4)
      Parameters:
      sortString4 - the sortString4 to set
    • getSearchString0

      public String getSearchString0()
      Returns:
      the searchString0
    • setSearchString0

      public void setSearchString0(String searchString0)
      Parameters:
      searchString0 - the searchString0 to set
    • getSearchString1

      public String getSearchString1()
      Returns:
      the searchString1
    • setSearchString1

      public void setSearchString1(String searchString1)
      Parameters:
      searchString1 - the searchString1 to set
    • getSearchString2

      public String getSearchString2()
      Returns:
      the searchString2
    • setSearchString2

      public void setSearchString2(String searchString2)
      Parameters:
      searchString2 - the searchString2 to set
    • getSearchString3

      public String getSearchString3()
      Returns:
      the searchString3
    • setSearchString3

      public void setSearchString3(String searchString3)
      Parameters:
      searchString3 - the searchString3 to set
    • getSearchString4

      public String getSearchString4()
      Returns:
      the searchString4
    • setSearchString4

      public void setSearchString4(String searchString4)
      Parameters:
      searchString4 - the searchString4 to set
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • updateMemberAttributes

      public void updateMemberAttributes(Subject subject, boolean storeChanges)
      Parameters:
      subject -
      storeChanges - if there are changes, should they be saved to the database?
    • hasStemView

      public Set<Stem> hasStemView() throws GrouperException
      Get stems where this member has the STEM_VIEW privilege.
       Set results = m.hasStemView();
       
      Returns:
      Set of Stem objects.
      Throws:
      GrouperException
    • hasStemView

      public boolean hasStemView(Stem stem)
      Report whether this member has STEM_VIEW on the specified stem.
       // Check whether this member has STEM_VIEW on the specified stem.
       if (m.hasStemView(stem)) {
         // Member has privilege
       }
       
      Parameters:
      stem - Test for privilege on this Stem
      Returns:
      true if the member has the privilege.
    • assignIdIndex

      public boolean assignIdIndex(long theIdIndex)
      assign different id index
      Parameters:
      theIdIndex -
      Returns:
      if it was changed