Package com.sun.identity.entitlement
Class ReferralPrivilege
- java.lang.Object
-
- com.sun.identity.entitlement.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 Summary
Constructors Constructor Description ReferralPrivilege()Deprecated.ReferralPrivilege(String name, Map<String,Set<String>> map, Set<String> realms)Deprecated.Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcanonicalizeResources(Subject adminSubject, String realm)Deprecated.Canonicalizes resource name before persistence.Objectclone()Deprecated.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)Deprecated.Returns a list of entitlement for a given subject, resource name and environment.Set<String>getApplicationTypeNames(Subject adminSubject, String realm)Deprecated.StringgetCreatedBy()Deprecated.Returns the user ID who created the policy.longgetCreationDate()Deprecated.Returns creation date.StringgetDescription()Deprecated.Returns description.static ReferralPrivilegegetInstance(org.json.JSONObject jo)Deprecated.StringgetLastModifiedBy()Deprecated.Returns the user ID who last modified the policy.longgetLastModifiedDate()Deprecated.Returns last modified date.Map<String,Set<String>>getMapApplNameToResources()Deprecated.Returns mapping of application name to resources.StringgetName()Deprecated.Returns name.Map<String,Set<String>>getOriginalMapApplNameToResources()Deprecated.Returns non canonicalized mapping of application name to resources.Set<String>getRealms()Deprecated.Returns realms.ResourceSaveIndexesgetResourceSaveIndexes(Subject adminSubject, String realm)Deprecated.Returns resource save indexes.booleanisActive()Deprecated.Returnstrueif this privilege is active.voidsetActive(boolean active)Deprecated.Sets this privilege active/inactive.voidsetCreatedBy(String createdBy)Deprecated.Sets the user ID who created the policy.voidsetCreationDate(long creationDate)Deprecated.Sets the creation date.voidsetDescription(String description)Deprecated.Sets description.voidsetLastModifiedBy(String lastModifiedBy)Deprecated.Sets the user ID who last modified the policy.voidsetLastModifiedDate(long lastModifiedDate)Deprecated.Sets the last modified date.voidsetMapApplNameToResources(Map<String,Set<String>> map)Deprecated.Sets the application name to resource name.voidsetName(String name)Deprecated.Set this referral privilege's name.voidsetRealms(Set<String> realms)Deprecated.Sets realms.StringtoJSON()Deprecated.StringtoXML()Deprecated.
-
-
-
Constructor Detail
-
ReferralPrivilege
public ReferralPrivilege()
Deprecated.
-
ReferralPrivilege
public ReferralPrivilege(String name, Map<String,Set<String>> map, Set<String> realms) throws EntitlementException
Deprecated.Constructor- Parameters:
name- Namemap- Map of application name to resources.realms- Realm names- Throws:
EntitlementException- if map or realms are empty.
-
-
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.
-
setRealms
public void setRealms(Set<String> realms) throws EntitlementException
Deprecated.Sets realms.- Parameters:
realms- Realms.- Throws:
EntitlementException- if realms is empty.
-
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:
getNamein interfaceIPrivilege- Returns:
- name.
-
setDescription
public void setDescription(String description)
Deprecated.Sets description.- Parameters:
description-
-
getDescription
public String getDescription()
Deprecated.Returns description.- Returns:
- description.
-
getResourceSaveIndexes
public ResourceSaveIndexes getResourceSaveIndexes(Subject adminSubject, String realm) throws EntitlementException
Deprecated.Returns resource save indexes.- Specified by:
getResourceSaveIndexesin interfaceIPrivilege- Parameters:
adminSubject- Admin Subject.realm- Realm Name- Returns:
- resource save indexes.
- Throws:
EntitlementException
-
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:
getLastModifiedDatein interfaceIPrivilege- 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:IPrivilegeReturns a list of entitlement for a given subject, resource name and environment.- Specified by:
evaluatein interfaceIPrivilege- Parameters:
adminSubject- Admin Subjectrealm- Realm Namesubject- 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-trueto 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.
-
getApplicationTypeNames
public Set<String> getApplicationTypeNames(Subject adminSubject, String realm) throws EntitlementException
Deprecated.- Throws:
EntitlementException
-
isActive
public boolean isActive()
Deprecated.Returnstrueif this privilege is active.- Returns:
trueif this privilege is active.
-
setActive
public void setActive(boolean active)
Deprecated.Sets this privilege active/inactive.- Parameters:
active-trueif this privilege is to be active.
-
-