org.dmonix.xml
Class XMLPropertyHandler

java.lang.Object
  extended byorg.dmonix.xml.XMLPropertyHandler

public abstract class XMLPropertyHandler
extends java.lang.Object

Copyright: Copyright (c) 2003

Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Field Summary
protected static org.w3c.dom.Document properties
           
 
Constructor Summary
XMLPropertyHandler()
           
 
Method Summary
static boolean getBooleanProperty(java.lang.String property)
          Get the value of a Boolean property.
static boolean getBooleanProperty(java.lang.String property, boolean defaultValue)
          Get the value of a Boolean property.
static java.lang.String getProperty(java.lang.String property)
          Get the value of an property.
static java.lang.String getProperty(java.lang.String property, java.lang.String defaultValue)
          Get the value of an property.
static boolean parsePropertyFile(java.io.File file)
           
static void savePropertyFile(java.io.File file)
           
static void setProperty(java.lang.String name, boolean value, boolean append)
          Set a property value
static void setProperty(java.lang.String name, int value, boolean append)
           
static void setProperty(java.lang.String name, long value, boolean append)
           
static void setProperty(java.lang.String name, java.lang.String value, boolean append)
           
static void setTransformerProperty(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

protected static org.w3c.dom.Document properties
Constructor Detail

XMLPropertyHandler

public XMLPropertyHandler()
Method Detail

getBooleanProperty

public static boolean getBooleanProperty(java.lang.String property,
                                         boolean defaultValue)
Get the value of a Boolean property.

Parameters:
property - The name of the property to get
defaultValue - The value to return if the method fails
Returns:
true if the property is true, default value otherwise

getBooleanProperty

public static boolean getBooleanProperty(java.lang.String property)
Get the value of a Boolean property.

Parameters:
property - The name of the property to get
Returns:
true if the property is true, false otherwise

getProperty

public static java.lang.String getProperty(java.lang.String property)
Get the value of an property.

Parameters:
property - The name of the property to get
Returns:
The value of the property if found, null otherwise

getProperty

public static java.lang.String getProperty(java.lang.String property,
                                           java.lang.String defaultValue)
Get the value of an property.

Parameters:
property - The name of the property to get
defaultValue - The value to return if the method fails
Returns:
The value of the property if found, default value otherwise

parsePropertyFile

public static boolean parsePropertyFile(java.io.File file)

savePropertyFile

public static void savePropertyFile(java.io.File file)

setProperty

public static void setProperty(java.lang.String name,
                               boolean value,
                               boolean append)
Set a property value

Parameters:
name - The name of the property
value - The value of the property
append -

setProperty

public static void setProperty(java.lang.String name,
                               int value,
                               boolean append)

setProperty

public static void setProperty(java.lang.String name,
                               long value,
                               boolean append)

setProperty

public static void setProperty(java.lang.String name,
                               java.lang.String value,
                               boolean append)

setTransformerProperty

public static void setTransformerProperty(java.lang.String name,
                                          java.lang.String value)


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.