org.objectweb.jonathan.libs.kernel.decoders

Class PropertiesDecoder

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, Properties _props, String[] _except, boolean _force)
Imports properties in the given context, save those whose keys begin with an excepted prefix.
void
importProperty(Context _context, String _name, String _value, boolean _force)
Imports a property in the given context.

Constructor Details

PropertiesDecoder

public PropertiesDecoder()

Method Details

importProperties

public void importProperties(Context _configuration,
                             Properties _props,
                             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,
                           String _name,
                           String _value,
                           boolean _force)
Imports a property in the given context.
Specified by:
importProperty in interface Properties2Configuration

Parameters:
_name - the property name
_value - the property value
_force - forces element overwriting