|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.XMLAutoStarter
An auto-starter mechanism storing its definition in an XML file. Is independent of the datastore since it is stored as a file and not in the actual datastore. TODO Add a JPOXAutoStart DTD to validate the file automatically. TODO If we have one per PMF, need to guarantee unique naming of file.
Field Summary | |
protected org.w3c.dom.Document |
doc
|
protected java.net.URL |
fileUrl
|
protected static Localiser |
LOCALISER
|
protected java.lang.String |
mode
|
protected org.w3c.dom.Element |
rootElement
|
static java.lang.String |
XML_STARTER
XML auto starter |
Fields inherited from interface org.jpox.store.AutoStartMechanism |
MODE_CHECKED, MODE_IGNORED, MODE_QUIET, NONE |
Constructor Summary | |
XMLAutoStarter(java.net.URL fileUrl)
Constructor, taking the XML file URL. |
Method Summary | |
void |
addClass(StoreData data)
Method to add a class to the starter. |
void |
close()
Closes a transaction for writing (add/delete) classes to the auto start mechanism |
void |
deleteAllClasses()
Method to remove all classes from the starter. |
void |
deleteClass(java.lang.String className)
Method to remove a class from the starter |
java.util.Collection |
getAllClassData()
Accessor for all auto start data for this starter. |
java.lang.String |
getMode()
Accessor for the mode of operation |
java.lang.String |
getStorageDescription()
Method to give a descriptive name for the starter process. |
boolean |
isOpen()
Whether it's open for writing (add/delete) classes to the auto start mechanism |
void |
open()
Starts a transaction for writting (add/delete) classes to the auto start mechanism |
void |
setMode(java.lang.String mode)
Mutator for the mode of operation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_STARTER
protected static final Localiser LOCALISER
protected java.lang.String mode
protected final java.net.URL fileUrl
protected org.w3c.dom.Document doc
protected org.w3c.dom.Element rootElement
Constructor Detail |
public XMLAutoStarter(java.net.URL fileUrl)
fileUrl
- The file URLMethod Detail |
public java.lang.String getMode()
getMode
in interface AutoStartMechanism
public void setMode(java.lang.String mode)
setMode
in interface AutoStartMechanism
mode
- The mode of operationpublic java.util.Collection getAllClassData() throws DatastoreInitialisationException
getAllClassData
in interface AutoStartMechanism
DatastoreInitialisationException
public void open()
open
in interface AutoStartMechanism
public boolean isOpen()
isOpen
in interface AutoStartMechanism
public void close()
close
in interface AutoStartMechanism
public void addClass(StoreData data)
addClass
in interface AutoStartMechanism
data
- The store data to addpublic void deleteClass(java.lang.String className)
deleteClass
in interface AutoStartMechanism
className
- The name of the class to remove.public void deleteAllClasses()
deleteAllClasses
in interface AutoStartMechanism
public java.lang.String getStorageDescription()
getStorageDescription
in interface AutoStartMechanism
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |