Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E54416-01


oracle.security.opss.service.config
Interface ConfigurationService

All Superinterfaces:
JpsPersistable, OpssServiceInstance, ServiceInstance, ServiceLifecycle

public interface ConfigurationService
extends ServiceLifecycle, OpssServiceInstance

The OPSS Configuration Service which manages configuration for applications and tenants.

The OPSS Runtime is only expected to make use of the getRuntimeConfiguration() method which provides a Normalized Read-Only view of the Configuration. Code dealing with OPSS runtime should not make use of the getMangementConfiguration() method as it is meant for Management Applications.

The Configuration Service can be in one of 2 states

TBD: Need to see if un-registration of various Listeners (TenentRegistrationListener and the ServiceCofigChangeListener, ConfigContextChangeListener) would also be needed.

Author:
vbkumarjayanti

Nested Class Summary
static class ConfigurationService.SERVICE_MODE
          The 3 Service Modes for Configuration Service

 

Nested classes/interfaces inherited from interface oracle.security.opss.service.OpssServiceInstance
OpssServiceInstance.State

 

Nested classes/interfaces inherited from interface oracle.security.jps.service.JpsPersistable
JpsPersistable.Mode

 

Method Summary
 void activateTenant(TenantInfo tenantInfo)
          Activate a registered Tenant.
 void addTenantListener(TenantListener listener)
           
 void deactivateTenant(TenantInfo tenantInfo)
          Deactivate a registered Tenant.
 ConfigurationService getConfiguredConfigurationService(javax.security.auth.callback.CallbackHandler cbh)
          This method maybe used by the OPSS runtime post re-association to create a new ConfigurationService that is bootstrapped with its Configuration Repository.
 ContextConfiguration getContextConfiguration(java.lang.String contextId)
           
 ContextConfiguration getDefaultBootstrapConfiguration()
           
 ContextConfiguration getDefaultConfiguration()
           
 ManagementConfiguration getDefaultManagementConfiguration()
           
 JpsConfiguration getJpsConfiguration()
           
 ManagementConfiguration getManagementConfiguration(TenantInfo tenantInfo)
          The Management Configuration View is a READ-WRITE view that allows CRUD operations on the Configuration.
 ConfigurationService.SERVICE_MODE getMode()
           
 java.util.List<ServiceProviderDescriptor> getServiceProviders()
          This method gives all OPSS service provider descriptors configured in OPSS configuration repository.
 ContextConfiguration getTenantBootstrapConfiguration(TenantInfo tenantInfo)
          The bootstrap Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
 ContextConfiguration getTenantConfiguration(TenantInfo tenantInfo)
          The Runtime Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
 java.util.List<java.lang.String> getTenants()
           
 boolean isTenantActivated(TenantInfo tenantInfo)
           
 boolean isTenantRegistered(TenantInfo tenantInfo)
           
 void listenToConfigChanges(TenantInfo tenantInfo, ConfigContextChangeListener listener)
          Listen to changes to the Config Context of the tenant.
 void listenToConfigChanges(TenantInfo tenantInfo, java.lang.String serviceInstanceName, ServiceConfigChangeListener listener)
          Subscribe to configuration changes for a particular Service Instance.
 void registerTenant(TenantInfo tenantInfo, java.util.List<ServiceInstanceDescriptor> tenantConfig, java.util.List<ServiceInstanceDescriptor> tenantBootstrapConfig)
          Register a new tenant with the Configuration Service.
 void unregisterTenant(TenantInfo tenantInfo)
          Unregister a tenant.

 

Methods inherited from interface oracle.security.opss.service.ServiceLifecycle
postStart, preStart, restart, start, stop, terminate

 

Methods inherited from interface oracle.security.opss.service.OpssServiceInstance
getState

 

Methods inherited from interface oracle.security.jps.service.ServiceInstance
accept, getName, getServiceProvider

 

Methods inherited from interface oracle.security.jps.service.JpsPersistable
persist, refresh

 

Method Detail

getMode

