Class PrivilegeStemInheritanceFinder

java.lang.Object
edu.internet2.middleware.grouper.privs.PrivilegeStemInheritanceFinder

public class PrivilegeStemInheritanceFinder extends Object
  • Constructor Details

    • PrivilegeStemInheritanceFinder

      public PrivilegeStemInheritanceFinder()
  • Method Details

    • assignRunAsRoot

      public PrivilegeStemInheritanceFinder assignRunAsRoot(boolean runAsRoot)
      set this to true to run as a root session
      Parameters:
      runAsRoot -
      Returns:
    • assignPrivilege

      public PrivilegeStemInheritanceFinder assignPrivilege(Privilege privilege)
      add privilege
      Parameters:
      theFieldName -
      Returns:
      this for chaining
    • assignPrivilegeName

      public PrivilegeStemInheritanceFinder assignPrivilegeName(String thePrivilegeName)
      field of privilege (could be privilege name too)
      Parameters:
      thePrivilegeName -
      Returns:
      this for chaining
    • assignField

      public PrivilegeStemInheritanceFinder assignField(Field theField)
      field of privilege
      Parameters:
      theFieldId -
      Returns:
      this for chaining
    • assignFieldId

      public PrivilegeStemInheritanceFinder assignFieldId(String theFieldId)
      field of privilege
      Parameters:
      theFieldId -
      Returns:
      this for chaining
    • assignFieldName

      public PrivilegeStemInheritanceFinder assignFieldName(String theFieldName)
      field of privilege (could be privilege name too)
      Parameters:
      theFieldName -
      Returns:
      this for chaining
    • assignStem

      public PrivilegeStemInheritanceFinder assignStem(Stem theStem)
      assign a stem
      Parameters:
      theStem -
      Returns:
      this for chaining
    • assignStemId

      public PrivilegeStemInheritanceFinder assignStemId(String theStemId)
      stem id to add to, mutually exclusive with stem name
      Parameters:
      theStemId -
      Returns:
      this for chaining
    • assignStemName

      public PrivilegeStemInheritanceFinder assignStemName(String theStemName)
      stem name to add to, mutually exclusive with stem id
      Parameters:
      theStemName -
      Returns:
      this for chaining
    • assignSubject

      public PrivilegeStemInheritanceFinder assignSubject(Subject theSubject)
      subject to add
      Parameters:
      theSubject -
      Returns:
      this for chaining
    • assignSubjectId

      public PrivilegeStemInheritanceFinder assignSubjectId(String theSubjectId)
      subject id to add, mutually exclusive and preferable to subject identifier
      Parameters:
      theSubjectId -
      Returns:
      this for chaining
    • assignSubjectIdentifier

      public PrivilegeStemInheritanceFinder assignSubjectIdentifier(String theSubjectIdentifier)
      subject identifier to add, mutually exclusive and not preferable to subject id
      Parameters:
      thesubjectIdentifier -
      Returns:
      this for chaining
    • assignSubjectSourceId

      public PrivilegeStemInheritanceFinder assignSubjectSourceId(String theSubjectSourceId)
      subject source id to add
      Parameters:
      theSubjectSourceId -
      Returns:
      this for chaining
    • hasAssignedPrivilege

      public boolean hasAssignedPrivilege()
      return true if the user has this inherited privilege based on assignment to the user or a group the user is in. The inherited privilege could be assigned on the folder or an ancestor folder.
      Returns:
    • hasEffectivePrivilege

      public boolean hasEffectivePrivilege()
      return true if the user has this inherited privilege based on assignment to the user or a group the user is in. The inherited privilege could be assigned on the folder or an ancestor folder. The privilege could be the actual privilege or a privilege that the assigned privilege implies. e.g. if searching for view and the subject has admin, it would return true
      Returns:
    • findEffectivePrivileges

      public Set<Privilege> findEffectivePrivileges()
      return set of effective inherited privileges based on assignment to the user or a group the user is in. The inherited privileges could be assigned on the folder or an ancestor folder. The privileges could be the actual privileges or privileges that the assigned privilege implies. e.g. if the subject has admin, it would include view and other privileges as well.
      Returns:
    • findAssignedPrivileges

      public Set<Privilege> findAssignedPrivileges()
      return set of assigned inherited privileges based on assignment to the user or a group the user is in. The inherited privileges could be assigned on the folder or an ancestor folder.
      Returns: