|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.Group
public class Group
A group within the Groups Registry.
Field Summary | |
---|---|
static java.lang.String |
COLUMN_ALTERNATE_NAME
an alternate name for this group |
static java.lang.String |
COLUMN_CREATE_TIME
col in db |
static java.lang.String |
COLUMN_CREATOR_ID
col in db |
static java.lang.String |
COLUMN_DESCRIPTION
col in db |
static java.lang.String |
COLUMN_DISPLAY_EXTENSION
col in db |
static java.lang.String |
COLUMN_DISPLAY_NAME
col in db |
static java.lang.String |
COLUMN_EXTENSION
col in db |
static java.lang.String |
COLUMN_ID
id col in db |
static java.lang.String |
COLUMN_ID_INDEX
unique number for this group |
static java.lang.String |
COLUMN_LAST_IMMEDIATE_MEMBERSHIP_CHANGE
timestamp of the last immediate membership change for this group |
static java.lang.String |
COLUMN_LAST_MEMBERSHIP_CHANGE
timestamp of the last membership change for this group |
static java.lang.String |
COLUMN_MODIFIER_ID
col in db |
static java.lang.String |
COLUMN_MODIFY_TIME
col in db |
static java.lang.String |
COLUMN_NAME
col in db |
static java.lang.String |
COLUMN_OLD_ID
old id col for id conversion |
static java.lang.String |
COLUMN_OLD_UUID
old uuid id col for id conversion |
static java.lang.String |
COLUMN_PARENT_STEM
col in db |
static java.lang.String |
COLUMN_TYPE_OF_GROUP
if this is a group or role |
static java.lang.String |
COLUMN_UUID
uuid col in db (not used anymore) |
static java.lang.String |
FIELD_ALTERNATE_NAME_DB
constant for field name for: alternateNameDb |
static java.lang.String |
FIELD_CREATE_TIME
constant for field name for: createTime |
static java.lang.String |
FIELD_CREATOR_UUID
constant for field name for: creatorUUID |
static java.lang.String |
FIELD_DB_VERSION
constant for field name for: dbVersion |
static java.lang.String |
FIELD_DESCRIPTION
constant for field name for: description |
static java.lang.String |
FIELD_DISPLAY_EXTENSION
constant for field name for: displayExtension |
static java.lang.String |
FIELD_DISPLAY_NAME
constant for field name for: displayName |
static java.lang.String |
FIELD_EXTENSION
constant for field name for: extension |
static java.lang.String |
FIELD_ID_INDEX
constant for field name for: idIndex |
static java.lang.String |
FIELD_LAST_IMMEDIATE_MEMBERSHIP_CHANGE_DB
constant for field name for: lastImmediateMembershipChangeDb |
static java.lang.String |
FIELD_LAST_MEMBERSHIP_CHANGE_DB
constant for field name for: lastMembershipChangeDb |
static java.lang.String |
FIELD_MODIFIER_UUID
constant for field name for: modifierUUID |
static java.lang.String |
FIELD_MODIFY_TIME
constant for field name for: modifyTime |
static java.lang.String |
FIELD_NAME
constant for field name for: name |
static java.lang.String |
FIELD_PARENT_UUID
constant for field name for: parentUuid |
static java.lang.String |
FIELD_TYPE_OF_GROUP
constant for field name for: typeOfGroup |
static java.lang.String |
FIELD_UUID
constant for field name for: uuid |
static java.util.Set<java.lang.String> |
INTERNAL_FIELD_ATTRIBUTES
list of internal field attributes, access with method so it can lazy load |
static java.lang.String |
TABLE_GROUPER_GROUPS
name of the groups table in the db |
static java.lang.String |
VALIDATION_GROUP_DESCRIPTION_TOO_LONG_KEY
|
static java.lang.String |
VALIDATION_GROUP_DISPLAY_EXTENSION_TOO_LONG_KEY
|
static java.lang.String |
VALIDATION_GROUP_DISPLAY_NAME_TOO_LONG_KEY
|
static java.lang.String |
VALIDATION_GROUP_EXTENSION_TOO_LONG_KEY
|
static java.lang.String |
VALIDATION_GROUP_NAME_TOO_LONG_KEY
|
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 | |
---|---|
Group()
|
Method Summary | |
---|---|
java.lang.String |
__getId()
if of this object |
java.lang.String |
__getName()
name of this object (for logging) |
static boolean |
_internal_fieldAttribute(java.lang.String attributeName)
see if field attribute (name, description, extension, displayName, displayExtension) |
void |
addAlternateName(java.lang.String alternateName)
Add an alternate name for this group. |
Composite |
addCompositeMember(CompositeType type,
Group left,
Group right)
Add a composite membership to this group. |
void |
addMember(edu.internet2.middleware.subject.Subject subj)
Add a subject to this group as immediate member. |
boolean |
addMember(edu.internet2.middleware.subject.Subject subj,
boolean exceptionIfAlreadyMember)
Add a subject to this group as immediate member. |
boolean |
addMember(edu.internet2.middleware.subject.Subject subject,
boolean defaultPrivs,
boolean memberChecked,
boolean adminChecked,
boolean updateChecked,
boolean readChecked,
boolean viewChecked,
boolean optinChecked,
boolean optoutChecked,
boolean attrReadChecked,
boolean attrUpdateChecked,
java.util.Date startDate,
java.util.Date endDate,
boolean revokeIfUnchecked)
Deprecated. use addOrEditMember instead |
boolean |
addMember(edu.internet2.middleware.subject.Subject subject,
boolean defaultPrivs,
boolean memberChecked,
java.util.Date startDate,
java.util.Date endDate,
boolean revokeIfUnchecked)
Deprecated. use addOrEditMember instead |
void |
addMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Add a subject to this group as immediate member. |
boolean |
addMember(edu.internet2.middleware.subject.Subject subj,
Field f,
boolean exceptionIfAlreadyMember)
Add a subject to this group as immediate member. |
boolean |
addOrEditMember(edu.internet2.middleware.subject.Subject subject,
boolean defaultPrivs,
boolean memberChecked,
boolean adminChecked,
boolean updateChecked,
boolean readChecked,
boolean viewChecked,
boolean optinChecked,
boolean optoutChecked,
boolean attrReadChecked,
boolean attrUpdateChecked,
java.util.Date startDate,
java.util.Date endDate,
boolean revokeIfUnchecked)
add a member to group, take into account if any default privs should be changed |
boolean |
addOrEditMember(edu.internet2.middleware.subject.Subject subject,
boolean defaultPrivs,
boolean memberChecked,
java.util.Date startDate,
java.util.Date endDate,
boolean revokeIfUnchecked)
add a member to group, take into account if any default privs should be changed |
void |
addType(GroupType type)
Deprecated. |
boolean |
addType(GroupType type,
boolean exceptionIfAlreadyHasType)
Deprecated. |
void |
assignCompositeMember(CompositeType type,
Group left,
Group right)
Add ore replace a composite membership to this group. |
boolean |
assignIdIndex(long theIdIndex)
assign different id index |
boolean |
canHavePrivilege(edu.internet2.middleware.subject.Subject subject,
java.lang.String privilegeOrListName,
boolean secure)
see if the subject has a privilege or another privilege that implies this privilege. |
boolean |
canReadField(Field f)
Check whether the Subject that loaded this Group can
read the specified Field . |
boolean |
canReadField(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the specified Subject can read the specified Field . |
boolean |
canWriteField(Field f)
Check whether the Subject that loaded this Group can
write the specified Field . |
boolean |
canWriteField(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the specified Subject can write the specified Field . |
Group |
clone()
deep clone the fields in this object |
int |
compareTo(java.lang.Object that)
|
Group |
copy(Stem stem)
Copy this group to another Stem. |
Group |
dbVersion()
version of this object in the database |
java.util.Set<java.lang.String> |
dbVersionDifferentFields()
see which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeName |
java.util.Set<java.lang.String> |
dbVersionDifferentFields(boolean failIfNull)
|
void |
dbVersionReset()
take a snapshot of the data since this is what is in the db |
void |
delete()
Delete this group from the Groups Registry. |
boolean |
deleteAlternateName(java.lang.String alternateName)
Delete the specified alternate name. |
void |
deleteAttribute(java.lang.String attrName)
Deprecated. |
void |
deleteAttribute(java.lang.String attrName,
boolean failOnRequiredAttribute)
Deprecated. |
void |
deleteCompositeMember()
Delete a Composite membership from this group. |
void |
deleteMember(Member member)
Delete a member from this group, and member must be immediate member. |
boolean |
deleteMember(Member member,
boolean exceptionIfAlreadyDeleted)
Delete a member from this group, and member must be immediate member. |
void |
deleteMember(Member member,
Field f)
Delete a member from this group, and member must be immediate member. |
boolean |
deleteMember(Member member,
Field f,
boolean exceptionIfAlreadyDeleted)
Delete a member from this group, and member must be immediate member. |
void |
deleteMember(edu.internet2.middleware.subject.Subject subj)
Delete a subject from this group, and subject must be immediate member. |
boolean |
deleteMember(edu.internet2.middleware.subject.Subject subj,
boolean exceptionIfAlreadyDeleted)
Delete a subject from this group, and subject must be immediate member. |
void |
deleteMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Delete a subject from this group, and subject must be immediate member. |
boolean |
deleteMember(edu.internet2.middleware.subject.Subject subj,
Field f,
boolean exceptionIfAlreadyDeleted)
Delete a subject from this group, and subject must be immediate member. |
static boolean |
deleteOccuring()
see if we are in the middle of a delete (e.g. for hook) |
void |
deleteType(GroupType type)
Deprecated. |
boolean |
equals(java.lang.Object other)
|
java.lang.Object |
fieldValue(java.lang.String fieldName)
call this method to get the field value (e.g. from dbVersionDifferentFields). |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getAdmins()
Get subjects with the ADMIN privilege on this group. |
java.lang.String |
getAlternateName()
Returns the alternate name for the group. |
java.lang.String |
getAlternateNameDb()
Returns the alternate name for the group. |
java.util.Set<java.lang.String> |
getAlternateNames()
Returns the alternate names for the group. |
java.lang.String |
getAttribute(java.lang.String attr)
Deprecated. |
AttributeAssignGroupDelegate |
getAttributeDelegate()
get the logic delegate |
AttributeAssignEffMshipDelegate |
getAttributeDelegateEffMship(Member member)
delegate for effective memberships |
AttributeAssignMembershipDelegate |
getAttributeDelegateMembership(Member member)
delegate for effective memberships |
AttributeAssignMembershipDelegate |
getAttributeDelegateMembership(Member member,
Field field)
delegate for effective memberships |
java.lang.String |
getAttributeOrFieldValue(java.lang.String attributeOrFieldName,
boolean checkSecurity,
boolean exceptionIfAttributeNotFound)
Deprecated. |
java.lang.String |
getAttributeOrNull(java.lang.String attributeName)
Deprecated. use getAttributeValue() |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Deprecated. use getAttributesMap |
java.util.Map<java.lang.String,java.lang.String> |
getAttributesDb()
Deprecated. |
java.util.Map<java.lang.String,Attribute> |
getAttributesMap(boolean checkSecurity)
Deprecated. |
java.lang.String |
getAttributeValue(java.lang.String attributeName,
boolean checkSecurity,
boolean exceptionIfNotFound)
Deprecated. |
AttributeValueDelegate |
getAttributeValueDelegate()
this delegate works on attributes and values at the same time |
AttributeValueDelegate |
getAttributeValueDelegateEffMship(Member member)
this delegate works on attributes and values at the same time |
AttributeValueDelegate |
getAttributeValueDelegateMembership(Member member)
this delegate works on attributes and values at the same time |
AttributeValueDelegate |
getAttributeValueDelegateMembership(Member member,
Field field)
this delegate works on attributes and values at the same time |
Composite |
getComposite()
Deprecated. use the overload with boolean instead |
Composite |
getComposite(boolean throwExceptionIfNotFound)
if this is a composite group, get the composite object for this group |
java.util.Set<Member> |
getCompositeMembers()
Get Composite Member s of this group. |
java.util.Set<Member> |
getCompositeMembers(Field field,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions)
Get Composite Member s of this group. |
java.util.Set<Member> |
getCompositeMembers(QueryOptions queryOptions)
Get Composite Member s of this group. |
java.util.Set<Membership> |
getCompositeMemberships()
Get Composite Membership s of this group. |
java.util.Set<Membership> |
getCompositeMemberships(java.util.Collection<Member> members)
Get memberships of this group, for a certain collection of members A membership is the object which represents a join of member and group. |
java.lang.String |
getContextId()
context id of the transaction |
edu.internet2.middleware.subject.Subject |
getCreateSubject()
Get subject that created this group. |
java.util.Date |
getCreateTime()
Get creation time for this group. |
long |
getCreateTimeLong()
|
java.lang.String |
getCreatorUuid()
|
static Field |
getDefaultList()
Retrieve default members Field . |
java.lang.String |
getDescription()
Get group description. |
java.lang.String |
getDescriptionDb()
Get group description for hibernate. |
java.lang.String |
getDisplayExtension()
Get group displayExtension. |
java.lang.String |
getDisplayExtensionDb()
hibernate method |
java.lang.String |
getDisplayName()
Get group displayName. |
java.lang.String |
getDisplayNameDb()
Get group displayName for hibernate. |
java.util.Set<Member> |
getEffectiveMembers()
Get effective members of this group. |
java.util.Set<Member> |
getEffectiveMembers(Field f)
Get effective members of this group. |
java.util.Set<Member> |
getEffectiveMembers(Field f,
QueryOptions queryOptions)
Get effective members of this group. |
java.util.Set<Member> |
getEffectiveMembers(Field f,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions)
Get effective members of this group. |
java.util.Set<Membership> |
getEffectiveMemberships()
Get effective memberships of this group. |
java.util.Set<Membership> |
getEffectiveMemberships(Field f)
Get effective memberships of this group. |
java.util.Set<Membership> |
getEffectiveMemberships(Field f,
java.util.Collection<Member> members)
Get memberships of this group, for a certain collection of members A membership is the object which represents a join of member and group. |
java.lang.String |
getExtension()
Get group extension. |
java.lang.String |
getExtensionDb()
hibernate method |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getGroupAttrReaders()
Get subjects with the GROUP_ATTR_READ privilege on this group. |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getGroupAttrUpdaters()
Get subjects with the GROUP_ATTR_UPDATE privilege on this group. |
java.lang.String |
getId()
uuid of role |
java.lang.Long |
getIdIndex()
id of the group as a unique integer |
java.util.Set<Member> |
getImmediateMembers()
Get immediate members of this group. |
java.util.Set<Member> |
getImmediateMembers(Field f)
Get immediate members of this group. |
java.util.Set<Member> |
getImmediateMembers(Field f,
QueryOptions queryOptions)
Get immediate members of this group. |
java.util.Set<Member> |
getImmediateMembers(Field f,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions)
Get immediate members of this group. |
java.util.Set<Member> |
getImmediateMembers(Field f,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions,
SortStringEnum memberSortStringEnum,
SearchStringEnum memberSearchStringEnum,
java.lang.String memberSearchStringValue)
Get immediate members of this group. |
Membership |
getImmediateMembership(Field f,
Member member,
boolean enabledOnly,
boolean exceptionIfNotFound)
Get membership of this group, for a certain member A membership is the object which represents a join of member and group. |
Membership |
getImmediateMembership(Field f,
edu.internet2.middleware.subject.Subject subject,
boolean enabledOnly,
boolean exceptionIfNotFound)
Get membership of this group, for a certain member A membership is the object which represents a join of member and group. |
java.util.Set<Membership> |
getImmediateMemberships()
Get immediate memberships of this group. |
java.util.Set<Membership> |
getImmediateMemberships(Field f)
An immediate member is directly assigned to a group. |
java.util.Set<Membership> |
getImmediateMemberships(Field f,
java.util.Collection<Member> members)
Get memberships of this group, for a certain collection of members, must be enabled A membership is the object which represents a join of member and group. |
java.util.Set<Membership> |
getImmediateMemberships(Field f,
java.util.Collection<Member> members,
boolean enabledOnly)
Get memberships of this group, for a certain collection of members A membership is the object which represents a join of member and group. |
java.sql.Timestamp |
getLastImmediateMembershipChange()
when the last immediate member has changed |
java.lang.Long |
getLastImmediateMembershipChangeDb()
when the last immediate member has changed |
java.sql.Timestamp |
getLastMembershipChange()
when the last member has changed |
java.lang.Long |
getLastMembershipChangeDb()
when the last member has changed |
java.util.Set<Member> |
getMembers()
Get members of this group. |
java.util.Set<Member> |
getMembers(Field f)
Get members of this group. |
java.util.Set<Member> |
getMembers(Field f,
QueryOptions queryOptions)
Get members of this group. |
java.util.Set<Member> |
getMembers(Field f,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions)
Get members of this group. |
java.util.Set<Membership> |
getMemberships()
Get memberships of this group. |
java.util.Set<Membership> |
getMemberships(Field f)
Get memberships of this group. |
java.util.Set<Membership> |
getMemberships(Field f,
java.util.Collection<Member> members)
Get memberships of this group, for a certain collection of members A membership is the object which represents a join of member and group. |
java.lang.String |
getModifierUuid()
|
edu.internet2.middleware.subject.Subject |
getModifySubject()
Get subject that last modified this group. |
java.util.Date |
getModifyTime()
Get last modified time for this group. |
long |
getModifyTimeLong()
|
java.lang.String |
getName()
Get group name. |
java.lang.String |
getNameDb()
Get group name for hibernate. |
java.util.Set<Member> |
getNonImmediateMembers()
Get non immediate members of this group. |
java.util.Set<Member> |
getNonImmediateMembers(Field f)
Get non-immediate members of this group. |
java.util.Set<Member> |
getNonImmediateMembers(Field f,
QueryOptions queryOptions)
Get non-immediate members of this group. |
java.util.Set<Member> |
getNonImmediateMembers(Field f,
java.util.Set<edu.internet2.middleware.subject.Source> sources,
QueryOptions queryOptions)
Get non-immediate members of this group. |
java.util.Set<Membership> |
getNonImmediateMemberships()
Get nonimmediate memberships of this group. |
java.util.Set<Membership> |
getNonImmediateMemberships(Field f)
An immediate member is directly assigned to a group. |
java.util.Set<Membership> |
getNonImmediateMemberships(Field f,
java.util.Collection<Member> members)
Get memberships of this group, for a certain collection of members, must be enabled A membership is the object which represents a join of member and group. |
java.util.Set<Membership> |
getNonImmediateMemberships(Field f,
java.util.Collection<Member> members,
boolean enabledOnly)
Get memberships of this group, for a certain collection of members A membership is the object which represents a join of member and group. |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getOptins()
Get subjects with the OPTIN privilege on this group. |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getOptouts()
Get subjects with the OPTOUT privilege on this group. |
Stem |
getParentStem()
Get parent stem. |
java.lang.String |
getParentStemName()
get the name of the parent stem |
java.lang.String |
getParentUuid()
|
PermissionRoleDelegate |
getPermissionRoleDelegate()
delegate calls to this class for permission role stuff |
java.util.Set<AccessPrivilege> |
getPrivs(edu.internet2.middleware.subject.Subject subj)
Get privileges that the specified subject has on this group. |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getReaders()
Get subjects with the READ privilege on this group. |
java.util.Set<GroupType> |
getRemovableTypes()
Deprecated. |
RoleInheritanceDelegate |
getRoleInheritanceDelegate()
delegate calls to this class for role hierarchy stuff |
java.lang.String |
getStemId()
stem that this attribute is in |
TypeOfGroup |
getTypeOfGroup()
type of group, group or role |
java.lang.String |
getTypeOfGroupDb()
type of group, group or role |
java.util.Set<GroupType> |
getTypes()
Deprecated. |
java.util.Set<GroupType> |
getTypes(boolean checkSecurity)
Deprecated. |
java.util.Set<GroupType> |
getTypesDb()
Deprecated. |
java.util.Set<edu.internet2.middleware.subject.Subject> |
getUpdaters()
Get subjects with the UPDATE privilege on this group. |
java.lang.String |
getUuid()
|
java.util.Set<edu.internet2.middleware.subject.Subject> |
getViewers()
Get subjects with the VIEW privilege on this group. |
void |
grantPriv(edu.internet2.middleware.subject.Subject subj,
Privilege priv)
Grant privilege to a subject on this group. |
boolean |
grantPriv(edu.internet2.middleware.subject.Subject subj,
Privilege priv,
boolean exceptionIfAlreadyMember)
Grant privilege to a subject on this group. |
boolean |
hasAdmin(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has ADMIN on this group. |
boolean |
hasComposite()
Does this Group have a Composite membership. |
boolean |
hasEffectiveMember(edu.internet2.middleware.subject.Subject subj)
Check whether the subject is an effective member of this group. |
boolean |
hasEffectiveMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the subject is an effective member of this group. |
boolean |
hasGroupAttrRead(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has GROUP_ATTR_READ on this group. |
boolean |
hasGroupAttrUpdate(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has GROUP_ATTR_UPDATE on this group. |
int |
hashCode()
|
boolean |
hasImmediateMember(edu.internet2.middleware.subject.Subject subj)
Check whether the subject is an immediate member of this group. |
boolean |
hasImmediateMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the subject is an immediate member of this group. |
boolean |
hasMember(edu.internet2.middleware.subject.Subject subj)
Check whether the subject is a member of this group. |
boolean |
hasMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the subject is a member of this list on this group. |
boolean |
hasNonImmediateMember(edu.internet2.middleware.subject.Subject subj)
Check whether the subject is a non immediate member of this group. |
boolean |
hasNonImmediateMember(edu.internet2.middleware.subject.Subject subj,
Field f)
Check whether the subject is a non immediate member of this group. |
boolean |
hasOptin(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has OPTIN on this group. |
boolean |
hasOptout(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has OPTOUT on this group. |
boolean |
hasPrivilege(edu.internet2.middleware.subject.Subject subject,
java.lang.String privilegeOrListName)
see if the subject has a privilege |
boolean |
hasRead(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has READ on this group. |
boolean |
hasType(GroupType type)
Check whether group has the specified type. |
boolean |
hasType(GroupType type,
boolean checkSecurity)
Check whether group has the specified type. |
boolean |
hasUpdate(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has UPDATE on this group. |
boolean |
hasView(edu.internet2.middleware.subject.Subject subj)
Check whether the subject has VIEW on this group. |
static void |
initData(java.util.Collection<Group> groups)
init attributes etc for multiple groups at once |
Composite |
internal_addCompositeMember(GrouperSession session,
CompositeType type,
Group left,
Group right,
java.lang.String uuid)
|
boolean |
internal_addMember(edu.internet2.middleware.subject.Subject subj,
Field f,
boolean exceptionIfAlreadyMember,
java.lang.String uuid,
java.sql.Timestamp startDate,
java.sql.Timestamp endDate)
Add a subject to this group as immediate member. |
boolean |
internal_addType(GroupType type,
java.lang.String groupTypeAssignmentId,
boolean exceptionIfAlreadyHasType)
|
boolean |
internal_canWriteField(edu.internet2.middleware.subject.Subject subj,
Field f)
TODO 20070531 make into some flavor of validator |
java.util.Map<java.lang.String,AttributeAssign> |
internal_getGroupTypeAssignments()
|
boolean |
internal_grantPriv(edu.internet2.middleware.subject.Subject subj,
Privilege priv,
boolean exceptionIfAlreadyMember,
java.lang.String uuid)
Grant privilege to a subject on this group. |
Attribute |
internal_setAttribute(java.lang.String attributeName,
java.lang.String value,
boolean checkPrivileges,
java.lang.String uuid)
Set an attribute value. |
boolean |
isComposite()
Is this Group a factor in a Composite membership. |
boolean |
isHasComposite()
Does this Group have a Composite membership. |
boolean |
isHasMembers()
more efficient? |
void |
manageIncludesExcludesRequiredGroups(GrouperSession grouperSession,
boolean isIncludeExcludes)
add or correct the includes/excludes group math structure for this group (as overall or system or record if named correctly) |
void |
manageIncludesExcludesRequiredGroups(GrouperSession grouperSession,
boolean isIncludeExcludes,
Group andGroup)
add or correct the includes/excludes group math structure for this group (as overall or system or record if named correctly) |
void |
manageIncludesExcludesRequiredGroups(GrouperSession grouperSession,
boolean isIncludeExcludes,
java.util.Set<Group> andGroups)
add or correct the includes/excludes group math structure for this group (as overall or system or record if named correctly) |
boolean |
matchesLowerSearchStrings(java.util.Set<java.lang.String> filterStrings)
see if this object matches the filter strings |
void |
move(Stem stem)
Move this group to another Stem. |
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)
|
int |
replaceMembers(java.util.Collection<edu.internet2.middleware.subject.Subject> newSubjectList)
replace the member list with new list. |
int |
replaceMembers(java.util.Collection<edu.internet2.middleware.subject.Subject> newSubjectList,
Field field)
replace the member list with new list. |
void |
revokePriv(Privilege priv)
Revoke all privileges of the specified type on this group. |
void |
revokePriv(edu.internet2.middleware.subject.Subject subj,
Privilege priv)
Revoke a privilege from the specified subject. |
boolean |
revokePriv(edu.internet2.middleware.subject.Subject subj,
Privilege priv,
boolean exceptionIfAlreadyRevoked)
Revoke a privilege from the specified subject. |
static Group |
saveGroup(GrouperSession GROUPER_SESSION,
java.lang.String groupNameToEdit,
java.lang.String uuid,
java.lang.String name,
java.lang.String displayExtension,
java.lang.String description,
SaveMode saveMode,
boolean createParentStemsIfNotExist)
create or update a group. |
void |
setAlternateNameDb(java.lang.String alternateName)
Set the group's alternate name Used by hibernate. |
void |
setAttribute(java.lang.String attributeName,
java.lang.String value)
Deprecated. |
void |
setAttribute(java.lang.String attributeName,
java.lang.String value,
boolean checkPrivileges)
Deprecated. |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Deprecated. |
void |
setContextId(java.lang.String contextId1)
context id of the transaction |
void |
setCreateTimeLong(long createTime)
|
void |
setCreatorUuid(java.lang.String creatorUUID)
|
void |
setDescription(java.lang.String value)
Set group description. |
void |
setDescriptionDb(java.lang.String value)
Set group description (hibernate method). |
void |
setDisplayExtension(java.lang.String value)
Set group displayExtension. |
void |
setDisplayExtensionDb(java.lang.String value)
hibernate method |
void |
setDisplayName(java.lang.String value)
This is really only for hibernate |
void |
setDisplayNameDb(java.lang.String value)
This is really only for hibernate |
void |
setDontSetModified(boolean theDontSetModified)
if we should not set the modified attributes on group save |
void |
setExtension(java.lang.String value)
Set group extension. |
void |
setExtension(java.lang.String value,
boolean assignAlternateName)
Set group extension. |
void |
setExtensionDb(java.lang.String value)
hibernate method |
void |
setId(java.lang.String id1)
id of this attribute def name |
void |
setIdIndex(java.lang.Long idIndex1)
id of the group as a unique integer |
void |
setLastImmediateMembershipChangeDb(java.lang.Long theImmediateMembershipLastChange)
when the last immediate member has changed |
void |
setLastMembershipChangeDb(java.lang.Long theMembershipLastChange)
when the last member has changed |
void |
setModifierUuid(java.lang.String modifierUUID)
|
void |
setModifyTimeLong(long modifyTime)
|
void |
setName(java.lang.String value)
Set group name. |
void |
setNameDb(java.lang.String value)
Set group name. |
void |
setParentUuid(java.lang.String parentUUID)
|
void |
setStemId(java.lang.String stemId1)
stem that this attribute is in |
void |
setTypeOfGroup(TypeOfGroup typeOfGroup1)
type of group, group or role |
void |
setTypeOfGroupDb(java.lang.String typeOfGroup1)
type of group, group or role |
void |
setTypes(java.util.Set<GroupType> types)
|
void |
setUuid(java.lang.String uuid)
|
void |
store()
store this object to the DB. |
Member |
toMember()
Convert this group to a Member object. |
java.lang.String |
toString()
|
java.lang.String |
toStringDb()
|
edu.internet2.middleware.subject.Subject |
toSubject()
Convert this group to a Subject object. |
void |
validate()
|
void |
xmlCopyBusinessPropertiesToExisting(Group existingRecord)
copy business (non update) properties to an existing record |
boolean |
xmlDifferentBusinessProperties(Group other)
see if the non update cols are different (e.g. name) |
boolean |
xmlDifferentUpdateProperties(Group other)
see if the update cols are different (e.g. last updated) |
java.lang.String |
xmlGetId()
set id key in db |
Group |
xmlRetrieveByIdOrKey()
retrieve from db by id or key. |
Group |
xmlSaveBusinessProperties(Group existingRecord)
save the business properties (not update properties) |
void |
xmlSaveUpdateProperties()
save the udpate properties (e.g. last updated). |
void |
xmlSetId(java.lang.String theId)
set id key in db |
XmlExportGroup |
xmlToExportGroup(GrouperVersion grouperVersion)
convert to xml bean for export |
java.lang.String |
xmlToString()
convert to string for log |
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI |
---|
dbVersionClear, dbVersionIsDifferent, getHibernateVersionNumber, onLoad, onUpdate, setHibernateVersionNumber |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VALIDATION_GROUP_DESCRIPTION_TOO_LONG_KEY
public static final java.lang.String VALIDATION_GROUP_DISPLAY_EXTENSION_TOO_LONG_KEY
public static final java.lang.String VALIDATION_GROUP_EXTENSION_TOO_LONG_KEY
public static final java.lang.String VALIDATION_GROUP_DISPLAY_NAME_TOO_LONG_KEY
public static final java.lang.String VALIDATION_GROUP_NAME_TOO_LONG_KEY
public static final java.lang.String TABLE_GROUPER_GROUPS
public static final java.lang.String COLUMN_UUID
public static final java.lang.String COLUMN_ID
public static final java.lang.String COLUMN_PARENT_STEM
public static final java.lang.String COLUMN_CREATOR_ID
public static final java.lang.String COLUMN_CREATE_TIME
public static final java.lang.String COLUMN_MODIFIER_ID
public static final java.lang.String COLUMN_MODIFY_TIME
public static final java.lang.String COLUMN_NAME
public static final java.lang.String COLUMN_DISPLAY_NAME
public static final java.lang.String COLUMN_EXTENSION
public static final java.lang.String COLUMN_DISPLAY_EXTENSION
public static final java.lang.String COLUMN_DESCRIPTION
public static final java.lang.String COLUMN_OLD_ID
public static final java.lang.String COLUMN_OLD_UUID
public static final java.lang.String COLUMN_LAST_MEMBERSHIP_CHANGE
public static final java.lang.String COLUMN_LAST_IMMEDIATE_MEMBERSHIP_CHANGE
public static final java.lang.String COLUMN_ALTERNATE_NAME
public static final java.lang.String COLUMN_TYPE_OF_GROUP
public static final java.lang.String COLUMN_ID_INDEX
public static final java.lang.String FIELD_ALTERNATE_NAME_DB
public static final java.lang.String FIELD_CREATE_TIME
public static final java.lang.String FIELD_CREATOR_UUID
public static final java.lang.String FIELD_DB_VERSION
public static final java.lang.String FIELD_DESCRIPTION
public static final java.lang.String FIELD_DISPLAY_EXTENSION
public static final java.lang.String FIELD_DISPLAY_NAME
public static final java.lang.String FIELD_EXTENSION
public static final java.lang.String FIELD_ID_INDEX
public static final java.lang.String FIELD_LAST_MEMBERSHIP_CHANGE_DB
public static final java.lang.String FIELD_LAST_IMMEDIATE_MEMBERSHIP_CHANGE_DB
public static final java.lang.String FIELD_MODIFIER_UUID
public static final java.lang.String FIELD_MODIFY_TIME
public static final java.lang.String FIELD_NAME
public static final java.lang.String FIELD_PARENT_UUID
public static final java.lang.String FIELD_TYPE_OF_GROUP
public static final java.lang.String FIELD_UUID
public static final java.util.Set<java.lang.String> INTERNAL_FIELD_ATTRIBUTES
Constructor Detail |
---|
public Group()
Method Detail |
---|
@Deprecated public Composite getComposite() throws CompositeNotFoundException
CompositeNotFoundException
- if composite not foundpublic Composite getComposite(boolean throwExceptionIfNotFound)
throwExceptionIfNotFound
-
CompositeNotFoundException
- if not found and throwExceptionIfNotFound is truepublic static Group saveGroup(GrouperSession GROUPER_SESSION, java.lang.String groupNameToEdit, java.lang.String uuid, java.lang.String name, java.lang.String displayExtension, java.lang.String description, SaveMode saveMode, boolean createParentStemsIfNotExist) throws StemNotFoundException, InsufficientPrivilegeException, StemAddException, GroupModifyException, GroupNotFoundException, GroupAddException
create or update a group. Note this will not rename a group at this time (might in future) This is a static method since setters to Group objects persist to the DB Steps: 1. Find the group by groupNameToEdit 2. Internally set all the fields of the stem (no need to reset if already the same) 3. Store the group (insert or update) if needed 4. Return the group object This runs in a tx so that if part of it fails the whole thing fails, and potentially the outer transaction too
GROUPER_SESSION
- to act asgroupNameToEdit
- is the name of the group to edit (or null if insert)description
- new description for groupdisplayExtension
- display friendly name for this group only
(parent stems are not specified)name
- this is required, and is the full name of the group
including the names of parent stems. e.g. stem1:stem2:stem3
the parent stem must exist unless createParentStemsIfNotExist.
Can rename a stem extension, but not the parent stem name (move)uuid
- of the group. If a group exists with this uuid, then it will
be updated, if not, then it will be created if createIfNotExist is truesaveMode
- to constrain if insert only or update only, if null defaults to INSERT_OR_UPDATEcreateParentStemsIfNotExist
- true if the stems should be created if they dont exist, false
for StemNotFoundException if not exist. Note, the display extension on created stems
will equal the extension
StemNotFoundException
InsufficientPrivilegeException
StemAddException
GroupModifyException
GroupNotFoundException
GroupAddException
public java.lang.String getContextId()
getContextId
in interface Entity
public void setContextId(java.lang.String contextId1)
setContextId
in interface GrouperHasContext
contextId1
- public AttributeAssignGroupDelegate getAttributeDelegate()
AttributeAssignable
getAttributeDelegate
in interface AttributeAssignable
getAttributeDelegate
in interface Entity
getAttributeDelegate()
public AttributeValueDelegate getAttributeValueDelegate()
getAttributeValueDelegate
in interface AttributeAssignable
getAttributeValueDelegate
in interface Entity
getAttributeValueDelegate
in interface Role
getAttributeValueDelegate()
public AttributeAssignEffMshipDelegate getAttributeDelegateEffMship(Member member)
member
-
public AttributeValueDelegate getAttributeValueDelegateEffMship(Member member)
member
-
public AttributeAssignMembershipDelegate getAttributeDelegateMembership(Member member)
member
-
public AttributeAssignMembershipDelegate getAttributeDelegateMembership(Member member, Field field)
member
- field
-
public AttributeValueDelegate getAttributeValueDelegateMembership(Member member, Field field)
member
- field
-
public AttributeValueDelegate getAttributeValueDelegateMembership(Member member)
member
-
public static Field getDefaultList() throws GrouperException
Field
.
Field members = Group.getDefaultList();
Field
GrouperException
public void assignCompositeMember(CompositeType type, Group left, Group right) throws InsufficientPrivilegeException, MemberAddException, MemberDeleteException
try { g.assignCompositeMember(CompositeType.UNION, leftGroup, rightGroup); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add composite membership }
type
- Add membership of this CompositeType
.left
- Group
that is left factor of of composite membership.right
- Group
that is right factor of composite membership.
InsufficientPrivilegeException
MemberAddException
MemberDeleteException
public Composite addCompositeMember(CompositeType type, Group left, Group right) throws InsufficientPrivilegeException, MemberAddException
try { g.addCompositeMember(CompositeType.UNION, leftGroup, rightGroup); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add composite membership }
type
- Add membership of this CompositeType
.left
- Group
that is left factor of of composite membership.right
- Group
that is right factor of composite membership.
InsufficientPrivilegeException
MemberAddException
public void addMember(edu.internet2.middleware.subject.Subject subj) throws InsufficientPrivilegeException, MemberAddException
try { g.addMember(subj); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add subject }
subj
- Add this Subject
InsufficientPrivilegeException
MemberAddException
public boolean addMember(edu.internet2.middleware.subject.Subject subj, boolean exceptionIfAlreadyMember) throws InsufficientPrivilegeException, MemberAddException
try { g.addMember(subj); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add subject }
addMember
in interface Role
subj
- Add this Subject
exceptionIfAlreadyMember
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the group
InsufficientPrivilegeException
MemberAddException
public void addMember(edu.internet2.middleware.subject.Subject subj, Field f) throws InsufficientPrivilegeException, MemberAddException, SchemaException
try { g.addMember(subj, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add member } catch (SchemaException eS) { // Invalid Field }
subj
- Add this Subject
f
- Add subject to this Field
.
InsufficientPrivilegeException
MemberAddException
SchemaException
public boolean addMember(edu.internet2.middleware.subject.Subject subj, Field f, boolean exceptionIfAlreadyMember) throws InsufficientPrivilegeException, MemberAddException, SchemaException
try { g.addMember(subj, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add member } catch (SchemaException eS) { // Invalid Field }
subj
- Add this Subject
f
- Add subject to this Field
.exceptionIfAlreadyMember
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the group
InsufficientPrivilegeException
MemberAddException
SchemaException
public int replaceMembers(java.util.Collection<edu.internet2.middleware.subject.Subject> newSubjectList)
newSubjectList
-
public int replaceMembers(java.util.Collection<edu.internet2.middleware.subject.Subject> newSubjectList, Field field)
newSubjectList
- field
-
@Deprecated public boolean addMember(edu.internet2.middleware.subject.Subject subject, boolean defaultPrivs, boolean memberChecked, boolean adminChecked, boolean updateChecked, boolean readChecked, boolean viewChecked, boolean optinChecked, boolean optoutChecked, boolean attrReadChecked, boolean attrUpdateChecked, java.util.Date startDate, java.util.Date endDate, boolean revokeIfUnchecked)
subject
- to adddefaultPrivs
- if true, forget about all the other checked paramsmemberChecked
- adminChecked
- updateChecked
- readChecked
- viewChecked
- optinChecked
- optoutChecked
- attrReadChecked
- attrUpdateChecked
- startDate
- on membershipendDate
- on membershiprevokeIfUnchecked
-
public boolean addOrEditMember(edu.internet2.middleware.subject.Subject subject, boolean defaultPrivs, boolean memberChecked, boolean adminChecked, boolean updateChecked, boolean readChecked, boolean viewChecked, boolean optinChecked, boolean optoutChecked, boolean attrReadChecked, boolean attrUpdateChecked, java.util.Date startDate, java.util.Date endDate, boolean revokeIfUnchecked)
subject
- to adddefaultPrivs
- if true, forget about all the other checked paramsmemberChecked
- adminChecked
- updateChecked
- readChecked
- viewChecked
- optinChecked
- optoutChecked
- attrReadChecked
- attrUpdateChecked
- startDate
- on membershipendDate
- on membershiprevokeIfUnchecked
-
@Deprecated public boolean addMember(edu.internet2.middleware.subject.Subject subject, boolean defaultPrivs, boolean memberChecked, java.util.Date startDate, java.util.Date endDate, boolean revokeIfUnchecked)
subject
- to adddefaultPrivs
- if true, forget about all the other checked paramsmemberChecked
- startDate
- on membershipendDate
- on membershiprevokeIfUnchecked
-
public boolean addOrEditMember(edu.internet2.middleware.subject.Subject subject, boolean defaultPrivs, boolean memberChecked, java.util.Date startDate, java.util.Date endDate, boolean revokeIfUnchecked)
subject
- to adddefaultPrivs
- if true, forget about all the other checked paramsmemberChecked
- startDate
- on membershipendDate
- on membershiprevokeIfUnchecked
-
public boolean internal_addMember(edu.internet2.middleware.subject.Subject subj, Field f, boolean exceptionIfAlreadyMember, java.lang.String uuid, java.sql.Timestamp startDate, java.sql.Timestamp endDate) throws InsufficientPrivilegeException, MemberAddException, SchemaException
try { g.addMember(subj, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to add members } catch (MemberAddException eMA) { // Unable to add member } catch (SchemaException eS) { // Invalid Field }
subj
- Add this Subject
f
- Add subject to this Field
.exceptionIfAlreadyMember
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the groupuuid
- is uuid or null for generatedstartDate
- endDate
-
InsufficientPrivilegeException
MemberAddException
SchemaException
public void addType(GroupType type) throws GroupModifyException, InsufficientPrivilegeException, SchemaException
try { GroupType custom = GroupTypeFinder.find("custom type"); g.addType(custom); } catch (GroupModifyException eGM) { // Unable to add type } catch (InsufficientPrivilegeException eIP) { // Not privileged to add type } catch (SchemaException eS) { // Cannot add system-maintained types }
type
- The GroupType
to add.
GroupModifyException
- if unable to add type.
InsufficientPrivilegeException
- if subject not root-like.
SchemaException
- if attempting to add a system group type.public boolean addType(GroupType type, boolean exceptionIfAlreadyHasType) throws GroupModifyException, InsufficientPrivilegeException, SchemaException
try { GroupType custom = GroupTypeFinder.find("custom type"); g.addType(custom); } catch (GroupModifyException eGM) { // Unable to add type } catch (InsufficientPrivilegeException eIP) { // Not privileged to add type } catch (SchemaException eS) { // Cannot add system-maintained types }
type
- The GroupType
to add.exceptionIfAlreadyHasType
-
GroupModifyException
- if unable to add type.
InsufficientPrivilegeException
- if subject not root-like.
SchemaException
- if attempting to add a system group type.public boolean internal_addType(GroupType type, java.lang.String groupTypeAssignmentId, boolean exceptionIfAlreadyHasType) throws GroupModifyException, InsufficientPrivilegeException, SchemaException
type
- groupTypeAssignmentId
- exceptionIfAlreadyHasType
-
GroupModifyException
InsufficientPrivilegeException
SchemaException
public boolean canReadField(Field f) throws java.lang.IllegalArgumentException, SchemaException
Subject
that loaded this Group
can
read the specified Field
.
try { boolean rv = g.canReadField(f); } catch (SchemaException eS) { // invalid field }
f
- Check privileges on this Field
.
Subject
can read Field
, false otherwise.
java.lang.IllegalArgumentException
- if null Field
SchemaException
- if invalid Field
public boolean canReadField(edu.internet2.middleware.subject.Subject subj, Field f) throws java.lang.IllegalArgumentException, SchemaException
Subject
can read the specified Field
.
try { boolean rv = g.canReadField(subj, f); } catch (SchemaException eS) { // invalid field }
subj
- Check privileges for this Subject
.f
- Check privileges on this Field
.
Subject
can read Field
, false otherwise.
java.lang.IllegalArgumentException
- if null Subject
or Field
SchemaException
- if invalid Field
or Subject
.public boolean canWriteField(Field f) throws java.lang.IllegalArgumentException, SchemaException
Subject
that loaded this Group
can
write the specified Field
.
try { boolean rv = g.canWriteField(f); } catch (SchemaException eS) { // invalid field }
f
- Check privileges on this Field
.
Subject
can write Field
, false otherwise.
java.lang.IllegalArgumentException
- if null Field
SchemaException
- if invalid Field
public boolean canWriteField(edu.internet2.middleware.subject.Subject subj, Field f) throws java.lang.IllegalArgumentException, SchemaException
Subject
can write the specified Field
.
try { boolean rv = g.canWriteField(subj, f); } catch (SchemaException eS) { // invalid field }
subj
- Check privileges for this Subject
.f
- Check privileges on this Field
.
Subject
can write Field
, false otherwise.
java.lang.IllegalArgumentException
- if null Subject
or Field
SchemaException
- if invalid Field
public static boolean deleteOccuring()
public void delete() throws GroupDeleteException, InsufficientPrivilegeException
try { g.delete(); } catch (GroupDeleteException e0) { // Unable to delete group } catch (InsufficientPrivilegeException e1) { // Not privileged to delete this group }
delete
in interface Entity
delete
in interface Role
GroupDeleteException
InsufficientPrivilegeException
public void deleteAttribute(java.lang.String attrName) throws AttributeNotFoundException, GroupModifyException, InsufficientPrivilegeException
try { g.deleteAttribute(attribute); } catch (GroupModifyException e0) { // Unable to modify group } catch (InsufficientPrivilegeException e1) { // Not privileged to delete this attribute }
attrName
- Delete this attribute.
AttributeNotFoundException
GroupModifyException
InsufficientPrivilegeException
public void deleteAttribute(java.lang.String attrName, boolean failOnRequiredAttribute) throws AttributeNotFoundException, GroupModifyException, InsufficientPrivilegeException
try { g.deleteAttribute(attribute); } catch (GroupModifyException e0) { // Unable to modify group } catch (InsufficientPrivilegeException e1) { // Not privileged to delete this attribute }
attrName
- Delete this attribute.failOnRequiredAttribute
- true if exception when attribute is required
AttributeNotFoundException
GroupModifyException
InsufficientPrivilegeException
public void deleteCompositeMember() throws InsufficientPrivilegeException, MemberDeleteException
Composite
membership from this group.
A composite group is composed of two groups and a set operator
(stored in grouper_composites table)
(e.g. union, intersection, etc). A composite group has no immediate members.
All subjects in a composite group are effective members.
try { g.deleteCompositeMember(); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete members } catch (MemberDeleteException eMD) { // Unable to delete composite membership }
InsufficientPrivilegeException
MemberDeleteException
public boolean deleteMember(Member member, boolean exceptionIfAlreadyDeleted) throws InsufficientPrivilegeException, MemberDeleteException
try { g.deleteMember(member); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
member
- Delete this Member
exceptionIfAlreadyDeleted
- throw exception if already deleted
InsufficientPrivilegeException
MemberDeleteException
public void deleteMember(Member member) throws InsufficientPrivilegeException, MemberDeleteException
try { g.deleteMember(member); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
member
- Delete this Member
InsufficientPrivilegeException
MemberDeleteException
public boolean deleteMember(Member member, Field f, boolean exceptionIfAlreadyDeleted) throws InsufficientPrivilegeException, MemberDeleteException, SchemaException
try { g.deleteMember(m, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
member
- Delete this Member
.f
- Delete subject from this Field
.exceptionIfAlreadyDeleted
-
InsufficientPrivilegeException
MemberDeleteException
SchemaException
public void deleteMember(Member member, Field f) throws InsufficientPrivilegeException, MemberDeleteException, SchemaException
try { g.deleteMember(m, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
member
- Delete this Member
.f
- Delete subject from this Field
.
InsufficientPrivilegeException
MemberDeleteException
SchemaException
public void deleteMember(edu.internet2.middleware.subject.Subject subj) throws InsufficientPrivilegeException, MemberDeleteException
try { g.deleteMember(subj); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
subj
- Delete this Subject
InsufficientPrivilegeException
MemberDeleteException
public boolean deleteMember(edu.internet2.middleware.subject.Subject subj, boolean exceptionIfAlreadyDeleted) throws InsufficientPrivilegeException, MemberDeleteException
try { g.deleteMember(subj); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
deleteMember
in interface Role
subj
- Delete this Subject
exceptionIfAlreadyDeleted
-
InsufficientPrivilegeException
MemberDeleteException
public void deleteMember(edu.internet2.middleware.subject.Subject subj, Field f) throws InsufficientPrivilegeException, MemberDeleteException, SchemaException
try { g.deleteMember(m, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
subj
- Delete this Subject
.f
- Delete subject from this Field
.
InsufficientPrivilegeException
MemberDeleteException
SchemaException
public boolean deleteMember(edu.internet2.middleware.subject.Subject subj, Field f, boolean exceptionIfAlreadyDeleted) throws InsufficientPrivilegeException, MemberDeleteException, SchemaException
try { g.deleteMember(m, f); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete this subject } catch (MemberDeleteException eMD) { // Unable to delete subject }
subj
- Delete this Subject
.f
- Delete subject from this Field
.exceptionIfAlreadyDeleted
- true if an exception should be thrown
if the member is already deleted
InsufficientPrivilegeException
MemberDeleteException
SchemaException
public void deleteType(GroupType type) throws GroupModifyException, InsufficientPrivilegeException, SchemaException
try { GroupType custom = GroupTypeFinder.find("custom type"); g.deleteType(custom); } catch (GroupModifyException eGM) { // Unable to delete type } catch (InsufficientPrivilegeException eIP) { // Not privileged to add type } catch (SchemaException eS) { // Cannot delete system-maintained types }
type
- The GroupType
to add.
GroupModifyException
- if unable to delete type.
InsufficientPrivilegeException
- if subject not root-like.
SchemaException
- if attempting to delete a system group type.public java.util.Set<edu.internet2.middleware.subject.Subject> getAdmins() throws GrouperException
Set admins = g.getAdmins();
getAdmins
in interface Entity
GrouperException
@Deprecated public java.lang.String getAttributeOrNull(java.lang.String attributeName)
attributeName
-
public java.lang.String getAttributeOrFieldValue(java.lang.String attributeOrFieldName, boolean checkSecurity, boolean exceptionIfAttributeNotFound)
attributeOrFieldName
- checkSecurity
- exceptionIfAttributeNotFound
-
public java.lang.String getAttributeValue(java.lang.String attributeName, boolean checkSecurity, boolean exceptionIfNotFound)
attributeName
- exceptionIfNotFound
- checkSecurity
-
@Deprecated public java.lang.String getAttribute(java.lang.String attr) throws AttributeNotFoundException
try { String value = g.getAttribute(attribute); } catch (AttributeNotFoundException e) { // Group doesn't have attribute }
attr
- Get value of this attribute.
AttributeNotFoundException
public java.util.Set<Member> getCompositeMembers(QueryOptions queryOptions)
Composite
Member
s of this group.
A composite group is composed of two groups and a set operator
(stored in grouper_composites table)
(e.g. union, intersection, etc). A composite group has no immediate members.
All subjects in a composite group are effective members.
Set members = g.getCompositeMembers();
queryOptions
-
Member
objects.@Deprecated public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Map attributes = g.getAttributes();
public java.util.Set<Member> getCompositeMembers()
Composite
Member
s of this group.
A composite group is composed of two groups and a set operator
(stored in grouper_composites table)
(e.g. union, intersection, etc). A composite group has no immediate members.
All subjects in a composite group are effective members.
Set members = g.getCompositeMembers();
Member
objects.public java.util.Set<Membership> getCompositeMemberships()
Composite
Membership
s of this group.
A composite group is composed of two groups and a set operator
(stored in grouper_composites table)
(e.g. union, intersection, etc). A composite group has no immediate members.
All subjects in a composite group are effective members.
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 mships = g.getCompositeMembers();
Membership
objects.public edu.internet2.middleware.subject.Subject getCreateSubject() throws edu.internet2.middleware.subject.SubjectNotFoundException
// Get creator of this group. try { Subject creator = g.getCreateSubject(); } catch (SubjectNotFoundException e) { // Couldn't find subject }
Subject
that created this group.
edu.internet2.middleware.subject.SubjectNotFoundException
public java.util.Date getCreateTime()
// Get create time. Date created = g.getCreateTime();
Date
that this group was created.public java.lang.String getDescription()
String description = g.getDescription();
getDescription
in interface Entity
getDescription
in interface GrouperObject
getDescription
in interface Role
public java.lang.String getDescriptionDb()
public static boolean _internal_fieldAttribute(java.lang.String attributeName)
attributeName
-
public java.lang.String getDisplayExtension()
String displayExtn = g.getDisplayExtension();
getDisplayExtension
in interface Entity
getDisplayExtension
in interface Role
GrouperException
public java.lang.String getDisplayName() throws GrouperException
String displayName = g.getDisplayName();
getDisplayName
in interface Entity
getDisplayName
in interface GrouperObject
getDisplayName
in interface Role
GrouperException
public java.util.Set<Member> getEffectiveMembers() throws GrouperException
Set effectives = g.getEffectiveMembers();
Member
objects.
GrouperException
public java.util.Set<Member> getEffectiveMembers(Field f) throws SchemaException
Set effectives = g.getEffectiveMembers(f);
f
- Get members in this list field.
Member
objects.
SchemaException
public java.util.Set<Member> getEffectiveMembers(Field f, QueryOptions queryOptions) throws SchemaException
Set effectives = g.getEffectiveMembers(f);
f
- Get members in this list field.queryOptions
-
Member
objects.
SchemaException
public java.util.Set<Member> getEffectiveMembers(Field f, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions) throws SchemaException
Set effectives = g.getEffectiveMembers(f);
f
- Get members in this list field.sources
- sources to filter by, or null for allqueryOptions
-
Member
objects.
SchemaException
public java.util.Set<Membership> getEffectiveMemberships() throws GrouperException
Set effectives = g.getEffectiveMemberships();
Membership
objects.
GrouperException
public java.util.Set<Membership> getEffectiveMemberships(Field f) throws SchemaException
Set memberships = g.getEffectiveMemberships(f);
f
- Get memberships in this list field.
Membership
objects.
SchemaException
public java.lang.String getExtension()
String extension = g.getExtension();
getExtension
in interface Entity
getExtension
in interface Role
GrouperException
public java.util.Set<Member> getImmediateMembers() throws GrouperException
Set immediates = g.getImmediateMembers();
Member
objects.
GrouperException
public java.util.Set<Member> getImmediateMembers(Field f) throws SchemaException
Set immediates = g.getImmediateMembers(f);
f
- Get members in this list field.
Member
objects.
SchemaException
public java.util.Set<Member> getImmediateMembers(Field f, QueryOptions queryOptions) throws SchemaException
Set immediates = g.getImmediateMembers(f);
f
- Get members in this list field.queryOptions
-
Member
objects.
SchemaException
public java.util.Set<Member> getImmediateMembers(Field f, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions) throws SchemaException
Set immediates = g.getImmediateMembers(f);
f
- Get members in this list field.sources
- to search in or null if allqueryOptions
-
Member
objects.
SchemaException
public boolean isHasMembers()
public java.util.Set<Member> getImmediateMembers(Field f, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions, SortStringEnum memberSortStringEnum, SearchStringEnum memberSearchStringEnum, java.lang.String memberSearchStringValue) throws SchemaException
Set immediates = g.getImmediateMembers(f);
f
- Get members in this list field.sources
- to search in or null if allqueryOptions
- memberSortStringEnum
- How to sort results or null for no sorting unless specified by queryOptionsmemberSearchStringEnum
- Specify search string if searching for members in the groupmemberSearchStringValue
- Search string value.
Member
objects.
SchemaException
public java.util.Set<Membership> getImmediateMemberships() throws GrouperException
Set immediates = g.getImmediateMemberships();
Membership
objects.
GrouperException
public java.util.Set<Membership> getImmediateMemberships(Field f) throws SchemaException
Set immediates = g.getImmediateMemberships(f);
f
- Get memberships in this list field.
Membership
objects.
SchemaException
public java.util.Set<Member> getMembers() throws GrouperException
Set members = g.getMembers();
Member
objects.
GrouperException
public java.util.Set<Member> getMembers(Field f) throws SchemaException
Set members = g.getMembers(f);
f
- Get members in this list field.
Member
objects.
SchemaException
public java.util.Set<Member> getMembers(Field f, QueryOptions queryOptions) throws SchemaException
Set members = g.getMembers(f);
f
- Get members in this list field.queryOptions
- paging, sorting, count, etc
Member
objects.
SchemaException
public java.util.Set<Member> getMembers(Field f, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions) throws SchemaException
Set members = g.getMembers(f);
f
- Get members in this list field.to get members from, or null for allsources
- to get members from, or null for allqueryOptions
- paging, sorting, count, etc
Member
objects.
SchemaException
public java.util.Set<Membership> getMemberships() throws GrouperException
Set memberships = g.getMemberships();
Membership
objects.
GrouperException
public java.util.Set<Membership> getMemberships(Field f) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.
Membership
objects.
SchemaException
public java.util.Set<Membership> getMemberships(Field f, java.util.Collection<Member> members) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
-
Membership
objects.
SchemaException
public java.util.Set<Membership> getImmediateMemberships(Field f, java.util.Collection<Member> members) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
-
Membership
objects.
SchemaException
public java.util.Set<Membership> getImmediateMemberships(Field f, java.util.Collection<Member> members, boolean enabledOnly) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
- enabledOnly
-
Membership
objects.
SchemaException
public Membership getImmediateMembership(Field f, edu.internet2.middleware.subject.Subject subject, boolean enabledOnly, boolean exceptionIfNotFound) throws SchemaException, MembershipNotFoundException
Membership membership = g.getMembership(f, m, true);
f
- Get memberships in this list field.subject
- enabledOnly
- exceptionIfNotFound
- true if MembershipNotFoundException should be thrown if not found, otherwise null
Membership
objects.
SchemaException
MembershipNotFoundException
- if none found and exceptionIfNotFoundpublic Membership getImmediateMembership(Field f, Member member, boolean enabledOnly, boolean exceptionIfNotFound) throws SchemaException, MembershipNotFoundException
Membership membership = g.getMembership(f, m, true);
f
- Get memberships in this list field.member
- enabledOnly
- exceptionIfNotFound
- true if MembershipNotFoundException should be thrown if not found, otherwise null
Membership
objects.
SchemaException
MembershipNotFoundException
- if none found and exceptionIfNotFoundpublic java.util.Set<Membership> getEffectiveMemberships(Field f, java.util.Collection<Member> members) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
-
Membership
objects.
SchemaException
public java.util.Set<Membership> getCompositeMemberships(java.util.Collection<Member> members) throws SchemaException
Set memberships = g.getMemberships(f);
members
-
Membership
objects.
SchemaException
public edu.internet2.middleware.subject.Subject getModifySubject() throws edu.internet2.middleware.subject.SubjectNotFoundException
try { Subject modifier = g.getModifySubject(); } catch (SubjectNotFoundException e) { // Couldn't find subject }
Subject
that last modified this group.
edu.internet2.middleware.subject.SubjectNotFoundException
public java.util.Date getModifyTime()
Date modified = g.getModifyTime();
Date
that this group was last modified.public java.lang.String getName() throws GrouperException
String name = g.getName();
getName
in interface Entity
getName
in interface GrouperObject
getName
in interface Owner
getName
in interface Role
GrouperException
public java.util.Set<edu.internet2.middleware.subject.Subject> getOptins() throws GrouperException
Set optins = g.getOptins();
GrouperException
public java.util.Set<edu.internet2.middleware.subject.Subject> getOptouts() throws GrouperException
Set admins = g.getOptouts();
GrouperException
public java.util.Set<edu.internet2.middleware.subject.Subject> getGroupAttrReaders() throws GrouperException
Set subjects = g.getGroupAttrReaders();
GrouperException
public java.util.Set<edu.internet2.middleware.subject.Subject> getGroupAttrUpdaters() throws GrouperException
Set subjects = g.getGroupAttrUpdaters();
GrouperException
public java.lang.String getParentStemName()
public Stem getParentStem() throws java.lang.IllegalStateException
Stem parent = g.getParentStem();
Stem
.
java.lang.IllegalStateException
public java.util.Set<AccessPrivilege> getPrivs(edu.internet2.middleware.subject.Subject subj)
Set privs = g.getPrivs(subj);
subj
- Get privileges for this subject.
AccessPrivilege
objects.public java.util.Set<edu.internet2.middleware.subject.Subject> getReaders() throws GrouperException
Set readers = g.getReaders();
GrouperException
public java.util.Set<GroupType> getRemovableTypes()
Set types = g.getRemovableTypes();
public java.util.Set<GroupType> getTypes()
Set types = g.getTypes();
public java.util.Set<GroupType> getTypes(boolean checkSecurity)
Set types = g.getTypes(true);
checkSecurity
-
public java.util.Set<GroupType> getTypesDb()
public java.util.Set<edu.internet2.middleware.subject.Subject> getUpdaters() throws GrouperException
Set updaters = g.getUpdaters();
GrouperException
public java.util.Set<edu.internet2.middleware.subject.Subject> getViewers() throws GrouperException
Set viewers = g.getViewers();
getViewers
in interface Entity
GrouperException
public void grantPriv(edu.internet2.middleware.subject.Subject subj, Privilege priv) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
try { g.grantPriv(subj, AccessPrivilege.ADMIN); } catch (GrantPrivilegeException e0) { // Not privileged to grant this privilege } catch (InsufficientPrivilegeException e1) { // Unable to grant this privilege }
subj
- Grant privilege to this subject.priv
- Grant this privilege.
GrantPrivilegeException
InsufficientPrivilegeException
SchemaException
public boolean grantPriv(edu.internet2.middleware.subject.Subject subj, Privilege priv, boolean exceptionIfAlreadyMember) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
try { g.grantPriv(subj, AccessPrivilege.ADMIN); } catch (GrantPrivilegeException e0) { // Not privileged to grant this privilege } catch (InsufficientPrivilegeException e1) { // Unable to grant this privilege }
grantPriv
in interface Entity
subj
- Grant privilege to this subject.priv
- Grant this privilege.exceptionIfAlreadyMember
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the group
GrantPrivilegeException
InsufficientPrivilegeException
SchemaException
public boolean internal_grantPriv(edu.internet2.middleware.subject.Subject subj, Privilege priv, boolean exceptionIfAlreadyMember, java.lang.String uuid) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException
try { g.grantPriv(subj, AccessPrivilege.ADMIN); } catch (GrantPrivilegeException e0) { // Not privileged to grant this privilege } catch (InsufficientPrivilegeException e1) { // Unable to grant this privilege }
subj
- Grant privilege to this subject.priv
- Grant this privilege.exceptionIfAlreadyMember
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the groupuuid
-
GrantPrivilegeException
InsufficientPrivilegeException
SchemaException
public boolean hasPrivilege(edu.internet2.middleware.subject.Subject subject, java.lang.String privilegeOrListName)
subject
- privilegeOrListName
-
public boolean hasAdmin(edu.internet2.middleware.subject.Subject subj)
if (g.hasAdmin(subj)) { // Has ADMIN } else { // Does not have ADMIN }
hasAdmin
in interface Entity
subj
- Check this subject.
public boolean hasGroupAttrRead(edu.internet2.middleware.subject.Subject subj)
if (g.hasGroupAttrRead(subj)) { // Has GROUP_ATTR_READ } else { // Does not have GROUP_ATTR_READ }
subj
- Check this subject.
public boolean hasGroupAttrUpdate(edu.internet2.middleware.subject.Subject subj)
if (g.hasGroupAttrUpdate(subj)) { // Has GROUP_ATTR_UPDATE } else { // Does not have GROUP_ATTR_UPDATE }
subj
- Check this subject.
public boolean hasComposite()
Group
have a Composite
membership.
if (g.hasComposite()) { // this group has a composite membership }
public boolean isHasComposite()
Group
have a Composite
membership.
hasComposite()
public boolean hasEffectiveMember(edu.internet2.middleware.subject.Subject subj) throws GrouperException
if (g.hasEffectiveMember(subj)) { // Subject is an effective member of this group } else { // Subject is not an effective member of this group }
subj
- Check this subject.
GrouperException
public boolean hasEffectiveMember(edu.internet2.middleware.subject.Subject subj, Field f) throws SchemaException
if (g.hasEffectiveMember(subj, f)) { // Subject is an effective member of this group } else { // Subject is not an effective member of this group }
subj
- Check this subject.f
- Check for membership in this list field.
SchemaException
public boolean hasImmediateMember(edu.internet2.middleware.subject.Subject subj) throws GrouperException
if (g.hasImmediateMember(subj)) { // Subject is an immediate member of this group } else { // Subject is not a immediate member of this group }
subj
- Check this subject.
GrouperException
public boolean hasImmediateMember(edu.internet2.middleware.subject.Subject subj, Field f) throws SchemaException
if (g.hasImmediateMember(subj, f)) { // Subject is an immediate member of this group } else { // Subject is not a immediate member of this group }
subj
- Check this subject.f
- Check for membership in this list field.
SchemaException
public boolean hasMember(edu.internet2.middleware.subject.Subject subj) throws GrouperException
if (g.hasMember(subj)) { // Subject is a member of this group } else { // Subject is not a member of this group }
hasMember
in interface Role
subj
- Check this subject.
GrouperException
hasMember(Subject)
public boolean hasMember(edu.internet2.middleware.subject.Subject subj, Field f) throws SchemaException
if (g.hasMember(subj, f)) { // Subject is a member of this group } else { // Subject is not a member of this group }
subj
- Check this subject.f
- Is subject a member of this list Field
.
SchemaException
public boolean hasOptin(edu.internet2.middleware.subject.Subject subj)
if (g.hasOptin(subj)) { // Has OPTIN } else { // Does not have OPTIN }
subj
- Check this subject.
public boolean hasOptout(edu.internet2.middleware.subject.Subject subj)
if (g.hasOptout(subj)) { // has OPTOUT } else { // Does not have OPTOUT }
subj
- Check this subject.
public boolean hasRead(edu.internet2.middleware.subject.Subject subj)
if (g.hasRead(subj)) { // Has READ } else { // Does not have READ }
subj
- Check this subject.
public boolean hasType(GroupType type, boolean checkSecurity)
GroupType custom = GroupTypeFinder.find("custom type"); if (g.hasType(custom, true)) { // Group has type }
type
- The GroupType
to check.checkSecurity
-
public boolean hasType(GroupType type)
GroupType custom = GroupTypeFinder.find("custom type"); if (g.hasType(custom)) { // Group has type }
type
- The GroupType
to check.
public boolean hasUpdate(edu.internet2.middleware.subject.Subject subj)
if (g.hasUpdate(subj)) { // Has UPDATE } else { // Does not have UPDATE }
subj
- Check this subject.
public boolean hasView(edu.internet2.middleware.subject.Subject subj)
if (g.hasView(subj)) { // Has VIEW } else { // Does not have VIEW }
hasView
in interface Entity
subj
- Check this member.
public boolean isComposite()
Group
a factor in a Composite
membership.
if (g.isComposite()) { // this group is a factor in one-or-more composite memberships. }
public void revokePriv(Privilege priv) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
try { g.revokePriv(AccessPrivilege.OPTIN); } catch (InsufficientPrivilegeException eIP) { // Not privileged to revoke this privilege } catch (RevokePrivilegeException eRP) { // Unable to modify group }
priv
- Revoke all instances of this privilege.
InsufficientPrivilegeException
RevokePrivilegeException
SchemaException
public void revokePriv(edu.internet2.middleware.subject.Subject subj, Privilege priv) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
try { g.revokePriv(subj, AccessPrivilege.OPTIN); } catch (InsufficientPrivilegeException e1) { // Not privileged to revoke this privilege } catch (RevokePrivilegeException eRP) { // Error revoking privilege }
subj
- Revoke privilege from this subject.priv
- Revoke this privilege.
InsufficientPrivilegeException
RevokePrivilegeException
SchemaException
public boolean revokePriv(edu.internet2.middleware.subject.Subject subj, Privilege priv, boolean exceptionIfAlreadyRevoked) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException
try { g.revokePriv(subj, AccessPrivilege.OPTIN); } catch (InsufficientPrivilegeException e1) { // Not privileged to revoke this privilege } catch (RevokePrivilegeException eRP) { // Error revoking privilege }
revokePriv
in interface Entity
subj
- Revoke privilege from this subject.priv
- Revoke this privilege.exceptionIfAlreadyRevoked
- if false, and subject is already a member,
then dont throw a MemberAddException if the member is already in the group
InsufficientPrivilegeException
RevokePrivilegeException
SchemaException
public void setAttribute(java.lang.String attributeName, java.lang.String value) throws AttributeNotFoundException, GroupModifyException, InsufficientPrivilegeException
try { g.attribute(attribute, value); } catch (AttributeNotFoundException e0) { // Attribute doesn't exist } catch (GroupModifyException e1) { // Unable to modify group } catch (InsufficientPrivilegeException e2) { // Not privileged to modify this attribute }
attributeName
- Set this attribute.value
- Set to this value.
AttributeNotFoundException
GroupModifyException
InsufficientPrivilegeException
public void setAttribute(java.lang.String attributeName, java.lang.String value, boolean checkPrivileges) throws AttributeNotFoundException, GroupModifyException, InsufficientPrivilegeException
try { g.attribute(attribute, value); } catch (AttributeNotFoundException e0) { // Attribute doesn't exist } catch (GroupModifyException e1) { // Unable to modify group } catch (InsufficientPrivilegeException e2) { // Not privileged to modify this attribute }
attributeName
- Set this attribute.value
- Set to this value.checkPrivileges
-
AttributeNotFoundException
GroupModifyException
InsufficientPrivilegeException
public Attribute internal_setAttribute(java.lang.String attributeName, java.lang.String value, boolean checkPrivileges, java.lang.String uuid) throws AttributeNotFoundException, GroupModifyException, InsufficientPrivilegeException
try { g.attribute(attribute, value); } catch (AttributeNotFoundException e0) { // Attribute doesn't exist } catch (GroupModifyException e1) { // Unable to modify group } catch (InsufficientPrivilegeException e2) { // Not privileged to modify this attribute }
attributeName
- Set this attribute.value
- Set to this value.checkPrivileges
- uuid
-
AttributeNotFoundException
GroupModifyException
InsufficientPrivilegeException
public void store()
store
in interface Entity
public void validate()
public void setDescription(java.lang.String value)
try { g.setDescription(value); } catch (GroupModifyException e0) { // Unable to modify group } catch (InsufficientPrivilegeException e1) { // Not privileged to modify description }
setDescription
in interface Entity
setDescription
in interface Role
value
- Set description to this value.public void setDescriptionDb(java.lang.String value)
value
- Set description to this value.public void setExtension(java.lang.String value)
g.setExtension(value);
setExtension
in interface Entity
setExtension
in interface Role
value
- Set extension to this value.public void setExtension(java.lang.String value, boolean assignAlternateName)
g.setExtension(value, true);
value
- Set extension to this value.assignAlternateName
- Whether to add the old group name as an
alternate name for the renamed group.public void setName(java.lang.String value)
setName
in interface Entity
setName
in interface Role
value
- Set extension to this value.public void setDisplayExtension(java.lang.String value)
g.setDisplayExtension(value);
setDisplayExtension
in interface Entity
setDisplayExtension
in interface Role
value
- Set displayExtension to this value.public void setDisplayExtensionDb(java.lang.String value)
value
- public void setExtensionDb(java.lang.String value)
value
- public java.lang.String getDisplayExtensionDb()
public java.lang.String getExtensionDb()
public void setDisplayName(java.lang.String value)
setDisplayName
in interface Entity
setDisplayName
in interface Role
value
- new display namepublic Member toMember() throws GrouperException
Member
object.
Member m = g.toMember();
toMember
in interface Entity
Group
as a Member
GrouperException
public edu.internet2.middleware.subject.Subject toSubject() throws GrouperException
Subject
object.
Subject subj = g.toSubject();
toSubject
in interface Entity
Group
as a Subject
GrouperException
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean internal_canWriteField(edu.internet2.middleware.subject.Subject subj, Field f) throws java.lang.IllegalArgumentException, SchemaException
subj
- f
-
java.lang.IllegalArgumentException
SchemaException
public void setDontSetModified(boolean theDontSetModified)
theDontSetModified
- public Composite internal_addCompositeMember(GrouperSession session, CompositeType type, Group left, Group right, java.lang.String uuid) throws InsufficientPrivilegeException, MemberAddException
session
- type
- left
- right
- uuid
-
InsufficientPrivilegeException
MemberAddException
public java.util.Set<java.lang.String> dbVersionDifferentFields()
GrouperAPI
dbVersionDifferentFields
in class GrouperAPI
GrouperAPI.dbVersionDifferentFields()
public java.util.Set<java.lang.String> dbVersionDifferentFields(boolean failIfNull)
failIfNull
-
GrouperAPI.dbVersionDifferentFields()
public void dbVersionReset()
dbVersionReset
in class GrouperAPI
public Group clone()
clone
in interface GrouperCloneable
clone
in class GrouperAPI
Object.clone()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public static void initData(java.util.Collection<Group> groups)
groups
- public java.util.Map<java.lang.String,Attribute> getAttributesMap(boolean checkSecurity)
checkSecurity
- if we should check if the current user can see each attribute
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getAttributesDb()
public long getCreateTimeLong()
public java.lang.String getCreatorUuid()
public Group dbVersion()
GrouperAPI
dbVersion
in class GrouperAPI
GrouperAPI.dbVersion()
public java.lang.String getModifierUuid()
public long getModifyTimeLong()
public java.lang.String getParentUuid()
public java.lang.String getUuid()
getUuid
in interface Owner
public int hashCode()
hashCode
in class java.lang.Object
public boolean onDelete(org.hibernate.Session hs) throws org.hibernate.CallbackException
onDelete
in interface org.hibernate.classic.Lifecycle
onDelete
in class GrouperAPI
org.hibernate.CallbackException
GrouperAPI.onDelete(org.hibernate.Session)
public void onPostSave(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostSave
in interface HibGrouperLifecycle
onPostSave
in class GrouperAPI
HibGrouperLifecycle.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPostUpdate(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostUpdate
in interface HibGrouperLifecycle
onPostUpdate
in class GrouperAPI
HibGrouperLifecycle.onPostUpdate(HibernateSession)
public java.lang.Long getLastMembershipChangeDb()
public void setLastMembershipChangeDb(java.lang.Long theMembershipLastChange)
theMembershipLastChange
- public java.sql.Timestamp getLastMembershipChange()
public java.lang.Long getLastImmediateMembershipChangeDb()
public void setLastImmediateMembershipChangeDb(java.lang.Long theImmediateMembershipLastChange)
theImmediateMembershipLastChange
- public java.sql.Timestamp getLastImmediateMembershipChange()
public java.lang.String getAlternateNameDb()
public java.lang.String getAlternateName()
public void setAlternateNameDb(java.lang.String alternateName)
alternateName
- public java.util.Set<java.lang.String> getAlternateNames()
public void addAlternateName(java.lang.String alternateName)
alternateName
- public boolean deleteAlternateName(java.lang.String alternateName)
alternateName
-
public void onPostDelete(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostDelete
in interface HibGrouperLifecycle
onPostDelete
in class GrouperAPI
GrouperAPI.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPreSave(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreSave
in interface HibGrouperLifecycle
onPreSave
in class GrouperAPI
GrouperAPI.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public boolean onSave(org.hibernate.Session hs) throws org.hibernate.CallbackException
onSave
in interface org.hibernate.classic.Lifecycle
onSave
in class GrouperAPI
org.hibernate.CallbackException
GrouperAPI.onSave(org.hibernate.Session)
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- public void setCreateTimeLong(long createTime)
createTime
- public void setCreatorUuid(java.lang.String creatorUUID)
creatorUUID
- public void setModifierUuid(java.lang.String modifierUUID)
modifierUUID
- public void setModifyTimeLong(long modifyTime)
modifyTime
- public void setParentUuid(java.lang.String parentUUID)
parentUUID
- public void setTypes(java.util.Set<GroupType> types)
types
- public java.util.Map<java.lang.String,AttributeAssign> internal_getGroupTypeAssignments()
public void setUuid(java.lang.String uuid)
uuid
- public java.lang.String toStringDb()
public void onPreDelete(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreDelete
in interface HibGrouperLifecycle
onPreDelete
in class GrouperAPI
GrouperAPI.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public java.lang.Object fieldValue(java.lang.String fieldName)
GrouperAPI
fieldValue
in interface GrouperUtil.FieldValuable
fieldValue
in class GrouperAPI
fieldName
-
GrouperAPI.fieldValue(java.lang.String)
public void onPreUpdate(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreUpdate
in interface HibGrouperLifecycle
onPreUpdate
in class GrouperAPI
GrouperAPI.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public int compareTo(java.lang.Object that)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public void manageIncludesExcludesRequiredGroups(GrouperSession grouperSession, boolean isIncludeExcludes)
grouperSession
- isIncludeExcludes
- public void manageIncludesExcludesRequiredGroups(GrouperSession grouperSession, boolean isIncludeExcludes, Group andGroup)
grouperSession
- isIncludeExcludes
- andGroup
- groups (like activeEmployee) which the user must also be inpublic void manageIncludesExcludesRequiredGroups(GrouperSession grouperSession, boolean isIncludeExcludes, java.util.Set<Group> andGroups)
grouperSession
- isIncludeExcludes
- andGroups
- groups (like activeEmployee) which the user must also be inpublic java.lang.String getDisplayNameDb() throws GrouperException
String displayName = g.getDisplayName();
GrouperException
public java.lang.String getNameDb()
GrouperException
public void setDisplayNameDb(java.lang.String value)
value
- new display namepublic void setNameDb(java.lang.String value)
value
- Set extension to this value.public void move(Stem stem) throws GroupModifyException, InsufficientPrivilegeException
move
in interface Entity
stem
-
GroupModifyException
InsufficientPrivilegeException
public Group copy(Stem stem) throws GroupAddException, InsufficientPrivilegeException
copy
in interface Entity
stem
-
InsufficientPrivilegeException
GroupAddException
public TypeOfGroup getTypeOfGroup()
public void setTypeOfGroup(TypeOfGroup typeOfGroup1)
typeOfGroup1
- public java.lang.String getTypeOfGroupDb()
public void setTypeOfGroupDb(java.lang.String typeOfGroup1)
typeOfGroup1
- public java.lang.String __getId()
GrouperSetElement
__getId
in interface GrouperSetElement
GrouperSetElement.__getId()
public java.lang.String __getName()
GrouperSetElement
__getName
in interface GrouperSetElement
GrouperSetElement.__getName()
public java.lang.String getId()
Role
getId
in interface Entity
getId
in interface GrouperId
getId
in interface Role
Role.getId()
public java.lang.Long getIdIndex()
getIdIndex
in interface Role
public void setIdIndex(java.lang.Long idIndex1)
idIndex1
- public java.lang.String getStemId()
Role
getStemId
in interface Entity
getStemId
in interface Role
Role.getStemId()
public void setId(java.lang.String id1)
Role
setId
in interface Entity
setId
in interface Role
Role.setId(java.lang.String)
public void setStemId(java.lang.String stemId1)
Role
setStemId
in interface Entity
setStemId
in interface Role
Role.setStemId(java.lang.String)
public RoleInheritanceDelegate getRoleInheritanceDelegate()
getRoleInheritanceDelegate
in interface Role
public PermissionRoleDelegate getPermissionRoleDelegate()
Role
getPermissionRoleDelegate
in interface Role
Role.getPermissionRoleDelegate()
public java.util.Set<Membership> getNonImmediateMemberships(Field f, java.util.Collection<Member> members) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
-
Membership
objects.
SchemaException
public java.util.Set<Membership> getNonImmediateMemberships(Field f, java.util.Collection<Member> members, boolean enabledOnly) throws SchemaException
Set memberships = g.getMemberships(f);
f
- Get memberships in this list field.members
- enabledOnly
-
Membership
objects.
SchemaException
public java.util.Set<Member> getNonImmediateMembers() throws GrouperException
Set nonImmediates = g.getNonImmediateMembers();
Member
objects.
GrouperException
public java.util.Set<Member> getNonImmediateMembers(Field f) throws SchemaException
Set nonImmediates = g.getNonImmediateMembers(f);
f
- Get members in this list field.
Member
objects.
SchemaException
public java.util.Set<Member> getNonImmediateMembers(Field f, QueryOptions queryOptions) throws SchemaException
Set nonImmediates = g.getNonImmediateMembers(f);
f
- Get members in this list field.queryOptions
-
Member
objects.
SchemaException
public java.util.Set<Member> getNonImmediateMembers(Field f, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions) throws SchemaException
Set nonImmediates = g.getNonImmediateMembers(f);
f
- Get members in this list field.sources
- queryOptions
-
Member
objects.
SchemaException
public java.util.Set<Membership> getNonImmediateMemberships() throws GrouperException
Set immediates = g.getImmediateMemberships();
Membership
objects.
GrouperException
public java.util.Set<Membership> getNonImmediateMemberships(Field f) throws SchemaException
Set immediates = g.getNonImmediateMemberships(f);
f
- Get memberships in this list field.
Membership
objects.
SchemaException
public boolean hasNonImmediateMember(edu.internet2.middleware.subject.Subject subj) throws GrouperException
if (g.hasImmediateMember(subj)) { // Subject is an immediate member of this group } else { // Subject is not a immediate member of this group }
subj
- Check this subject.
GrouperException
public boolean hasNonImmediateMember(edu.internet2.middleware.subject.Subject subj, Field f) throws SchemaException
if (g.hasImmediateMember(subj, f)) { // Subject is an immediate member of this group } else { // Subject is not a immediate member of this group }
subj
- Check this subject.f
- Check for membership in this list field.
SchemaException
public java.util.Set<Member> getCompositeMembers(Field field, java.util.Set<edu.internet2.middleware.subject.Source> sources, QueryOptions queryOptions)
Composite
Member
s of this group.
A composite group is composed of two groups and a set operator
(stored in grouper_composites table)
(e.g. union, intersection, etc). A composite group has no immediate members.
All subjects in a composite group are effective members.
Set members = g.getCompositeMembers();
field
- sources
- queryOptions
-
Member
objects.public void xmlCopyBusinessPropertiesToExisting(Group existingRecord)
XmlImportableBase
xmlCopyBusinessPropertiesToExisting
in interface XmlImportableBase<Group>
XmlImportableBase.xmlCopyBusinessPropertiesToExisting(java.lang.Object)
public boolean xmlDifferentBusinessProperties(Group other)
XmlImportableBase
xmlDifferentBusinessProperties
in interface XmlImportableBase<Group>
other
- the one to compare with
XmlImportableBase.xmlDifferentBusinessProperties(java.lang.Object)
public boolean xmlDifferentUpdateProperties(Group other)
XmlImportableBase
xmlDifferentUpdateProperties
in interface XmlImportableBase<Group>
other
- the one to compare with
XmlImportableBase.xmlDifferentUpdateProperties(java.lang.Object)
public Group xmlRetrieveByIdOrKey()
XmlImportable
xmlRetrieveByIdOrKey
in interface XmlImportable<Group>
XmlImportable.xmlRetrieveByIdOrKey()
public boolean assignIdIndex(long theIdIndex)
theIdIndex
-
public Group xmlSaveBusinessProperties(Group existingRecord)
XmlImportableBase
xmlSaveBusinessProperties
in interface XmlImportableBase<Group>
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
XmlImportableBase.xmlSaveBusinessProperties(java.lang.Object)
public void xmlSaveUpdateProperties()
XmlImportableBase
xmlSaveUpdateProperties
in interface XmlImportableBase<Group>
XmlImportableBase.xmlSaveUpdateProperties()
public XmlExportGroup xmlToExportGroup(GrouperVersion grouperVersion)
grouperVersion
-
public java.lang.String xmlGetId()
XmlImportableBase
xmlGetId
in interface XmlImportableBase<Group>
XmlImportableBase.xmlGetId()
public void xmlSetId(java.lang.String theId)
XmlImportableBase
xmlSetId
in interface XmlImportableBase<Group>
XmlImportableBase.xmlSetId(java.lang.String)
public java.lang.String xmlToString()
XmlImportableBase
xmlToString
in interface XmlImportableBase<Group>
XmlImportableBase.xmlToString()
public boolean matchesLowerSearchStrings(java.util.Set<java.lang.String> filterStrings)
GrouperObject
matchesLowerSearchStrings
in interface GrouperObject
GrouperObject.matchesLowerSearchStrings(Set)
public boolean canHavePrivilege(edu.internet2.middleware.subject.Subject subject, java.lang.String privilegeOrListName, boolean secure)
subject
- privilegeOrListName
- secure
- if the user must be an admin to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |