public class EntitlementService extends Object implements EntitlementConfiguration
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_CLASSNAME |
static String |
ATTR_NAME_META |
static String |
ATTR_NAME_SUBJECT_ATTR_NAMES |
static String |
CONFIG_CONDITIONS |
static String |
CONFIG_ENTITLEMENT_COMBINER |
static String |
CONFIG_RESOURCE_COMP_IMPL |
static String |
CONFIG_SAVE_INDEX_IMPL |
static String |
CONFIG_SEARCH_INDEX_IMPL |
static String |
CONFIG_SUBJECTS |
static String |
SERVICE_NAME
Entitlement Service name.
|
INDEX_CACHE_SIZE, POLICY_CACHE_SIZE, POLICY_EVAL_THREAD_SIZE, POLICY_SEARCH_THREAD_SIZE
Constructor and Description |
---|
EntitlementService(Subject subject,
String realm,
NotificationBroker broker)
Construct a new instance of
EntitlementService . |
Modifier and Type | Method and Description |
---|---|
void |
addSubjectAttributeNames(String applicationName,
Set<String> names)
Returns subject attribute names.
|
Application |
getApplication(String name)
Returns the application with the specified name.
|
Set<Application> |
getApplications()
Returns a set of registered applications.
|
Set<ApplicationType> |
getApplicationTypes()
Returns a set of registered application type.
|
Set<String> |
getConfiguration(String attrName)
Returns set of attribute values of a given attribute name,
|
static int |
getConfiguration(String attrName,
int defaultValue) |
int |
getPolicyWindowSize()
Informs us of the size of the policy window set in the configurable options.
|
Set<String> |
getSubjectAttributeNames(String application)
Returns subject attribute names.
|
Map<String,Set<String>> |
getSubjectAttributesCollectorConfiguration(String name)
Returns subject attributes collector configuration.
|
boolean |
hasEntitlementDITs()
Returns
true if OpenAM policy data is migrated to a
form that entitlements service can operates on them. |
boolean |
isMonitoringRunning()
Whether the overall monitoring framework is enabled and running.
|
boolean |
networkMonitorEnabled()
Returns
true if the network monitoring for entitlements
is enabled |
void |
reindexApplications()
Reindex Applications.
|
void |
removeApplication(String name)
Removes application.
|
void |
removeApplicationType(String name)
Removes application type.
|
Set<Application> |
searchApplications(Subject subject,
org.forgerock.util.query.QueryFilter<String> queryFilter)
Returns a set of applications for the given search criteria.
|
void |
setNetworkMonitorEnabled(boolean enabled)
Allows the network monitoring to be enabled/disabled
|
void |
setSubjectAttributesCollectorConfiguration(String name,
Map<String,Set<String>> attrMap)
Sets subject attributes collector configuration.
|
void |
storeApplication(Application appl)
Stores the application to data store.
|
void |
storeApplicationType(ApplicationType applicationType)
Stores the application type to data store.
|
boolean |
xacmlPrivilegeEnabled()
Returns
true if the system stores privileges in
XACML format and supports exporting privileges in XACML format |
public static final String SERVICE_NAME
public static final String ATTR_NAME_SUBJECT_ATTR_NAMES
public static final String ATTR_NAME_META
public static final String CONFIG_CONDITIONS
public static final String CONFIG_SUBJECTS
public static final String CONFIG_ENTITLEMENT_COMBINER
public static final String CONFIG_SEARCH_INDEX_IMPL
public static final String CONFIG_SAVE_INDEX_IMPL
public static final String CONFIG_RESOURCE_COMP_IMPL
public static final String APPLICATION_CLASSNAME
@Inject public EntitlementService(Subject subject, String realm, NotificationBroker broker)
EntitlementService
.subject
- the calling subjectrealm
- the realmbroker
- the notification broker for notifying the policyset changespublic Set<String> getConfiguration(String attrName)
getConfiguration
in interface EntitlementConfiguration
attrName
- attribute name.public static int getConfiguration(String attrName, int defaultValue)
public Set<ApplicationType> getApplicationTypes()
getApplicationTypes
in interface EntitlementConfiguration
public Set<Application> searchApplications(Subject subject, org.forgerock.util.query.QueryFilter<String> queryFilter) throws EntitlementException
EntitlementConfiguration
searchApplications
in interface EntitlementConfiguration
subject
- Admin SubjectqueryFilter
- Query filter.EntitlementException
- if search failed.public Application getApplication(String name)
EntitlementConfiguration
getApplication
in interface EntitlementConfiguration
public Set<Application> getApplications()
getApplications
in interface EntitlementConfiguration
public void addSubjectAttributeNames(String applicationName, Set<String> names) throws EntitlementException
addSubjectAttributeNames
in interface EntitlementConfiguration
applicationName
- Application name.names
- subject attribute names.EntitlementException
- if subject attribute names cannot be
returned.public void removeApplication(String name) throws EntitlementException
removeApplication
in interface EntitlementConfiguration
name
- name of application to be removed.EntitlementException
- if application cannot be removed.public void removeApplicationType(String name) throws EntitlementException
removeApplicationType
in interface EntitlementConfiguration
name
- name of application type to be removed.EntitlementException
- if application type cannot be removed.public void storeApplication(Application appl) throws EntitlementException
storeApplication
in interface EntitlementConfiguration
appl
- Application object.EntitlementException
- if application cannot be stored.public void storeApplicationType(ApplicationType applicationType) throws EntitlementException
storeApplicationType
in interface EntitlementConfiguration
applicationType
- Application type object.EntitlementException
- if application type cannot be stored.public Set<String> getSubjectAttributeNames(String application)
getSubjectAttributeNames
in interface EntitlementConfiguration
application
- Application name.public Map<String,Set<String>> getSubjectAttributesCollectorConfiguration(String name) throws EntitlementException
getSubjectAttributesCollectorConfiguration
in interface EntitlementConfiguration
name
- subject attributes collector nameEntitlementException
- if subject attributes collector
configuration cannot be returned.public void setSubjectAttributesCollectorConfiguration(String name, Map<String,Set<String>> attrMap) throws EntitlementException
setSubjectAttributesCollectorConfiguration
in interface EntitlementConfiguration
name
- subject attributes collector nameattrMap
- subject attributes collector configuration map.EntitlementException
- if subject attributes collector
configuration cannot be set.public boolean hasEntitlementDITs()
true
if OpenAM policy data is migrated to a
form that entitlements service can operates on them.hasEntitlementDITs
in interface EntitlementConfiguration
true
if OpenAM policy data is migrated to a
form that entitlements service can operates on them.public boolean xacmlPrivilegeEnabled()
true
if the system stores privileges in
XACML format and supports exporting privileges in XACML formatxacmlPrivilegeEnabled
in interface EntitlementConfiguration
true
if the system stores privileges in
XACML format and supports exporting privileges in XACML formatpublic boolean networkMonitorEnabled()
EntitlementConfiguration
true
if the network monitoring for entitlements
is enablednetworkMonitorEnabled
in interface EntitlementConfiguration
true
if the network monitoring for entitlements
is enabled.public void setNetworkMonitorEnabled(boolean enabled)
EntitlementConfiguration
setNetworkMonitorEnabled
in interface EntitlementConfiguration
enabled
- Is the network monitoring enabledpublic void reindexApplications()
EntitlementConfiguration
reindexApplications
in interface EntitlementConfiguration
public boolean isMonitoringRunning()
isMonitoringRunning
in interface EntitlementConfiguration
public int getPolicyWindowSize()
EntitlementConfiguration
getPolicyWindowSize
in interface EntitlementConfiguration
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.