|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPFileProperty
public class XPFileProperty
Loads an XML file containing name/value pairs. The format for this file looks like this:
<?xml version="1.0" encoding="UTF-8"?> <properties> <surf>is up</surf> <database> testDB </database> <CHANGELIST>koOOoky</CHANGELIST> </properties>
Constructor Summary | |
---|---|
XPFileProperty(java.lang.String file_location,
java.lang.String file_name)
Loads XML property file from the file_location with the file_name. |
Method Summary | |
---|---|
void |
Clear()
Clears this this XPFileProperty set. |
IXPEnumerator |
GetKeys()
Returns an enumeration of keys. |
java.lang.String |
GetProperty(java.lang.String key)
Returns the selected property Returns null if the key does not existed. |
XPStringDictionary |
GetStringDictionary()
return a string dictionary. |
void |
RemoveProperty(java.lang.String key)
Removes a specific key in the property object. |
void |
Save()
Saves the property object to the file that was opened. |
void |
SetProperty(java.lang.String name,
java.lang.String val)
Sets a property. |
void |
SetStringDictionary(XPStringDictionary sd)
sets the properties object from a string dictionary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPFileProperty(java.lang.String file_location, java.lang.String file_name)
file_location
- - full file location e.g. c:\temp\dir1file_name
- - property file name.
XPException
- wrapping any underlying platform exception other than FileNotFound (fix to 24946).Method Detail |
---|
public java.lang.String GetProperty(java.lang.String key)
key
- - the key for the property you are interested in
public XPStringDictionary GetStringDictionary()
public void SetStringDictionary(XPStringDictionary sd)
sd
- Input XPStringDictionary to set the current StringDictionary.public IXPEnumerator GetKeys()
public void SetProperty(java.lang.String name, java.lang.String val)
name
- - the name of the property to setval
- - the value of the property to set
This does not save the properties file, you must
explicitly select save to store the filepublic void RemoveProperty(java.lang.String key)
key
- - the key you want to removepublic void Clear()
public void Save()
XPException
- wrapping any underlying platform exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |