Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.config
Class DefaultSettings

    java.lang.Object
      org.apache.struts2.config.Settings
          org.apache.struts2.config.DefaultSettings

    public class DefaultSettings

extends Settings

DefaultSettings implements optional methods of Settings.

This class creates and delegates to other settings by using an internal `DelegatingSettings` object.

Field Summary
`(package private) Settings` | `delegate` The Settings object that handles API calls.
`protected Log` | `log` The logging instance for this class.

Fields inherited from class org.apache.struts2.config.Settings
`defaultImpl, locale, settingsImpl`

Constructor Summary
`DefaultSettings()` Constructs an instance by loading the standard property files, any custom property files (`struts.custom.properties`), and any custom message resources ().

Method Summary
`String` | `getImpl(String aName)` Implements the `Settings.get(String)` method.
`boolean` | `isSetImpl(String aName)` Implements the `Settings.isSet(String)` method.
`Iterator` | `listImpl()` Implements the `Settings.list()` method.
`void` | `setImpl(String name, String value)` Implements the `Settings.set(String, String)` method.

Methods inherited from class org.apache.struts2.config.Settings
`get, getInstance, getLocale, getLocation, getLocationImpl, isSet, list, reset, set, setInstance`

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

Field Detail

### log

    protected Log log

  The logging instance for this class.

### delegate

    Settings delegate

  The Settings object that handles API calls.

Constructor Detail

### DefaultSettings

    public DefaultSettings()

  Constructs an instance by loading the standard property files, any custom property files (`struts.custom.properties`), and any custom message resources ().

  Since this constructor combines Settings from multiple resources, it utilizes a `DelegatingSettings` instance, and all API calls are handled by that instance.

Method Detail

### setImpl

    public void setImpl(String name,
                        String value)
                 throws IllegalArgumentException,
                        UnsupportedOperationException

  Description copied from class: `Settings`
  Implements the `Settings.set(String, String)` method.

  Overrides:
    `setImpl` in class `Settings`
  Parameters:
    `name` - Identifer for the setting to change.
    `value` - The new value for the setting.
  Throws:
    `IllegalArgumentException` - if an error occurs when setting the value.
    `UnsupportedOperationException` - if the config implementation does not support setting values.
  See Also:
    `Settings.set(String, String)`

### getImpl

    public String getImpl(String aName)
                   throws IllegalArgumentException

  Description copied from class: `Settings`
  Implements the `Settings.get(String)` method.

  Overrides:
    `getImpl` in class `Settings`
  Parameters:
    `aName` - The name of the setting value to retreive
  Returns:
    The setting value as a String
  Throws:
    `IllegalArgumentException` - if an error occurs when retrieving the value
  See Also:
    `Settings.get(String)`

### isSetImpl

    public boolean isSetImpl(String aName)

  Description copied from class: `Settings`
  Implements the `Settings.isSet(String)` method.

  Overrides:
    `isSetImpl` in class `Settings`
  Parameters:
    `aName` - Identifier for the setting value to change
  Returns:
    True if the setting exists and has a value, false otherwise.
  See Also:
    `Settings.isSet(String)`

### listImpl

    public Iterator listImpl()

  Description copied from class: `Settings`
  Implements the `Settings.list()` method.

  Overrides:
    `listImpl` in class `Settings`
  Returns:
    A list of the settings as an iterator
  See Also:
    `Settings.list()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.