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 ConfigurationManagementService

All Superinterfaces:
JpsPersistable, OpssServiceInstance, ServiceInstance, ServiceLifecycle

public interface ConfigurationManagementService
extends ServiceLifecycle, OpssServiceInstance

The OPSS Configuration Management Service which manages the lifecycle of configuration(s) for one or more OPSS Runtime's (ServiceContext's). This service manages the Lifecycle of named Configuration Profiles. Profiles are customized jps-config.xml files that relate to a specific usage of OPSS Services by an OPSS Consumer. For example one could register a FusionApps Profile or a JavaService Profile. The configuration service also manages the Lifecycle of Named Context Configurations. Named Context Configurations can be created either by supplying

Each named Context Configuration can be in one of the following states at any given time

The Configuration Management Service itself can be in one of 2 Modes

The Configuration Management Service would transition from DEFAULT mode to REPOSITORY mode lazily the first time there is a request to service a named Context Configuration or a Configuration Profile.

Author:
vbkumarjayanti

Nested Class Summary
static class ConfigurationManagementService.CONFIG_STATE
           
static interface ConfigurationManagementService.ConfigCustomization
          A Configuration Customization.
static class ConfigurationManagementService.SERVICE_MODE
           

 

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 activateContextConfiguration(java.lang.String contextId)
          Activate a registered configuration.
 void addConfigListener(ConfigListener listener, ConfigEvent[] filter)
           
 void createConfigurationProfile(java.lang.String profileId, java.net.URI profileXml)
           
 void createContextConfiguration(java.lang.String contextId, java.util.List<ServiceInstanceDescriptor> serviceConfig, java.util.List<ServiceInstanceDescriptor> bootstrapConfig)
          Register a new configuration with the Configuration Service using explicit service definitions.
 void createContextConfiguration(java.lang.String contextId, java.lang.String profileId, javax.security.auth.callback.CallbackHandler customizationHandler)
          Create a new ContextConfiguration using a base Template/Profile.
 void createContextConfiguration(java.lang.String contextId, java.lang.String profileId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization)
          Create a new ContextConfiguration using a base Template/Profile.
 void deactivateContextConfiguration(java.lang.String contextId)
          Deactivate a registered Context Configuration
 void deleteConfigurationProfile(java.lang.String profileId)
           
 void deleteContextConfiguration(java.lang.String contextId)
          Unregister a Context Configuration.
 void exportConfiguration(java.lang.String contextId, java.io.OutputStream stream)
           
 void exportProfile(java.lang.String profileId, java.io.OutputStream stream)
          Export the configuration of a Profile to the outputstream.
 java.lang.String getAlias(java.lang.String contextId)
           
 ContextConfiguration getContextBootstrapConfiguration(java.lang.String contextId)
          The bootstrap Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
 ContextConfiguration getContextConfiguration(java.lang.String contextId)
           
 java.util.List<java.lang.String> getContextConfigurationIds()
           
 java.util.List<java.lang.String> getContextConfigurationIds(ConfigurationManagementService.CONFIG_STATE state)
           
 java.util.List<java.lang.String> getContextConfigurationIds(ConfigurationManagementService.CONFIG_STATE state, java.lang.String profileId)
           
 java.util.List<java.lang.String> getContextConfigurationIds(java.lang.String profileId)
           
 ConfigurationManagementService.CONFIG_STATE getContextConfigurationState(java.lang.String contextId)
           
 java.lang.String getContextId(java.lang.String alias)
           
 ContextConfiguration getDefaultBootstrapConfiguration()
           
 ContextConfiguration getDefaultConfiguration()
           
 JpsConfiguration getJpsConfiguration()
           
 ContextConfiguration getJpsContextConfiguration(java.lang.String contextId)
           
 ConfigurationManagementService.SERVICE_MODE getMode()
           
 java.util.List<java.lang.String> getProfileIds()
           
 java.util.List<ServiceProviderDescriptor> getServiceProviders()
          This method gives all OPSS service provider descriptors configured in OPSS configuration repository.
 boolean isRegistered(java.lang.String contextId)
           
 void removeConfigListener(ConfigListener listener)
           
 void setAlias(java.lang.String contextId, java.lang.String alias)
          Sets an Alias for a named Context.
 java.lang.String unsetAlias(java.lang.String contextId)
          Unset the Alias of a named Context.
 void updateContextConfiguration(java.lang.String contextId, javax.security.auth.callback.CallbackHandler customizationHandler, boolean replace, boolean complete)
          Update a ContextConfiguration.
 void updateContextConfiguration(java.lang.String contextId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization, boolean replace, boolean complete)
          Update a ContextConfiguration.

 

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

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

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 the jps-config.xml supplied to the provider.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getDefaultConfiguration

