public class DataModule extends FrameworkModule
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
dataType
The data type
|
protected Resource |
resource
The resource to reference the data source
|
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
DataModule(Service service,
PasswordHandler pHandler)
Creates a new instance of DataModule.
|
DataModule(Service service,
PasswordHandler pHandler,
org.licas_xml.abs.Element adminDataXml)
Creates a new instance of DataModule.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData()
Get the whole public data object.
|
java.lang.Object |
getData(org.licas_xml.abs.Element infoDescr)
Get the data object part defined by the description.
|
java.lang.String |
getDataType()
Get the data type.
|
Resource |
getResource()
Get the data resource object.
|
void |
initialiseData(org.licas_xml.abs.Element adminDataXml)
Create the data resource.
|
boolean |
isEmpty()
Return true if the data module has no data references.
|
protected org.licas_xml.abs.Element |
resetXml(org.licas_xml.abs.Element dataXml)
Reset the XML to remove the coding to a string.
|
void |
setData(org.licas_xml.abs.Element dataXml)
This creates an appropriate
Resource object by parsing the XMl description. |
void |
setData(java.lang.String dataType,
java.lang.Object dataObj)
This creates a
Resource to store the data directly. |
canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType
getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUUID, setJarFile, setUUID
protected java.lang.String dataType
protected Resource resource
public DataModule(Service service, PasswordHandler pHandler) throws java.lang.Exception
service
- the parent service.pHandler
- the parent password handler.java.lang.Exception
- any error.public DataModule(Service service, PasswordHandler pHandler, org.licas_xml.abs.Element adminDataXml) throws java.lang.Exception
service
- the parent service.pHandler
- the parent password handler.adminDataXml
- xml description to create the data resource from.java.lang.Exception
- any error.public void initialiseData(org.licas_xml.abs.Element adminDataXml) throws java.lang.Exception
adminDataXml
- description of the resource with data value.java.lang.Exception
- any error.protected org.licas_xml.abs.Element resetXml(org.licas_xml.abs.Element dataXml)
dataXml
- the data that may be represented as a string.public void setData(java.lang.String dataType, java.lang.Object dataObj) throws java.lang.Exception
Resource
to store the data directly. This can be
dangerous because it overwrites the existing resource.dataType
- the data type.dataObj
- the data object.java.lang.Exception
- any error.public void setData(org.licas_xml.abs.Element dataXml) throws java.lang.Exception
Resource
object by parsing the XMl description.
This can be dangerous because it overwrites the existing resource.dataXml
- XML description of the data object to store.java.lang.Exception
- any error.public boolean isEmpty()
public Resource getResource()
public java.lang.String getDataType()
public java.lang.Object getData() throws java.lang.Exception
java.lang.Exception
- any error.public java.lang.Object getData(org.licas_xml.abs.Element infoDescr) throws java.lang.Exception
infoDescr
- optional description. Needs to be implemented in the resource.java.lang.Exception
- any error.