edu.internet2.middleware.grouper.entity
Interface Entity

All Superinterfaces:
Comparable, GrouperId, GrouperObject, GrouperSetElement
All Known Implementing Classes:
Group

public interface Entity
extends GrouperSetElement, Comparable, GrouperObject


Method Summary
 Group copy(Stem stem)
          Copy this group to another Stem.
 void delete()
          delete this role.
 Set<edu.internet2.middleware.subject.Subject> getAdmins()
          Get subjects with the ADMIN privilege on this group.
 AttributeAssignGroupDelegate getAttributeDelegate()
           
 AttributeValueDelegate getAttributeValueDelegate()
           
 String getContextId()
          context id of the transaction
 String getDescription()
          description of role, friendly description, e.g.
 String getDisplayExtension()
          displayExtension of role
 String getDisplayName()
          displayName of attribute, e.g.
 String getExtension()
          extension of attribute expireTime
 String getId()
          uuid of role
 String getName()
          name of role
 String getStemId()
          stem that this attribute is in
 Set<edu.internet2.middleware.subject.Subject> getViewers()
          Get subjects with the VIEW privilege 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 hasView(edu.internet2.middleware.subject.Subject subj)
          Check whether the subject has VIEW on this group.
 void move(Stem stem)
          Move this group to another Stem.
 boolean revokePriv(edu.internet2.middleware.subject.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 expireTime
 void setId(String id1)
          id of this attribute def name
 void setName(String name1)
           
 void setStemId(String stemId1)
          stem that this attribute is in
 void store()
          store this object to the DB.
 Member toMember()
          Convert this group to a Member object.
 edu.internet2.middleware.subject.Subject toSubject()
          Convert this group to a Subject object.
 
Methods inherited from interface edu.internet2.middleware.grouper.grouperSet.GrouperSetElement
__getId, __getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.internet2.middleware.grouper.misc.GrouperObject
matchesLowerSearchStrings
 

Method Detail

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

Specified by:
getId in interface GrouperId
Returns:
id

getName

String getName()
name of role

Specified by:
getName in interface GrouperObject
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 interface GrouperObject
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 interface GrouperObject
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

void setDescription(String description1)
description of attribute, friendly description, e.g. in sentence form, about what the attribute is about

Parameters:
description1 -

setDisplayExtension

void setDisplayExtension(String displayExtension1)
displayExtension of attribute, e.g. Expire Date

Parameters:
displayExtension1 -

setDisplayName

void setDisplayName(String displayName1)
displayName of attribute, e.g. My School:Community Groups:Expire Date

Parameters:
displayName1 -

setExtension

void setExtension(String extension1)
extension of attribute expireTime

Parameters:
extension1 -

setId

void setId(String id1)
id of this attribute def name

Parameters:
id1 -

setName

void setName(String name1)
Parameters:
name1 -

setStemId

void setStemId(String stemId1)
stem that this attribute is in

Parameters:
stemId1 -

getAdmins

Set<edu.internet2.middleware.subject.Subject> getAdmins()
Get subjects with the ADMIN privilege on this group.
 Set admins = g.getAdmins();
 

Returns:
Set of subjects with ADMIN
Throws:
GrouperException

getViewers

Set<edu.internet2.middleware.subject.Subject> 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(edu.internet2.middleware.subject.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

boolean hasAdmin(edu.internet2.middleware.subject.Subject subj)
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

boolean hasView(edu.internet2.middleware.subject.Subject subj)
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(edu.internet2.middleware.subject.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

Member toMember()
                throws GrouperException
Convert this group to a Member object.

 Member m = g.toMember();
 

Returns:
Group as a Member
Throws:
GrouperException

toSubject

edu.internet2.middleware.subject.Subject toSubject()
                                                   throws GrouperException
Convert this group to a Subject object.

 Subject subj = g.toSubject();
 

Returns:
Group as a Subject
Throws:
GrouperException

getContextId

String getContextId()
context id of the transaction

Returns:
context id

copy

Group copy(Stem stem)
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

void move(Stem stem)
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:
Group.getAttributeValueDelegate()

getAttributeDelegate

AttributeAssignGroupDelegate getAttributeDelegate()
Returns:
the delegate
See Also:
Group.getAttributeDelegate()