ContextConfiguration getDefaultConfiguration()
Returns:
the default Runtime Configuration as defined in the jps-config.xml supplied to the provider.
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getJpsConfiguration

JpsConfiguration getJpsConfiguration()
Returns:
JpsConfiguration
Throws:
ConfigurationRuntimeException - if there was an error in fetching the configuration

getJpsContextConfiguration

ContextConfiguration getJpsContextConfiguration(java.lang.String contextId)
                                                throws ConfigurationException
Returns:
the Configuration of a jpsContext defined in OOTB jps-config.xml as a ContextConfiguration
Throws:
ConfigurationException - if there was an error in fetching the configuration

createConfigurationProfile

void createConfigurationProfile(java.lang.String profileId,
                                java.net.URI profileXml)
                                throws ConfigurationException
Parameters:
profileId -
profileXml - A template jps-config.xml that defines the Configuration Profile
Throws:
ConfigurationException - if there was an error in creating the configuration profile

deleteConfigurationProfile

void deleteConfigurationProfile(java.lang.String profileId)
                                throws ConfigurationException,
                                       RegistrationException
Parameters:
profileId -
Throws:
ConfigurationException - if there was an error in deleting the configuration profile
RegistrationException - if a profile with the profileId is not registered.

getContextConfiguration

ContextConfiguration getContextConfiguration(java.lang.String contextId)
                                             throws ConfigurationException,
                                                    RegistrationException
Parameters:
contextId - the ContextId for which the Configuration is desired
Returns:
The configuration defined for a given context in OPSS configuration repository or the OOTB jps-config.xml
Throws:
AccessControlException - if the code does not have permission to invoke this operation
ConfigurationException - if there was an error in fetching the configuration
RegistrationException - if a configuration with the contextID is not registered.

getContextBootstrapConfiguration

ContextConfiguration getContextBootstrapConfiguration(java.lang.String contextId)
                                                      throws ConfigurationException,
                                                             RegistrationException
The bootstrap Configuration View is generally a Normalized ReadOnly view of the persistence layer configuration and is used by the OPSS Runtime.
Parameters:
contextID - the ID of the configuration
Returns:
the bootstrap ContextConfiguration for the contextId.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
RegistrationException - if a configuration with the contextID is not registered.
ConfigurationException - if there was an error in fetching the configuration

createContextConfiguration

void createContextConfiguration(java.lang.String contextId,
                                java.util.List<ServiceInstanceDescriptor> serviceConfig,
                                java.util.List<ServiceInstanceDescriptor> bootstrapConfig)
                                throws ConfigurationException,
                                       RegistrationException
Register a new configuration with the Configuration Service using explicit service definitions. The Configuration would be in CREATED state upon successful creation
Parameters:
contextId - the context ID of the configuration
servicesConfig - the services configuration
bootstrapConfig - the bootstrap configuration.
Throws:
RegistrationException - if a Config with the contextId is already registered
AccessControlException - if the code does not have permission to invoke this operation
ConfigurationException - if there was an error in creating the configuration

createContextConfiguration

void createContextConfiguration(java.lang.String contextId,
                                java.lang.String profileId,
                                java.util.List<ConfigurationManagementService.ConfigCustomization> customization,
                                java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization)
                                throws ConfigurationException,
                                       RegistrationException
Create a new ContextConfiguration using a base Template/Profile. The Configuration would be in CREATED state upon successful creation
Parameters:
contextId - the unique name of the contextConfiguration to be created
profileId - the base profile name from which to derive the Context Configuration
customization - the customization to be applied to the profile
bootCustomization - the customization to be applied to the bootstrap configuration implied by the profile
Throws:
RegistrationException - if a Config with the contextId is already registered
AccessControlException - if the code does not have permission to invoke this operation
ConfigurationException - if there was an error in creating the configuration

createContextConfiguration

void createContextConfiguration(java.lang.String contextId,
                                java.lang.String profileId,
                                javax.security.auth.callback.CallbackHandler customizationHandler)
                                throws ConfigurationException
Create a new ContextConfiguration using a base Template/Profile. The Configuration would be in CREATED state upon successful creation. This method provides an Alternate programmatic form of customization where callers can supply code in the form of a CallBackHandler to perform Customizations
Parameters:
contextId - the unique name of the contextConfiguration to be created
profileId - the base profile name from which to derive the Context Configuration
customizationHandler - A CallBackHandler that can handle the CustomizationCallback to obtain the base Configuration as a DOM element on which it can perform the required Customizations.
Throws:
ConfigurationException

updateContextConfiguration

void updateContextConfiguration(java.lang.String contextId,
                                java.util.List<ConfigurationManagementService.ConfigCustomization> customization,
                                java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization,
                                boolean replace,
                                boolean complete)
                                throws ConfigurationException,
                                       RegistrationException
Update a ContextConfiguration. The Configuration must be in INACTIVE/CREATED state before a call to this method.
Parameters:
contextId - the unique name of the contextConfiguration
customization - the customization to be applied to the configuration, can be null
bootCustomization - the customization to be applied to the bootstrap configuration implied by the profile, can be null
replace - when set to true will completely replace the existing customizations with newly supplied customizations. When set to false the customizations supplied here are applied on top of the existing customizations (with matching targets overriding the old customization by newly supplied customization).
complete - when set to true will set the state of the configuration to COMPLETE.
Throws:
ConfigurationException - if there was an error in performing the operation or if the state of the context configuration is not INACTIVE/CREATED when the method was called. A ConfigurationException is also thrown if complete flag was set to true and the configuration was actually completed earlier.
RegistrationException - if a Config with the contextId does not exist
AccessControlException - if the code does not have permission to invoke this operation

updateContextConfiguration

void updateContextConfiguration(java.lang.String contextId,
                                javax.security.auth.callback.CallbackHandler customizationHandler,
                                boolean replace,
                                boolean complete)
                                throws ConfigurationException,
                                       RegistrationException
Update a ContextConfiguration. The Configuration must be in INACTIVE/CREATED state before a call to this method. This method provides an Alternate programmatic form of customization where callers can supply code in the form of a CallBackHandler to perform Customizations
Parameters:
contextId - the unique name of the contextConfiguration
customizationHandler - A CallBackHandler that can handle the CustomizationCallback to obtain the base Configuration as a DOM element on which it can perform the required Customizations.
replace - when set to true will completely replace the existing customizations with newly supplied customizations. When set to false the customizations supplied here are applied on top of the existing customizations (with matching targets overriding the old customization by newly supplied customization).
complete - when set to true will set the state of the configuration to COMPLETE.
Throws:
ConfigurationException - if there was an error in performing the operation or if the state of the context configuration is not INACTIVE/CREATED when the method was called. A ConfigurationException is also thrown if complete flag was set to true and the configuration was actually completed earlier.
RegistrationException - if a Config with the contextId does not exist
AccessControlException - if the code does not have permission to invoke this operation

deleteContextConfiguration

void deleteContextConfiguration(java.lang.String contextId)
                                throws ConfigurationException,
                                       RegistrationException
Unregister a Context Configuration. The state of the configuration would be TERMINATED during execution of this method, till the time it gets removed from the Config Repository.
Parameters:
contextId - the context identifier
Throws:
RegistrationException - if a context with the contextId is not registered
AccessControlException - if the code does not have permission to invoke this operation
ConfigurationException - if there was an error in fetching the configuration

isRegistered

boolean isRegistered(java.lang.String contextId)
                     throws ConfigurationException
Parameters:
contextId -
Returns:
true if a context with the contextId exists, false otherwise
Throws:
ConfigurationException - if there is an error in determining the registration status.
AccessControlException - if the code does not have permission to invoke this operation

activateContextConfiguration

void activateContextConfiguration(java.lang.String contextId)
                                  throws ConfigurationException,
                                         RegistrationException,
                                         ActivationException
Activate a registered configuration.
Parameters:
contextId -
Throws:
AccessControlException - if the code does not have permission to invoke this operation
RegistrationException - if a config with the contextId is not registered.
ActivationException - if a config with the contextId is already active.
ConfigurationException - if there was an error in fetching the configuration

deactivateContextConfiguration

void deactivateContextConfiguration(java.lang.String contextId)
                                    throws ConfigurationException,
                                           RegistrationException,
                                           ActivationException
Deactivate a registered Context Configuration
Parameters:
contextId - the context id.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
RegistrationException - if a context with the contextId is not registered.
ActivationException - if a context with the contextId not active.
ConfigurationException - if there was an error in fetching the configuration

getContextConfigurationState

ConfigurationManagementService.CONFIG_STATE getContextConfigurationState(java.lang.String contextId)
                                                                         throws ConfigurationException,
                                                                                RegistrationException
Parameters:
contextId -
Returns:
returns the State of the Configuration identified by contextId
Throws:
AccessControlException - if the code does not have permission to invoke this operation
RegistrationException - if a configuration with the contextId is not registered.
ConfigurationException - if there was an error in fetching the configuration state information

getContextConfigurationIds

java.util.List<java.lang.String> getContextConfigurationIds()
                                                            throws ConfigurationException
Returns:
returns a list of contextId's of all registered configurations.
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
ConfigurationException - if there was an error in fetching the list of registered configurations.

getContextConfigurationIds

java.util.List<java.lang.String> getContextConfigurationIds(java.lang.String profileId)
                                                            throws ConfigurationException
