BeanIO 1.2.3

org.beanio.util
Class Settings

java.lang.Object
  extended by org.beanio.util.Settings

public class Settings
extends Object

Settings is used to load and store BeanIO configuration settings. All settings are global within the Java virtual machine.

Default BeanIO settings can be overridden using a property file named beanio.properties The file will be loaded from the current working directory or from anywhere on the classpath. The default configuration filename can be overridden using the System property org.beanio.configuration.

Configuration settings can be further overridden by any System property of the same name when the configuration file is loaded.

Since:
1.0
Author:
Kevin Seim

Field Summary
static String DEFAULT_DATE_FORMAT
          The default date format pattern for fields assigned type alias Date
static String DEFAULT_DATETIME_FORMAT
          The default date format pattern for fields assigned type alias DateTime or of type java.util.Date
static String DEFAULT_MARSHALLING_ENABLED
          Whether a configured field default is marshalled for null property values.
static String DEFAULT_TIME_FORMAT
          The default date format pattern for fields assigned type alias Time
static String DEFAULT_XML_TYPE
          The default XML type for a field definition, set to element or attribute.
static String DEFAULT_XSI_NAMESPACE_PREFIX
          The default namespace prefix for 'http://www.w3.org/2001/XMLSchema-instance'
static String PROPERTY_ESCAPING_ENABLED
          Whether property values support the following escape sequences: \\ - Backslash \n - Line Feed \r - Carriage Return \t - Tab \f - Form Feed
static String STREAM_FACTORY_CLASS
          This property is set to the fully qualified class name of the default stream factory implementation
static String XML_WRITER_UPDATE_STATE_USING_DELTA
          Used for Spring Batch integration.
 
Method Summary
static Settings getInstance()
          Returns the Settings instance.
 String getProperty(String key)
          Returns a BeanIO configuration setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STREAM_FACTORY_CLASS

public static final String STREAM_FACTORY_CLASS
This property is set to the fully qualified class name of the default stream factory implementation

See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

public static final String DEFAULT_DATE_FORMAT
The default date format pattern for fields assigned type alias Date

See Also:
Constant Field Values

DEFAULT_DATETIME_FORMAT

public static final String DEFAULT_DATETIME_FORMAT
The default date format pattern for fields assigned type alias DateTime or of type java.util.Date

See Also:
Constant Field Values

DEFAULT_TIME_FORMAT

public static final String DEFAULT_TIME_FORMAT
The default date format pattern for fields assigned type alias Time

See Also:
Constant Field Values

PROPERTY_ESCAPING_ENABLED

public static final String PROPERTY_ESCAPING_ENABLED
Whether property values support the following escape sequences:

A backslash preceding any other character is ignored.

Set to false to disable.

Since:
1.2
See Also:
Constant Field Values

DEFAULT_XML_TYPE

public static final String DEFAULT_XML_TYPE
The default XML type for a field definition, set to element or attribute.

See Also:
Constant Field Values

DEFAULT_XSI_NAMESPACE_PREFIX

public static final String DEFAULT_XSI_NAMESPACE_PREFIX
The default namespace prefix for 'http://www.w3.org/2001/XMLSchema-instance'

See Also:
Constant Field Values

XML_WRITER_UPDATE_STATE_USING_DELTA

public static final String XML_WRITER_UPDATE_STATE_USING_DELTA
Used for Spring Batch integration. Set to 'true' to have the XmlWriter only update the execution context (state) with changes since the last update. At the time of writing, it's not known whether Spring Batch will create a new ExecutionContext every time state is updated, or if the current context is used. Disabled by default until proven the optimization will not impact state updates.

See Also:
Constant Field Values

DEFAULT_MARSHALLING_ENABLED

public static final String DEFAULT_MARSHALLING_ENABLED
Whether a configured field default is marshalled for null property values. The default configuration sets this property to true.

Since:
1.2.2
See Also:
Constant Field Values
Method Detail

getProperty

public String getProperty(String key)
Returns a BeanIO configuration setting.

Parameters:
key - the name of the setting
Returns:
the value of the setting, or null if the name is invalid

getInstance

public static Settings getInstance()
Returns the Settings instance.

Returns:
the Settings

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim