|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.AbstractAutoStartMechanism
org.jpox.store.XMLAutoStarter
public class 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 org.w3c.dom.Element |
rootElement
|
| Fields inherited from class org.jpox.store.AbstractAutoStartMechanism |
|---|
LOCALISER, mode, open |
| Fields inherited from interface org.jpox.store.AutoStartMechanism |
|---|
MODE_CHECKED, MODE_IGNORED, MODE_QUIET, NONE |
| Constructor Summary | |
|---|---|
XMLAutoStarter(StoreManager storeMgr,
ClassLoaderResolver clr)
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 |
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 |
| Methods inherited from class org.jpox.store.AbstractAutoStartMechanism |
|---|
getMode, open, setMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.net.URL fileUrl
protected org.w3c.dom.Document doc
protected org.w3c.dom.Element rootElement
| Constructor Detail |
|---|
public XMLAutoStarter(StoreManager storeMgr,
ClassLoaderResolver clr)
throws java.net.MalformedURLException
storeMgr - The StoreManager managing the store that we are auto-starting.clr - The ClassLoaderResolver
java.net.MalformedURLException| Method Detail |
|---|
public java.util.Collection getAllClassData()
throws DatastoreInitialisationException
DatastoreInitialisationExceptionpublic boolean isOpen()
isOpen in interface AutoStartMechanismisOpen in class AbstractAutoStartMechanismpublic void close()
close in interface AutoStartMechanismclose in class AbstractAutoStartMechanismpublic void addClass(StoreData data)
data - The store data to addpublic void deleteClass(java.lang.String className)
className - The name of the class to remove.public void deleteAllClasses()
public java.lang.String getStorageDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||