Parameters:
profileId - the profile under which the configurations are to be fetched
Returns:
the ContextId's of the registered Context Configurations.
Throws:
ConfigurationPersistenceException
ConfigurationException

getContextConfigurationIds

java.util.List<java.lang.String> getContextConfigurationIds(ConfigurationManagementService.CONFIG_STATE state)
                                                            throws ConfigurationException
Parameters:
state - the state of the context configuration
Returns:
returns a list of contextId's for all registered configurations in the specified state
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
ConfigurationRuntimeException - if there was an error in fetching the list of configurations.
ConfigurationException

getContextConfigurationIds

java.util.List<java.lang.String> getContextConfigurationIds(ConfigurationManagementService.CONFIG_STATE state,
                                                            java.lang.String profileId)
                                                            throws ConfigurationException
Parameters:
state - the state of the context configuration
profileId - the profile under which the configurations are to be fetched
Returns:
returns a list of contextId's for all registered configurations in the specified state
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
ConfigurationRuntimeException - if there was an error in fetching the list of configurations.
ConfigurationException

getProfileIds

java.util.List<java.lang.String> getProfileIds()
                                               throws ConfigurationException
Returns:
the list of ProfileId's registered with the System
Throws:
ConfigurationException - if there was an error in registering the listener

addConfigListener

void addConfigListener(ConfigListener listener,
                       ConfigEvent[] filter)
                       throws ConfigurationException
Parameters:
listener - the listener to be notified for config registrations and un-registrations
filter - the list of ConfigEvents that the listener is interested in. When specified as null, the listener would be notified for all Config Events.
Throws:
AccessControlException - if the code does not have permission to invoke this operation
ConfigurationException - if there was an error in registering the listener

removeConfigListener

void removeConfigListener(ConfigListener listener)
                          throws ConfigurationException
Parameters:
listener - the listener to be removed from the notification service
Throws:
ConfigurationException - if there was an error in un-registering the listener or if the listener was not registered.

exportProfile

void exportProfile(java.lang.String profileId,
                   java.io.OutputStream stream)
                   throws ConfigurationException,
                          java.io.IOException,
                          RegistrationException
Export the configuration of a Profile to the outputstream.
Parameters:
profileId - the id of the profile whose configuration has to be exported
stream - the
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
RegistrationException - if a profile with the profileId is not registered.
ConfigurationException - if there was a problem in retrieving the configuration
java.io.IOException - if there was a problem in writing to the stream

exportConfiguration

void exportConfiguration(java.lang.String contextId,
                         java.io.OutputStream stream)
                         throws ConfigurationException,
                                java.io.IOException,
                                RegistrationException
Parameters:
contextId - the contextId whose complete configuration and bootstrap configuration is desired
stream - the outputstream to which the configuration needs to be written to
Throws:
AccessControlException - if the code does not have permission to invoke this operation.
RegistrationException - if a context with the contextId is not registered.
ConfigurationException - if there was a problem in retrieving the configuration
java.io.IOException - if there was a problem in writing to the stream

setAlias

void setAlias(java.lang.String contextId,
              java.lang.String alias)
              throws ConfigurationException,
                     RegistrationException
Sets an Alias for a named Context. Only one Alias can be set for named context. When the configuration of a Context is updated (via updateContextConfiguration API) the updates would happen in the context of the Alias in such a way that when the Alias is unset, the corresponding updates are reverted/purged.
Parameters:
contextId - the context to be aliased
alias - the alias for the contexId
Throws:
ConfigurationException - if there was a problem in setting the Alias, or the context associated with contextId is in ACTIVE state
RegistrationException - if the contextId is not registered, or the alias supplied is already associated with another contextId

unsetAlias

java.lang.String unsetAlias(java.lang.String contextId)
                            throws ConfigurationException
Unset the Alias of a named Context. Any updates to the context configuration that happened in the context of the Alias would be reverted
Parameters:
contextId - the context to be de-aliased
Returns:
the current alias if any was set prior to the call, or null
Throws:
ConfigurationException - if there was a problem in unsetting the alias, or the context associated with contextId is in ACTIVE state
RegistrationException - if the contextId is not registered

getAlias

java.lang.String getAlias(java.lang.String contextId)
                          throws ConfigurationException
Parameters:
contextId -
Returns:
the Alias (if any) associated with the contextId, null otherwise
Throws:
ConfigurationException - if there was a problem in getting the alias
RegistrationException - if the contextId is not registered

getContextId

java.lang.String getContextId(java.lang.String alias)
                              throws ConfigurationException
Parameters:
alias -
Returns:
the contextId (if any) associated with the alias, null otherwise
Throws:
ConfigurationException - if there was a problem in getting the alias

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.