public abstract class AbstractMX extends Object implements IDocument
AbstractMT
Modifier | Constructor and Description |
---|---|
protected |
AbstractMX() |
protected |
AbstractMX(BusinessHeader businessHeader) |
Modifier and Type | Method and Description |
---|---|
BusinessHeader |
getBusinessHeader() |
abstract String |
getBusinessProcess()
get the Alphabetic code in four positions (fixed length) identifying the Business Process
|
abstract Class[] |
getClasses()
Get the classes associated with this message
|
abstract int |
getFunctionality()
Get the code identifying the Message Functionality
|
MxId |
getMxId()
Returns the MX message identification.
Composed by the business process, functionality, variant and version. |
abstract String |
getNamespace()
Get the XML namespace of the message
|
abstract int |
getVariant()
Get the Message variant
|
abstract int |
getVersion()
Get the message version
|
abstract String |
message()
Get this message as an XML string
|
protected static String |
message(String namespace,
AbstractMX obj,
Class[] classes) |
protected static AbstractMX |
read(Class<? extends AbstractMX> targetClass,
String xml,
Class[] classes) |
protected void |
setBusinessHeader(BusinessHeader businessHeader) |
void |
write(File file)
Writes the message into a file with its message content in the FIN format.
|
void |
write(OutputStream stream)
Writes the message into a given output stream with its message content in the FIN format,
encoding content in UTF-8.
|
Source |
xmlSource()
Convenience method to get this message XML as javax.xml.transform.Source
|
protected AbstractMX()
protected AbstractMX(BusinessHeader businessHeader)
protected static String message(String namespace, AbstractMX obj, Class[] classes)
protected static AbstractMX read(Class<? extends AbstractMX> targetClass, String xml, Class[] classes)
public abstract Class[] getClasses()
public abstract String getNamespace()
public abstract String getBusinessProcess()
public abstract int getFunctionality()
public abstract int getVariant()
public abstract int getVersion()
public abstract String message()
public Source xmlSource()
null
if message() returns null
or StreamSource in other casemessage()
public void write(File file) throws IOException
a
- non null file to write, if it does not exists, it will be createdIOException
public void write(OutputStream stream) throws IOException
a
- non null stream to writeIOException
public BusinessHeader getBusinessHeader()
protected void setBusinessHeader(BusinessHeader businessHeader)
businessHeader
- the header to setpublic MxId getMxId()