Interface Entity
- All Superinterfaces:
Comparable
,GrouperId
,GrouperObject
,GrouperSetElement
- All Known Implementing Classes:
Group
-
Method Summary
Modifier and TypeMethodDescriptionCopy this group to another Stem.void
delete()
delete this role.Get subjects with the ADMIN privilege on this group.context id of the transactiondescription of role, friendly description, e.g.displayExtension of roledisplayName of attribute, e.g.extension of attribute expireTimegetId()
uuid of rolegetName()
name of rolestem that this attribute is inGet subjects with the VIEW privilege on this group.boolean
Grant privilege to a subject on this group.boolean
Check whether the subject has ADMIN on this group.boolean
Check whether the subject has VIEW on this group.void
Move this group to another Stem.boolean
revokePriv
(Subject subj, Privilege priv, boolean exceptionIfAlreadyRevoked) Revoke a privilege from the specified subject.void
setDescription
(String description1) description of attribute, friendly description, e.g.void
setDisplayExtension
(String displayExtension1) displayExtension of attribute, e.g.void
setDisplayName
(String displayName1) displayName of attribute, e.g.void
setExtension
(String extension1) extension of attribute expireTimevoid
id of this attribute def namevoid
void
stem that this attribute is invoid
store()
store this object to the DB.toMember()
Convert this group to aMember
object.Convert this group to aSubject
object.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface edu.internet2.middleware.grouper.misc.GrouperObject
getParentStem, matchesLowerSearchStrings
Methods inherited from interface edu.internet2.middleware.grouper.grouperSet.GrouperSetElement
__getId, __getName
-
Method Details
-
delete
void delete()delete this role. Note if the role participates in role inheritance, you need to break that inheritance first -
getId
String getId()uuid of role -
getName
String getName()name of role- Specified by:
getName
in interfaceGrouperObject
- Returns:
- name
-
getDescription
String getDescription()description of role, friendly description, e.g. in sentence form, about what the attribute is about- Specified by:
getDescription
in interfaceGrouperObject
- Returns:
- the description
-
getDisplayExtension
String getDisplayExtension()displayExtension of role- Returns:
- display extension
-
getDisplayName
String getDisplayName()displayName of attribute, e.g. My School:Community Groups:Expire Date- Specified by:
getDisplayName
in interfaceGrouperObject
- Returns:
- display name
-
getExtension
String getExtension()extension of attribute expireTime- Returns:
- extension
-
getStemId
String getStemId()stem that this attribute is in- Returns:
- the stem id
-
setDescription
description of attribute, friendly description, e.g. in sentence form, about what the attribute is about- Parameters:
description1
-
-
setDisplayExtension
displayExtension of attribute, e.g. Expire Date- Parameters:
displayExtension1
-
-
setDisplayName
displayName of attribute, e.g. My School:Community Groups:Expire Date- Parameters:
displayName1
-
-
setExtension
extension of attribute expireTime- Parameters:
extension1
-
-
setId
id of this attribute def name- Parameters:
id1
-
-
setName
- Parameters:
name1
-
-
setStemId
stem that this attribute is in- Parameters:
stemId1
-
-
getAdmins
Get subjects with the ADMIN privilege on this group.Set admins = g.getAdmins();
- Returns:
- Set of subjects with ADMIN
- Throws:
GrouperException
-
getViewers
Get subjects with the VIEW privilege on this group.Set viewers = g.getViewers();
- Returns:
- Set of subjects with VIEW
- Throws:
GrouperException
-
grantPriv
boolean grantPriv(Subject subj, Privilege priv, boolean exceptionIfAlreadyMember) throws GrantPrivilegeException, InsufficientPrivilegeException, SchemaException Grant privilege to a subject on this group.try { g.grantPriv(subj, AccessPrivilege.ADMIN); } catch (GrantPrivilegeException e0) { // Not privileged to grant this privilege } catch (InsufficientPrivilegeException e1) { // Unable to grant this privilege }
- Parameters:
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- Returns:
- false if it already existed, true if it didnt already exist
- Throws:
GrantPrivilegeException
InsufficientPrivilegeException
SchemaException
-
hasAdmin
Check whether the subject has ADMIN on this group.if (g.hasAdmin(subj)) { // Has ADMIN } else { // Does not have ADMIN }
- Parameters:
subj
- Check this subject.- Returns:
- Boolean true if subject has ADMIN.
-
hasView
Check whether the subject has VIEW on this group.if (g.hasView(subj)) { // Has VIEW } else { // Does not have VIEW }
- Parameters:
subj
- Check this member.- Returns:
- Boolean true if subject has VIEW.
-
revokePriv
boolean revokePriv(Subject subj, Privilege priv, boolean exceptionIfAlreadyRevoked) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException Revoke a privilege from the specified subject.try { g.revokePriv(subj, AccessPrivilege.OPTIN); } catch (InsufficientPrivilegeException e1) { // Not privileged to revoke this privilege } catch (RevokePrivilegeException eRP) { // Error revoking privilege }
- Parameters:
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- Returns:
- false if it was already revoked, true if it wasnt already deleted
- Throws:
InsufficientPrivilegeException
RevokePrivilegeException
SchemaException
-
store
void store()store this object to the DB. -
toMember
Convert this group to aMember
object.Member m = g.toMember();
- Returns:
Group
as aMember
- Throws:
GrouperException
-
toSubject
Convert this group to aSubject
object.Subject subj = g.toSubject();
- Returns:
Group
as aSubject
- Throws:
GrouperException
-
getContextId
String getContextId()context id of the transaction- Returns:
- context id
-
copy
Copy this group to another Stem. If you want to specify options for the copy, use GroupCopy. This will use the default options.- Parameters:
stem
-- Returns:
- the new group
- Throws:
InsufficientPrivilegeException
GroupAddException
-
move
Move this group to another Stem. If you would like to specify options for the move, use GroupMove instead. This will use the default options.- Parameters:
stem
-- Throws:
GroupModifyException
InsufficientPrivilegeException
-
getAttributeValueDelegate
AttributeValueDelegate getAttributeValueDelegate()- Returns:
- the delegate
- See Also:
-
getAttributeDelegate
AttributeAssignGroupDelegate getAttributeDelegate()- Returns:
- the delegate
- See Also:
-