Class ReferralPrivilege

  • All Implemented Interfaces:
    IPrivilege, Cloneable

    @Deprecated
    public final class ReferralPrivilege
    extends Object
    implements IPrivilege, Cloneable
    Deprecated.
    referrals is no longer supported by the policy model and is in the process of being removed.
    Referral privilege allows application to be referred to peer and sub realm.
    • Constructor Detail

      • ReferralPrivilege

        public ReferralPrivilege()
        Deprecated.
    • Method Detail

      • getInstance

        public static ReferralPrivilege getInstance​(org.json.JSONObject jo)
        Deprecated.
      • setMapApplNameToResources

        public void setMapApplNameToResources​(Map<String,​Set<String>> map)
                                       throws EntitlementException
        Deprecated.
        Sets the application name to resource name.
        Parameters:
        map - map of application name to tesource names.
        Throws:
        EntitlementException - if map is empty.
      • setName

        public void setName​(String name)
        Deprecated.
        Set this referral privilege's name.
      • getMapApplNameToResources

        public Map<String,​Set<String>> getMapApplNameToResources()
        Deprecated.
        Returns mapping of application name to resources.
        Returns:
        mapping of application name to resources.
      • getOriginalMapApplNameToResources

        public Map<String,​Set<String>> getOriginalMapApplNameToResources()
        Deprecated.
        Returns non canonicalized mapping of application name to resources.
        Returns:
        mapping of application name to resources.
      • getName

        public String getName()
        Deprecated.
        Returns name.
        Specified by:
        getName in interface IPrivilege
        Returns:
        name.
      • setDescription

        public void setDescription​(String description)
        Deprecated.
        Sets description.
        Parameters:
        description -
      • getDescription

        public String getDescription()
        Deprecated.
        Returns description.
        Returns:
        description.
      • getRealms

        public Set<String> getRealms()
        Deprecated.
        Returns realms.
        Returns:
        realms
      • getCreationDate

        public long getCreationDate()
        Deprecated.
        Returns creation date.
        Returns:
        creation date.
      • setCreationDate

        public void setCreationDate​(long creationDate)
        Deprecated.
        Sets the creation date.
        Parameters:
        creationDate - creation date.
      • getLastModifiedDate

        public long getLastModifiedDate()
        Deprecated.
        Returns last modified date.
        Specified by:
        getLastModifiedDate in interface IPrivilege
        Returns:
        last modified date.
      • setLastModifiedDate

        public void setLastModifiedDate​(long lastModifiedDate)
        Deprecated.
        Sets the last modified date.
        Parameters:
        lastModifiedDate - last modified date.
      • getLastModifiedBy

        public String getLastModifiedBy()
        Deprecated.
        Returns the user ID who last modified the policy.
        Returns:
        user ID who last modified the policy.
      • setLastModifiedBy

        public void setLastModifiedBy​(String lastModifiedBy)
        Deprecated.
        Sets the user ID who last modified the policy.
        Parameters:
        lastModifiedBy - user ID who last modified the policy.
      • getCreatedBy

        public String getCreatedBy()
        Deprecated.
        Returns the user ID who created the policy.
        Returns:
        user ID who created the policy.
      • setCreatedBy

        public void setCreatedBy​(String createdBy)
        Deprecated.
        Sets the user ID who created the policy.
        Parameters:
        createdBy - user ID who created the policy.
      • toXML

        public String toXML()
        Deprecated.
      • toJSON

        public String toJSON()
        Deprecated.
      • canonicalizeResources

        public void canonicalizeResources​(Subject adminSubject,
                                          String realm)
                                   throws EntitlementException
        Deprecated.
        Canonicalizes resource name before persistence.
        Parameters:
        adminSubject - Admin Subject.
        realm - Realm Name
        Throws:
        EntitlementException
      • evaluate

        public List<Entitlement> evaluate​(Subject adminSubject,
                                          String realm,
                                          Subject subject,
                                          String applicationName,
                                          String normalisedResourceName,
                                          String requestedResourceName,
                                          Set<String> actionNames,
                                          Map<String,​Set<String>> environment,
                                          boolean recursive,
                                          Object context)
                                   throws EntitlementException
        Deprecated.
        Description copied from interface: IPrivilege
        Returns a list of entitlement for a given subject, resource name and environment.
        Specified by:
        evaluate in interface IPrivilege
        Parameters:
        adminSubject - Admin Subject
        realm - Realm Name
        subject - Subject who is under evaluation.
        applicationName - Application name.
        normalisedResourceName - The normalised resource name.
        requestedResourceName - The requested resource name.
        actionNames - Set of action names.
        environment - Environment parameters.
        recursive - true to perform evaluation on sub resources from the given resource name.
        context - A security context
        Returns:
        a list of entitlement for a given subject, resource name and environment.
        Throws:
        EntitlementException - if the result cannot be determined.
      • isActive

        public boolean isActive()
        Deprecated.
        Returns true if this privilege is active.
        Returns:
        true if this privilege is active.
      • setActive

        public void setActive​(boolean active)
        Deprecated.
        Sets this privilege active/inactive.
        Parameters:
        active - true if this privilege is to be active.