Class PrivilegeSet


  • public class PrivilegeSet
    extends Object
    Simple collection class for passing collections of Privilege, ReferralPrivilege, Application and ResourceType objects as method argument or return type. This class was introduced specifically to allow methods to return both Privilege and ReferralPrivilge results in separate collections so later instanceof checks can be avoided.
    Since:
    12.0.0
    • Constructor Detail

      • PrivilegeSet

        public PrivilegeSet()
        Constructs PrivilegeSet instance.
    • Method Detail

      • addPrivilege

        public void addPrivilege​(Privilege privilege)
        Adds privilege to this set.
        Parameters:
        privilege - to be added.
      • addReferralPrivilege

        public void addReferralPrivilege​(ReferralPrivilege referralPrivilege)
        Adds referralPrivilege to this set.
        Parameters:
        referralPrivilege - to be added.
      • addApplication

        public void addApplication​(Application application)
        Adds application to this set.
        Parameters:
        application - to be added.
      • addResourceType

        public void addResourceType​(ResourceType resourceType)
        Adds resource type to this set.
        Parameters:
        resourceType - to be added.
      • getPrivileges

        public List<Privilege> getPrivileges()
        Obtain list of Privilege objects held by this class.
        Returns:
        Unmodifiable list of Privilege objects held by this class.
      • getReferralPrivileges

        public List<ReferralPrivilege> getReferralPrivileges()
        Obtain list of ReferralPrivilege objects held by this class.
        Returns:
        Unmodifiable list of ReferralPrivilege objects held by this class.
      • getApplication

        public List<Application> getApplication()
        Obtain list of Application objects held by this class.
        Returns:
        Unmodifiable list of Application objects held by this class.
      • getResourceTypes

        public List<ResourceType> getResourceTypes()
        Obtain list of ResourceType objects held by this class.
        Returns:
        Unmodifiable list of ResourceType objects held by this class.