Interface Entity

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

public interface Entity extends GrouperSetElement, Comparable, GrouperObject
  • 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
      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<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<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(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(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(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(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

      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:
    • getAttributeDelegate

      AttributeAssignGroupDelegate getAttributeDelegate()
      Returns:
      the delegate
      See Also: