public class OpenSSOApplicationPrivilegeManager extends ApplicationPrivilegeManager
ACTION_DELEGATE, ACTION_MODIFY, ACTION_READ
Constructor and Description |
---|
OpenSSOApplicationPrivilegeManager(String realm,
Subject caller,
ResourceTypeService resourceTypeService) |
Modifier and Type | Method and Description |
---|---|
void |
addPrivilege(ApplicationPrivilege appPrivilege)
Adds a delegation privilege.
|
boolean |
canCreateApplication(String realm)
Returns
true if subject can create application. |
Set<String> |
getApplications(ApplicationPrivilege.Action action)
Returns application names for a given action.
|
Set<String> |
getDelegatableResourceNames(String applicationName) |
ApplicationPrivilege |
getPrivilege(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.
|
boolean |
hasPrivilege(Application app,
ApplicationPrivilege.Action action) |
boolean |
hasPrivilege(Privilege p,
ApplicationPrivilege.Action action)
Returns
true if the subject has permission to a
privilege of a given action. |
boolean |
hasPrivilege(ReferralPrivilege p,
ApplicationPrivilege.Action action)
Returns
true if the subject has permission to a
referral privilege of a given action. |
void |
removePrivilege(String name)
Removes a privilege.
|
void |
replacePrivilege(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.
|
getInstance
public OpenSSOApplicationPrivilegeManager(String realm, Subject caller, ResourceTypeService resourceTypeService) throws EntitlementException
EntitlementException
public void addPrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
ApplicationPrivilegeManager
addPrivilege
in class ApplicationPrivilegeManager
appPrivilege
- Application Privilege to be addedEntitlementException
- if privilege cannot be added.public void removePrivilege(String name) throws EntitlementException
ApplicationPrivilegeManager
removePrivilege
in class ApplicationPrivilegeManager
name
- Name of privilege to removeEntitlementException
- if privilege cannot be removed.public void replacePrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
ApplicationPrivilegeManager
replacePrivilege
in class ApplicationPrivilegeManager
appPrivilege
- New privilege.EntitlementException
- if privilege cannot be replaced.public ApplicationPrivilege getPrivilege(String name) throws EntitlementException
ApplicationPrivilegeManager
getPrivilege
in class ApplicationPrivilegeManager
name
- Name of application privilege.EntitlementException
- if privilege cannot be returned.public Set<String> search(Set<SearchFilter> filters)
ApplicationPrivilegeManager
search
in class ApplicationPrivilegeManager
filters
- Set of search filters.public boolean hasPrivilege(Privilege p, ApplicationPrivilege.Action action) throws EntitlementException
ApplicationPrivilegeManager
true
if the subject has permission to a
privilege of a given action.hasPrivilege
in class ApplicationPrivilegeManager
p
- Privilege.action
- Privilege action.true
if the subject has permission to a
privilege of a given action.EntitlementException
public boolean hasPrivilege(ReferralPrivilege p, ApplicationPrivilege.Action action) throws EntitlementException
ApplicationPrivilegeManager
true
if the subject has permission to a
referral privilege of a given action.hasPrivilege
in class ApplicationPrivilegeManager
p
- Referral Privilege.action
- Privilege action.true
if the subject has permission to a
referral privilege of a given action.EntitlementException
public boolean hasPrivilege(Application app, ApplicationPrivilege.Action action) throws EntitlementException
hasPrivilege
in class ApplicationPrivilegeManager
EntitlementException
public Set<String> getResources(String applicationName, ApplicationPrivilege.Action action)
ApplicationPrivilegeManager
getResources
in class ApplicationPrivilegeManager
applicationName
- Application name.action
- Privilege action.public Set<String> getApplications(ApplicationPrivilege.Action action)
ApplicationPrivilegeManager
getApplications
in class ApplicationPrivilegeManager
action
- Privilege action.public boolean canCreateApplication(String realm)
true
if subject can create application.canCreateApplication
in class ApplicationPrivilegeManager
realm
- Realm where application is to be created.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.