org.objectweb.proactive.core.xml
Class XMLProperties

java.lang.Object
  extended byorg.objectweb.proactive.core.xml.XMLProperties

public class XMLProperties
extends java.lang.Object

Author:
The ProActive Team The class

Method Summary
static void clean()
          Call this static method to remove all XML properties.
static void load(java.lang.String file)
           
static void loadXML(java.lang.String file)
           
static void setDescriptorVariable(java.lang.String name, java.lang.String value, java.lang.String type)
          Static method to add a property.
static void setVariableValue(java.util.HashMap map, java.lang.String type)
          Static method to add a table of program set properties.
static void setVariableValue(java.lang.String name, java.lang.String value, java.lang.String typeName)
          Static method to add a new program set property.
static java.lang.String transform(java.lang.String value)
          Static method to transform a string with properties to decoded version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clean

public static void clean()
Call this static method to remove all XML properties. When a descriptor parsing fail with throwing a exception, you must clean properties manually.


transform

public static java.lang.String transform(java.lang.String value)
Static method to transform a string with properties to decoded version.

Parameters:
value - Text with properties inside to translates.
Returns:
string with properties swapped to their text value.

setVariableValue

public static void setVariableValue(java.lang.String name,
                                    java.lang.String value,
                                    java.lang.String typeName)
                             throws org.xml.sax.SAXException
Static method to add a new program set property.

Parameters:
name - The name of the property.
value - Text to swap with coding property name.
Throws:
org.xml.sax.SAXException

setVariableValue

public static void setVariableValue(java.util.HashMap map,
                                    java.lang.String type)
                             throws org.xml.sax.SAXException
Static method to add a table of program set properties.

Parameters:
map - HashMap with key=name:String and value=textToSwap:String.
Throws:
org.xml.sax.SAXException

setDescriptorVariable

public static void setDescriptorVariable(java.lang.String name,
                                         java.lang.String value,
                                         java.lang.String type)
                                  throws org.xml.sax.SAXException
Static method to add a property. It's possible to redefine property but only with same type.form descriptor.

Parameters:
name - The name of the property.
value - Text to swap with coding property name.
type - Type of property must be "constant", "overridable" or "programset".

If type is "constant", value must be set in descriptor, and it's impossible to redefine the value of the proterty.

If type is "overridable" value must be set in descriptor, and it's possible to redifine it with the API.

If type is "programset", value cannot be set in descriptor, value has to be defined with the API.

Throws:
org.xml.sax.SAXException

load

public static void load(java.lang.String file)
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

loadXML

public static void loadXML(java.lang.String file)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException


Copyright 2001-2005 INRIA All Rights Reserved.