public final class FndXmlUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
directionMatches(FndXmlSerializer xml,
FndAttribute attr)
Checks if the direction of an attribute (parameter) matches the direction of the formatted record.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
boolean addRecordAttributes)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
boolean addRecordAttributes,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
boolean addRecordAttributes,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
int flags)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
int flags,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
java.lang.String namespace)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecord(FndAbstractRecord record,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecordArray(FndAbstractArray array,
boolean addRecordAttributes,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats an array of records into a utf-8 encoded xml string.
|
static byte[] |
formatAndDestroyRecordArray(FndAbstractArray array,
int flags,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats an array of records into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
boolean addRecordAttributes)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
boolean addRecordAttributes,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
boolean addRecordAttributes,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
int flags)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
int flags,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
java.lang.String namespace)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecord(FndAbstractRecord record,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats a record into a utf-8 encoded xml string.
|
static byte[] |
formatRecordArray(FndAbstractArray array,
boolean addRecordAttributes,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats an array of records into a utf-8 encoded xml string.
|
static byte[] |
formatRecordArray(FndAbstractArray array,
int flags,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Formats an array of records into a utf-8 encoded xml string.
|
static byte[] |
generateXmlExample(FndAbstractRecord record,
java.lang.String namespace)
Generates an XML example file for a record.
|
static byte[] |
generateXmlExample(FndAbstractRecord record,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Generates an XML example file for a record.
|
static byte[] |
generateXmlExampleForArray(FndAbstractArray array,
FndAbstractRecord record,
java.lang.String namespace)
Generates an XML example file for an array
|
static byte[] |
generateXmlExampleForQuery(FndAbstractRecord record,
java.lang.String namespace)
Generates an XML example file for a query condition.
|
static byte[] |
generateXsdSchema(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Generates an XSD schema for a view.
|
static byte[] |
generateXsdSchema(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction,
boolean query)
Generates an XSD schema for a view.
|
static java.lang.String |
generateXsdSchemaAsString(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction,
boolean query)
Deprecated.
This method converts byte[] to String. Use the method that returns byte[].
|
static byte[] |
generateXsdSchemaForArray(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Generates an XSD schema for an array.
|
static java.lang.String |
generateXsdSchemaForArrayAsString(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Deprecated.
This method converts byte[] to String. Use the method that returns byte[].
|
static byte[] |
generateXsdSchemaForQuery(FndAbstractRecord rec,
FndValidationMeta validation,
boolean omitXmlDeclaration,
java.lang.String namespace,
FndRecordFormat.Direction direction)
Generates an XSD schema for a query view.
|
static java.lang.String |
getViewName(FndAbstractRecord view,
FndRecordFormat.Direction direction)
Gets the name of a view used in XML and XSD documents.
|
static void |
parseRecord(byte[] data,
FndAbstractRecord record)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecord(byte[] data,
FndAbstractRecord record,
boolean allowNewAttributes)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecord(byte[] data,
FndAbstractRecord record,
FndRecordFormat.Direction direction)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecord(java.io.InputStream data,
FndAbstractRecord record,
boolean caseSensitive)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecord(java.io.InputStream data,
FndAbstractRecord record,
boolean caseSensitive,
boolean allowNewAttributes)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecord(java.io.InputStream data,
FndAbstractRecord record,
boolean caseSensitive,
boolean allowNewAttributes,
boolean ignoreUnderscores,
FndRecordFormat.Direction direction)
Parses an (utf-8 encoded) xml string into a record.
|
static void |
parseRecordArray(byte[] data,
FndAbstractArray array,
boolean allowNewAttributes,
FndRecordFormat.Direction direction)
Parses an (utf-8 encoded) xml string into an array of records.
|
static void |
parseRecordArray(java.io.InputStream data,
FndAbstractArray array,
boolean allowNewAttributes,
FndRecordFormat.Direction direction)
Parses an (utf-8 encoded) xml string into an array of records.
|
static void |
populateExampleData(FndAbstractRecord record)
Populates a record's attributes with example data.
|
public static byte[] formatRecord(FndAbstractRecord record) throws ParseException
record
- the record to format.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, boolean addRecordAttributes) throws ParseException
record
- the record to format.addRecordAttributes
- if true
, IFS record attributs
are used in the XML produced. These attributes are in the ifsrecord
namespace.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, int flags) throws ParseException
record
- the record to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, boolean addRecordAttributes, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.addRecordAttributes
- if true
, IFS record attributs
are used in the XML produced. These attributes are in the ifsrecord
namespace.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, int flags, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use. (When a namspace is used, IFS record attributes are not added).direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, java.lang.String namespace) throws ParseException
record
- the record to format.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use. (When a namespace is used, IFS record attributes are not added).java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatRecord(FndAbstractRecord record, boolean addRecordAttributes, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.addRecordAttributes
- wheter IFS record attributes are to be
used or not. Not used when namespace
is non-null.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatRecordArray(FndAbstractArray array, boolean addRecordAttributes, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
array
- array to format.addRecordAttributes
- wheter IFS record attributes are to benamespace
- Will be used in the xml namepace. If null then created from the metadata view
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted array.
If the direction is not null then the name of the root XML element will be set to
the direction name ("REQUEST" or "RESPONSE"), otherwise a default name will be created.java.text.ParseException
- if the array for some reason cannot be formatted into xml.ParseException
public static byte[] formatRecordArray(FndAbstractArray array, int flags, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
array
- array to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags. Thisnamespace
- the name of the Business API in use (if any). A
null
value for this parameter indicates a that a Business API
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted array.
If the direction is not null then the name of the root XML element will be set to
the direction name ("REQUEST" or "RESPONSE"), otherwise a default name will be created.java.text.ParseException
- if the array for some reason cannot be formatted into xml.ParseException
public static void parseRecordArray(java.io.InputStream data, FndAbstractArray array, boolean allowNewAttributes, FndRecordFormat.Direction direction) throws ParseException, SystemException
data
- the InputStream with xml data.array
- the array to parse the xml data into.allowNewAttributes
- the boolean flag indicating if attributes that don't match the target record should be alloweddirection
- the direction (REQUEST/RESPONSE) of the formatted array. If the direction is
not null then the name of the root XML element must match the direction name ("REQUEST" or "RESPONSE").java.text.ParseException
- if the data cannot be parsed into the record.SystemException
- if the data cannot be parsed into the record.ParseException
public static void parseRecordArray(byte[] data, FndAbstractArray array, boolean allowNewAttributes, FndRecordFormat.Direction direction) throws ParseException, SystemException
data
- the raw xml data.array
- the array to parse the xml data into.allowNewAttributes
- the boolean flag indicating if attributes that don't match the target record should be alloweddirection
- the direction (REQUEST/RESPONSE) of the formatted array. If the direction is
not null then the name of the root XML element must match the direction name ("REQUEST" or "RESPONSE").java.text.ParseException
- if the data cannot be parsed into the record.SystemException
- if the data cannot be parsed into the record.ParseException
public static void parseRecord(byte[] data, FndAbstractRecord record) throws ParseException, SystemException
data
- the raw xml data.record
- the record to parse the xml data into.java.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static void parseRecord(byte[] data, FndAbstractRecord record, FndRecordFormat.Direction direction) throws ParseException, SystemException
data
- the raw xml data.record
- the record to parse the xml data into.direction
- the direction (REQUEST/RESPONSE) of the formatted array. If the direction is
not null then the name of the root XML element must match the direction name ("REQUEST" or "RESPONSE").java.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static void parseRecord(byte[] data, FndAbstractRecord record, boolean allowNewAttributes) throws ParseException, SystemException
data
- the raw xml data.record
- the record to parse the xml data into.allowNewAttributes
- the boolean flag indicating if attributes that don't match the target record should be allowedjava.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static void parseRecord(java.io.InputStream data, FndAbstractRecord record, boolean caseSensitive) throws ParseException, SystemException
data
- the InputStream with xml data.record
- the record to parse the xml data into.caseSensitive
- the boolean flag indicating whether parsed view/attribute names are case sensitive.java.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static void parseRecord(java.io.InputStream data, FndAbstractRecord record, boolean caseSensitive, boolean allowNewAttributes) throws ParseException, SystemException
data
- the InputStream with xml data.record
- the record to parse the xml data into.caseSensitive
- the boolean flag indicating whether parsed view/attribute names are case sensitive.allowNewAttributes
- the boolean flag indicating if attributes that don't match the target record should be allowedjava.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static void parseRecord(java.io.InputStream data, FndAbstractRecord record, boolean caseSensitive, boolean allowNewAttributes, boolean ignoreUnderscores, FndRecordFormat.Direction direction) throws ParseException, SystemException
data
- the InputStream with xml data.record
- the record to parse the xml data into.caseSensitive
- the boolean flag indicating whether parsed view/attribute names are case sensitive.allowNewAttributes
- the boolean flag indicating if attributes that don't match the target record should be allowedignoreUnderscores
- the boolean flag indicating if object names should be also matched by ignoring underscores in the record and attribute namesjava.text.ParseException
- if the data cannot be parsed into the record.ParseException
SystemException
public static byte[] generateXmlExample(FndAbstractRecord record, java.lang.String namespace) throws IfsException
record
- the record to generate the example for.namespace
- the target XML namespaceString
containing
the example XML.IfsException
public static byte[] generateXmlExampleForQuery(FndAbstractRecord record, java.lang.String namespace) throws IfsException
record
- the record to generate the example for.namespace
- the target XML namespaceString
containing
the example XML.IfsException
public static byte[] generateXmlExampleForArray(FndAbstractArray array, FndAbstractRecord record, java.lang.String namespace) throws IfsException
array
- the array to generate the example for.record
- the record that the array consists of.namespace
- the target XML namespaceString
containing
the example XML.IfsException
public static byte[] generateXmlExample(FndAbstractRecord record, java.lang.String namespace, FndRecordFormat.Direction direction) throws IfsException
record
- the record to generate the example for.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredString
containing
the example XML.IfsException
public static void populateExampleData(FndAbstractRecord record) throws IfsException
record
- the record to generate the example for.IfsException
public static byte[] generateXsdSchema(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction) throws IfsException, java.io.UnsupportedEncodingException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredString
containing
the XSD schema.java.io.UnsupportedEncodingException
- if the current Java VM doesn't support UTF-8 encodings.IfsException
public static byte[] generateXsdSchema(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction, boolean query) throws IfsException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredString
containing
the XSD schema.IfsException
public static byte[] generateXsdSchemaForQuery(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction) throws IfsException, java.io.UnsupportedEncodingException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredString
containing
the XSD schema.java.io.UnsupportedEncodingException
- if the current Java VM doesn't support UTF-8 encodings.IfsException
public static byte[] generateXsdSchemaForArray(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction) throws IfsException, java.io.UnsupportedEncodingException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredString
containing
the XSD schema.java.io.UnsupportedEncodingException
- if the current Java VM doesn't support UTF-8 encodings.IfsException
public static java.lang.String generateXsdSchemaAsString(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction, boolean query) throws IfsException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredquery
- true for a query view, false for other viewsIfsException
public static java.lang.String generateXsdSchemaForArrayAsString(FndAbstractRecord rec, FndValidationMeta validation, boolean omitXmlDeclaration, java.lang.String namespace, FndRecordFormat.Direction direction) throws IfsException
rec
- the
FndAbstractRecord
object to
generate the schema for.validation
- Referred view validation meta object.omitXmlDeclaration
- if true
the XML declaration
(first line) is omitted from the result.namespace
- the target XML namespacedirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other views the argument is ignoredIfsException
public static java.lang.String getViewName(FndAbstractRecord view, FndRecordFormat.Direction direction)
view
- a record to get the name fordirection
- the direction (REQUEST/RESPONSE) of a parameter-list view, for other types of views the argument is ignoredpublic static boolean directionMatches(FndXmlSerializer xml, FndAttribute attr)
xml
- the XML serializer used to generate the XML streamattr
- an attribute to check the direction forpublic static byte[] formatAndDestroyRecord(FndAbstractRecord record) throws ParseException
record
- the record to format.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, boolean addRecordAttributes) throws ParseException
record
- the record to format.addRecordAttributes
- if true
, IFS record attributs
are used in the XML produced. These attributes are in the ifsrecord
namespace.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, int flags) throws ParseException
record
- the record to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, boolean addRecordAttributes, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.addRecordAttributes
- if true
, IFS record attributs
are used in the XML produced. These attributes are in the ifsrecord
namespace.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, int flags, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use. (When a namspace is used, IFS record attributes are not added).direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, java.lang.String namespace) throws ParseException
record
- the record to format.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use. (When a namespace is used, IFS record attributes are not added).java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted into xml.ParseException
public static byte[] formatAndDestroyRecord(FndAbstractRecord record, boolean addRecordAttributes, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
record
- the record to format.addRecordAttributes
- wheter IFS record attributes are to be
used or not. Not used when namespace
is non-null.namespace
- Will be used in the xml namepace. If null then created from the metadata view
null
value for this parameter indicates a that a Business API
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted record.
If the direction is not null and if the specified record is a generated parameter-list view
then attributes with direction not matching the direction of the view will be omitted.java.text.ParseException
- if the record for some reason cannot be formatted
into xml.ParseException
public static byte[] formatAndDestroyRecordArray(FndAbstractArray array, boolean addRecordAttributes, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
array
- array to format.addRecordAttributes
- wheter IFS record attributes are to benamespace
- Will be used in the xml namepace. If null then created from the metadata view
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted array.
If the direction is not null then the name of the root XML element will be set to
the direction name ("REQUEST" or "RESPONSE"), otherwise a default name will be created.java.text.ParseException
- if the array for some reason cannot be formatted into xml.ParseException
public static byte[] formatAndDestroyRecordArray(FndAbstractArray array, int flags, java.lang.String namespace, FndRecordFormat.Direction direction) throws ParseException
array
- array to format.flags
- the XML serialization flags to use. See class
FndXmlSerializer
for more information on the flags. Thisnamespace
- the name of the Business API in use (if any). A
null
value for this parameter indicates a that a Business API
is not in use.direction
- the direction (REQUEST/RESPONSE) of the formatted array.
If the direction is not null then the name of the root XML element will be set to
the direction name ("REQUEST" or "RESPONSE"), otherwise a default name will be created.java.text.ParseException
- if the array for some reason cannot be formatted into xml.ParseException