org.apache.commons.configuration2.plist

## Class PropertyListConfiguration

- java.lang.Object
- - org.apache.commons.configuration2.event.BaseEventSource
  - - org.apache.commons.configuration2.AbstractConfiguration
    - - org.apache.commons.configuration2.AbstractHierarchicalConfiguration<ImmutableNode>
      - - org.apache.commons.configuration2.BaseHierarchicalConfiguration
        - - org.apache.commons.configuration2.plist.PropertyListConfiguration

- All Implemented Interfaces:
    Cloneable, Configuration, EventSource, FileBasedConfiguration, HierarchicalConfiguration<ImmutableNode>, ImmutableConfiguration, ImmutableHierarchicalConfiguration, FileBased, SynchronizerSupport, InMemoryNodeModelSupport, NodeKeyResolver<ImmutableNode>, NodeModelSupport<ImmutableNode>

      public class PropertyListConfiguration
      extends BaseHierarchicalConfiguration
      implements FileBasedConfiguration

  NeXT / OpenStep style configuration. This configuration can read and write ASCII plist files. It supports the GNUStep extension to specify date objects.

  References:

  - Apple Documentation - Old-Style ASCII Property Lists
  - GNUStep Documentation

  Example:

       {
           foo = "bar";

           array = ( value1, value2, value3 );

           data = <4f3e0145ab>;

           date = <*D2007-05-05 20:05:00 +0100>;

           nested =
           {
               key1 = value1;
               key2 = value;
               nested =
               {
                   foo = bar
               }
           }
       }

  Since:
    1.2
  Version:
    $Id: PropertyListConfiguration.java 1679795 2015-05-16 17:51:13Z oheger $
  Author:
    Emmanuel Bourg

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.commons.configuration2.BaseHierarchicalConfiguration

      `BaseHierarchicalConfiguration.BuilderVisitor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyListConfiguration()` Creates an empty PropertyListConfiguration object which can be used to synthesize a new plist file by adding values and then saving().
    `PropertyListConfiguration(HierarchicalConfiguration<ImmutableNode> c)` Creates a new instance of `PropertyListConfiguration` and copies the content of the specified configuration into this object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addPropertyInternal(String key, Object value)` Adds the property with the specified key.
    `void` | `read(Reader in)` Reads the content of this object from the given reader.
    `protected void` | `setPropertyInternal(String key, Object value)` Sets the value of the specified property.
    `void` | `write(Writer out)` Writes the content of this object to the given writer.

    - ### Methods inherited from class org.apache.commons.configuration2.BaseHierarchicalConfiguration

      `childConfigurationsAt, childConfigurationsAt, cloneNodeModel, configurationAt, configurationAt, configurationsAt, configurationsAt, createSubConfigurationForTrackedNode, getNodeModel, getSubConfigurationNodeSelector, getSubConfigurationParentModel, immutableChildConfigurationsAt, immutableConfigurationAt, immutableConfigurationAt, immutableConfigurationsAt, initSubConfigurationForThisParent, interpolatedConfiguration, subnodeConfigurationChanged, subset`

    - ### Methods inherited from class org.apache.commons.configuration2.AbstractHierarchicalConfiguration

      `addNodes, addNodesInternal, addPropertyDirect, clearInternal, clearPropertyDirect, clearTree, clearTreeInternal, clone, containsKeyInternal, fetchNodeList, getExpressionEngine, getKeysInternal, getKeysInternal, getMaxIndex, getMaxIndexInternal, getModel, getPropertyInternal, getRootElementName, getRootElementNameInternal, isEmptyInternal, nodeDefined, nodeKey, resolveAddKey, resolveKey, resolveNodeKey, resolveUpdateKey, setExpressionEngine, sizeInternal`

    - ### Methods inherited from class org.apache.commons.configuration2.AbstractConfiguration

      `addErrorLogListener, addProperty, append, beginRead, beginWrite, clear, clearProperty, cloneInterpolator, containsKey, copy, endRead, endWrite, get, get, getArray, getArray, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCollection, getCollection, getConfigurationDecoder, getConversionHandler, getDouble, getDouble, getDouble, getEncodedString, getEncodedString, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getKeys, getKeys, getList, getList, getList, getList, getListDelimiterHandler, getLogger, getLong, getLong, getLong, getProperties, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, getSynchronizer, immutableSubset, initLogger, installInterpolator, interpolate, interpolate, isEmpty, isScalarValue, isThrowExceptionOnMissing, lock, setConfigurationDecoder, setConversionHandler, setDefaultLookups, setInterpolator, setListDelimiterHandler, setLogger, setParentInterpolator, setPrefixLookups, setProperty, setSynchronizer, setThrowExceptionOnMissing, size, unlock`

    - ### Methods inherited from class org.apache.commons.configuration2.event.BaseEventSource

      `addEventListener, clearErrorListeners, clearEventListeners, copyEventListeners, createErrorEvent, createEvent, fireError, fireEvent, getEventListenerRegistrations, getEventListeners, isDetailEvents, removeEventListener, setDetailEvents`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.configuration2.Configuration

      `addProperty, clear, clearProperty, getInterpolator, installInterpolator, setInterpolator, setProperty, subset`

    - ### Methods inherited from interface org.apache.commons.configuration2.ImmutableConfiguration

      `containsKey, get, get, getArray, getArray, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCollection, getCollection, getDouble, getDouble, getDouble, getEncodedString, getEncodedString, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getKeys, getList, getList, getList, getList, getLong, getLong, getLong, getProperties, getProperty, getShort, getShort, getShort, getString, getString, getStringArray, immutableSubset, isEmpty, size`

    - ### Methods inherited from interface org.apache.commons.configuration2.sync.SynchronizerSupport

      `getSynchronizer, lock, setSynchronizer, unlock`

- - ### Constructor Detail

    - #### PropertyListConfiguration

          public PropertyListConfiguration()

      Creates an empty PropertyListConfiguration object which can be used to synthesize a new plist file by adding values and then saving().

    - #### PropertyListConfiguration

          public PropertyListConfiguration(HierarchicalConfiguration<ImmutableNode> c)

      Creates a new instance of `PropertyListConfiguration` and copies the content of the specified configuration into this object.
      Parameters:
        `c` - the configuration to copy
      Since:
        1.4

  - ### Method Detail

    - #### setPropertyInternal

          protected void setPropertyInternal(String key,
                                             Object value)

      Description copied from class: `AbstractHierarchicalConfiguration`
      Sets the value of the specified property.
      Overrides:
        `setPropertyInternal` in class `AbstractHierarchicalConfiguration<ImmutableNode>`
      Parameters:
        `key` - the key of the property to set
        `value` - the new value of this property

    - #### addPropertyInternal

          protected void addPropertyInternal(String key,
                                             Object value)

      Description copied from class: `AbstractHierarchicalConfiguration`
      Adds the property with the specified key. This task will be delegated to the associated `ExpressionEngine`, so the passed in key must match the requirements of this implementation.
      Overrides:
        `addPropertyInternal` in class `AbstractHierarchicalConfiguration<ImmutableNode>`
      Parameters:
        `key` - the key of the new property
        `value` - the value of the new property

    - #### read

          public void read(Reader in)
                    throws ConfigurationException

      Description copied from interface: `FileBased`
      Reads the content of this object from the given reader.
      Specified by:
        `read` in interface `FileBased`
      Parameters:
        `in` - the reader
      Throws:
        `ConfigurationException` - if a non-I/O related problem occurs, e.g. the data read does not have the expected format

    - #### write

          public void write(Writer out)
                     throws ConfigurationException

      Description copied from interface: `FileBased`
      Writes the content of this object to the given writer.
      Specified by:
        `write` in interface `FileBased`
      Parameters:
        `out` - the writer
      Throws:
        `ConfigurationException` - if a non-I/O related problem occurs, e.g. the data read does not have the expected format

Copyright © 2001–2016 The Apache Software Foundation. All rights reserved.