|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.xml.VariableContract
This class provides a Variable Contract between the deployment descriptor and the application program. Variables can be defined of different types, thus inforcing different requirements to the contract.
Nested Class Summary | |
static class |
VariableContract.Lock
Class used for exclusive acces to global static variable: org.objectweb.proactive.core.xml.XMLProperties.xmlproperties |
Field Summary | |
static VariableContract.Lock |
lock
|
static VariableContract |
xmlproperties
|
Constructor Summary | |
VariableContract()
Constructor of the class. |
Method Summary | |
boolean |
checkContract()
Checks if there are empty values in the contract. |
void |
close()
Marks the contract as closed. |
java.lang.String |
getValue(java.lang.String name)
Returns the value of the variable name passed as parameter. |
boolean |
isClosed()
Tells wether this contract is closed or not. |
void |
load(java.lang.String file)
Loads the variable contract from a Java Properties file format |
void |
loadXML(java.lang.String file)
Loads a file with Variable Contract tags into the this instance. |
void |
setDescriptorVariable(java.lang.String name,
java.lang.String value,
VariableContractType type)
Method for setting variables value from the deploying application. |
void |
setDescriptorVariableOLD(java.lang.String name,
java.lang.String value,
VariableContractType type)
|
void |
setVariableFromProgram(java.util.HashMap map,
VariableContractType type)
Method for setting a group of variables from the program. |
void |
setVariableFromProgram(java.lang.String name,
java.lang.String value,
VariableContractType type)
Method for setting variables value from the deploying application. |
void |
setVariableFromProgramOLD(java.lang.String name,
java.lang.String value,
VariableContractType type)
|
java.lang.String |
toString()
|
java.lang.String |
transform(java.lang.String text)
TODO Method to transform a variable to it's value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static VariableContract xmlproperties
public static final VariableContract.Lock lock
Constructor Detail |
public VariableContract()
Method Detail |
public void close()
public boolean isClosed()
public void setVariableFromProgram(java.lang.String name, java.lang.String value, VariableContractType type)
name
- The name of the variable.value
- Value of the variable
java.lang.NullPointerException
- if the arguments are null.
java.lang.IllegalArgumentException
- if setting the value breaches the variable (contract) typepublic void setVariableFromProgram(java.util.HashMap map, VariableContractType type) throws java.lang.NullPointerException
java.lang.NullPointerException
- if the arguments are null.
java.lang.IllegalArgumentException
- if setting the value breaches the variable (contract) typesetVariableFromProgram(String name, String value, VariableContractType type)
public void setDescriptorVariable(java.lang.String name, java.lang.String value, VariableContractType type)
name
- The name of the variable.value
- Value of the variable
java.lang.NullPointerException
- if the arguments are null.
java.lang.IllegalArgumentException
- if setting the value breaches the variable (contract) typepublic void load(java.lang.String file) throws org.xml.sax.SAXException
file
- The file location.
org.xml.sax.SAXException
public void loadXML(java.lang.String file)
file
- public java.lang.String getValue(java.lang.String name)
name
- The name of the variable.
public java.lang.String transform(java.lang.String text)
text
- Text with properties inside to translates.
public boolean checkContract()
public java.lang.String toString()
public void setDescriptorVariableOLD(java.lang.String name, java.lang.String value, VariableContractType type)
public void setVariableFromProgramOLD(java.lang.String name, java.lang.String value, VariableContractType type) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
java.lang.NullPointerException
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |