edu.internet2.middleware.grouper
Class Member

java.lang.Object
  extended by edu.internet2.middleware.grouper.GrouperAPI
      extended by 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

public class Member
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned, Comparable<Member>, XmlImportable<Member>, AttributeAssignable, GrouperId

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 $
Author:
blair christensen.
See Also:
Serialized Form

Field Summary
static int changeSubjectDidntExist
          change a subject to a subject which didnt exist
static int changeSubjectExist
          change a subject to a subject which did exist
static int changeSubjectMembershipAddCount
          number of memberships edited
static int changeSubjectMembershipDeleteCount
          number of memberships deleted due to duplicates
static int changeSubjectSameSubject
          change a subject to the same subject (for testing)
static String COLUMN_DESCRIPTION
          description
static String COLUMN_ID
          new uuid col in db
static String COLUMN_MEMBER_UUID
          uuid col in db
static String COLUMN_NAME
          name
static String COLUMN_OLD_ID
          old id col for id conversion
static String COLUMN_OLD_MEMBER_UUID
          old uuid id col for id conversion
static String COLUMN_SEARCH_STRING0
          searchString0
static String COLUMN_SEARCH_STRING1
          searchString1
static String COLUMN_SEARCH_STRING2
          searchString2
static String COLUMN_SEARCH_STRING3
          searchString3
static String COLUMN_SEARCH_STRING4
          searchString4
static String COLUMN_SORT_STRING0
          sortString0
static String COLUMN_SORT_STRING1
          sortString1
static String COLUMN_SORT_STRING2
          sortString2
static String COLUMN_SORT_STRING3
          sortString3
static String COLUMN_SORT_STRING4
          sortString4
static String COLUMN_SUBJECT_ID
          column
static String COLUMN_SUBJECT_IDENTIFIER0
          subjectIdentifier0
static String COLUMN_SUBJECT_SOURCE
          column
static String COLUMN_SUBJECT_TYPE
          column
static boolean DELETE_OLD_MEMBER
          boolean constant for gsh param
static String FIELD_DB_VERSION
          constant for field name for: dbVersion
static String FIELD_DESCRIPTION
          constant for field name for: description
static String FIELD_MEMBER_UUID
          constant for field name for: memberUUID
static String FIELD_NAME
          constant for field name for: name
static String FIELD_SEARCH_STRING0
          constant for field name for: searchString0
static String FIELD_SEARCH_STRING1
          constant for field name for: searchString1
static String FIELD_SEARCH_STRING2
          constant for field name for: searchString2
static String FIELD_SEARCH_STRING3
          constant for field name for: searchString3
static String FIELD_SEARCH_STRING4
          constant for field name for: searchString4
static String FIELD_SORT_STRING0
          constant for field name for: sortString0
static String FIELD_SORT_STRING1
          constant for field name for: sortString1
static String FIELD_SORT_STRING2
          constant for field name for: sortString2
static String FIELD_SORT_STRING3
          constant for field name for: sortString3
static String FIELD_SORT_STRING4
          constant for field name for: sortString4
static String FIELD_SUBJECT_ID
          constant for field name for: subjectID
static String FIELD_SUBJECT_IDENTIFIER0
          constant for field name for: subjectIdentifier0
static String FIELD_SUBJECT_SOURCE_ID
          constant for field name for: subjectSourceID
static String FIELD_SUBJECT_TYPE_ID
          constant for field name for: subjectTypeID
static String PROPERTY_SUBJECT_ID
          constant for property name for: subjectId
static String PROPERTY_UUID
          javabeans property for uuid
static long serialVersionUID
          serial version
static String TABLE_GROUPER_MEMBERS
          grouper_members table in the DB
 
Fields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
 
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
 
Constructor Summary
Member()
           
 
Method Summary
 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.
 boolean canAdmin(Group g)
          Can this Member ADMIN on this Group.
 boolean canAttrAdmin(AttributeDef attributeDef)
          Can this Member ATTR_ADMIN on this AttributeDef.
 boolean canAttrDefAttrRead(AttributeDef attributeDef)
          Can this Member ATTR_DEF_ATTR_READ on this AttributeDef.
 boolean canAttrDefAttrUpdate(AttributeDef attributeDef)
          Can this Member ATTR_DEF_ATTR_UPDATE on this AttributeDef.
 boolean canAttrOptin(AttributeDef attributeDef)
          Can this Member ATTR_OPTIN on this AttributeDef.
 boolean canAttrOptout(AttributeDef attributeDef)
          Can this Member ATTR_OPTOUT on this AttributeDef.
 boolean canAttrRead(AttributeDef attributeDef)
          Can this Member ATTR_READ on this AttributeDef.
 boolean canAttrUpdate(AttributeDef attributeDef)
          Can this Member ATTR_UPDATE on this AttributeDef.
 boolean canAttrView(AttributeDef attributeDef)
          Can this Member ATTR_VIEW on this AttributeDef.
 boolean canCreate(Stem ns)
          Can this Member CREATE on this Stem.
 boolean canGroupAttrRead(Group group)
          Can this Member GROUP_ATTR_READ on this Group.
 boolean canGroupAttrUpdate(Group group)
          Can this Member GROUP_ATTR_UPDATE on this Group.
 boolean canOptin(Group g)
          Can this Member OPTIN on this Group.
 boolean canOptout(Group g)
          Can this Member OPTOUT on this Group.
 boolean canRead(Group g)
          Can this Member READ on this Group.
 boolean canStem(Stem ns)
          Can this Member STEM on this Stem.
 boolean canStemAdmin(Stem stem)
          Can this Member STEM_ADMIN on this Stem.
 boolean canStemAttrRead(Stem stem)
          Can this Member STEM_ATTR_READ on this Stem.
 boolean canStemAttrUpdate(Stem stem)
          Can this Member STEM_ATTR_UPDATE on this Stem.
 boolean canUpdate(Group g)
          Can this Member UPDATE on this Group.
 boolean canView(Group g)
          Can this Member VIEW on this Group.
 void changeSubject(edu.internet2.middleware.subject.Subject newSubject)
          change the subject of a member to another subject.
 void changeSubject(edu.internet2.middleware.subject.Subject newSubject, boolean deleteOldMember)
          change the subject of a member to another subject.
 String changeSubjectReport(edu.internet2.middleware.subject.Subject newSubject, boolean deleteOldMember)
           This is the readonly dry run report version of this operation...
 Member clone()
          deep clone the fields in this object
 int compareTo(Member o)
           
 Member dbVersion()
          save the state when retrieving from DB
 Set<String> dbVersionDifferentFields()
          note, these are massaged so that name, extension, etc look like normal fields.
 void dbVersionReset()
          take a snapshot of the data since this is what is in the db
 boolean equals(Object other)
           
 AttributeAssignMemberDelegate getAttributeDelegate()
          get the logic delegate
 AttributeValueDelegate getAttributeValueDelegate()
          this delegate works on attributes and values at the same time
 String getContextId()
          context id of the transaction
 String getDescription()
           
 Set<Group> getEffectiveGroups()
          Get groups where this member has an effective membership.
 Set<Group> getEffectiveGroups(Field field)
          Get groups where this member has an effective membership.
 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.
 Set<Membership> getEffectiveMemberships()
          Get effective memberships.
 Set<Membership> getEffectiveMemberships(Field f)
          Get effective memberships.
 Set<Group> getGroups()
          Get groups where this member is a member.
 Set<Group> getGroups(Field field)
          Get groups where this member is a member.
 Set<Group> getGroups(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled)
          Get groups where this member is a member.
 String getId()
          get a members id
 Set<Group> getImmediateGroups()
          Get groups where this member has an immediate membership.
 Set<Group> getImmediateGroups(Field field)
          Get groups where this member has an immediate membership.
 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.
 Set<Membership> getImmediateMemberships()
          Get immediate memberships.
 Set<Membership> getImmediateMemberships(Field f)
          Get immediate memberships.
 Set<Membership> getMemberships()
          Get memberships.
 Set<Membership> getMemberships(Field f)
          Get memberships.
 Set<Membership> getMemberships(Field f, boolean requireListField)
          Get memberships.
 String getName()
           
 Set<Group> getNonImmediateGroups()
          Get groups where this member has a non immediate membership.
 Set<Group> getNonImmediateGroups(Field field)
          Get groups where this member has an immediate membership.
 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.
 Set<Membership> getNonImmediateMemberships()
          Get non-immediate memberships.
 Set<Membership> getNonImmediateMemberships(Field f)
          Get non-immediate memberships.
 Set<AccessPrivilege> getPrivs(Group g)
          Find access privileges held by this member on a Group.
 Set<NamingPrivilege> getPrivs(Stem ns)
          Find naming privileges held by this member on a Stem.
 String getSearchString0()
           
 String getSearchString1()
           
 String getSearchString2()
           
 String getSearchString3()
           
 String getSearchString4()
           
 String getSortString0()
           
 String getSortString1()
           
 String getSortString2()
           
 String getSortString3()
           
 String getSortString4()
           
 edu.internet2.middleware.subject.Subject getSubject()
          Get Subject that maps to this member.
 String getSubjectId()
           
 String getSubjectIdDb()
           
 String getSubjectIdentifier0()
           
 edu.internet2.middleware.subject.Source getSubjectSource()
          Get the Source of the subject that maps to this member.
 String getSubjectSourceId()
          Get the Source id of the subject that maps to this member.
 String getSubjectSourceIdDb()
          simple get subject source id
 edu.internet2.middleware.subject.SubjectType getSubjectType()
          Get the SubjectType of the subject that maps to this member.
 String getSubjectTypeId()
          Get the subject type id of the subject that maps to this member.
 String getUuid()
          Get member's UUID.
 Set<Group> hasAdmin()
          Get groups where this member has the ADMIN privilege.
 boolean hasAdmin(Group g)
          Report whether this member has ADMIN on the specified group.
 Set<Stem> hasAdminInStem()
          Get stems where this member has the ADMIN privilege of a group inside.
 Set<AttributeDef> hasAttrAdmin()
          Get attributeDefs where this member has the ATTR_ADMIN privilege.
 boolean hasAttrAdmin(AttributeDef attributeDef)
          Report whether this member has ATTR_ADMIN on the specified attributeDef.
 Set<AttributeDef> hasAttrDefAttrRead()
          Get attribute defs where this member has the ATTR_DEF_ATTR_READ privilege.
 boolean hasAttrDefAttrRead(AttributeDef attributeDef)
          Report whether this member has ATTR_DEF_ATTR_READ on the specified attributeDef.
 Set<AttributeDef> hasAttrDefAttrUpdate()
          Get attribute defs where this member has the ATTR_DEF_ATTR_UPDATE privilege.
 boolean hasAttrDefAttrUpdate(AttributeDef attributeDef)
          Report whether this member has ATTR_DEF_ATTR_UPDATE on the specified attributeDef.
 Set<AttributeDef> hasAttrOptin()
          Get attribute defs where this member has the ATTR_OPTIN privilege.
 boolean hasAttrOptin(AttributeDef attributeDef)
          Report whether this member has ATTR_OPTIN on the specified AttributeDef.
 Set<AttributeDef> hasAttrOptout()
          Get groups where this member has the ATTR_OPTOUT privilege.
 boolean hasAttrOptout(AttributeDef attributeDef)
          Report whether this member has ATTR_OPTOUT on the specified AttributeDef.
 Set<AttributeDef> hasAttrRead()
          Get groups where this member has the ATTR_READ privilege.
 boolean hasAttrRead(AttributeDef attributeDef)
          Report whether this member has ATTR_READ on the specified AttributeDef.
 Set<AttributeDef> hasAttrUpdate()
          Get groups where this member has the ATTR_UPDATE privilege.
 boolean hasAttrUpdate(AttributeDef attributeDef)
          Report whether this member has ATTR_UPDATE on the specified AttributeDef.
 Set<AttributeDef> hasAttrView()
          Get groups where this member has the ATTR_VIEW privilege.
 boolean hasAttrView(AttributeDef attributeDef)
          Report whether this member has ATTR_VIEW on the specified AttributeDef.
 Set<Stem> hasCreate()
          Get stems where this member has the CREATE privilege.
 boolean hasCreate(Stem ns)
          Report whether this member has CREATE on the specified stem.
 Set<Group> hasGroupAttrRead()
          Get groups where this member has the GROUP_ATTR_READ privilege.
 boolean hasGroupAttrRead(Group group)
          Report whether this member has GROUP_ATTR_READ on the specified group.
 Set<Stem> hasGroupAttrReadInStem()
          Get stems where this member has the GROUP_ATTR_READ privilege of a group inside.
 Set<Group> hasGroupAttrUpdate()
          Get groups where this member has the GROUP_ATTR_UPDATE privilege.
 boolean hasGroupAttrUpdate(Group group)
          Report whether this member has GROUP_ATTR_UPDATE on the specified group.
 Set<Stem> hasGroupAttrUpdateInStem()
          Get stems where this member has the GROUP_ATTR_UPDATE privilege of a group inside.
 int hashCode()
           
 Set<Group> hasOptin()
          Get groups where this member has the OPTIN privilege.
 boolean hasOptin(Group g)
          Report whether this member has OPTIN on the specified group.
 Set<Stem> hasOptinInStem()
          Get stems where this member has the OPTIN privilege of a group inside.
 Set<Group> hasOptout()
          Get groups where this member has the OPTOUT privilege.
 boolean hasOptout(Group g)
          Report whether this member has OPTOUT on the specified group.
 Set<Stem> hasOptoutInStem()
          Get stems where this member has the OPTOUT privilege of a group inside.
 Set<Group> hasRead()
          Get groups where this member has the READ privilege.
 boolean hasRead(Group g)
          Report whether this member has READ on the specified group.
 Set<Stem> hasReadInStem()
          Get stems where this member has the READ privilege of a group inside.
 Set<Stem> hasStem()
          Get stems where this member has the STEM privilege.
 boolean hasStem(Stem ns)
          Report whether this member has STEM on the specified stem.
 Set<Stem> hasStemAdmin()
          Get stems where this member has the STEM_ADMIN privilege.
 boolean hasStemAdmin(Stem stem)
          Report whether this member has STEM_ADMIN on the specified stem.
 Set<Stem> hasStemAttrRead()
          Get stems where this member has the STEM_ATTR_READ privilege.
 boolean hasStemAttrRead(Stem stem)
          Report whether this member has STEM_ATTR_READ on the specified stem.
 Set<Stem> hasStemAttrUpdate()
          Get stems where this member has the STEM_ATTR_UPDATE privilege.
 boolean hasStemAttrUpdate(Stem stem)
          Report whether this member has STEM_ATTR_UPDATE on the specified stem.
 Set<Group> hasUpdate()
          Get groups where this member has the UPDATE privilege.
 boolean hasUpdate(Group g)
          Report whether this member has UPDATE on the specified group.
 Set<Stem> hasUpdateInStem()
          Get stems where this member has the UPDATE privilege of a group inside.
 Set<Group> hasView()
          Get groups where this member has the VIEW privilege.
 boolean hasView(Group g)
          Report whether this member has VIEW on the specified group.
 Set<Stem> hasViewInStem()
          Get stems where this member has the VIEW privilege of a group inside.
 boolean isEffectiveMember(Group g)
          Test whether a member effectively belongs to a group.
 boolean isEffectiveMember(Group g, Field f)
          Test whether a member effectively belongs to a group.
 boolean isImmediateMember(Group g)
          Test whether a member immediately belongs to a group.
 boolean isImmediateMember(Group g, Field f)
          Test whether a member immediately belongs to a group.
 boolean isMember(Group g)
          Test whether a member belongs to a group.
 boolean isMember(Group g, Field f)
          Test whether a member belongs to the specified group list.
 boolean isMember(String ownerUUID, Field f)
           
 boolean isNonImmediateMember(Group g)
          Test whether a member nonimmediately belongs to a group.
 boolean isNonImmediateMember(Group g, Field f)
          Test whether a member nonimmediately belongs to a group.
 boolean onDelete(org.hibernate.Session hs)
           
 void onPostDelete(HibernateSession hibernateSession)
          after a delete occurs
 void onPostSave(HibernateSession hibernateSession)
          after a save (insert) occurs
 void onPostUpdate(HibernateSession hibernateSession)
          after an update occurs
 void onPreDelete(HibernateSession hibernateSession)
          before a delete (insert) occurs
 void onPreSave(HibernateSession hibernateSession)
          before a save (insert) occurs
 void onPreUpdate(HibernateSession hibernateSession)
          before an update occurs
 boolean onSave(org.hibernate.Session hs)
           
