org.openmdx.base.configuration.cci
Class ContextSensitivePreferences

java.lang.Object
  extended by org.openmdx.base.configuration.cci.ContextSensitivePreferences

public class ContextSensitivePreferences
extends Object

Context Sensitive Preferences

Provides preferences for the following trees

  1. system
  2. application
  3. module
  4. component


    Field Summary
    protected static String PREFERENCES_FACTORY
              The default ContextSensitivePreferencesFactory is org.openmdx.base.configuration.BasicPreferencesFactory.
    static String PREFERENCES_FACTORY_PROPERTY
              The system property org.openmdx.prefs.PreferencesFactory can be used to override the default context sensitive preferences factory name.
     
    Constructor Summary
    protected ContextSensitivePreferences()
              Constructor
     
    Method Summary
    static Preferences applicationNodeForPackage(Class aClass)
              Find a package based application preference node given a class of the package.
    static Preferences applicationRoot()
              Returns the topmost preference node for the application.
    static Preferences componentNodeForPackage(Class aClass)
              Find a package based component preference node given a class of the package.
    static Preferences componentRoot()
              Returns the topmost preference node for the component.
    static Preferences containerNodeForPackage(Class aClass)
              Find a package based container preference node given a class of the package.
    static Preferences containerRoot()
              Returns the topmost preference node for the system.
    static Preferences moduleNodeForPackage(Class aClass)
              Find a package based module preference node given a class of the package.
    static Preferences moduleRoot()
              Returns the topmost preference node for the application.
    protected static Preferences nodeForPackage(Preferences rootNode, Class aClass)
              Find a package based preference node given its root node and a class of the package.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PREFERENCES_FACTORY_PROPERTY

    public static final String PREFERENCES_FACTORY_PROPERTY
    The system property org.openmdx.prefs.PreferencesFactory can be used to override the default context sensitive preferences factory name.

    See Also:
    PREFERENCES_FACTORY, Constant Field Values

    PREFERENCES_FACTORY

    protected static final String PREFERENCES_FACTORY
    The default ContextSensitivePreferencesFactory is org.openmdx.base.configuration.BasicPreferencesFactory.

    See Also:
    PREFERENCES_FACTORY_PROPERTY
    Constructor Detail

    ContextSensitivePreferences

    protected ContextSensitivePreferences()
    Constructor

    Method Detail

    containerRoot

    public static Preferences containerRoot()
    Returns the topmost preference node for the system.

    Returns:
    the topmost preference node for the system.

    applicationRoot

    public static Preferences applicationRoot()
    Returns the topmost preference node for the application.

    Returns:
    the topmost preference node for the application.

    moduleRoot

    public static Preferences moduleRoot()
    Returns the topmost preference node for the application.

    Returns:
    the topmost preference node for the application.

    componentRoot

    public static Preferences componentRoot()
    Returns the topmost preference node for the component.

    Returns:
    the topmost preference node for the component.

    containerNodeForPackage

    public static Preferences containerNodeForPackage(Class aClass)
    Find a package based container preference node given a class of the package.

    Parameters:
    aClass - the class for whose package a container preference node is desired.
    Returns:
    the container preference node associated with the package of which aClass is a member.
    Throws:
    NullPointerException - if aClass is null.
    IllegalArgumentException - if aClass is an array class

    applicationNodeForPackage

    public static Preferences applicationNodeForPackage(Class aClass)
    Find a package based application preference node given a class of the package.

    Parameters:
    aClass - the class for whose package an application preference node is desired.
    Returns:
    the application preference node associated with the package of which aClass is a member.
    Throws:
    NullPointerException - if aClass is null.
    IllegalArgumentException - if aClass is an array class

    moduleNodeForPackage

    public static Preferences moduleNodeForPackage(Class aClass)
    Find a package based module preference node given a class of the package.

    Parameters:
    aClass - the class for whose package a module preference node is desired.
    Returns:
    the module preference node associated with the package of which aClass is a member.
    Throws:
    NullPointerException - if aClass is null.
    IllegalArgumentException - if aClass is an array class

    componentNodeForPackage

    public static Preferences componentNodeForPackage(Class aClass)
    Find a package based component preference node given a class of the package.

    Parameters:
    aClass - the class for whose package a component preference node is desired.
    Returns:
    the component preference node associated with the package of which aClass is a member.
    Throws:
    NullPointerException - if aClass is null.
    IllegalArgumentException - if aClass is an array class

    nodeForPackage

    protected static Preferences nodeForPackage(Preferences rootNode,
                                                Class aClass)
    Find a package based preference node given its root node and a class of the package.

    Parameters:
    aClass - the class for whose package a preference node is desired.
    rootNode - the topmost node
    Returns:
    the preference node associated with the package of which c is a member.
    Throws:
    NullPointerException - if root or aClass is null.
    IllegalArgumentException - if aClass is an array class


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