com.prowidesoftware.swift.io.IConversionService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wife Show documentation
Show all versions of wife Show documentation
Prowide Core Libraries for SWIFT (TM) messages
The newest version!
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.prowidesoftware.swift.io;
import com.prowidesoftware.swift.model.SwiftMessage;
/**
* This interface provides a general conversion service between three different formats:
*
* - FIN: SWIFT message format as used by SWIFTNet (ISO 15022 compliance).
* - XML: WIFE's XML representation of SWIFT messages.
* - SwiftMessage: WIFE's java object model of SWIFT messages.
*
*
* @author www.prowidesoftware.com
* @version $Id: IConversionService.java,v 1.2 2010/10/17 01:22:04 zubri Exp $
*/
public interface IConversionService {
/**
* Gets a String containing the FIN message from the msg object
* argument, using FIN writer.
*
* @param msg an object containing the message to convert
* @return a string with the FIN format representation of the message
*
* @throws IllegalArgumentException if msg is null
*/
public abstract String getFIN(SwiftMessage msg);
/**
* Gets a String containing the FIN message from the XML representation
* passed as a String argument.
*
* @param xml the string with the internal XML message to read
* @return a string with the FIN format representation of the message
*
* @throws IllegalArgumentException if XML is null
*/
public abstract String getFIN(String xml);
/**
* Gets a String containing the XML internal representation of the message
* from the msg object argument.
*
* @param msg an object containing the message to convert
* @return a string with the internal XML representation of the message
*
* @throws IllegalArgumentException if msg is null
*/
public abstract String getXml(SwiftMessage msg);
/**
* Gets a String containing the XML internal representation of the message
* from the FIN string message passed as argument.
*
* @param fin a string containing the FIN message to convert
* @return a string with the internal XML representation of the message
*
* @throws IllegalArgumentException if fin is null
*/
public abstract String getXml(String fin);
/**
* Gets a message object containing the message data
* from the FIN string message passed as argument.
*
* @param fin a string containing the FIN message to convert
* @return a swift object containing the message data
*
* @throws IllegalArgumentException if fin is null
*/
public abstract SwiftMessage getMessageFromFIN(String fin);
/**
* Gets a message object containing the message data
* from the XML representation passed as a String argument.
*
* @param xml the string with the internal XML message to read
* @return a swift object containing the message data
*
* @throws IllegalArgumentException if XML is null
*/
public abstract SwiftMessage getMessageFromXML(String xml);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy