org.openmdx.base.configuration.spi
Class BasicPreferencesFactory

java.lang.Object
  extended by org.openmdx.base.configuration.spi.BasicPreferencesFactory
All Implemented Interfaces:
ContextSensitivePreferencesFactory

public class BasicPreferencesFactory
extends Object
implements ContextSensitivePreferencesFactory

Basic Preferences Factory

The BasicPreferencesFactory's implementation supports the following providers:

Others may be supported by a subclass.


Field Summary
protected static String APPLICATION_SEGMENT
          The application preferences segment has the following default value: xri://@openmdx*org.openmdx.preferences1/provider/Java*Properties/segment/(xri://+resource/org/openmdx/prefs/application/preferences.properties)
static String APPLICATION_SEGMENT_PROPERTY
          The system property org.openmdx.prefs.ApplicationSegment can be used to override the default application sgement path.
protected static String COMPONENT_SEGMENT
          The component preferences segment has the following default value: xri://@openmdx*org.openmdx.preferences1/provider/Java*Naming/segment/(java:comp/env)
static String COMPONENT_SEGMENT_PROPERTY
          The system property org.openmdx.prefs.ComponentSegment can be used to override the default application sgement path.
protected static String CONTAINER_SEGMENT
          The container preferences segment has the following default value: "xri://@openmdx*org.openmdx.preferences1/provider/Java*Properties/segment/System*(xri://+resource/org/openmdx/prefs/container/preferences.properties)"
static String CONTAINER_SEGMENT_PROPERTY
          The system property org.openmdx.prefs.ContainerSegment can be used to override the default container sgement path.
protected static String MODULE_SEGMENT
          The module preferences segment has the following default value: xri://@openmdx*org.openmdx.preferences1/provider/Java*Properties/segment/(xri://+resource/org/openmdx/prefs/module/preferences.properties)
static String MODULE_SEGMENT_PROPERTY
          The system property org.openmdx.prefs.ModuleSegment can be used to override the default module sgement path.
protected static Path PREFERENCES_1_SEGMENT_PATTERN
          org::openmdx::preferences1 segment pattern as XRI 1: xri:@openmdx:org.openmdx.preferences1/provider/**/segment/** as XRI 2: xri://@openmdx*org.openmdx.preferences1/provider/$(..)/segment/($..) as Path: org::openmdx::preferences1/provider/::*/segment/::* as URI: spice://org:openmdx:preferences1/provider/:*/segment/:*
 
Constructor Summary
BasicPreferencesFactory()
           
 
Method Summary
 Preferences applicationRoot()
          Returns the topmost preference node for the application.
 Preferences componentRoot()
          Returns the topmost preference node for the component.
 Preferences containerRoot()
          Returns the topmost preference node for the container.
protected static Preferences getSegment(String xri, boolean userNode)
          The BasicPreferencesFactory's implementation supports the following providers: Java*Preferencesjava.util.prefs.Preferences' System or User preferences Java*Propertiesjava.util.Properties based configuration Java*Naming — JNDI based configuration, e.g.
 Preferences moduleRoot()
          Returns the topmost preference node for the module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFERENCES_1_SEGMENT_PATTERN

protected static final Path PREFERENCES_1_SEGMENT_PATTERN
org::openmdx::preferences1 segment pattern


CONTAINER_SEGMENT_PROPERTY

public static final String CONTAINER_SEGMENT_PROPERTY
The system property org.openmdx.prefs.ContainerSegment can be used to override the default container sgement path.

See Also:
CONTAINER_SEGMENT, Constant Field Values

CONTAINER_SEGMENT

protected static final String CONTAINER_SEGMENT
The container preferences segment has the following default value:

See Also:
CONTAINER_SEGMENT_PROPERTY

APPLICATION_SEGMENT_PROPERTY

public static final String APPLICATION_SEGMENT_PROPERTY
The system property org.openmdx.prefs.ApplicationSegment can be used to override the default application sgement path.

See Also:
APPLICATION_SEGMENT, Constant Field Values

APPLICATION_SEGMENT

protected static final String APPLICATION_SEGMENT
The application preferences segment has the following default value:

See Also:
APPLICATION_SEGMENT_PROPERTY

MODULE_SEGMENT_PROPERTY

public static final String MODULE_SEGMENT_PROPERTY
The system property org.openmdx.prefs.ModuleSegment can be used to override the default module sgement path.

See Also:
MODULE_SEGMENT, Constant Field Values

MODULE_SEGMENT

protected static final String MODULE_SEGMENT
The module preferences segment has the following default value:

See Also:
MODULE_SEGMENT_PROPERTY

COMPONENT_SEGMENT_PROPERTY

public static final String COMPONENT_SEGMENT_PROPERTY
The system property org.openmdx.prefs.ComponentSegment can be used to override the default application sgement path.

See Also:
COMPONENT_SEGMENT, Constant Field Values

COMPONENT_SEGMENT

protected static final String COMPONENT_SEGMENT
The component preferences segment has the following default value:

See Also:
COMPONENT_SEGMENT_PROPERTY
Constructor Detail

BasicPreferencesFactory

public BasicPreferencesFactory()
Method Detail

getSegment

protected static Preferences getSegment(String xri,
                                        boolean userNode)
The BasicPreferencesFactory's implementation supports the following providers: Others may be supported by a subclass.

Parameters:
xri - the preferences' source
userNode -
Returns:
the corresponding preferences node
Throws:
IllegalArgumentException - if the given path's provider is not supported

containerRoot

public Preferences containerRoot()
Description copied from interface: ContextSensitivePreferencesFactory
Returns the topmost preference node for the container.

Specified by:
containerRoot in interface ContextSensitivePreferencesFactory
Returns:
the topmost preference node for the container.

applicationRoot

public Preferences applicationRoot()
Description copied from interface: ContextSensitivePreferencesFactory
Returns the topmost preference node for the application.

Specified by:
applicationRoot in interface ContextSensitivePreferencesFactory
Returns:
the topmost preference node for the application.

moduleRoot

public Preferences moduleRoot()
Description copied from interface: ContextSensitivePreferencesFactory
Returns the topmost preference node for the module.

Specified by:
moduleRoot in interface ContextSensitivePreferencesFactory
Returns:
the topmost preference node for the module.

componentRoot

public Preferences componentRoot()
Description copied from interface: ContextSensitivePreferencesFactory
Returns the topmost preference node for the component.

Specified by:
componentRoot in interface ContextSensitivePreferencesFactory
Returns:
the topmost preference node for the component.


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.