Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.peopleconnections.common.settings
Class SettingsManager

java.lang.Object
  extended by oracle.webcenter.peopleconnections.common.settings.SettingsManager


public abstract class SettingsManager
extends java.lang.Object

A settings manager is responsible for managing all reads and updates to a settings XML document, at a global or user level.

An instance of this class can be created using the createSettingsManager(java.lang.String) method, passing the path of the document to be managed. A single instance of this class can be used for reading (i.e. getting a read-only JAXB bean) or writing (by gettings a JAXB bean on which updates can be made) settings, at a global level as well as at a user level.

Since:
release specific (what release of product did this appear in)

Constructor Summary
SettingsManager()
           

 

Method Summary
static SettingsManager createSettingsManager(java.lang.String settingsPath)
          Returns a settings manager instance for a specified document.
abstract  UpdateableSettings getCurrentUserSettingsForUpdate()
          Returns an updateable-settings object corresponding to the current user's version of the settings document, for performing settings updates at the current user's level (overriding the global level settings).
abstract  javax.xml.bind.Element getSystemSettingsBean()
          Returns a read-only JAXB bean representing the settings encapsulated in the global level version of the settings document.
abstract  UpdateableSettings getSystemSettingsForUpdate()
          Returns an updateable-settings object corresponding to the global level version of the settings document, for performing settings updates at a global level.
abstract  javax.xml.bind.Element getUserSettingsBean(java.lang.String username)
          Returns a read-only JAXB bean representing the settings encapsulated in a particular user's version of the settings document.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SettingsManager

public SettingsManager()

Method Detail

getSystemSettingsBean

public abstract javax.xml.bind.Element getSystemSettingsBean()
                                                      throws SettingsException
Returns a read-only JAXB bean representing the settings encapsulated in the global level version of the settings document.

Any call to this method on a settings manager for the document will always return the latest updated version of the document.

Typically one would typecast the bean returned by this method to the appropriate JAXB class associated with the XSD on which the settings document is based, and call getters on it to access the settings info.

Returns:
Read-only JAXB bean representing global level settings
Throws:
SettingsException - If any error occurs while reading the document or preparing the JAXB bean for it

getUserSettingsBean

public abstract javax.xml.bind.Element getUserSettingsBean(java.lang.String username)
                                                    throws SettingsException
Returns a read-only JAXB bean representing the settings encapsulated in a particular user's version of the settings document.

Any call to this method on a settings manager for the document will always return the latest updated version of the document. For any setting that the user has not explicitly configured, the bean will contain the global level setting.

Typically one would typecast the bean returned by this method to the appropriate JAXB class associated with the XSD on which the settings document is based, and call getters on it to access the settings info.

Parameters:
username - The user for which to return the settings
Returns:
Read-only JAXB bean representing the specified user's settings (applied on top of the global level settings)
Throws:
SettingsException - If any error occurs while reading the document or preparing the JAXB bean for it

getSystemSettingsForUpdate

public abstract UpdateableSettings getSystemSettingsForUpdate()
                                                       throws SettingsException
Returns an updateable-settings object corresponding to the global level version of the settings document, for performing settings updates at a global level.

Each call to this method will return a separate new updateable-settings object, in the sense that if two objects are obtained through two calls to this method, updates made in one object will not be reflected in the other object (even after the first one is saved).

Returns:
Updateable-settings object for performing settings updates at a global level
Throws:
SettingsException - In the event of an unexpected error

getCurrentUserSettingsForUpdate

public abstract UpdateableSettings getCurrentUserSettingsForUpdate()
                                                            throws SettingsException
Returns an updateable-settings object corresponding to the current user's version of the settings document, for performing settings updates at the current user's level (overriding the global level settings).

Each call to this method will return a separate new updateable-settings object, in the sense that if two objects are obtained through two calls to this method, updates made in one object will not be reflected in the other object (even after the first one is saved).

Returns:
Updateable-settings object for performing settings updates at the current user's level (overriding global level settings)
Throws:
SettingsException - In the event of an unexpected error

createSettingsManager

public static SettingsManager createSettingsManager(java.lang.String settingsPath)
Returns a settings manager instance for a specified document.
Parameters:
settingsPath - Path of the document to be managed. The document must be a valid XML document available in the system and JAXB beans corresponding to its XSD must be available in the system (the 'system' in question here depends on the specific implementation of the settings manager, e.g. the current implementation uses MDS).
Returns:
A settings manager for the specified document.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.