static void resolveSubjects(Collection<Member> members, boolean resolveAllAlways)
          resolve subjects in one batch
 void setContextId(String contextId1)
          context id of the transaction
 void setDescription(String description)
           
 void setName(String name)
           
 void setSearchString0(String searchString0)
           
 void setSearchString1(String searchString1)
           
 void setSearchString2(String searchString2)
           
 void setSearchString3(String searchString3)
           
 void setSearchString4(String searchString4)
           
 void setSortString0(String sortString0)
           
 void setSortString1(String sortString1)
           
 void setSortString2(String sortString2)
           
 void setSortString3(String sortString3)
           
 void setSortString4(String sortString4)
           
 void setSubjectId(String id)
          Change subject id associated with member.
 void setSubjectIdDb(String id)
          simple set subject id
 void setSubjectIdentifier0(String subjectIdentifier0)
           
 void setSubjectSourceId(String id)
          Change subject source id associated with member.
 void setSubjectSourceIdDb(String id)
          simple set subject source id
 void setSubjectTypeId(String subjectTypeID)
           
 void setUuid(String memberUUID)
           
 void store()
          will be implemented soon
static String subjectIds(Collection<Member> collection)
          print out a collection of members
 Group toGroup()
          Convert this member back to a Group object.
 String toString()
           
 String toStringDto()
           
 void updateMemberAttributes(edu.internet2.middleware.subject.Subject subject, boolean storeChanges)
           
 void xmlCopyBusinessPropertiesToExisting(Member existingRecord)
          copy business (non update) properties to an existing record
 boolean xmlDifferentBusinessProperties(Member other)
          see if the non update cols are different (e.g.
 boolean xmlDifferentUpdateProperties(Member other)
          see if the update cols are different (e.g.
 String xmlGetId()
          set id key in db
 Member xmlRetrieveByIdOrKey()
          retrieve from db by id or key.
 Member xmlSaveBusinessProperties(Member existingRecord)
          save the business properties (not update properties)
 void xmlSaveUpdateProperties()
          save the udpate properties (e.g.
 void xmlSetId(String theId)
          set id key in db
 XmlExportMember xmlToExportMember(GrouperVersion grouperVersion)
          convert to xml bean for export
 String xmlToString()
          convert to string for log
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onLoad, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_SUBJECT_ID

public static final String PROPERTY_SUBJECT_ID
constant for property name for: subjectId

See Also:
Constant Field Values

TABLE_GROUPER_MEMBERS

public static final String TABLE_GROUPER_MEMBERS
grouper_members table in the DB

See Also:
Constant Field Values

COLUMN_MEMBER_UUID

public static final String COLUMN_MEMBER_UUID
uuid col in db

See Also:
Constant Field Values

COLUMN_ID

public static final String COLUMN_ID
new uuid col in db

See Also:
Constant Field Values

COLUMN_OLD_ID

public static final String COLUMN_OLD_ID
old id col for id conversion

See Also:
Constant Field Values

COLUMN_OLD_MEMBER_UUID

public static final String COLUMN_OLD_MEMBER_UUID
old uuid id col for id conversion

See Also:
Constant Field Values

COLUMN_SUBJECT_IDENTIFIER0

public static final String COLUMN_SUBJECT_IDENTIFIER0
subjectIdentifier0

See Also:
Constant Field Values

COLUMN_SORT_STRING0

public static final String COLUMN_SORT_STRING0
sortString0

See Also:
Constant Field Values

COLUMN_SORT_STRING1

public static final String COLUMN_SORT_STRING1
sortString1

See Also:
Constant Field Values

COLUMN_SORT_STRING2

public static final String COLUMN_SORT_STRING2
sortString2

See Also:
Constant Field Values

COLUMN_SORT_STRING3

public static final String COLUMN_SORT_STRING3
sortString3

See Also:
Constant Field Values

COLUMN_SORT_STRING4

public static final String COLUMN_SORT_STRING4
sortString4

See Also:
Constant Field Values

COLUMN_SEARCH_STRING0

public static final String COLUMN_SEARCH_STRING0
searchString0

See Also:
Constant Field Values

COLUMN_SEARCH_STRING1

public static final String COLUMN_SEARCH_STRING1
searchString1

See Also:
Constant Field Values

COLUMN_SEARCH_STRING2

public static final String COLUMN_SEARCH_STRING2
searchString2

See Also:
Constant Field Values

COLUMN_SEARCH_STRING3

public static final String COLUMN_SEARCH_STRING3
searchString3

See Also:
Constant Field Values

COLUMN_SEARCH_STRING4

public static final String COLUMN_SEARCH_STRING4
searchString4

See Also:
Constant Field Values

COLUMN_NAME

public static final String COLUMN_NAME
name

See Also:
Constant Field Values

COLUMN_SUBJECT_ID

public static final String COLUMN_SUBJECT_ID
column

See Also:
Constant Field Values

COLUMN_SUBJECT_SOURCE

public static final String COLUMN_SUBJECT_SOURCE
column

See Also:
Constant Field Values

COLUMN_SUBJECT_TYPE

public static final String COLUMN_SUBJECT_TYPE
column

See Also:
Constant Field Values

COLUMN_DESCRIPTION

public static final String COLUMN_DESCRIPTION
description

See Also:
Constant Field Values

serialVersionUID

public static final long serialVersionUID
serial version

See Also:
Constant Field Values

FIELD_DB_VERSION

public static final String FIELD_DB_VERSION
constant for field name for: dbVersion

See Also:
Constant Field Values

FIELD_MEMBER_UUID

public static final String FIELD_MEMBER_UUID
constant for field name for: memberUUID

See Also:
Constant Field Values

FIELD_SUBJECT_ID

public static final String FIELD_SUBJECT_ID
constant for field name for: subjectID

See Also:
Constant Field Values

FIELD_SUBJECT_SOURCE_ID

public static final String FIELD_SUBJECT_SOURCE_ID
constant for field name for: subjectSourceID

See Also:
Constant Field Values

FIELD_SUBJECT_TYPE_ID

public static final String FIELD_SUBJECT_TYPE_ID
constant for field name for: subjectTypeID

See Also:
Constant Field Values

FIELD_SUBJECT_IDENTIFIER0

public static final String FIELD_SUBJECT_IDENTIFIER0
constant for field name for: subjectIdentifier0

See Also:
Constant Field Values

FIELD_SORT_STRING0

public static final String FIELD_SORT_STRING0
constant for field name for: sortString0

See Also:
Constant Field Values

FIELD_SORT_STRING1

public static final String FIELD_SORT_STRING1
constant for field name for: sortString1

See Also:
Constant Field Values

FIELD_SORT_STRING2

public static final String FIELD_SORT_STRING2
constant for field name for: sortString2

See Also:
Constant Field Values

FIELD_SORT_STRING3

public static final String FIELD_SORT_STRING3
constant for field name for: sortString3

See Also:
Constant Field Values

FIELD_SORT_STRING4

public static final String FIELD_SORT_STRING4
constant for field name for: sortString4

See Also:
Constant Field Values

FIELD_SEARCH_STRING0

public static final String FIELD_SEARCH_STRING0
constant for field name for: searchString0

See Also:
Constant Field Values

FIELD_SEARCH_STRING1

public static final String FIELD_SEARCH_STRING1
constant for field name for: searchString1

See Also:
Constant Field Values

FIELD_SEARCH_STRING2

public static final String FIELD_SEARCH_STRING2
constant for field name for: searchString2

See Also:
Constant Field Values

FIELD_SEARCH_STRING3

public static final String FIELD_SEARCH_STRING3
constant for field name for: searchString3

See Also:
Constant Field Values

FIELD_SEARCH_STRING4

public static final String FIELD_SEARCH_STRING4
constant for field name for: searchString4

See Also:
Constant Field Values

FIELD_NAME

public static final String FIELD_NAME
constant for field name for: name

See Also:
Constant Field Values

FIELD_DESCRIPTION

public static final String FIELD_DESCRIPTION
constant for field name for: description

See Also:
Constant Field Values

PROPERTY_UUID

public static final String PROPERTY_UUID
javabeans property for uuid

See Also:
Constant Field Values

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:
Constant Field Values
Constructor Detail

Member

public Member()
Method Detail

resolveSubjects

public static void resolveSubjects(Collection<Member> members,
                                   boolean resolveAllAlways)
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(edu.internet2.middleware.subject.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(edu.internet2.middleware.subject.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(edu.internet2.middleware.subject.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

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 edu.internet2.middleware.subject.Subject getSubject()
                                                    throws edu.internet2.middleware.subject.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:
edu.internet2.middleware.subject.SubjectNotFoundException

getSubjectSource

public edu.internet2.middleware.subject.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 edu.internet2.middleware.subject.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

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:
Object.toString()

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:
Object.equals(java.lang.Object)

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:
Object.hashCode()

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:
GrouperAPI.onDelete(org.hibernate.Session)

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:
GrouperAPI.onSave(org.hibernate.Session)

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:
GrouperAPI.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.onPostUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)

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:
GrouperAPI.dbVersionDifferentFields()

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:
Object.clone()

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

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:
Comparable.compareTo(java.lang.Object)

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:
XmlImportableBase.xmlDifferentBusinessProperties(java.lang.Object)

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:
XmlImportableBase.xmlDifferentUpdateProperties(java.lang.Object)

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:
XmlImportableBase.xmlCopyBusinessPropertiesToExisting(java.lang.Object)

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:
XmlImportable.xmlRetrieveByIdOrKey()

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:
XmlImportableBase.xmlSaveBusinessProperties(java.lang.Object)

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:
XmlImportableBase.xmlSaveUpdateProperties()

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:
XmlImportableBase.xmlGetId()

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:
XmlImportableBase.xmlSetId(java.lang.String)

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:
XmlImportableBase.xmlToString()

getSubjectIdentifier0

public String getSubjectIdentifier0()
Returns:
the subjectIdentifier0

setSubjectIdentifier0

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

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(edu.internet2.middleware.subject.Subject subject,
                                   boolean storeChanges)
Parameters:
subject -
storeChanges - if there are changes, should they be saved to the database?