|
Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server 11g Release 2 (11.1.2) E54416-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceManager
The Persistence Manager associated with the MetaFactory. Allows JpsConfigurationP persistence layer elements to be stored in a particular physical Data Store
TBD : Exceptions in all my interfaces need revisiting
Method Summary | ||
---|---|---|
void |
addConfigListener(ConfigListener listener) |
|
void |
deleteConfigProfile(java.lang.String profileId) Delete a Configuration Profile |
|
void |
deleteContextConfiguration(java.lang.String contextId) Used when a configuration context unregisters from the system. |
|
void |
deleteTenantConfiguration(java.lang.String tenantId) Used when a tenant unregisters from the system. |
|
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) |
|
java.util.List<java.lang.String> |
getContextConfigurationIds() |
|
java.util.List<java.lang.String> |
getContextConfigurationIds(java.lang.String profileId) |
|
java.lang.String |
getContextId(java.lang.String alias) |
|
java.util.List<java.lang.String> |
getProfileIds() |
|
ConfigurationManagementService.CONFIG_STATE |
getState(java.lang.String contextId) |
|
boolean |
getTenantActivationStatus(java.lang.String tenantId) |
|
java.util.List<java.lang.String> |
getTenants() |
|
boolean |
isRegistered(java.lang.String contextId) |
|
JpsConfigurationP |
load() An XML based PM might use all the information from jps-config.xml. |
|
java.beans.PropertyChangeEvent[] |
loadConfigChanges() Once loaded a second call to this method should return null unless there were further changes. |
|
PersistenceConfiguration |
loadContextConfiguration(java.lang.String contextId) This method populates the Services Configuration and BootConfiguration for the supplied context |
|
TenantConfig |
loadTenantConfiguration(java.lang.String tenantId) This method populates the Tenant;s Service Configuration and BootConfiguration in the supplied method parameters. |
|
|
persist(T element) API to store a particular Persistence Layer Configuration Element. |
|
void |
persistConfigChanges(java.beans.PropertyChangeEvent[] changes) Persist the Property changes. |
|
void |
persistConfigProfile(java.lang.String profileId, java.io.InputStream config) Persist a Configuration Profile |
|
void |
persistContextConfiguration(java.lang.String contextId, java.util.List<ServiceInstanceP> serviceConfig, java.util.List<ServiceInstanceP> bootConfig) Persist an explicitly defined context configuration TODO: we may not require this if the proposed Template Approach is sufficient for end customer usecases. |
|
void |
persistContextConfiguration(java.lang.String contextId, java.lang.String profileId, javax.security.auth.callback.CallbackHandler customizationHandler) Persist a Context Configuration as a customization of a Profile |
|
void |
persistContextConfiguration(java.lang.String contextId, java.lang.String profileId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization) Persist a Context Configuration as a customization of a Profile |
|
void |
persistTenantConfiguration(java.lang.String tenantId, java.util.List<ServiceInstanceP> serviceConfig, java.util.List<ServiceInstanceP> bootConfig) |
|
void |
removeConfigListener(ConfigListener listener) |
|
void |
setAlias(java.lang.String contextId, java.lang.String alias) Sets an Alias for a named Context. |
|
void |
setState(java.lang.String contextId, ConfigurationManagementService.CONFIG_STATE state) Sets the Activation State |
|
void |
setTenantActivationStatus(java.lang.String tenantId, boolean status) Sets the tenant's Activation Status |
|
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 an existing Context Configuration with additional Customizations or replace the existing customization with the ones supplied. |
|
void |
updateContextConfiguration(java.lang.String contextId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization, boolean replace, boolean complete) Update an existing Context Configuration with additional Customizations or replace the existing customization with the ones supplied. |
Method Detail |
---|
<T extends ConfigPersistenceElement> void persist(T element) throws ConfigurationPersistenceException
Depending on the particular DataStore type used it may or maynot be possible to store a particular kind of Configuration Element. For example the only Configuration Element that can be stored by an XML Persistence Manager is the root element JpsConfigurationP. Whereas a DB based Persistence Manager can store child named child elements like JpsContextP or a ServiceInstanceP.
element
- the configuration element to storeConfigurationPersistenceException
- if there was an error during persistencejava.lang.UnsupportedOperationException
- if the Persistence Manager does not support persisting the particular element.JpsConfigurationP load() throws ConfigurationPersistenceException
A Hybrid PM might be useful in most scenarios where it will pickup the ServiceProvider definitions from a jps-config.xml but should be able to pickup a set of ServiceInstanceP configurations (or a JpsContextP configuration) from a DB/LDAP DataStore.
ConfigurationPersistenceException
- if there was an error in loading configuration.void deleteContextConfiguration(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
-ConfigurationPersistenceException
- if there was an error while deleting the configPersistenceConfiguration loadContextConfiguration(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
- the contextId for which the configuration needs to be loadedConfigurationPersistenceException
- if there was an error while getting the configurationvoid persistContextConfiguration(java.lang.String contextId, java.util.List<ServiceInstanceP> serviceConfig, java.util.List<ServiceInstanceP> bootConfig) throws ConfigurationPersistenceException
contextId
- the contextId for which the configuration needs to be persistedserviceConfig
- the service configuration.bootConfig
- the boot configuration.ConfigurationPersistenceException
- if there was an error while persisting the configurationvoid persistConfigProfile(java.lang.String profileId, java.io.InputStream config) throws ConfigurationPersistenceException, java.io.IOException
profileId
- the name of the configuration profileconfig
-ConfigurationPersistenceException
- if there was an error in persistingjava.io.IOException
- if there was an issue in reading from the Streamvoid deleteConfigProfile(java.lang.String profileId) throws ConfigurationPersistenceException
profileId
-ConfigurationPersistenceException
- if there was an error in deleting the configuration profilevoid persistContextConfiguration(java.lang.String contextId, java.lang.String profileId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization) throws ConfigurationPersistenceException
contextId
- the name of the Context Configuration being persistedprofileId
- the configuration profile that will be used as the basecustomization
- the customizations to be applied for the service configurationsbootCustomization
- the customizations to be applied for the bootstrap configurationConfigurationException
ConfigurationPersistenceException
void persistContextConfiguration(java.lang.String contextId, java.lang.String profileId, javax.security.auth.callback.CallbackHandler customizationHandler) throws ConfigurationPersistenceException
contextId
- the name of the Context Configuration being persistedprofileId
- the configuration profile that will be used as the basecustomizationHandler
- A CallBackHandler that can handle the CustomizationCallback to obtain the base Configuration as a DOM element on which it can perform the required Customizations.ConfigurationException
ConfigurationPersistenceException
void updateContextConfiguration(java.lang.String contextId, java.util.List<ConfigurationManagementService.ConfigCustomization> customization, java.util.List<ConfigurationManagementService.ConfigCustomization> bootCustomization, boolean replace, boolean complete) throws ConfigurationPersistenceException
contextId
- the name of the Context Configuration being persistedcustomization
- the customizations to be applied for the service configurationsbootCustomization
- the customizations to be applied for the bootstrap configurationreplace
- a boolean flag indicating whether to apply the customization on top of existing customization or replace the existing one with what is supplied.complete
- when true it sets the configuration state to complete post this operationConfigurationPersistenceException
void updateContextConfiguration(java.lang.String contextId, javax.security.auth.callback.CallbackHandler customizationHandler, boolean replace, boolean complete) throws ConfigurationPersistenceException
contextId
- the name of the Context Configuration being persistedcustomizationHandler
- 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
- a boolean flag indicating whether to apply the customization on top of existing customization or replace the existing one with what is supplied.complete
- when true it sets the configuration state to complete post this operationConfigurationPersistenceException
void setState(java.lang.String contextId, ConfigurationManagementService.CONFIG_STATE state) throws ConfigurationPersistenceException
contextId
- the name of the Context ConfigurationConfigurationPersistenceException
ConfigurationManagementService.CONFIG_STATE getState(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
- the name of the Context ConfigurationConfigurationPersistenceException
boolean isRegistered(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
- the name of the Context ConfigurationConfigurationPersistenceException
- if there was an error in querying the statusjava.util.List<java.lang.String> getContextConfigurationIds() throws ConfigurationPersistenceException
ConfigurationPersistenceException
java.util.List<java.lang.String> getContextConfigurationIds(java.lang.String profileId) throws ConfigurationPersistenceException
profileId
- the profile under which the configurations are to be fetchedConfigurationPersistenceException
java.util.List<java.lang.String> getProfileIds() throws ConfigurationPersistenceException
ConfigurationPersistenceException
void addConfigListener(ConfigListener listener) throws ConfigurationPersistenceException
listener
- the listener to be notified for config state changesAccessControlException
- if the code does not have permission to invoke this operationConfigurationException
- if there was an error in registering the listenerjava.lang.IllegalArgumentException
- if the listener was supplied as null;ConfigurationPersistenceException
void removeConfigListener(ConfigListener listener) throws ConfigurationPersistenceException
listener
- the listener to be removed from the notification serviceConfigurationException
- if there was an error in un-registering the listener or if the listener was not registered.ConfigurationPersistenceException
void persistConfigChanges(java.beans.PropertyChangeEvent[] changes) throws ConfigurationPersistenceException
Currently all Persistence Managers are expected to produce this. Primarily because the Portable JMX Framework API's require the results of a change to be reflected in a file that is then propagated to the ManagedServers.
TBD: need to revisit this in the next release.changes
- the property changesConfigurationPersistenceException
- if there was an error while persisting the changesjava.beans.PropertyChangeEvent[] loadConfigChanges() throws ConfigurationPersistenceException
TODO : revisit the semantics
ConfigurationPersistenceException
- if there was an error while persisting the changesvoid deleteTenantConfiguration(java.lang.String tenantId) throws ConfigurationPersistenceException
tenantId
- : the ID of the tenant whose configuration needs to be deleted from a system.ConfigurationPersistenceException
- if there was an error while deleting the configTenantConfig loadTenantConfiguration(java.lang.String tenantId) throws ConfigurationPersistenceException
tenantId
-serviceConfig
- the tenant's service configuration.bootConfig
- the tenant;s boot configuration.ConfigurationPersistenceException
- if there was an error while getting the configurationvoid persistTenantConfiguration(java.lang.String tenantId, java.util.List<ServiceInstanceP> serviceConfig, java.util.List<ServiceInstanceP> bootConfig) throws ConfigurationPersistenceException
tenantId
-serviceConfig
- the tenant's service configuration.bootConfig
- the tenant;s boot configuration.ConfigurationPersistenceException
- if there was an error while persisting the configurationvoid setTenantActivationStatus(java.lang.String tenantId, boolean status)
tenantId
-status
- true indicates activate the tenant, false indicates deactivateboolean getTenantActivationStatus(java.lang.String tenantId)
tenantId
-java.util.List<java.lang.String> getTenants() throws ConfigurationPersistenceException
ConfigurationPersistenceException
void setAlias(java.lang.String contextId, java.lang.String alias) throws ConfigurationPersistenceException
contextId
- the context to be aliasedalias
- the alias for the contexIdConfigurationPersistenceException
- if there was a problem in setting the Aliasjava.lang.String unsetAlias(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
- the context to be de-aliasedConfigurationPersistenceException
- if there was a problem in unsetting the aliasjava.lang.String getAlias(java.lang.String contextId) throws ConfigurationPersistenceException
contextId
-ConfigurationPersistenceException
- if there was a problem in getting the aliasjava.lang.String getContextId(java.lang.String alias) throws ConfigurationPersistenceException
alias
-ConfigurationPersistenceException
- if there was a problem in getting the aliasvoid exportProfile(java.lang.String profileId, java.io.OutputStream stream) throws ConfigurationPersistenceException, java.io.IOException
profileId
- the id of the profile whose configuration has to be exportedstream
- the outputstream to which the profile needs to be written toConfigurationPersistenceException
- if there was a problem in retrieving the configurationjava.io.IOException
- if there was a problem in writing to the streamvoid exportConfiguration(java.lang.String contextId, java.io.OutputStream stream) throws ConfigurationPersistenceException, java.io.IOException
contextId
- the contextId whose complete configuration and bootstrap configuration is desiredstream
- the outputstream to which the configuration needs to be written toConfigurationPersistenceException
- if there was a problem in retrieving the configurationjava.io.IOException
- if there was a problem in writing to the stream
|
Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server 11g Release 2 (11.1.2) E54416-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |