public class XMLAutoStarter extends AbstractAutoStartMechanism
AutoStartMechanism.Mode
Modifier and Type | Field and Description |
---|---|
protected Document |
doc |
protected URL |
fileUrl |
protected Element |
rootElement |
mode, open
Constructor and Description |
---|
XMLAutoStarter(StoreManager storeMgr,
ClassLoaderResolver clr)
Constructor, taking the XML file URL.
|
Modifier and Type | Method and Description |
---|---|
void |
addClass(StoreData data)
Method to add a class to the starter.
|
void |
close()
Performs the write to the XML file.
|
void |
deleteAllClasses()
Remove all classes from the starter.
|
void |
deleteClass(String className)
Method to remove a class from the starter
|
Collection<StoreData> |
getAllClassData()
Accessor for all auto start data for this starter.
|
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.
|
getMode, open, setMode
protected final URL fileUrl
protected Document doc
protected Element rootElement
public XMLAutoStarter(StoreManager storeMgr, ClassLoaderResolver clr) throws MalformedURLException
storeMgr
- The StoreManager managing the store that we are auto-starting.clr
- The ClassLoaderResolverMalformedURLException
- if an error occurs processing the URLpublic Collection<StoreData> getAllClassData() throws DatastoreInitialisationException
DatastoreInitialisationException
- If an error occurs in datastore initpublic boolean isOpen()
isOpen
in interface AutoStartMechanism
isOpen
in class AbstractAutoStartMechanism
public void close()
close
in interface AutoStartMechanism
close
in class AbstractAutoStartMechanism
public void addClass(StoreData data)
data
- The store data to addpublic void deleteClass(String className)
className
- The name of the class to remove.public void deleteAllClasses()
public String getStorageDescription()
Copyright © 2019. All rights reserved.