public class MetaFactoryService
extends java.lang.Object
Constructor and Description |
---|
MetaFactoryService() |
Modifier and Type | Method and Description |
---|---|
static void |
addUUIDAttribute(org.licas_xml.abs.Element xmlElem,
java.lang.String uuidValue)
Add an
Const.UUID attribute to the base XML element. |
java.lang.String |
asFaultComm(java.lang.String commID)
Convert the comm ID into a fault comm ID.
|
java.lang.String |
asServiceComm(java.lang.String commID)
Convert the comm ID into a service comm ID.
|
org.licas_xml.abs.Element |
createAddInstanceValue(org.licas_xml.abs.Element valuesXml,
java.lang.String varName,
java.lang.Class varType)
Add a new instance value to the instance values section.
|
org.licas_xml.abs.Element |
createAddInstanceValue(org.licas_xml.abs.Element valuesXml,
java.lang.String varName,
java.lang.Object varInstance)
Add a new instance value to the instance values section.
|
static org.licas_xml.abs.Element |
createAdmin(AdminInfo adminInfo)
Create an Admin script that can be used to initialise a service with.
|
org.licas_xml.abs.Element |
createLoadService(java.lang.String serviceUuid,
java.lang.String serviceType,
java.lang.String serviceClass,
java.util.ArrayList<java.lang.String> jarFiles,
java.util.ArrayList<java.lang.Object> params)
Create an XML element that can be used as part of a script to define a
service to dynamically create and load into another one.
|
org.licas_xml.abs.Element |
createSerialize(java.util.ArrayList<java.lang.String> varNames,
boolean includeAdmin,
java.util.ArrayList<java.lang.String> toRemove)
Create a list of variable names to be serialized as the service object.
|
org.licas_xml.abs.Element |
createSerialize(java.util.ArrayList varNames,
boolean includeAdmin)
Create a list of variable names to be serialized as the service object.
|
boolean |
isFaultComm(java.lang.String commID)
Return true if the comm ID is coded as a fault comm ID.
|
boolean |
isServiceComm(java.lang.String commID)
Return true if the comm ID is coded as a service comm ID.
|
org.licas_xml.abs.Element |
serverMeta(org.licas_xml.abs.Element serverXml,
java.lang.String metaType)
Get the element representing the meta type for an XML description of a server.
|
public static org.licas_xml.abs.Element createAdmin(AdminInfo adminInfo) throws java.lang.Exception
<Admin></Admin>
and populates
it with the field values of the AdminInfo
object.adminInfo
- an admin document with values to initialise a service with.java.lang.Exception
- any error.public static void addUUIDAttribute(org.licas_xml.abs.Element xmlElem, java.lang.String uuidValue)
Const.UUID
attribute to the base XML element. This will overwrite
any existing attribute.xmlElem
- the element to add the attribute to.uuidValue
- the value of the uuid.public org.licas_xml.abs.Element createLoadService(java.lang.String serviceUuid, java.lang.String serviceType, java.lang.String serviceClass, java.util.ArrayList<java.lang.String> jarFiles, java.util.ArrayList<java.lang.Object> params)
Const
.SERVICESTOLOAD
, for example - see the admin user guide.serviceUuid
- the service uuid.serviceType
- the service type.serviceClass
- the service classname.jarFiles
- a list of required jar files.params
- list of constructor parameters for the service. Can be of
a simple type, like String, Integer or an XML Element and the service must
know what they represent.
<serviceType Name="serviceUUID"><Class_Name>serviceClass</Class_Name>
<Jar_Files><Jar_File>Jar file path</Jar_File></Jar_Files>
<Ps><Param>String or XML param</Param></Ps></serviceType>
public org.licas_xml.abs.Element createAddInstanceValue(org.licas_xml.abs.Element valuesXml, java.lang.String varName, java.lang.Object varInstance) throws java.lang.Exception
valuesXml
- the instance values section. If null it is created first.varName
- the name of the variable, as written in the class.varInstance
- the actual instance to serializeToString. This will also check if
the parser is present for a complex object.
<Instance_Values><Instance_Value Name="variableName"><Object_Type Ct="class_type">
<Object_Variable>Serialized code</Object_Variable></Object_Type></Instance_Value>
</Instance_Values>
java.lang.Exception
- any error.public org.licas_xml.abs.Element createAddInstanceValue(org.licas_xml.abs.Element valuesXml, java.lang.String varName, java.lang.Class varType)
valuesXml
- the instance values section. If null it is created first.varName
- the name of the variable, as written in the class.varType
- only add the variable type and leave the value missing. This is
then used for later serializations, when the value gets added.
<Instance_Values><Instance_Value Name="variableName"><Object_Type Ct="class_type">
</Object_Type></Instance_Value></Instance_Values>
public org.licas_xml.abs.Element createSerialize(java.util.ArrayList varNames, boolean includeAdmin)
varNames
- the list of variables to serialize.includeAdmin
- if true add a MetaConst
.ADMIN
value to
indicate to include the admin document information. If true, some
admin fields are automatically removed, for safety reasons.public org.licas_xml.abs.Element createSerialize(java.util.ArrayList<java.lang.String> varNames, boolean includeAdmin, java.util.ArrayList<java.lang.String> toRemove)
varNames
- the list of variables to serialize.includeAdmin
- if true add a MetaConst
.ADMIN
value to
indicate to include the admin document information.toRemove
- if any admin section is indicated here through the XML tag name,
it is removed first. If included, includeAdmin
must also be true.public org.licas_xml.abs.Element serverMeta(org.licas_xml.abs.Element serverXml, java.lang.String metaType)
public boolean isServiceComm(java.lang.String commID)
commID
- the communication id.public boolean isFaultComm(java.lang.String commID)
commID
- the communication id.public java.lang.String asServiceComm(java.lang.String commID)
commID
- the communication id to convert.public java.lang.String asFaultComm(java.lang.String commID)
commID
- the communication id to convert.