ConfigurationService.SERVICE_MODE getMode()
Returns:
the SERVICE_MODE of the Configuration Service

getConfiguredConfigurationService

ConfigurationService getConfiguredConfigurationService(javax.security.auth.callback.CallbackHandler cbh)
                                                       throws ConfigurationException
This method maybe used by the OPSS runtime post re-association to create a new ConfigurationService that is bootstrapped with its Configuration Repository.
Returns:
the ConfigurationService instance configured in the bootstrap OPSS configuration repository.
Throws:
ConfigurationException - if there was an error in fetching the configuration

getServiceProviders

java.util.List<ServiceProviderDescriptor> getServiceProviders()
This method gives all OPSS service provider descriptors configured in OPSS configuration repository.
Returns:
the list of OPSS ServiceProvider Descriptors.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getDefaultBootstrapConfiguration

ContextConfiguration getDefaultBootstrapConfiguration()
Returns:
the default Bootstrap Configuration as defined in OPSS configuration repository.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getDefaultConfiguration

ContextConfiguration getDefaultConfiguration()
Returns:
the default Runtime Configuration as defined in OPSS configuration repository.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getContextConfiguration

ContextConfiguration getContextConfiguration(java.lang.String contextId)
Parameters:
contextId - the JpsContextId for which the Configuration is desired
Returns:
The configuration defined for a given context in OPSS configuration repository.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

registerTenant

void registerTenant(TenantInfo tenantInfo,
                    java.util.List<ServiceInstanceDescriptor> tenantConfig,
                    java.util.List<ServiceInstanceDescriptor> tenantBootstrapConfig)
                    throws ConfigurationException
Register a new tenant with the Configuration Service.
Parameters:
tenantId - the tenant ID of a tenant
tenantConfig - the tenant services configuration
tenantBootstrapConfig - the bootstrap configuration for the tenant.
Throws:
TenantRegistrationException - if a tenant with the tenantId is already registered
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
ConfigurationException - if there was an error in fetching the configuration

unregisterTenant

void unregisterTenant(TenantInfo tenantInfo)
                      throws ConfigurationException
Unregister a tenant. Do nothing if there was no registration for the tenant.
Parameters:
tenantId - the tenant identifier
Throws:
TenantRegistrationException - if a tenant with the tenantId is not registered
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
TenantActivationException - if the tenant with the tenantId is active.
ConfigurationException - if there was an error in fetching the configuration

isTenantRegistered

boolean isTenantRegistered(TenantInfo tenantInfo)
                           throws ConfigurationException
Parameters:
tenantId -
Returns:
true if a tenant with the tenantId exists, false otherwise
Throws:
ConfigurationException - if there is an error in fetching the configuration
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode

activateTenant

void activateTenant(TenantInfo tenantInfo)
                    throws ConfigurationException
Activate a registered Tenant.
Parameters:
tenantId - the tenant id.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
TenantRegistrationException - if a tenant with the tenantId is not registered.
TenantActivationException - if a tenant with the tenantId is already active.
ConfigurationException - if there was an error in fetching the configuration

deactivateTenant

void deactivateTenant(TenantInfo tenantInfo)
                      throws ConfigurationException
Deactivate a registered Tenant.
Parameters:
tenantId - the tenant id.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
Tenant - RegistrationException if a tenant with the tenantId is not registered.
TenantActivationException - if a tenant with the tenantId not active.
ConfigurationException - if there was an error in fetching the configuration

isTenantActivated

boolean isTenantActivated(TenantInfo tenantInfo)
                          throws ConfigurationException
Parameters:
tenantId -
Returns:
returns true if a tenant with the tenantId is active, false otherwise
Throws:
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
TenantRegistrationException - if a tenant with the tenantId is not registered.
ConfigurationException - if there was an error in fetching the configuration

getTenants

java.util.List<java.lang.String> getTenants()
                                            throws ConfigurationException
Returns:
returns a list of tenentId for all registered tenants.
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode.
ConfigurationRuntimeException - if there was an error in fetching the configuration.
ConfigurationException

