org.objectweb.jonathan.libs.kernel.decoders
Class PropertiesDecoder

java.lang.Object
  extended by org.objectweb.jonathan.libs.kernel.decoders.PropertiesDecoder
All Implemented Interfaces:
Properties2Configuration

public class PropertiesDecoder
extends java.lang.Object
implements Properties2Configuration

Common properties to configuration implementation. May also create JAtom components.


Constructor Summary
PropertiesDecoder()
           
 
Method Summary
 void importProperties(Context _configuration, java.util.Properties _props, java.lang.String[] _except, boolean _force)
          Imports properties in the given context, save those whose keys begin with an excepted prefix.
 void importProperty(Context _context, java.lang.String _name, java.lang.String _value, boolean _force)
          Imports a property in the given context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesDecoder

public PropertiesDecoder()
Method Detail

importProperties

public void importProperties(Context _configuration,
                             java.util.Properties _props,
                             java.lang.String[] _except,
                             boolean _force)
Imports properties in the given context, save those whose keys begin with an excepted prefix. A property whose name ends with .atom is not translated into a JProperty, but into a JAtom whose element name is the remaining part of the property key.

Specified by:
importProperties in interface Properties2Configuration
Parameters:
_configuration - where the imported properties are added
_props - the properties to import
_except - the rejected property prefixes
_force - forces element overwriting

importProperty

public void importProperty(Context _context,
                           java.lang.String _name,
                           java.lang.String _value,
                           boolean _force)
Imports a property in the given context.

Specified by:
importProperty in interface Properties2Configuration
Parameters:
_configuration - where the imported property is added
_name - the property name
_value - the property value
_force - forces element overwriting