com.prowidesoftware.swift.io
Class ConversionService

java.lang.Object
  extended by com.prowidesoftware.swift.io.ConversionService
All Implemented Interfaces:
IConversionService

public class ConversionService
extends java.lang.Object
implements IConversionService

This interface provides a general conversion service between three different formats:

This class may be used as a serializer.

All methods in this class are threadsafe.

Author:
www.prowidesoftware.com

Constructor Summary
ConversionService()
           
 
Method Summary
 java.lang.String getFIN(java.lang.String xml)
          Given a String containing a message in its Wife XML internal representation, returns a String containing its SWIFT message representation.
 java.lang.String getFIN(SwiftMessage msg)
          Given a SwiftMessage object returns a String containing its SWIFT message representation.
 SwiftMessage getMessageFromFIN(java.lang.String fin)
          Given a Swift message String returns a SwiftMessage object.
 SwiftMessage getMessageFromXML(java.lang.String xml)
          Given a String containing a message in its WIFE internal XML representation, returns a SwiftMessage object.
 java.lang.String getXml(java.lang.String fin)
          Given a Swift message String returns a String containing WIFE internal XML representation of the message.
 java.lang.String getXml(SwiftMessage msg)
          Given a SwiftMessage objects returns a String containing WIFE internal XML representation of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversionService

public ConversionService()
Method Detail

getFIN

public java.lang.String getFIN(SwiftMessage msg)
Given a SwiftMessage object returns a String containing its SWIFT message representation.

Specified by:
getFIN in interface IConversionService
Parameters:
msg - an object containing the message to convert
Returns:
a string with the FIN format representation of the message
See Also:
IConversionService.getFIN(com.prowidesoftware.swift.model.SwiftMessage)

getFIN

public java.lang.String getFIN(java.lang.String xml)
Given a String containing a message in its Wife XML internal representation, returns a String containing its SWIFT message representation.

Specified by:
getFIN in interface IConversionService
Parameters:
xml - the string with the internal XML message to read
Returns:
a string with the FIN format representation of the message
See Also:
IConversionService.getFIN(java.lang.String)

getXml

public java.lang.String getXml(SwiftMessage msg)
Given a SwiftMessage objects returns a String containing WIFE internal XML representation of the message.

Specified by:
getXml in interface IConversionService
Parameters:
msg - an object containing the message to convert
Returns:
a string with the internal XML representation of the message
See Also:
IConversionService.getXml(com.prowidesoftware.swift.model.SwiftMessage)

getXml

public java.lang.String getXml(java.lang.String fin)
Given a Swift message String returns a String containing WIFE internal XML representation of the message.

Specified by:
getXml in interface IConversionService
Parameters:
fin - a string containing the FIN message to convert
Returns:
a string with the internal XML representation of the message
See Also:
IConversionService.getXml(java.lang.String)

getMessageFromFIN

public SwiftMessage getMessageFromFIN(java.lang.String fin)
Given a Swift message String returns a SwiftMessage object.

Specified by:
getMessageFromFIN in interface IConversionService
Parameters:
fin - a string containing the FIN message to convert
Returns:
a swift object containing the message data
See Also:
IConversionService.getMessageFromFIN(java.lang.String)

getMessageFromXML

public SwiftMessage getMessageFromXML(java.lang.String xml)
Given a String containing a message in its WIFE internal XML representation, returns a SwiftMessage object.

Specified by:
getMessageFromXML in interface IConversionService
Parameters:
xml - the string with the internal XML message to read
Returns:
a swift object containing the message data
See Also:
IConversionService.getMessageFromXML(java.lang.String)