Package edu.internet2.middleware.grouper
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
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 $
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
change a subject to a subject which didnt existstatic int
change a subject to a subject which did existstatic int
number of memberships editedstatic int
number of memberships deleted due to duplicatesstatic int
change a subject to the same subject (for testing)static final String
descriptionstatic final String
email0static final String
new uuid col in dbstatic final String
new id_index col in dbstatic final String
new internal_id col in dbstatic final String
uuid col in dbstatic final String
namestatic final String
old id col for id conversionstatic final String
old uuid id col for id conversionstatic final String
searchString0static final String
searchString1static final String
searchString2static final String
searchString3static final String
searchString4static final String
sortString0static final String
sortString1static final String
sortString2static final String
sortString3static final String
sortString4static final String
columnstatic final String
subjectIdentifier0static final String
subjectIdentifier1static final String
subjectIdentifier2static final String
subjectResolutionDeletedstatic final String
subjectResolutionEligiblestatic final String
subjectResolutionResolvablestatic final String
columnstatic final String
columnstatic final boolean
boolean constant for gsh paramstatic final String
constant for field name for: dbVersionstatic final String
constant for field name for: descriptionstatic final String
constant for field name for: email0static final String
constant for field name for: idIndexstatic final String
constant for field name for: internalIdstatic final String
constant for field name for: memberUUIDstatic final String
constant for field name for: namestatic final String
constant for field name for: searchString0static final String
constant for field name for: searchString1static final String
constant for field name for: searchString2static final String
constant for field name for: searchString3static final String
constant for field name for: searchString4static final String
constant for field name for: sortString0static final String
constant for field name for: sortString1static final String
constant for field name for: sortString2static final String
constant for field name for: sortString3static final String
constant for field name for: sortString4static final String
constant for field name for: subjectIDstatic final String
constant for field name for: subjectIdentifier0static final String
constant for field name for: subjectIdentifier1static final String
constant for field name for: subjectIdentifier2static final String
constant for field name for: subjectResolutionDeletedstatic final String
constant for field name for: subjectResolutionEligiblestatic final String
constant for field name for: subjectResolutionResolvablestatic final String
constant for field name for: subjectSourceIDstatic final String
constant for field name for: subjectTypeIDstatic final String
constant for property name for: subjectIdstatic final String
javabeans property for uuidstatic final long
serial versionstatic final String
grouper_members table in the DBFields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, dbVersion, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_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
assignIdIndex
(long theIdIndex) assign different id indexboolean
boolean
canAttrAdmin
(AttributeDef attributeDef) Can thisMember
ATTR_ADMIN on thisAttributeDef
.boolean
canAttrDefAttrRead
(AttributeDef attributeDef) Can thisMember
ATTR_DEF_ATTR_READ on thisAttributeDef
.boolean
canAttrDefAttrUpdate
(AttributeDef attributeDef) Can thisMember
ATTR_DEF_ATTR_UPDATE on thisAttributeDef
.boolean
canAttrOptin
(AttributeDef attributeDef) Can thisMember
ATTR_OPTIN on thisAttributeDef
.boolean
canAttrOptout
(AttributeDef attributeDef) Can thisMember
ATTR_OPTOUT on thisAttributeDef
.boolean
canAttrRead
(AttributeDef attributeDef) Can thisMember
ATTR_READ on thisAttributeDef
.boolean
canAttrUpdate
(AttributeDef attributeDef) Can thisMember
ATTR_UPDATE on thisAttributeDef
.boolean
canAttrView
(AttributeDef attributeDef) Can thisMember
ATTR_VIEW on thisAttributeDef
.boolean
boolean
canGroupAttrRead
(Group group) boolean
canGroupAttrUpdate
(Group group) boolean
boolean
boolean
boolean
boolean
canStemAdmin
(Stem stem) boolean
canStemAttrRead
(Stem stem) boolean
canStemAttrUpdate
(Stem stem) boolean
canStemView
(Stem stem) boolean
boolean
void
changeSubject
(Subject newSubject) change the subject of a member to another subject.void
changeSubject
(Subject newSubject, boolean deleteOldMember) change the subject of a member to another subject.changeSubjectReport
(Subject newSubject, boolean deleteOldMember) This is the readonly dry run report version of this operation...clone()
deep clone the fields in this objectint
save the state when retrieving from DBnote, these are massaged so that name, extension, etc look like normal fields.void
take a snapshot of the data since this is what is in the dbboolean
get the logic delegatethis delegate works on attributes and values at the same timecontext id of the transactionGet groups where this member has an effective membership.getEffectiveGroups
(Field field) Get groups where this member has an effective membership.getEffectiveGroups
(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled) Get groups where this member is an effective member.Get effective memberships.Get effective memberships.Get groups where this member is a member.Get groups where this member is a member.getGroups
(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled) Get groups where this member is a member.getId()
get a members idid of the member as a unique integerGet groups where this member has an immediate membership.getImmediateGroups
(Field field) Get groups where this member has an immediate membership.getImmediateGroups
(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled) Get groups where this member is an immediate member.Get immediate memberships.Get immediate memberships.internal idGet memberships.Get memberships.getMemberships
(Field f, boolean requireListField) Get memberships.getName()
Get groups where this member has a non immediate membership.getNonImmediateGroups
(Field field) Get groups where this member has an immediate membership.getNonImmediateGroups
(Field field, String scope, Stem stem, Stem.Scope stemScope, QueryOptions queryOptions, Boolean enabled) Get groups where this member is a nonimmediate member.Get non-immediate memberships.Get non-immediate memberships.Find access privileges held by this member on aGroup
.Find naming privileges held by this member on aStem
.GetSubject
that maps to this member.Get theSource
of the subject that maps to this member.Get theSource
id of the subject that maps to this member.simple get subject source idGet theSubjectType
of the subject that maps to this member.Get the subject type id of the subject that maps to this member.getUuid()
Get member's UUID.hasAdmin()
Get groups where this member has the ADMIN privilege.boolean
Report whether this member has ADMIN on the specified group.Get stems where this member has the ADMIN privilege of a group inside.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.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.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.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.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.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.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.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.Get stems where this member has the CREATE privilege.boolean
Report whether this member has CREATE on the specified stem.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.Get stems where this member has the GROUP_ATTR_READ privilege of a group inside.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.Get stems where this member has the GROUP_ATTR_UPDATE privilege of a group inside.int
hashCode()
hasOptin()
Get groups where this member has the OPTIN privilege.boolean
Report whether this member has OPTIN on the specified group.Get stems where this member has the OPTIN privilege of a group inside.Get groups where this member has the OPTOUT privilege.boolean
Report whether this member has OPTOUT on the specified group.Get stems where this member has the OPTOUT privilege of a group inside.hasRead()
Get groups where this member has the READ privilege.boolean
Report whether this member has READ on the specified group.Get stems where this member has the READ privilege of a group inside.hasStem()
Get stems where this member has the STEM privilege.boolean
Report whether this member has STEM on the specified stem.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.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.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.Get stems where this member has the STEM_VIEW privilege.boolean
hasStemView
(Stem stem) Report whether this member has STEM_VIEW on the specified stem.Get groups where this member has the UPDATE privilege.boolean
Report whether this member has UPDATE on the specified group.Get stems where this member has the UPDATE privilege of a group inside.hasView()
Get groups where this member has the VIEW privilege.boolean
Report whether this member has VIEW on the specified group.Get stems where this member has the VIEW privilege of a group inside.static boolean
boolean
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
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
Test whether a member belongs to a group.boolean
Test whether a member belongs to the specified group list.boolean
boolean
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
boolean
boolean
boolean
onDelete
(org.hibernate.Session hs) void
onPostDelete
(HibernateSession hibernateSession) after a delete occursvoid
onPostSave
(HibernateSession hibernateSession) after a save (insert) occursvoid
onPostUpdate
(HibernateSession hibernateSession) after an update occursvoid
onPreDelete
(HibernateSession hibernateSession) before a delete (insert) occursvoid
onPreSave
(HibernateSession hibernateSession) before a save (insert) occursvoid
onPreUpdate
(HibernateSession hibernateSession) before an update occursboolean
onSave
(org.hibernate.Session hs) static void
resolveSubjects
(Collection<Member> members, boolean resolveAllAlways) Deprecated.void
setContextId
(String contextId1) context id of the transactionvoid
setDescription
(String description) void
void
setIdIndex
(Long idIndex1) id of the member as a unique integervoid
setInternalId
(Long internalId1) internal idvoid
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 idvoid
setSubjectIdentifier0
(String subjectIdentifier0) void
setSubjectIdentifier1
(String subjectIdentifier1) void
setSubjectIdentifier2
(String subjectIdentifier2) void
setSubjectResolutionDeleted
(boolean subjectResolutionDeleted) void
setSubjectResolutionDeletedDb
(String subjectResolutionDeleted) void
setSubjectResolutionEligible
(boolean subjectResolutionEligible) void
setSubjectResolutionEligibleDb
(String subjectResolutionEligible) void
setSubjectResolutionResolvable
(boolean subjectResolutionResolvable) void
setSubjectResolutionResolvableDb
(String subjectResolutionResolvable) void
Change subject source id associated with member.void
simple set subject source idvoid
setSubjectTypeId
(String subjectTypeID) void
void
store()
will be implemented soonstatic String
subjectIds
(Collection<Member> collection) print out a collection of memberstoGroup()
Convert this member back to aGroup
object.toString()
void
updateMemberAttributes
(Subject subject, boolean storeChanges) void
xmlCopyBusinessPropertiesToExisting
(Member existingRecord) copy business (non update) properties to an existing recordboolean
see if the non update cols are different (e.g.boolean
see if the update cols are different (e.g.xmlGetId()
set id key in dbretrieve from db by id or key.xmlSaveBusinessProperties
(Member existingRecord) save the business properties (not update properties)void
save the udpate properties (e.g.void
set id key in dbxmlToExportMember
(GrouperVersion grouperVersion) convert to xml bean for exportconvert to string for logMethods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onLoad, onUpdate, setHibernateVersionNumber
-
Field Details
-
PROPERTY_SUBJECT_ID
constant for property name for: subjectId- See Also:
-
TABLE_GROUPER_MEMBERS
grouper_members table in the DB- See Also:
-
COLUMN_MEMBER_UUID
uuid col in db- See Also:
-
COLUMN_ID
new uuid col in db- See Also:
-
COLUMN_ID_INDEX
new id_index col in db- See Also:
-
COLUMN_INTERNAL_ID
new internal_id col in db- See Also:
-
COLUMN_OLD_ID
old id col for id conversion- See Also:
-
COLUMN_OLD_MEMBER_UUID
old uuid id col for id conversion- See Also:
-
COLUMN_SUBJECT_IDENTIFIER0
subjectIdentifier0- See Also:
-
COLUMN_SUBJECT_IDENTIFIER1
subjectIdentifier1- See Also:
-
COLUMN_SUBJECT_IDENTIFIER2
subjectIdentifier2- See Also:
-
COLUMN_EMAIL0
email0- See Also:
-
COLUMN_SUBJECT_RESOLUTION_RESOLVABLE
subjectResolutionResolvable- See Also:
-
COLUMN_SUBJECT_RESOLUTION_ELIGIBLE
subjectResolutionEligible- See Also:
-
COLUMN_SUBJECT_RESOLUTION_DELETED
subjectResolutionDeleted- See Also:
-
COLUMN_SORT_STRING0
sortString0- See Also:
-
COLUMN_SORT_STRING1
sortString1- See Also:
-
COLUMN_SORT_STRING2
sortString2- See Also:
-
COLUMN_SORT_STRING3
sortString3- See Also:
-
COLUMN_SORT_STRING4
sortString4- See Also:
-
COLUMN_SEARCH_STRING0
searchString0- See Also:
-
COLUMN_SEARCH_STRING1
searchString1- See Also:
-
COLUMN_SEARCH_STRING2
searchString2- See Also:
-
COLUMN_SEARCH_STRING3
searchString3- See Also:
-
COLUMN_SEARCH_STRING4
searchString4- See Also:
-
COLUMN_NAME
name- See Also:
-
COLUMN_SUBJECT_ID
column- See Also:
-
COLUMN_SUBJECT_SOURCE
column- See Also:
-
COLUMN_SUBJECT_TYPE
column- See Also:
-
COLUMN_DESCRIPTION
description- See Also:
-
serialVersionUID
public static final long serialVersionUIDserial version- See Also:
-
FIELD_DB_VERSION
constant for field name for: dbVersion- See Also:
-
FIELD_MEMBER_UUID
constant for field name for: memberUUID- See Also:
-
FIELD_SUBJECT_ID
constant for field name for: subjectID- See Also:
-
FIELD_SUBJECT_SOURCE_ID
constant for field name for: subjectSourceID- See Also:
-
FIELD_SUBJECT_TYPE_ID
constant for field name for: subjectTypeID- See Also:
-
FIELD_SUBJECT_IDENTIFIER0
constant for field name for: subjectIdentifier0- See Also:
-
FIELD_SUBJECT_IDENTIFIER1
constant for field name for: subjectIdentifier1- See Also:
-
FIELD_SUBJECT_IDENTIFIER2
constant for field name for: subjectIdentifier2- See Also:
-
FIELD_EMAIL0
constant for field name for: email0- See Also:
-
FIELD_SUBJECT_RESOLUTION_ELIGIBLE
constant for field name for: subjectResolutionEligible- See Also:
-
FIELD_SUBJECT_RESOLUTION_RESOLVABLE
constant for field name for: subjectResolutionResolvable- See Also:
-
FIELD_SUBJECT_RESOLUTION_DELETED
constant for field name for: subjectResolutionDeleted- See Also:
-
FIELD_SORT_STRING0
constant for field name for: sortString0- See Also:
-
FIELD_SORT_STRING1
constant for field name for: sortString1- See Also:
-
FIELD_SORT_STRING2
constant for field name for: sortString2- See Also:
-
FIELD_SORT_STRING3
constant for field name for: sortString3- See Also:
-
FIELD_SORT_STRING4
constant for field name for: sortString4- See Also:
-
FIELD_SEARCH_STRING0
constant for field name for: searchString0- See Also:
-
FIELD_SEARCH_STRING1
constant for field name for: searchString1- See Also:
-
FIELD_SEARCH_STRING2
constant for field name for: searchString2- See Also:
-
FIELD_SEARCH_STRING3
constant for field name for: searchString3- See Also:
-
FIELD_SEARCH_STRING4
constant for field name for: searchString4- See Also:
-
FIELD_NAME
constant for field name for: name- See Also:
-
FIELD_DESCRIPTION
constant for field name for: description- See Also:
-
FIELD_ID_INDEX
constant for field name for: idIndex- See Also:
-
FIELD_INTERNAL_ID
constant for field name for: internalId- See Also:
-
PROPERTY_UUID
javabeans property for uuid- See Also:
-
changeSubjectSameSubject
public static int changeSubjectSameSubjectchange a subject to the same subject (for testing) -
changeSubjectDidntExist
public static int changeSubjectDidntExistchange a subject to a subject which didnt exist -
changeSubjectExist
public static int changeSubjectExistchange a subject to a subject which did exist -
changeSubjectMembershipAddCount
public static int changeSubjectMembershipAddCountnumber of memberships edited -
changeSubjectMembershipDeleteCount
public static int changeSubjectMembershipDeleteCountnumber of memberships deleted due to duplicates -
DELETE_OLD_MEMBER
public static final boolean DELETE_OLD_MEMBERboolean constant for gsh param- See Also:
-
-
Constructor Details
-
Member
public Member()
-
-
Method Details
-
resolveSubjects
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
Description copied from interface:AttributeAssignable
get the logic delegate- Specified by:
getAttributeDelegate
in interfaceAttributeAssignable
- Returns:
- the delegate
-
getAttributeValueDelegate
this delegate works on attributes and values at the same time- Specified by:
getAttributeValueDelegate
in interfaceAttributeAssignable
- Returns:
- the delegate
-
subjectIds
print out a collection of members- Parameters:
collection
-- Returns:
- the subject ids comma separated
-
changeSubject
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
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
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if admin
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canCreate
- Parameters:
ns
- Check privileges on thisStem
.- Returns:
- if can create stem
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canOptin
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if can optin
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canOptout
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if can optout
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canRead
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if can read
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canStem
- Parameters:
ns
- Check privileges on thisStem
.- Returns:
- if can stem
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canUpdate
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if can update
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canView
- Parameters:
g
- Check privileges on thisGroup
.- Returns:
- if can view
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
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
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
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 membershipSet effectives = m.getEffectiveMemberships();
- Returns:
- Set of
Membership
objects. - Throws:
GrouperException
-
getEffectiveMemberships
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 membershipSet effectives = m.getEffectiveMemberships(f);
- Parameters:
f
- Get effective memberships in this list field.- Returns:
- Set of
Membership
objects. - Throws:
SchemaException
-
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
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 fieldmembershipType
- immediate, effective, non immediate, etc, or null for allscope
- 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 stemScopestemScope
- is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stemqueryOptions
- is what to sort/page to or null for all. Can sort on name, displayName, extension, displayExtensionenabled
- 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 fieldscope
- is a DB pattern that will have % appended to it, or null for allstem
- is the stem to check in, or null if allstemScope
- is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stemqueryOptions
- is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtensionenabled
- 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 fieldscope
- is a DB pattern that will have % appended to it, or null for allstem
- is the stem to check in, or null if allstemScope
- is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stemqueryOptions
- is what to sort/page to or null for all, can sort on name, displayName, extension, displayExtensionenabled
- 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 fieldscope
- is a DB pattern that will have % appended to it, or null for allstem
- is the stem to check in, or null if allstemScope
- is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stemqueryOptions
- is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtensionenabled
- 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 fieldscope
- is a DB pattern that will have % appended to it, or null for allstem
- is the stem to check in, or null if allstemScope
- is if in this stem, or in any stem underneath. You must pass stemScope if you pass a stemqueryOptions
- is what to sort/page to or null for all. can sort on name, displayName, extension, displayExtensionenabled
- is null for all, true for enabled only, false for enabled and disabled- Returns:
- Set of
Group
objects.
-
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
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
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
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 membershipSet immediates = m.getImmediateMemberships();
- Returns:
- Set of
Membership
objects. - Throws:
GrouperException
-
getNonImmediateMemberships
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 membershipSet immediates = m.getNonImmediateMemberships();
- Returns:
- Set of
Membership
objects. - Throws:
GrouperException
-
getImmediateMemberships
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 membershipSet immediates = m.getImmediateMemberships(f);
- Parameters:
f
- Get immediate memberships in this list field.- Returns:
- Set of
Membership
objects. - Throws:
SchemaException
-
getNonImmediateMemberships
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 membershipSet immediates = m.getNonImmediateMemberships(f);
- Parameters:
f
- Get non-immediate memberships in this list field.- Returns:
- Set of
Membership
objects. - Throws:
SchemaException
-
getMemberships
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 membershipSet groups = m.getMemberships();
- Returns:
- Set of
Membership
objects. - Throws:
GrouperException
-
getMemberships
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 membershipSet groups = m.getMemberships(f);
- Parameters:
f
- Get memberships in this list field.- Returns:
- Set of
Membership
objects. - Throws:
SchemaException
-
getMemberships
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 membershipSet 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
Find access privileges held by this member on aGroup
.Set access = m.getPrivs(g);
- Parameters:
g
- Find Access Privileges on thisGroup
- Returns:
- A set of
AccessPrivilege
objects.
-
getPrivs
Find naming privileges held by this member on aStem
.Set naming = m.getPrivs(ns);
- Parameters:
ns
- Find Naming Privileges on thisStem
- Returns:
- A set of
NamingPrivilege
objects.
-
getSubject
GetSubject
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
Get theSource
of the subject that maps to this member.Source sa = m.getSubjectSource();
- Returns:
- Subject's
Source
- Throws:
GrouperException
-
getSubjectSourceId
Get theSource
id of the subject that maps to this member.String id = m.getSubjectSourceId();
- Returns:
- Subject's
Source
id
-
getSubjectSourceIdDb
simple get subject source id- Returns:
- subject source id
-
getSubjectType
Get theSubjectType
of the subject that maps to this member.// Get this member's subject type. SubjectType type = m.getSubjectType();
- Returns:
- Subject's
SubjectType
-
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
Get member's UUID.// Get UUID of member. String uuid = m.getUuid();
- Returns:
- Member's UUID.
-
getId
get a members id -
getInternalId
internal id- Returns:
- internal id
-
setInternalId
internal id- Parameters:
internalId1
-
-
getIdIndex
id of the member as a unique integer- Returns:
- id
-
setIdIndex
id of the member as a unique integer- Parameters:
idIndex1
-
-
hasAdmin
Get groups where this member has the ADMIN privilege.Set admin = m.hasAdmin();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasAdminInStem
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
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
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
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
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
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
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
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
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasCreate
Get stems where this member has the CREATE privilege.Set create = m.hasCreate();
- Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasCreate
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 thisStem
- Returns:
- Boolean true if the member has the privilege.
-
hasOptin
Get groups where this member has the OPTIN privilege.Set optin = m.hasOptin();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasOptin
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasOptout
Get groups where this member has the OPTOUT privilege.Set optout = m.hasOptout();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasOptout
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasRead
Get groups where this member has the READ privilege.Set read = m.hasRead();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasRead
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasStem
Get stems where this member has the STEM privilege.Set stem = m.hasStem();
- Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasStem
Report whether this member has STEM on the specified stem.if (m.hasStem(ns)) { // Member has privilege }
- Parameters:
ns
- Test for privilege on thisStem
- Returns:
- Boolean true if the member has the privilege.
-
hasUpdate
Get groups where this member has the UPDATE privilege.Set update = m.hasUpdate();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasUpdate
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasView
Get groups where this member has the VIEW privilege.Set view = m.hasView();
- Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasView
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
isEffectiveMember
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 membershipsif (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
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
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 membershipsif (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
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
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
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 listField
.- Returns:
- Boolean true if is a member.
- Throws:
SchemaException
-
setSubjectIdDb
simple set subject id- Parameters:
id
-
-
setSubjectId
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
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
Convert this member back to aGroup
object.try { Group g = m.toGroup(); } catch (GroupNotFoundException e) { // unable to convert member back to group }
- Returns:
Member
as aGroup
- Throws:
GroupNotFoundException
-
toString
-
isMember
- Parameters:
ownerUUID
-f
-- Returns:
- if is member
-
equals
-
getSubjectId
- Returns:
- subject id
-
getSubjectIdDb
- Returns:
- subject id db
-
hashCode
public int hashCode() -
onDelete
public boolean onDelete(org.hibernate.Session hs) throws org.hibernate.CallbackException - Specified by:
onDelete
in interfaceorg.hibernate.classic.Lifecycle
- Overrides:
onDelete
in classGrouperAPI
- Throws:
org.hibernate.CallbackException
- See Also:
-
onSave
public boolean onSave(org.hibernate.Session hs) throws org.hibernate.CallbackException - Specified by:
onSave
in interfaceorg.hibernate.classic.Lifecycle
- Overrides:
onSave
in classGrouperAPI
- Throws:
org.hibernate.CallbackException
- See Also:
-
setSubjectTypeId
- Parameters:
subjectTypeID
-
-
setUuid
- Parameters:
memberUUID
-
-
toStringDto
- Returns:
- string
-
onPostDelete
Description copied from interface:HibGrouperLifecycle
after a delete occurs- Specified by:
onPostDelete
in interfaceHibGrouperLifecycle
- Overrides:
onPostDelete
in classGrouperAPI
- See Also:
-
onPostSave
Description copied from interface:HibGrouperLifecycle
after a save (insert) occurs- Specified by:
onPostSave
in interfaceHibGrouperLifecycle
- Overrides:
onPostSave
in classGrouperAPI
- See Also:
-
onPostUpdate
Description copied from interface:HibGrouperLifecycle
after an update occurs- Specified by:
onPostUpdate
in interfaceHibGrouperLifecycle
- Overrides:
onPostUpdate
in classGrouperAPI
- See Also:
-
onPreDelete
Description copied from interface:HibGrouperLifecycle
before a delete (insert) occurs- Specified by:
onPreDelete
in interfaceHibGrouperLifecycle
- Overrides:
onPreDelete
in classGrouperAPI
- See Also:
-
onPreSave
Description copied from interface:HibGrouperLifecycle
before a save (insert) occurs- Specified by:
onPreSave
in interfaceHibGrouperLifecycle
- Overrides:
onPreSave
in classGrouperAPI
- See Also:
-
onPreUpdate
Description copied from interface:HibGrouperLifecycle
before an update occurs- Specified by:
onPreUpdate
in interfaceHibGrouperLifecycle
- Overrides:
onPreUpdate
in classGrouperAPI
- See Also:
-
dbVersion
save the state when retrieving from DB- Overrides:
dbVersion
in classGrouperAPI
- Returns:
- the dbVersion
-
dbVersionDifferentFields
note, these are massaged so that name, extension, etc look like normal fields. access with fieldValue()- Overrides:
dbVersionDifferentFields
in classGrouperAPI
- 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 classGrouperAPI
-
clone
deep clone the fields in this object- Specified by:
clone
in interfaceGrouperCloneable
- Specified by:
clone
in classGrouperAPI
- Returns:
- the clone of the object
- See Also:
-
getContextId
context id of the transaction- Returns:
- context id
-
setContextId
context id of the transaction- Specified by:
setContextId
in interfaceGrouperHasContext
- Parameters:
contextId1
-
-
canAttrAdmin
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if admin
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrDefAttrRead
Can thisMember
ATTR_DEF_ATTR_READ on thisAttributeDef
.boolean rv = m.canAttrDefAttrRead(attributeDef);
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrDefAttrUpdate
Can thisMember
ATTR_DEF_ATTR_UPDATE on thisAttributeDef
.boolean rv = m.canAttrDefAttrUpdate(attributeDef);
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canGroupAttrUpdate
- Parameters:
group
- Check privileges on thisGroup
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canGroupAttrRead
- Parameters:
group
- Check privileges on thisGroup
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullGroup
- Since:
- 1.0
-
canStemAttrRead
- Parameters:
stem
- Check privileges on thisStem
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canStemView
- Parameters:
stem
- Check privileges on thisStem
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canStemAdmin
- Parameters:
stem
- Check privileges on thisStem
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canStemAttrUpdate
- Parameters:
stem
- Check privileges on thisStem
.- Returns:
- true if allowed
- Throws:
IllegalArgumentException
- if nullStem
- Since:
- 1.0
-
canAttrOptin
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if can optin
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrOptout
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if can optout
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrRead
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if can read
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrUpdate
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if can update
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
canAttrView
- Parameters:
attributeDef
- Check privileges on thisAttributeDef
.- Returns:
- if can view
- Throws:
IllegalArgumentException
- if nullAttributeDef
- Since:
- 1.0
-
hasAttrAdmin
Get attributeDefs where this member has the ATTR_ADMIN privilege.Set
admins = hasAttrAdmin(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrAdmin
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 thisAttributeDef
- Returns:
- true if the member has the privilege.
-
hasGroupAttrRead
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 thisGroup
- Returns:
- true if the member has the privilege.
-
hasGroupAttrUpdate
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 thisGroup
- Returns:
- true if the member has the privilege.
-
hasStemAttrUpdate
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 thisStem
- Returns:
- true if the member has the privilege.
-
hasStemAttrRead
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 thisStem
- Returns:
- true if the member has the privilege.
-
hasStemAdmin
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 thisStem
- Returns:
- true if the member has the privilege.
-
hasAttrDefAttrRead
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 thisAttributeDef
- Returns:
- true if the member has the privilege.
-
hasAttrDefAttrUpdate
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 thisAttributeDef
- Returns:
- true if the member has the privilege.
-
hasAttrOptin
Get attribute defs where this member has the ATTR_OPTIN privilege.Set
optin = m.hasAttrOptin(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrDefAttrRead
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
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
Get groups where this member has the GROUP_ATTR_UPDATE privilege.Set
results = m.hasGroupAttrUpdate(); - Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasGroupAttrRead
Get groups where this member has the GROUP_ATTR_READ privilege.Set
results = m.hasGroupAttrRead(); - Returns:
- Set of
Group
objects. - Throws:
GrouperException
-
hasStemAttrRead
Get stems where this member has the STEM_ATTR_READ privilege.Set
results = m.hasStemAttrRead(); - Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasStemAdmin
Get stems where this member has the STEM_ADMIN privilege.Set
results = m.hasStemAdmin(); - Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasStemAttrUpdate
Get stems where this member has the STEM_ATTR_UPDATE privilege.Set
results = m.hasStemAttrUpdate(); - Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasAttrOptin
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 thisAttributeDef
- Returns:
- Boolean true if the member has the privilege.
-
hasAttrOptout
Get groups where this member has the ATTR_OPTOUT privilege.Set
optout = m.hasOptout(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrOptout
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 thisAttributeDef
- Returns:
- Boolean true if the member has the privilege.
-
hasAttrRead
Get groups where this member has the ATTR_READ privilege.Set
read = m.hasRead(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrRead
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 thisGroup
- Returns:
- Boolean true if the member has the privilege.
-
hasAttrUpdate
Get groups where this member has the ATTR_UPDATE privilege.Set
update = m.hasUpdate(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrUpdate
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 thisAttributeDef
- Returns:
- Boolean true if the member has the privilege.
-
hasAttrView
Get groups where this member has the ATTR_VIEW privilege.Set
view = m.hasView(); - Returns:
- Set of
AttributeDef
objects. - Throws:
GrouperException
-
hasAttrView
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 thisAttributeDef
- Returns:
- Boolean true if the member has the privilege.
-
isNonImmediateMember
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 membershipsif (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
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
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
- Specified by:
compareTo
in interfaceComparable<Member>
- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBase
see if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessProperties
in interfaceXmlImportableBase<Member>
- Parameters:
other
- the one to compare with- Returns:
- true if so
- See Also:
-
xmlDifferentUpdateProperties
Description copied from interface:XmlImportableBase
see if the update cols are different (e.g. last updated)- Specified by:
xmlDifferentUpdateProperties
in interfaceXmlImportableBase<Member>
- Parameters:
other
- the one to compare with- Returns:
- true if so
- See Also:
-
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBase
copy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExisting
in interfaceXmlImportableBase<Member>
- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportable
retrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKey
in interfaceXmlImportable<Member>
- Returns:
- the object or null if not found
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBase
save the business properties (not update properties)- Specified by:
xmlSaveBusinessProperties
in interfaceXmlImportableBase<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 interfaceXmlImportableBase<Member>
- See Also:
-
xmlToExportMember
convert to xml bean for export- Parameters:
grouperVersion
-- Returns:
- xml bean
-
xmlGetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlGetId
in interfaceXmlImportableBase<Member>
- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlSetId
in interfaceXmlImportableBase<Member>
- See Also:
-
xmlToString
Description copied from interface:XmlImportableBase
convert to string for log- Specified by:
xmlToString
in interfaceXmlImportableBase<Member>
- Returns:
- the string value for log
- See Also:
-
getSubjectIdentifier0
- Returns:
- the subjectIdentifier0
-
setSubjectIdentifier0
- Parameters:
subjectIdentifier0
- the subjectIdentifier0 to set
-
getSubjectIdentifier1
- Returns:
- the subjectIdentifier1
-
setSubjectIdentifier1
- Parameters:
subjectIdentifier1
-
-
getSubjectIdentifier2
- Returns:
- the subjectIdentifier2
-
setSubjectIdentifier2
- Parameters:
subjectIdentifier2
-
-
getEmail0
- Returns:
- the email0
-
setEmail0
- Parameters:
email0
-
-
isSubjectResolutionEligible
public boolean isSubjectResolutionEligible() -
setSubjectResolutionEligible
public void setSubjectResolutionEligible(boolean subjectResolutionEligible) -
getSubjectResolutionEligibleDb
- Returns:
- T if eligible
-
setSubjectResolutionEligibleDb
- Parameters:
subjectResolutionEligible
-
-
getSubjectResolutionResolvableDb
- Returns:
- T if resolvable
-
setSubjectResolutionResolvableDb
- Parameters:
subjectResolutionResolvable
-
-
getSubjectResolutionDeletedDb
- Returns:
- T if deleted
-
setSubjectResolutionDeletedDb
- 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
- Returns:
- the sortString0
-
setSortString0
- Parameters:
sortString0
- the sortString0 to set
-
getSortString1
- Returns:
- the sortString1
-
setSortString1
- Parameters:
sortString1
- the sortString1 to set
-
getSortString2
- Returns:
- the sortString2
-
setSortString2
- Parameters:
sortString2
- the sortString2 to set
-
getSortString3
- Returns:
- the sortString3
-
setSortString3
- Parameters:
sortString3
- the sortString3 to set
-
getSortString4
- Returns:
- the sortString4
-
setSortString4
- Parameters:
sortString4
- the sortString4 to set
-
getSearchString0
- Returns:
- the searchString0
-
setSearchString0
- Parameters:
searchString0
- the searchString0 to set
-
getSearchString1
- Returns:
- the searchString1
-
setSearchString1
- Parameters:
searchString1
- the searchString1 to set
-
getSearchString2
- Returns:
- the searchString2
-
setSearchString2
- Parameters:
searchString2
- the searchString2 to set
-
getSearchString3
- Returns:
- the searchString3
-
setSearchString3
- Parameters:
searchString3
- the searchString3 to set
-
getSearchString4
- Returns:
- the searchString4
-
setSearchString4
- Parameters:
searchString4
- the searchString4 to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name
- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description
- the description to set
-
updateMemberAttributes
- Parameters:
subject
-storeChanges
- if there are changes, should they be saved to the database?
-
hasStemView
Get stems where this member has the STEM_VIEW privilege.Set
results = m.hasStemView(); - Returns:
- Set of
Stem
objects. - Throws:
GrouperException
-
hasStemView
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 thisStem
- 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
-