getTenantConfiguration

ContextConfiguration getTenantConfiguration(TenantInfo tenantInfo)
                                            throws ConfigurationException
The Runtime Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
Parameters:
tenantId - the ID of the tenant whose configuration is desired.
Returns:
the ContextConfiguration for this Tenant.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
TenantRegistrationException - if a tenant with the tenantId is not registered.
TenantActivationException - if a tenant with the tenentId is not active.
ConfigurationException - if there was an error in fetching the configuration

getTenantBootstrapConfiguration

ContextConfiguration getTenantBootstrapConfiguration(TenantInfo tenantInfo)
                                                     throws ConfigurationException
The bootstrap Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
Parameters:
tenantId - the ID of the tenant whose configuration is desired.
Returns:
the ContextConfiguration for this Tenant.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration
AccessControlException - if the code does not have permission to invoke this operation
IllegalServiceModeException - if the Configuration Service is not in MULTITEANT mode
TenantRegistrationException - if a tenant with the tenantId is not registered.
TenantActivationException - if a tenant with the tenentId is not active.
ConfigurationException - if there was an error in fetching the configuration

listenToConfigChanges

void listenToConfigChanges(TenantInfo tenantInfo,
                           java.lang.String serviceInstanceName,
                           ServiceConfigChangeListener listener)
Subscribe to configuration changes for a particular Service Instance. Configuration changes are done by the Management Configuration Beans.
Parameters:
serviceInstanceName - The name of the ServiceInstance Descriptor for which the listener is to be registered. When null is passed, the listener is registered for all ServiceInstances in the current Context.
listener - the Listener.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
ServiceNotIntializedException - if the Config Service is not initialized (Not Connected to Configuration Repository)
RegistrationException - if a tenant with the tenantId is not registered with the system

listenToConfigChanges

void listenToConfigChanges(TenantInfo tenantInfo,
                           ConfigContextChangeListener listener)
Listen to changes to the Config Context of the tenant. Primarily initiated by calls to createMgmtConfigBean, deleteMgmtConfigBean which create and delete a Service Instance Descriptor from the configuration. The Tenant Security Context Lifecyle may then decide to do a Stop and Restart of the Tenant Security context.
Parameters:
listener - the listener to be notified when there is change in the Configuration of this Context
Throws:
AccessControlException - if the code does not have permission to invoke this operation
ServiceNotIntializedException - if the Config Service is not initia lized (Not Connected to Configuration Repository)
RegistrationException - if a tenant with the tenantId is not regist ered with the system

addTenantListener

void addTenantListener(TenantListener listener)
Parameters:
listener - the should be notified for tenant registrations and un-registrations
Throws:
AccessControlException - if the code does not have permission to invoke this operation
ServiceNotIntializedException - if the Config Service is not initia lized (Not Connected to Configuration Repository)
RegistrationException - if a tenant with the tenantId is not regist ered with the system

getManagementConfiguration

ManagementConfiguration getManagementConfiguration(TenantInfo tenantInfo)
The Management Configuration View is a READ-WRITE view that allows CRUD operations on the Configuration. The actual management API for a service is provided by the concrete ConfigBean and ConfigMXBean implementations.
Parameters:
tenantId - the tenantId
Returns:
the Management Configuration view of the tenant configuration
Throws:
AccessControlException - when the code invoking this operation does not have permission.
AccessControlException - if the code does not have permission to invoke this operation
ServiceNotIntializedException - if the Config Service is not initia lized (Not Connected to Configuration Repository)
RegistrationException - if a tenant with the tenantId is not regist ered with the system

getDefaultManagementConfiguration

ManagementConfiguration getDefaultManagementConfiguration()
Returns:
the Management Configuration View of the OOTB jps-config.xml

getJpsConfiguration

JpsConfiguration getJpsConfiguration()
Returns:
JpsConfiguration

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E54416-01


Copyright © 2011, 2015, Oracle and/or its affiliates. All rights reserved.