Interface XmlResource
- All Superinterfaces:
Element
,Resource
,java.io.Serializable
,XmlResourceBase
- All Known Subinterfaces:
IntegrationResource
public interface XmlResource extends XmlResourceBase
XmlResource
interface represents an Xml Resource. An Xml Resource is used
to read and write Xml documents to or from the file system, remote systems etc, and to provide
additional services to process Xml documents.
- Since:
- V4.4
-
Method Summary
Modifier and Type Method Description void
read()
Issues a read request to the default adapter of the XML Resource.void
read(java.lang.String adapterName)
Issues a read request to the adapter specified byadapterName
on the XML Resource.void
write()
Issues a write request to the default adapter of the XML Resource.void
write(java.lang.String adapterName)
Issues a write request to the adapter specified byadapterName
on the XML Resource.Methods inherited from interface com.ebasetech.xi.api.Element
getElementName, getElementType
Methods inherited from interface com.ebasetech.xi.api.XmlResourceBase
call, call, fetch, getDocument, setDocument, update
-
Method Details
-
read
void read() throws com.ebasetech.xi.exceptions.FormRuntimeExceptionIssues a read request to the default adapter of the XML Resource. Note that different adapters support different methods and not all adapters support this method.After the read request is processed, the
fetch()
method is called internally - this transfers any non-tabular field data from the resource to mapped form fields.If the resource is mapped to tables in the form, any table data should be transferred to the form after invoking this method using the
fetchTable()
method on the relevant tables.Javascript example (read an XML document from file):
// call the file adapter to load an XML document resources.PARAMS_XML.read(); // load the PARAMETERS table from the XML document tables.PARAMETERS.fetchTable();
- Throws:
com.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution- Since:
- V4.4
- See Also:
read(String)
-
read
void read(java.lang.String adapterName) throws com.ebasetech.xi.exceptions.FormRuntimeExceptionIssues a read request to the adapter specified byadapterName
on the XML Resource. Note that different adapters support different methods and not all adapters support this method.After the read request is processed, the
fetch()
method is called internally - this transfers any non-tabular field data from the resource to mapped form fields.If the resource is mapped to tables in the form, any table data should be transferred to the form after invoking this method using the
fetchTable()
method on the relevant tables.Javascript example (read an XML document from file):
// call the file adapter to load an XML document resources.PARAMS_XML.read("FILE1"); // load the PARAMETERS table from the XML document tables.PARAMETERS.fetchTable();
- Parameters:
adapterName
- the adapter to be called- Throws:
com.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution- Since:
- V4.4
- See Also:
read()
-
write
void write() throws com.ebasetech.xi.exceptions.FormRuntimeExceptionIssues a write request to the default adapter of the XML Resource. Note that different adapters support different methods and not all adapters support this method.Before the write request is processed, the
update()
method is called internally - this transfers any non-tabular field data to the resource from mapped form fields.If the resource is mapped to tables in the form, resource data must be updated prior to invoking this method; this is done using the
updateTable()
method on all relevant tables.Javascript example (write a XML document to file):
// update the ORDERS table in the XML document tables.ORDERS.updateTable(); // call the file adapter to write an XML document resources.ORDERS_XML.write();
- Throws:
com.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution- Since:
- V4.4
- See Also:
write(String)
-
write
void write(java.lang.String adapterName) throws com.ebasetech.xi.exceptions.FormRuntimeExceptionIssues a write request to the adapter specified byadapterName
on the XML Resource. Note that different adapters support different methods and not all adapters support this method.Before the write request is processed, the
update()
method is called internally - this transfers any non-tabular field data to the resource from mapped form fields.If the resource is mapped to tables in the form, resource data must be updated prior to invoking this method; this is done using the
updateTable()
method on all relevant tables.Javascript example (write a XML document to file):
// update the ORDERS table in the XML document tables.ORDERS.updateTable(); // call the file adapter to write an XML document resources.ORDERS_XML.write("FILE1");
- Parameters:
adapterName
- the adapter to be called- Throws:
com.ebasetech.xi.exceptions.FormRuntimeException
- if any error occurs during execution- Since:
- V4.4
- See Also:
write()
-