public abstract class ApplicationPrivilegeManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_DELEGATE |
static String |
ACTION_MODIFY |
static String |
ACTION_READ |
Modifier | Constructor and Description |
---|---|
protected |
ApplicationPrivilegeManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addPrivilege(ApplicationPrivilege appPrivilege)
Adds a delegation privilege.
|
abstract boolean |
canCreateApplication(String realm)
Returns
true if subject can create application. |
abstract Set<String> |
getApplications(ApplicationPrivilege.Action action)
Returns application names for a given action.
|
static ApplicationPrivilegeManager |
getInstance(String realm,
Subject caller)
Returns an instance of application privilege manager.
|
abstract ApplicationPrivilege |
getPrivilege(String name)
Returns the application privilege object.
|
abstract Set<String> |
getResources(String applicationName,
ApplicationPrivilege.Action action)
Returns a set of resources for an application and an action.
|
abstract boolean |
hasPrivilege(Application app,
ApplicationPrivilege.Action action) |
abstract boolean |
hasPrivilege(Privilege p,
ApplicationPrivilege.Action action)
Returns
true if the subject has permission to a
privilege of a given action. |
abstract boolean |
hasPrivilege(ReferralPrivilege p,
ApplicationPrivilege.Action action)
Returns
true if the subject has permission to a
referral privilege of a given action. |
abstract void |
removePrivilege(String name)
Removes a privilege.
|
abstract void |
replacePrivilege(ApplicationPrivilege appPrivilege)
Replaces (or modifies) an existing privilege.
|
abstract Set<String> |
search(Set<SearchFilter> filters)
Returns a set of privilege names that the administrator can delegate.
|
public static final String ACTION_READ
public static final String ACTION_MODIFY
public static final String ACTION_DELEGATE
public abstract void addPrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
appPrivilege
- Application Privilege to be addedEntitlementException
- if privilege cannot be added.public abstract void replacePrivilege(ApplicationPrivilege appPrivilege) throws EntitlementException
appPrivilege
- New privilege.EntitlementException
- if privilege cannot be replaced.public abstract void removePrivilege(String name) throws EntitlementException
name
- Name of privilege to removeEntitlementException
- if privilege cannot be removed.public abstract Set<String> search(Set<SearchFilter> filters)
filters
- Set of search filters.public abstract ApplicationPrivilege getPrivilege(String name) throws EntitlementException
name
- Name of application privilege.EntitlementException
- if privilege cannot be returned.public abstract boolean hasPrivilege(Privilege p, ApplicationPrivilege.Action action) throws EntitlementException
true
if the subject has permission to a
privilege of a given action.p
- Privilege.action
- Privilege action.true
if the subject has permission to a
privilege of a given action.EntitlementException
public abstract boolean hasPrivilege(Application app, ApplicationPrivilege.Action action) throws EntitlementException
EntitlementException
public abstract boolean hasPrivilege(ReferralPrivilege p, ApplicationPrivilege.Action action) throws EntitlementException
true
if the subject has permission to a
referral privilege of a given action.p
- Referral Privilege.action
- Privilege action.true
if the subject has permission to a
referral privilege of a given action.EntitlementException
public abstract Set<String> getResources(String applicationName, ApplicationPrivilege.Action action)
applicationName
- Application name.action
- Privilege action.public abstract Set<String> getApplications(ApplicationPrivilege.Action action)
action
- Privilege action.public abstract boolean canCreateApplication(String realm)
true
if subject can create application.realm
- Realm where application is to be created.public static ApplicationPrivilegeManager getInstance(String realm, Subject caller)
realm
- Realm name.caller
- Administrator subject.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.