Class OpenSSOApplicationPrivilegeManager
- java.lang.Object
-
- com.sun.identity.entitlement.ApplicationPrivilegeManager
-
- com.sun.identity.entitlement.opensso.OpenSSOApplicationPrivilegeManager
-
public class OpenSSOApplicationPrivilegeManager extends ApplicationPrivilegeManager
-
-
Field Summary
-
Fields inherited from class com.sun.identity.entitlement.ApplicationPrivilegeManager
ACTION_DELEGATE, ACTION_MODIFY, ACTION_READ
-
-
Constructor Summary
Constructors Constructor Description OpenSSOApplicationPrivilegeManager(String realm, Subject caller, ResourceTypeService resourceTypeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPrivilege(ApplicationPrivilege appPrivilege)Adds a delegation privilege.booleancanCreateApplication(String realm)Returnstrueif subject can create application.Set<String>getApplications(ApplicationPrivilege.Action action)Returns application names for a given action.Set<String>getDelegatableResourceNames(String applicationName)ApplicationPrivilegegetPrivilege(String name)Returns the application privilege object.Set<String>getResources(String applicationName, ApplicationPrivilege.Action action)Returns a set of resources for an application and an action.booleanhasPrivilege(Application app, ApplicationPrivilege.Action action)booleanhasPrivilege(Privilege p, ApplicationPrivilege.Action action)Returnstrueif the subject has permission to a privilege of a given action.booleanhasPrivilege(ReferralPrivilege p, ApplicationPrivilege.Action action)Returnstrueif the subject has permission to a referral privilege of a given action.voidremovePrivilege(String name)Removes a privilege.voidreplacePrivilege(ApplicationPrivilege appPrivilege)Replaces (or modifies) an existing privilege.Set<String>search(Set<SearchFilter> filters)Returns a set of privilege names that the administrator can delegate.-
Methods inherited from class com.sun.identity.entitlement.ApplicationPrivilegeManager
getInstance
-
-
-
-
Constructor Detail
-
OpenSSOApplicationPrivilegeManager
public OpenSSOApplicationPrivilegeManager(String realm, Subject caller, ResourceTypeService resourceTypeService) throws EntitlementException
- Throws:
EntitlementException
-
-
Method Detail
-
addPrivilege
public void addPrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerAdds a delegation privilege.- Specified by:
addPrivilegein classApplicationPrivilegeManager- Parameters:
appPrivilege- Application Privilege to be added- Throws:
EntitlementException- if privilege cannot be added.
-
removePrivilege
public void removePrivilege(String name) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerRemoves a privilege.- Specified by:
removePrivilegein classApplicationPrivilegeManager- Parameters:
name- Name of privilege to remove- Throws:
EntitlementException- if privilege cannot be removed.
-
replacePrivilege
public void replacePrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerReplaces (or modifies) an existing privilege.- Specified by:
replacePrivilegein classApplicationPrivilegeManager- Parameters:
appPrivilege- New privilege.- Throws:
EntitlementException- if privilege cannot be replaced.
-
getPrivilege
public ApplicationPrivilege getPrivilege(String name) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerReturns the application privilege object.- Specified by:
getPrivilegein classApplicationPrivilegeManager- Parameters:
name- Name of application privilege.- Returns:
- the application privilege object.
- Throws:
EntitlementException- if privilege cannot be returned.
-
search
public Set<String> search(Set<SearchFilter> filters)
Description copied from class:ApplicationPrivilegeManagerReturns a set of privilege names that the administrator can delegate.- Specified by:
searchin classApplicationPrivilegeManager- Parameters:
filters- Set of search filters.- Returns:
- Set of privilege names that the administrator can delegate.
-
hasPrivilege
public boolean hasPrivilege(Privilege p, ApplicationPrivilege.Action action) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerReturnstrueif the subject has permission to a privilege of a given action.- Specified by:
hasPrivilegein classApplicationPrivilegeManager- Parameters:
p- Privilege.action- Privilege action.- Returns:
trueif the subject has permission to a privilege of a given action.- Throws:
EntitlementException
-
hasPrivilege
public boolean hasPrivilege(ReferralPrivilege p, ApplicationPrivilege.Action action) throws EntitlementException
Description copied from class:ApplicationPrivilegeManagerReturnstrueif the subject has permission to a referral privilege of a given action.- Specified by:
hasPrivilegein classApplicationPrivilegeManager- Parameters:
p- Referral Privilege.action- Privilege action.- Returns:
trueif the subject has permission to a referral privilege of a given action.- Throws:
EntitlementException
-
hasPrivilege
public boolean hasPrivilege(Application app, ApplicationPrivilege.Action action) throws EntitlementException
- Specified by:
hasPrivilegein classApplicationPrivilegeManager- Throws:
EntitlementException
-
getResources
public Set<String> getResources(String applicationName, ApplicationPrivilege.Action action)
Description copied from class:ApplicationPrivilegeManagerReturns a set of resources for an application and an action.- Specified by:
getResourcesin classApplicationPrivilegeManager- Parameters:
applicationName- Application name.action- Privilege action.- Returns:
- set of resources for an application and an action.
-
getApplications
public Set<String> getApplications(ApplicationPrivilege.Action action)
Description copied from class:ApplicationPrivilegeManagerReturns application names for a given action.- Specified by:
getApplicationsin classApplicationPrivilegeManager- Parameters:
action- Privilege action.- Returns:
- application names for a given action.
-
canCreateApplication
public boolean canCreateApplication(String realm)
Returnstrueif subject can create application.- Specified by:
canCreateApplicationin classApplicationPrivilegeManager- Parameters:
realm- Realm where application is to be created.
-
-