notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2432 - in development/laboratory/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/authorization api/src/main/net/dpml/iso8583/comm api/src/main/net/dpml/iso8583/network authorization channels/src/main/net/dpml/iso8583/channels elements/src/main/net/dpml/iso8583/data/elements elements/src/main/net/dpml/iso8583/data/manager mti mti/src/main/net/dpml/iso8583/data/mti mti/src/test/net/dpml/iso8583/test/mti network network/src network/src/main network/src/main/net network/src/main/net/dpml network/src/main/net/dpml/iso8583 network/src/main/net/dpml/iso8583/network network/src/main/net/dpml/iso8583/network/impl network/src/test packaging packaging/src/main/net/dpml/iso8583/packaging test-app test-app/src test-app/src/main test-app/src/main/net test-app/src/main/net/dpml test-app/src/main/net/dpml/iso8583 test-app/src/main/net/dpml/iso8583/test test-app/src/main/net/dpml/iso8583/test/app test-app/src/test
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2432 - in development/laboratory/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/authorization api/src/main/net/dpml/iso8583/comm api/src/main/net/dpml/iso8583/network authorization channels/src/main/net/dpml/iso8583/channels elements/src/main/net/dpml/iso8583/data/elements elements/src/main/net/dpml/iso8583/data/manager mti mti/src/main/net/dpml/iso8583/data/mti mti/src/test/net/dpml/iso8583/test/mti network network/src network/src/main network/src/main/net network/src/main/net/dpml network/src/main/net/dpml/iso8583 network/src/main/net/dpml/iso8583/network network/src/main/net/dpml/iso8583/network/impl network/src/test packaging packaging/src/main/net/dpml/iso8583/packaging test-app test-app/src test-app/src/main test-app/src/main/net test-app/src/main/net/dpml test-app/src/main/net/dpml/iso8583 test-app/src/main/net/dpml/iso8583/test test-app/src/main/net/dpml/iso8583/test/app test-app/src/test
- Date: Wed, 27 Apr 2005 21:41:42 -0400
Author: niclas AT hedhman.org
Date: Wed Apr 27 21:41:37 2005
New Revision: 2432
Added:
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/network/
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/network/NetworkService.java
development/laboratory/users/niclas/iso8583/module.xml
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2100.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2101.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2110.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2120.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2121.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2130.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2140.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2150.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2804.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2805.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2814.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2824.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2825.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2834.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2844.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2854.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2100TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2101TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2110TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2120TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2121TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2130TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2140TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2150TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2804TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2805TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2814TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2824TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2825TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2834TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2844TestCase.java
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2854TestCase.java
development/laboratory/users/niclas/iso8583/network/
development/laboratory/users/niclas/iso8583/network/build.xml
development/laboratory/users/niclas/iso8583/network/network.iml
development/laboratory/users/niclas/iso8583/network/src/
development/laboratory/users/niclas/iso8583/network/src/main/
development/laboratory/users/niclas/iso8583/network/src/main/net/
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/network/
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/network/impl/
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/network/impl/DefaultNetworkService.java
development/laboratory/users/niclas/iso8583/network/src/test/
development/laboratory/users/niclas/iso8583/test-app/
development/laboratory/users/niclas/iso8583/test-app/build.xml
development/laboratory/users/niclas/iso8583/test-app/src/
development/laboratory/users/niclas/iso8583/test-app/src/main/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/test/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/test/app/
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/test/app/Ping.java
development/laboratory/users/niclas/iso8583/test-app/src/test/
development/laboratory/users/niclas/iso8583/test-app/test-app.iml
Removed:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti100.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti101.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti110.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti120.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti121.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti130.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti140.java
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti150.java
Modified:
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/authorization/AuthorizationService.java
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/comm/Packager.java
development/laboratory/users/niclas/iso8583/authorization/authorization.iml
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/AsciiChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24Channel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24TcpChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/ConfigHelper.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/CsChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/LogChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NacChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NccChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PadChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PostChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/RawChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/VapChannel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/X25Channel.java
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java
development/laboratory/users/niclas/iso8583/index.xml
development/laboratory/users/niclas/iso8583/iso8583.ipr
development/laboratory/users/niclas/iso8583/iso8583.iws
development/laboratory/users/niclas/iso8583/mti/build.xml
development/laboratory/users/niclas/iso8583/mti/mti.iml
development/laboratory/users/niclas/iso8583/packaging/packaging.iml
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1Packager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1SubFieldPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base24Packager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubElementPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubFieldPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroSubFieldPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericSubFieldPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericValidatingPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackagerBBitmap.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87BPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93APackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93BPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISOBaseValidatingPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/LogPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/PostPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Visa1Packager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92GenericPackager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92Packager.java
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/XmlPackager.java
Log:
A days work of more tests and restructure.
Modified:
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/authorization/AuthorizationService.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/authorization/AuthorizationService.java
(original)
+++
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/authorization/AuthorizationService.java
Wed Apr 27 21:41:37 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2005 Niclas Hedhman.
+ * Copyright 2005 Niclas Hedhman.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified:
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/comm/Packager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/comm/Packager.java
(original)
+++
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/comm/Packager.java
Wed Apr 27 21:41:37 2005
@@ -2,10 +2,6 @@
import org.jpos.iso.ISOPackager;
-/**
- * Created by IntelliJ IDEA. User: gondor Date: Apr 26, 2005 Time: 4:15:24
PM To change this template use File |
- * Settings | File Templates.
- */
public interface Packager
{
ISOPackager getISOPackager();
Added:
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/network/NetworkService.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/api/src/main/net/dpml/iso8583/network/NetworkService.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.network;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.ISOException;
+
+/**
+ * @metro.service type="net.dpml.iso8583.network.NetworkService"
+ */
+public interface NetworkService
+{
+ /** Authorize the transaction in the thread context space.
+ *
+ * @return A DataElement of type ActionCode.
+ * @throws net.dpml.iso8583.data.ISOException if the underlying
communication layers failed.
+ */
+ DataElement ping()
+ throws ISOException;
+
+}
+
Modified:
development/laboratory/users/niclas/iso8583/authorization/authorization.iml
==============================================================================
---
development/laboratory/users/niclas/iso8583/authorization/authorization.iml
(original)
+++
development/laboratory/users/niclas/iso8583/authorization/authorization.iml
Wed Apr 27 21:41:37 2005
@@ -15,6 +15,7 @@
<orderEntry type="library" name="JPos" level="project" />
<orderEntry type="module" module-name="elements" />
<orderEntry type="library" name="Metro Public" level="application" />
+ <orderEntry type="library" name="Clover" level="application" />
<orderEntryProperties />
</component>
</module>
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/AsciiChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/AsciiChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/AsciiChannel.java
Wed Apr 27 21:41:37 2005
@@ -57,7 +57,7 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
public ISOMessage send( ISOMessage message )
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24Channel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24Channel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24Channel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24TcpChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24TcpChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/Base24TcpChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/ConfigHelper.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/ConfigHelper.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/ConfigHelper.java
Wed Apr 27 21:41:37 2005
@@ -18,26 +18,24 @@
package net.dpml.iso8583.channels;
-import java.io.IOException;
-
-import java.net.ServerSocket;
-
-import net.dpml.parameters.ParameterException;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-
import net.dpml.service.ServiceException;
import net.dpml.service.ServiceManager;
-import net.dpml.iso8583.data.ISOException;
-
import org.jpos.iso.BaseChannel;
-import org.jpos.iso.ISOServerSocketFactory;
import org.jpos.iso.ISOClientSocketFactory;
+import org.jpos.iso.ISOServerSocketFactory;
+
+import java.io.IOException;
+import java.net.ServerSocket;
class ConfigHelper
{
- static void initialize( BaseChannel ch, ServiceManager man, Parameters
params )
+ static void initialize( Logger logger, BaseChannel ch, ServiceManager
man, Parameters params )
throws ServiceException, IOException, ISOException
{
+ logger.info( "Initilizing Channel: " + ch );
if( man.hasService( "server-socket-factory" ) )
{
ISOServerSocketFactory ssf = (ISOServerSocketFactory)
man.lookup( "server-socket-factory" );
@@ -65,5 +63,9 @@
{
ch.setHeader( header );
}
+ logger.info( " server socket: " + ch.getServerSocket() );
+ logger.info( " client socket factory: " + ch.getSocketFactory() );
+ logger.info( " timeout: " + ch.getTimeout() );
+ logger.info( " header: " + ch.getHeader() );
}
}
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/CsChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/CsChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/CsChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/LogChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/LogChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/LogChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NacChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NacChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NacChannel.java
Wed Apr 27 21:41:37 2005
@@ -59,7 +59,7 @@
((Packager) man.lookup( "packager" )).getISOPackager(),
convertByteArray( params )
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
private static byte[] convertByteArray( Parameters params )
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NccChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NccChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/NccChannel.java
Wed Apr 27 21:41:37 2005
@@ -59,7 +59,7 @@
((Packager) man.lookup( "packager" )).getISOPackager(),
convertByteArray( params )
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
private static byte[] convertByteArray( Parameters params )
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PadChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PadChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PadChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PostChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PostChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/PostChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/RawChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/RawChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/RawChannel.java
Wed Apr 27 21:41:37 2005
@@ -59,7 +59,7 @@
((Packager) man.lookup( "packager" )).getISOPackager(),
convertByteArray( params )
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
private static byte[] convertByteArray( Parameters params )
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/VapChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/VapChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/VapChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/X25Channel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/X25Channel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/X25Channel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java
(original)
+++
development/laboratory/users/niclas/iso8583/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java
Wed Apr 27 21:41:37 2005
@@ -56,6 +56,6 @@
params.getParameterAsInteger( "port" ),
((Packager) man.lookup( "packager" )).getISOPackager()
);
- ConfigHelper.initialize( this, man, params );
+ ConfigHelper.initialize( logger, this, man, params );
}
}
\ No newline at end of file
Modified:
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
(original)
+++
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
Wed Apr 27 21:41:37 2005
@@ -97,7 +97,15 @@
}
try
{
- message.set( getIsoBitNumber(), m_value.getBytes( "ISO8859-1" )
);
+ if( m_value != null )
+ {
+ byte[] data = m_value.getBytes( "ISO8859-1" );
+ message.set( getIsoBitNumber(), data );
+ }
+ else
+ {
+ message.set( getIsoBitNumber(), null );
+ }
} catch( UnsupportedEncodingException e )
{
// Can not happen.
Modified:
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java
(original)
+++
development/laboratory/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java
Wed Apr 27 21:41:37 2005
@@ -109,9 +109,15 @@
DataElement de = (DataElement) map.get( classname );
if( de == null )
{
+ Object obj = null;
try
{
- de = (DataElement) m_model.resolve( false );
+ obj = m_model.resolve( false );
+ if( obj instanceof DataElement )
+ return (DataElement) obj;
+
+ m_logger.error( "Unexpected cast of returned element: " +
obj );
+ throw new NoSuchDataElementException( type );
} catch( Exception e )
{
throw new NoSuchDataElementException( type, e );
Modified: development/laboratory/users/niclas/iso8583/index.xml
==============================================================================
--- development/laboratory/users/niclas/iso8583/index.xml (original)
+++ development/laboratory/users/niclas/iso8583/index.xml Wed Apr 27
21:41:37 2005
@@ -18,128 +18,194 @@
-->
<index>
- <import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT" />
+ <import uri="artifact:module:dpml/metro/dpml-metro#SNAPSHOT"/>
- <resource>
- <info>
- <name>jpos</name>
- <group>jpos</group>
- <version>1.4.9</version>
- </info>
- </resource>
-
- <project basedir="api" >
- <info>
- <name>dpml-iso8583-api</name>
- <group>dpml/planet/iso8583/api</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-activity-api" />
- <include key="dpml-logging-api" />
- <include key="dpml-context-api" />
- <include key="dpml-parameters-api"/>
- <include key="dpml-service-api" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
-
- <project basedir="authorization" >
- <info>
- <name>dpml-iso8583-authorization</name>
- <group>dpml/planet/iso8583/authorization</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-iso8583-api" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
-
- <project basedir="elements" >
- <info>
- <name>dpml-iso8583-elements</name>
- <group>dpml/planet/iso8583/elements</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-iso8583-api" />
- <include key="dpml-activity-api" />
- <include key="dpml-logging-api" />
- <include key="dpml-classic-api" />
- <include key="dpml-context-api" />
- <include key="dpml-context-impl" build="false" runtime="false"
test="true" />
- <include key="dpml-parameters-api"/>
- <include key="dpml-parameters-impl" build="false" runtime="false"
test="true" />
- <include key="dpml-service-api" />
- <include key="dpml-transit-main" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
-
- <project basedir="channels" >
- <info>
- <name>dpml-iso8583-channels</name>
- <group>dpml/planet/iso8583/channels</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-iso8583-packaging" />
- <include key="dpml-activity-api" />
- <include key="dpml-logging-api" />
- <include key="dpml-context-api" />
- <include key="dpml-parameters-api"/>
- <include key="dpml-service-api" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
-
- <project basedir="mti" >
- <info>
- <name>dpml-iso8583-mti</name>
- <group>dpml/planet/iso8583/mti</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-iso8583-api" />
- <include key="dpml-iso8583-elements" />
- <include key="dpml-service-api" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
-
- <project basedir="packaging" >
- <info>
- <name>dpml-iso8583-packaging</name>
- <group>dpml/planet/iso8583/packaging</group>
- <version>1.0</version>
- </info>
- <dependencies>
- <include key="jpos" />
- <include key="dpml-activity-api" />
- <include key="dpml-logging-api" />
- <include key="dpml-context-api" />
- <include key="dpml-parameters-api"/>
- <include key="dpml-service-api" />
- </dependencies>
- <plugins>
- <include key="dpml-meta-tools" />
- </plugins>
- </project>
+ <resource>
+ <info>
+ <name>jpos</name>
+ <group>jpos</group>
+ <version>1.4.9</version>
+ </info>
+ </resource>
+
+ <resource>
+ <info>
+ <name>jmock</name>
+ <group>jmock</group>
+ <version>1.0.1</version>
+ </info>
+ <dependencies>
+ <include key="jmock-cglib"/>
+ </dependencies>
+ </resource>
+
+ <resource>
+ <info>
+ <name>jmock-cglib</name>
+ <group>jmock</group>
+ <version>1.0.1</version>
+ </info>
+ </resource>
+
+ <!-- project file="module.xml">
+ <info>
+ <group>dpml/planet/iso8583</group>
+ <name>dpml-iso8583</name>
+ <type>module</type>
+ </info>
+ <dependencies>
+ <include key="dpml-util"/>
+ <include key="dpml-transit"/>
+ <include key="dpml-metro"/>
+ </dependencies>
+ </project -->
+
+ <project basedir="api">
+ <info>
+ <name>dpml-iso8583-api</name>
+ <group>dpml/planet/iso8583/api</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-activity-api"/>
+ <include key="dpml-logging-api"/>
+ <include key="dpml-context-api"/>
+ <include key="dpml-parameters-api"/>
+ <include key="dpml-service-api"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="authorization">
+ <info>
+ <name>dpml-iso8583-authorization</name>
+ <group>dpml/planet/iso8583/authorization</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-iso8583-elements"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="elements">
+ <info>
+ <name>dpml-iso8583-elements</name>
+ <group>dpml/planet/iso8583/elements</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-activity-api"/>
+ <include key="dpml-logging-api"/>
+ <include key="dpml-classic-api"/>
+ <include key="dpml-context-api"/>
+ <include key="dpml-context-impl" build="false" runtime="false"
test="true"/>
+ <include key="dpml-parameters-api"/>
+ <include key="dpml-parameters-impl" build="false"
runtime="false" test="true"/>
+ <include key="dpml-service-api"/>
+ <include key="dpml-transit-main"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="channels">
+ <info>
+ <name>dpml-iso8583-channels</name>
+ <group>dpml/planet/iso8583/channels</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-iso8583-packaging"/>
+ <include key="dpml-activity-api"/>
+ <include key="dpml-logging-api"/>
+ <include key="dpml-context-api"/>
+ <include key="dpml-parameters-api"/>
+ <include key="dpml-service-api"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="mti">
+ <info>
+ <name>dpml-iso8583-mti</name>
+ <group>dpml/planet/iso8583/mti</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-iso8583-channels"/>
+ <include key="dpml-iso8583-elements"/>
+ <include key="dpml-service-api"/>
+ <include key="dpml-classic-unit"/>
+ <include key="jmock" build="false" runtime="false" test="true"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="network">
+ <info>
+ <name>dpml-iso8583-network</name>
+ <group>dpml/planet/iso8583/network</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-iso8583-elements"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="packaging">
+ <info>
+ <name>dpml-iso8583-packaging</name>
+ <group>dpml/planet/iso8583/packaging</group>
+ </info>
+ <dependencies>
+ <include key="jpos"/>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-activity-api"/>
+ <include key="dpml-logging-api"/>
+ <include key="dpml-context-api"/>
+ <include key="dpml-parameters-api"/>
+ <include key="dpml-service-api"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
+
+ <project basedir="test-app">
+ <info>
+ <name>dpml-iso8583-test-app</name>
+ <group>dpml/planet/iso8583/test-app</group>
+ </info>
+ <dependencies>
+ <include key="dpml-iso8583-api"/>
+ <include key="dpml-iso8583-authorization"/>
+ <include key="dpml-iso8583-channels"/>
+ <include key="dpml-iso8583-elements"/>
+ <include key="dpml-iso8583-mti"/>
+ <include key="dpml-iso8583-packaging"/>
+ <include key="dpml-iso8583-network"/>
+ </dependencies>
+ <plugins>
+ <include key="dpml-meta-tools"/>
+ </plugins>
+ </project>
</index>
Modified: development/laboratory/users/niclas/iso8583/iso8583.ipr
==============================================================================
--- development/laboratory/users/niclas/iso8583/iso8583.ipr (original)
+++ development/laboratory/users/niclas/iso8583/iso8583.ipr Wed Apr 27
21:41:37 2005
@@ -191,7 +191,9 @@
<module fileurl="file://$PROJECT_DIR$/channels/channels.iml"
filepath="$PROJECT_DIR$/channels/channels.iml" />
<module fileurl="file://$PROJECT_DIR$/elements/elements.iml"
filepath="$PROJECT_DIR$/elements/elements.iml" />
<module fileurl="file://$PROJECT_DIR$/mti/mti.iml"
filepath="$PROJECT_DIR$/mti/mti.iml" />
+ <module fileurl="file://$PROJECT_DIR$/network/network.iml"
filepath="$PROJECT_DIR$/network/network.iml" />
<module fileurl="file://$PROJECT_DIR$/packaging/packaging.iml"
filepath="$PROJECT_DIR$/packaging/packaging.iml" />
+ <module fileurl="file://$PROJECT_DIR$/test-app/test-app.iml"
filepath="$PROJECT_DIR$/test-app/test-app.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="true"
jdk-15="false" project-jdk-name="java version "1.4.2_08"" />
Modified: development/laboratory/users/niclas/iso8583/iso8583.iws
==============================================================================
--- development/laboratory/users/niclas/iso8583/iso8583.iws (original)
+++ development/laboratory/users/niclas/iso8583/iso8583.iws Wed Apr 27
21:41:37 2005
@@ -146,92 +146,78 @@
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="FileEditorManager" split-orientation="vertical"
split-proportion="0.5">
- <first-group
selected-file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java">
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/LoopbackChannel.java"
pinned="false">
+ <first-group
selected-file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2854TestCase.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="0" selection-start="866"
selection-end="866" vertical-scroll-proportion="0.18939394">
+ <state line="61" column="24" selection-start="2662"
selection-end="2662" vertical-scroll-proportion="0.84942085">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/NacChannel.java"
pinned="false">
+ <entry file="file://$PROJECT_DIR$/mti/build.xml" pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="0" column="0" selection-start="0" selection-end="0"
vertical-scroll-proportion="0.0">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/NccChannel.java"
pinned="false">
+ <entry file="file://$PROJECT_DIR$/network/build.xml" pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="66" column="35" selection-start="2622"
selection-end="2622" vertical-scroll-proportion="0.8484849">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/PadChannel.java"
pinned="false">
+ <entry file="file://$PROJECT_DIR$/test-app/build.xml" pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1159"
selection-end="1159" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="33" column="46" selection-start="1216"
selection-end="1216" vertical-scroll-proportion="0.6212121">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/PostChannel.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/test-app/src/main/net/dpml/iso8583/test/app/Ping.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1156"
selection-end="1156" vertical-scroll-proportion="0.39772728">
+ <state line="55" column="28" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.50757575">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/RawChannel.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="119" column="54" selection-start="4151"
selection-end="4151" vertical-scroll-proportion="0.719697">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/VapChannel.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/mti/src/main/net/dpml/iso8583/data/mti/Mti2804.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1154"
selection-end="1154" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="76" column="0" selection-start="2808"
selection-end="3169" vertical-scroll-proportion="0.39772728">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/X25Channel.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/network/src/main/net/dpml/iso8583/network/impl/DefaultNetworkService.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1156"
selection-end="1156" vertical-scroll-proportion="0.39772728">
+ <state line="18" column="114" selection-start="770"
selection-end="770" vertical-scroll-proportion="0.3409091">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/network/NetworkService.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1155"
selection-end="1155" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="38" column="0" selection-start="1125"
selection-end="1125" vertical-scroll-proportion="0.39772728">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/LogChannel.java"
pinned="false">
+ <entry file="file://$PROJECT_DIR$/index.xml" pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1154"
selection-end="1154" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="196" column="55" selection-start="6178"
selection-end="6178" vertical-scroll-proportion="0.6212121">
+ <folding />
</state>
</provider>
</entry>
@@ -256,24 +242,24 @@
</component>
<component name="NamedScopeManager" />
<component name="PackagesPane">
- <expanded_node url="net.dpml.iso8583.data.mti" module="mti"
type="package" />
- <expanded_node url="" module="mti" type="module" />
- <expanded_node url="" module="authorization" type="module" />
- <expanded_node url="net.dpml.iso8583.data" module="api" type="package" />
- <expanded_node url="net.dpml.iso8583.authorization.impl"
module="authorization" type="package" />
- <expanded_node url="" module="channels" type="module" />
- <expanded_node url="net.dpml.iso8583.authorization" module="api"
type="package" />
- <expanded_node url="net.dpml.iso8583.channels" module="channels"
type="package" />
- <expanded_node url="net.dpml.iso8583.comm" module="api" type="package" />
- <expanded_node url="" module="api" type="module" />
+ <expanded_node url="net" module="elements" type="package" />
+ <expanded_node url="net.dpml" module="elements" type="package" />
+ <expanded_node url="net.dpml.iso8583.data.manager" module="elements"
type="package" />
+ <expanded_node url="net.dpml.iso8583" module="elements" type="package" />
+ <expanded_node url="net.dpml.iso8583.data" module="elements"
type="package" />
+ <expanded_node url="" module="elements" type="module" />
</component>
<component name="ProjectPane">
- <expanded_node url="file://$PROJECT_DIR$/elements" module="elements"
type="directory" />
- <expanded_node url="" module="elements" type="module" />
+ <expanded_node url="file://$PROJECT_DIR$/test-app/src" module="test-app"
type="directory" />
+ <expanded_node url="file://$PROJECT_DIR$/test-app" module="test-app"
type="directory" />
+ <expanded_node url="" module="network" type="module" />
+ <expanded_node url="file://$PROJECT_DIR$/network" module="network"
type="directory" />
+ <expanded_node url="" module="test-app" type="module" />
+ <expanded_node url="" module="api" type="module" />
</component>
<component name="ProjectView">
<navigator currentView="PackagesPane" splitterProportion="0.5">
- <flattenPackages PackagesPane="true" />
+ <flattenPackages PackagesPane="false" />
<showMembers PackagesPane="false" />
<showModules PackagesPane="true" />
<showLibraryContents PackagesPane="false" />
@@ -289,14 +275,14 @@
<property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.sorted" value="false" />
<property name="GoToFile.includeJavaFiles" value="false" />
- <property name="last_opened_file_path"
value="/home/gondor/dev/dpml/development/main/magic/core/src/main/net/dpml/magic/tasks"
/>
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
</component>
<component name="RunManager">
<activeType name="JUnit" />
- <tempConfiguration selected="true" default="false"
name="net.dpml.iso8583.test.data.elements" type="JUnit" factoryName="JUnit">
- <module name="api" />
- <option name="PACKAGE_NAME"
value="net.dpml.iso8583.test.data.elements" />
+ <tempConfiguration selected="true" default="false" name="net"
type="JUnit" factoryName="JUnit">
+ <module name="" />
+ <option name="PACKAGE_NAME" value="net" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="package" />
@@ -310,13 +296,6 @@
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
</tempConfiguration>
- <configuration selected="false" default="true" type="Remote"
factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
- </configuration>
<configuration selected="false" default="true" type="Applet"
factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
@@ -348,6 +327,13 @@
<value defaultName="wholeProject" />
</option>
</configuration>
+ <configuration selected="false" default="true" type="Remote"
factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
+ </configuration>
</component>
<component name="SelectInManager" />
<component name="StarteamConfiguration">
@@ -395,22 +381,22 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="-4" y="-6" width="1288" height="987" extended-state="6" />
+ <frame x="0" y="0" width="1280" height="977" extended-state="6" />
<editor active="true" />
<layout>
- <window_info id="CheckStyle" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="-1" />
+ <window_info id="CheckStyle" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="8" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.33" order="8"
/>
- <window_info id="XPTask View" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.32980457" order="-1" />
+ <window_info id="XPTask View" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.32980457" order="3" />
<window_info id="TODO" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="7" />
<window_info id="SvgViewer" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33028287" order="3" />
- <window_info id="Project" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.25" order="0" />
+ <window_info id="Project" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.23941368" order="0" />
<window_info id="Find" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="1" />
<window_info id="Structure" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.24958402" order="1" />
<window_info id="Messages" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.25437573" order="8" />
<window_info id="Inspection" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.4" order="6" />
<window_info id="Dependency Viewer" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="8" />
<window_info id="Ant Build" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.24958402" order="1" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.33058822"
order="2" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.3302217"
order="2" />
<window_info id="Hierarchy" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.25" order="2" />
<window_info id="Clover" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.30199668" order="3" />
<window_info id="Commander" active="false" anchor="right"
auto_hide="false" internal_type="sliding" type="sliding" visible="false"
weight="0.4" order="0" />
@@ -490,131 +476,109 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/AsciiChannel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2814TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="36" column="0" selection-start="1163"
selection-end="1218" vertical-scroll-proportion="0.31439394">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="71" column="24" selection-start="3148"
selection-end="3148" vertical-scroll-proportion="0.40041068">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/Base24Channel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2824TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1160"
selection-end="1160" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="65" column="24" selection-start="2814"
selection-end="2814" vertical-scroll-proportion="0.5570292">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/Base24TcpChannel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2825TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1168"
selection-end="1168" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="65" column="24" selection-start="2814"
selection-end="2814" vertical-scroll-proportion="0.48262548">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/CsChannel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2834TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1152"
selection-end="1152" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="67" column="24" selection-start="2918"
selection-end="2918" vertical-scroll-proportion="0.5019305">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/ISOMessageImpl.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2844TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="13" selection-start="779"
selection-end="779" vertical-scroll-proportion="0.11363637">
+ <state line="73" column="24" selection-start="3260"
selection-end="3260" vertical-scroll-proportion="0.5585586">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/LogChannel.java">
+ <entry file="file://$PROJECT_DIR$/mti/build.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1154"
selection-end="1154" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="0" column="0" selection-start="0" selection-end="0"
vertical-scroll-proportion="0.0">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/LoopbackChannel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/test/net/dpml/iso8583/test/mti/Mti2854TestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="0" selection-start="866"
selection-end="866" vertical-scroll-proportion="0.18939394">
+ <state line="61" column="24" selection-start="2662"
selection-end="2662" vertical-scroll-proportion="0.84942085">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/NacChannel.java">
+ <entry
file="file://$PROJECT_DIR$/mti/src/main/net/dpml/iso8583/data/mti/Mti2804.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="76" column="0" selection-start="2808"
selection-end="3169" vertical-scroll-proportion="0.39772728">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/NccChannel.java">
+ <entry file="file://$PROJECT_DIR$/network/build.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="66" column="35" selection-start="2622"
selection-end="2622" vertical-scroll-proportion="0.8484849">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/PadChannel.java">
+ <entry file="file://$PROJECT_DIR$/test-app/build.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1159"
selection-end="1159" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="33" column="46" selection-start="1216"
selection-end="1216" vertical-scroll-proportion="0.6212121">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/PostChannel.java">
+ <entry file="file://$PROJECT_DIR$/index.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1156"
selection-end="1156" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="196" column="55" selection-start="6178"
selection-end="6178" vertical-scroll-proportion="0.6212121">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/RawChannel.java">
+ <entry
file="file://$PROJECT_DIR$/network/src/main/net/dpml/iso8583/network/impl/DefaultNetworkService.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="13" selection-start="1189"
selection-end="1189" vertical-scroll-proportion="0.32323232">
+ <state line="18" column="114" selection-start="770"
selection-end="770" vertical-scroll-proportion="0.3409091">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/VapChannel.java">
+ <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/network/NetworkService.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1154"
selection-end="1154" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="38" column="0" selection-start="1125"
selection-end="1125" vertical-scroll-proportion="0.39772728">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/XmlChannel.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/manager/DefaultManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1155"
selection-end="1155" vertical-scroll-proportion="0.39772728">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="119" column="54" selection-start="4151"
selection-end="4151" vertical-scroll-proportion="0.719697">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/channels/src/main/net/dpml/iso8583/channels/X25Channel.java">
+ <entry
file="file://$PROJECT_DIR$/test-app/src/main/net/dpml/iso8583/test/app/Ping.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1156"
selection-end="1156" vertical-scroll-proportion="0.39772728">
+ <state line="55" column="28" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.50757575">
<folding>
<element signature="imports" expanded="true" />
</folding>
Added: development/laboratory/users/niclas/iso8583/module.xml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/iso8583/module.xml Wed Apr 27
21:41:37 2005
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2004 Stephen J McConnell
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.
+
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="dpml-iso8583" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="build" depends="standard.build">
+ <x:module index="index.xml">
+ <header>
+ <svn
href="http://scm..dpml.net/repos/dpml/development/laboratory/users/niclas/processing"/>
+ <home href="http://planet.dpml.net/dpml/products/processing"/>
+ </header>
+ </x:module>
+ </target>
+
+ <target name="install" depends="standard.install,checkstyle,junit-report">
+ <x:javadoc>
+ <link href="http://java.sun.com/j2se/1.4/docs/api"/>
+ <group title="ISO8583 API">
+ <package name="net.dpml.iso8583"/>
+ </group>
+ </x:javadoc>
+ </target>
+
+ <target name="junit-report" depends="test">
+ <mkdir dir="target/reports/junit"/>
+ <junitreport todir="target/reports/junit">
+ <fileset dir=".">
+ <include name="**/target/test-reports/TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="target/reports/junit"/>
+ </junitreport>
+ </target>
+
+</project>
Modified: development/laboratory/users/niclas/iso8583/mti/build.xml
==============================================================================
--- development/laboratory/users/niclas/iso8583/mti/build.xml (original)
+++ development/laboratory/users/niclas/iso8583/mti/build.xml Wed Apr 27
21:41:37 2005
@@ -19,7 +19,9 @@
<project name="dpml-iso8583-mti" default="install" basedir="."
xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core"
>
- <transit:import uri="artifact:template:dpml/magic/standard"/>
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
</project>
Modified: development/laboratory/users/niclas/iso8583/mti/mti.iml
==============================================================================
--- development/laboratory/users/niclas/iso8583/mti/mti.iml (original)
+++ development/laboratory/users/niclas/iso8583/mti/mti.iml Wed Apr 27
21:41:37 2005
@@ -16,6 +16,10 @@
<orderEntry type="module" module-name="api" />
<orderEntry type="module" module-name="elements" />
<orderEntry type="module" module-name="channels" />
+ <orderEntry type="library" name="Clover" level="application" />
+ <orderEntry type="library" name="JMock" level="application" />
+ <orderEntry type="library" name="junit" level="application" />
+ <orderEntry type="library" name="Metro Unit" level="application" />
<orderEntryProperties />
</component>
</module>
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2100.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2100.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.PosCapability;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2100" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2100
+ implements MTI
+{
+ static private final String MTI_NO = "2100";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2100( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateEffective.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateExpiration.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( PosDataCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( CardSequenceNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( PosCapability.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( Track2Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( Track3Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ServiceCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( Track1Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( DateEffective.class ).extract( msg );
+ m_dataElementManager.lookup( DateExpiration.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( PosDataCode.class ).extract( msg );
+ m_dataElementManager.lookup( CardSequenceNumber.class ).extract( msg
);
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).extract(
msg );
+ m_dataElementManager.lookup( PosCapability.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( Track2Data.class ).extract( msg );
+ m_dataElementManager.lookup( Track3Data.class ).extract( msg );
+ m_dataElementManager.lookup( ServiceCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( Track1Data.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2101.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2101.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.PosCapability;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2101" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2101
+ implements MTI
+{
+ static private final String MTI_NO = "2101";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2101( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateEffective.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateExpiration.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( PosDataCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( CardSequenceNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( PosCapability.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( Track2Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( Track3Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ServiceCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( Track1Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( DateEffective.class ).extract( msg );
+ m_dataElementManager.lookup( DateExpiration.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( PosDataCode.class ).extract( msg );
+ m_dataElementManager.lookup( CardSequenceNumber.class ).extract( msg
);
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).extract(
msg );
+ m_dataElementManager.lookup( PosCapability.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( Track2Data.class ).extract( msg );
+ m_dataElementManager.lookup( Track3Data.class ).extract( msg );
+ m_dataElementManager.lookup( ServiceCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( Track1Data.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2110.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2110.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2110" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2110
+ implements MTI
+{
+ static private final String MTI_NO = "2110";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2110( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).populate(
msg, true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ApprovalCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( TransportData.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).extract(
msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ApprovalCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( TransportData.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2120.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2120.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2120" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2120
+ implements MTI
+{
+ static private final String MTI_NO = "2120";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2120( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateEffective.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateExpiration.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( PosDataCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( CardSequenceNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( Track2Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( Track3Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ServiceCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( Track1Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( DateEffective.class ).extract( msg );
+ m_dataElementManager.lookup( DateExpiration.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( PosDataCode.class ).extract( msg );
+ m_dataElementManager.lookup( CardSequenceNumber.class ).extract( msg
);
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).extract(
msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( Track2Data.class ).extract( msg );
+ m_dataElementManager.lookup( Track3Data.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( ServiceCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( Track1Data.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2121.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2121.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2121" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2121
+ implements MTI
+{
+ static private final String MTI_NO = "2121";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2121( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateEffective.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateExpiration.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( PosDataCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( CardSequenceNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( Track2Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( Track3Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ServiceCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( Track1Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( DateEffective.class ).extract( msg );
+ m_dataElementManager.lookup( DateExpiration.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( PosDataCode.class ).extract( msg );
+ m_dataElementManager.lookup( CardSequenceNumber.class ).extract( msg
);
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).extract(
msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( Track2Data.class ).extract( msg );
+ m_dataElementManager.lookup( Track3Data.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( ServiceCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( Track1Data.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2130.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2130.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2130" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2130
+ implements MTI
+{
+ static private final String MTI_NO = "2130";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2130( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).populate(
msg, true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ApprovalCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup( TransportData.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).extract(
msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ApprovalCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup( TransportData.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2140.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2140.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2140" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2140
+ implements MTI
+{
+ static private final String MTI_NO = "2140";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2140( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ProcessingCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( AmountTransaction.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateEffective.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateExpiration.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( PosDataCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( CardSequenceNumber.class ).populate(
msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup( AmountsOriginal.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( Track2Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( Track3Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ApprovalCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( ServiceCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).populate( msg, true );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).populate( msg, true );
+ m_dataElementManager.lookup( Track1Data.class ).populate( msg, true
);
+ m_dataElementManager.lookup( AmountsFees.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+ m_dataElementManager.lookup( PrimaryAccountNumber.class ).extract(
msg );
+ m_dataElementManager.lookup( ProcessingCode.class ).extract( msg );
+ m_dataElementManager.lookup( AmountTransaction.class ).extract( msg
);
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( DateEffective.class ).extract( msg );
+ m_dataElementManager.lookup( DateExpiration.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( PosDataCode.class ).extract( msg );
+ m_dataElementManager.lookup( CardSequenceNumber.class ).extract( msg
);
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( MerchantCategoryCode.class ).extract(
msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup( AmountsOriginal.class ).extract( msg );
+ m_dataElementManager.lookup(
AcquiringInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( Track2Data.class ).extract( msg );
+ m_dataElementManager.lookup( Track3Data.class ).extract( msg );
+ m_dataElementManager.lookup( ApprovalCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( ServiceCode.class ).extract( msg );
+ m_dataElementManager.lookup(
CardAcceptorTerminalIdentification.class ).extract( msg );
+ m_dataElementManager.lookup( CardAcceptorIdentificationCode.class
).extract( msg );
+ m_dataElementManager.lookup( Track1Data.class ).extract( msg );
+ m_dataElementManager.lookup( AmountsFees.class ).extract( msg );
+ m_dataElementManager.lookup(
AuthorizingAgentInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2150.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2150.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2150" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2150
+ implements MTI
+{
+ static private final String MTI_NO = "2150";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2150( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionLifeCycleIdentificationData.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2804.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2804.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2804" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2804
+ implements MTI
+{
+ static private final String MTI_NO = "2804";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2804( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, false );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, false );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, false );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, false );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).populate( msg, false );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).populate( msg, false );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, false );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).extract( msg );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2805.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2805.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2805" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2805
+ implements MTI
+{
+ static private final String MTI_NO = "2805";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2805( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).populate( msg, true );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).populate( msg, true );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).extract( msg );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2814.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2814.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2814" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2814
+ implements MTI
+{
+ static private final String MTI_NO = "2814";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2814( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( TransportData.class ).populate( msg,
true );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).populate( msg, true );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).populate( msg, true );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).extract(
msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( TransportData.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).extract( msg );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2824.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2824.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2824" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2824
+ implements MTI
+{
+ static private final String MTI_NO = "2824";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2824( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2825.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2825.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2825" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2825
+ implements MTI
+{
+ static private final String MTI_NO = "2825";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2825( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2834.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2834.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2834" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2834
+ implements MTI
+{
+ static private final String MTI_NO = "2834";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2834( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( TransportData.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( MessageErrorIndicator.class ).extract(
msg );
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( TransportData.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2844.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2844.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2844" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2844
+ implements MTI
+{
+ static private final String MTI_NO = "2844";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2844( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( FunctionCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup( MessageReasonCode.class ).populate(
msg, true );
+ m_dataElementManager.lookup( DateReconciliation.class ).populate(
msg, true );
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).populate( msg, true );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).populate( msg, true );
+ m_dataElementManager.lookup( ActionCode.class ).populate( msg, true
);
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).populate( msg, true );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).populate( msg, true );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( FunctionCode.class ).extract( msg );
+ m_dataElementManager.lookup( MessageReasonCode.class ).extract( msg
);
+ m_dataElementManager.lookup( DateReconciliation.class ).extract( msg
);
+ m_dataElementManager.lookup( ReconciliationIndicator.class
).extract( msg );
+ m_dataElementManager.lookup(
ForwardingInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup( ActionCode.class ).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).extract( msg );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2854.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/main/net/dpml/iso8583/data/mti/Mti2854.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.iso8583.data.mti;
+
+import net.dpml.iso8583.channels.ISOMessageImpl;
+import net.dpml.iso8583.data.DataElementAlreadyContainsValueException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.NoSuchDataElementException;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.service.ServiceException;
+import net.dpml.service.ServiceManager;
+
+/**
+ * @metro.component name="Mti2854" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.data.MTI"
+ */
+public class Mti2854
+ implements MTI
+{
+ static private final String MTI_NO = "2854";
+
+ private DataElementManager m_dataElementManager;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ */
+ public Mti2854( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ }
+
+ public ISOMessage assemble()
+ throws ISOException, NoSuchDataElementException
+ {
+ String mti = MTI_NO;
+ ISOMessage msg = new ISOMessageImpl( mti );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).populate( msg, true );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).populate( msg, true );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).populate( msg, true );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).populate( msg, true );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).populate( msg, true );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).populate( msg,
true );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).populate( msg, true );
+ return msg;
+ }
+
+ public boolean disassemble( ISOMessage msg )
+ throws ISOException, NoSuchDataElementException,
DataElementAlreadyContainsValueException
+ {
+ String mti = msg.getMtiNumber();
+ if( MTI_NO.equals( mti ) == false )
+ return false;
+
+ m_dataElementManager.lookup( DateAndTimeTransmission.class
).extract( msg );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class
).extract( msg );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferMessageControl.class
).extract( msg );
+ m_dataElementManager.lookup( BatchFileTransferControlData.class
).extract( msg );
+ m_dataElementManager.lookup( FileTransferDescriptionData.class
).extract( msg );
+ m_dataElementManager.lookup(
TransactionDestinationInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
TransactionOriginatorInstitutionIdentificationCode.class ).extract( msg );
+ m_dataElementManager.lookup(
ReceivingInstitutionIdentificationCode.class ).extract( msg );
+ return true;
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2100TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2100TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,136 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.PosCapability;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2100;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2100TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ DateEffective.class,
+ DateExpiration.class,
+ TransactionLifeCycleIdentificationData.class,
+ PosDataCode.class,
+ CardSequenceNumber.class,
+ FunctionCode.class,
+ MerchantCategoryCode.class,
+ PosCapability.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ Track2Data.class,
+ Track3Data.class,
+ ServiceCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ Track1Data.class,
+ AmountsFees.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2100 mti = new Mti2100( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2100", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2100 mti = new Mti2100( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2100" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2100 mti = new Mti2100( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2101TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2101TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,136 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.PosCapability;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2101;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2101TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ DateEffective.class,
+ DateExpiration.class,
+ TransactionLifeCycleIdentificationData.class,
+ PosDataCode.class,
+ CardSequenceNumber.class,
+ FunctionCode.class,
+ MerchantCategoryCode.class,
+ PosCapability.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ Track2Data.class,
+ Track3Data.class,
+ ServiceCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ Track1Data.class,
+ AmountsFees.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2101 mti = new Mti2101( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2101", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2101 mti = new Mti2101( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2101" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2101 mti = new Mti2101( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2110TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2110TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,128 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.iso8583.data.mti.Mti2110;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2110TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ MessageErrorIndicator.class,
+ TransactionLifeCycleIdentificationData.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ApprovalCode.class,
+ ActionCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ AmountsFees.class,
+ AuthorizingAgentInstitutionIdentificationCode.class,
+ TransportData.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2110 mti = new Mti2110( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2110", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2110 mti = new Mti2110( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2110" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2110 mti = new Mti2110( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2120TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2120TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,140 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2120;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2120TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ DateEffective.class,
+ DateExpiration.class,
+ TransactionLifeCycleIdentificationData.class,
+ PosDataCode.class,
+ CardSequenceNumber.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ MerchantCategoryCode.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ Track2Data.class,
+ Track3Data.class,
+ ActionCode.class,
+ ServiceCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ Track1Data.class,
+ AmountsFees.class,
+ AuthorizingAgentInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2120 mti = new Mti2120( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2120", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2120 mti = new Mti2120( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2110" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2120 mti = new Mti2120( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2121TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2121TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,140 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2121;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2121TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ DateEffective.class,
+ DateExpiration.class,
+ TransactionLifeCycleIdentificationData.class,
+ PosDataCode.class,
+ CardSequenceNumber.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ MerchantCategoryCode.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ Track2Data.class,
+ Track3Data.class,
+ ActionCode.class,
+ ServiceCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ Track1Data.class,
+ AmountsFees.class,
+ AuthorizingAgentInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2121 mti = new Mti2121( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2121", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2121 mti = new Mti2121( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2121" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2121 mti = new Mti2121( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2130TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2130TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,124 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.iso8583.data.mti.Mti2130;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2130TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ MessageErrorIndicator.class,
+ TransactionLifeCycleIdentificationData.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ApprovalCode.class,
+ ActionCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ AmountsFees.class,
+ TransportData.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2130 mti = new Mti2130( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2130", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2130 mti = new Mti2130( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2130" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2130 mti = new Mti2130( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2140TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2140TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,148 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.AcquiringInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.AmountTransaction;
+import net.dpml.iso8583.data.elements.AmountsFees;
+import net.dpml.iso8583.data.elements.AmountsOriginal;
+import net.dpml.iso8583.data.elements.ApprovalCode;
+import
net.dpml.iso8583.data.elements.AuthorizingAgentInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.CardAcceptorIdentificationCode;
+import net.dpml.iso8583.data.elements.CardAcceptorTerminalIdentification;
+import net.dpml.iso8583.data.elements.CardSequenceNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateEffective;
+import net.dpml.iso8583.data.elements.DateExpiration;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MerchantCategoryCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.PosDataCode;
+import net.dpml.iso8583.data.elements.PrimaryAccountNumber;
+import net.dpml.iso8583.data.elements.ProcessingCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.ServiceCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.Track1Data;
+import net.dpml.iso8583.data.elements.Track2Data;
+import net.dpml.iso8583.data.elements.Track3Data;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2140;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2140TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ PrimaryAccountNumber.class,
+ ProcessingCode.class,
+ AmountTransaction.class,
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ DateEffective.class,
+ DateExpiration.class,
+ TransactionLifeCycleIdentificationData.class,
+ PosDataCode.class,
+ CardSequenceNumber.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ MerchantCategoryCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ AmountsOriginal.class,
+ AcquiringInstitutionIdentificationCode.class,
+ ForwardingInstitutionIdentificationCode.class,
+ Track2Data.class,
+ Track3Data.class,
+ ApprovalCode.class,
+ ActionCode.class,
+ ServiceCode.class,
+ CardAcceptorTerminalIdentification.class,
+ CardAcceptorIdentificationCode.class,
+ Track1Data.class,
+ AmountsFees.class,
+ AuthorizingAgentInstitutionIdentificationCode.class,
+ BatchFileTransferMessageControl.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2140 mti = new Mti2140( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2140", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2140 mti = new Mti2140( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2140" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2140 mti = new Mti2140( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2150TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2150TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,92 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.TransactionLifeCycleIdentificationData;
+import net.dpml.iso8583.data.mti.Mti2150;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2150TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ SystemsTraceAuditNumber.class,
+ TransactionLifeCycleIdentificationData.class,
+ BatchFileTransferMessageControl.class,
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2150 mti = new Mti2150( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2150", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2150 mti = new Mti2150( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2150" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2150 mti = new Mti2150( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2804TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2804TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,112 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2804;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2804TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ BatchFileTransferControlData.class,
+ FileTransferDescriptionData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2804 mti = new Mti2804( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2804", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2804 mti = new Mti2804( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2804" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2804 mti = new Mti2804( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2805TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2805TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,112 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2805;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2805TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ BatchFileTransferControlData.class,
+ FileTransferDescriptionData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2805 mti = new Mti2805( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2805", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2805 mti = new Mti2805( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2805" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2805 mti = new Mti2805( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2814TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2814TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,114 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.iso8583.data.mti.Mti2814;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2814TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ MessageErrorIndicator.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ActionCode.class,
+ TransportData.class,
+ BatchFileTransferControlData.class,
+ FileTransferDescriptionData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2814 mti = new Mti2814( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2814", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2814 mti = new Mti2814( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2814" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2814 mti = new Mti2814( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2824TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2824TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,108 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2824;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2824TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ FunctionCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ActionCode.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2824 mti = new Mti2824( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2824", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2824 mti = new Mti2824( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2824" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2824 mti = new Mti2824( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2825TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2825TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,108 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2825;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2825TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ FunctionCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ActionCode.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2825 mti = new Mti2825( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2825", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2825 mti = new Mti2825( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2825" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2825 mti = new Mti2825( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2834TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2834TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,110 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.MessageErrorIndicator;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.TransportData;
+import net.dpml.iso8583.data.mti.Mti2834;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2834TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ MessageErrorIndicator.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ActionCode.class,
+ TransportData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2834 mti = new Mti2834( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2834", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2834 mti = new Mti2834( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2834" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2834 mti = new Mti2834( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2844TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2844TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,116 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.DateReconciliation;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import
net.dpml.iso8583.data.elements.ForwardingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.data.elements.MessageReasonCode;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.ReconciliationIndicator;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2844;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2844TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ FunctionCode.class,
+ MessageReasonCode.class,
+ DateReconciliation.class,
+ ReconciliationIndicator.class,
+ ForwardingInstitutionIdentificationCode.class,
+ ActionCode.class,
+ BatchFileTransferMessageControl.class,
+ BatchFileTransferControlData.class,
+ FileTransferDescriptionData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2844 mti = new Mti2844( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2844", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2844 mti = new Mti2844( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2844" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2844 mti = new Mti2844( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added:
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2854TestCase.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/mti/src/test/net/dpml/iso8583/test/mti/Mti2854TestCase.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,104 @@
+package net.dpml.iso8583.test.mti;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.BatchFileTransferControlData;
+import net.dpml.iso8583.data.elements.BatchFileTransferMessageControl;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.FileTransferDescriptionData;
+import net.dpml.iso8583.data.elements.ReceivingInstitutionIdentificationCode;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import
net.dpml.iso8583.data.elements.TransactionDestinationInstitutionIdentificationCode;
+import
net.dpml.iso8583.data.elements.TransactionOriginatorInstitutionIdentificationCode;
+import net.dpml.iso8583.data.mti.Mti2854;
+import net.dpml.metro.unit.TestServiceManager;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+import java.util.HashMap;
+
+public class Mti2854TestCase extends MockObjectTestCase
+{
+ private TestServiceManager m_serviceManager;
+ private static final Class[] DATAELEMENT_SET =
+ {
+ DateAndTimeTransmission.class,
+ SystemsTraceAuditNumber.class,
+ DateAndTimeLocalTransaction.class,
+ BatchFileTransferMessageControl.class,
+ BatchFileTransferControlData.class,
+ FileTransferDescriptionData.class,
+ TransactionDestinationInstitutionIdentificationCode.class,
+ TransactionOriginatorInstitutionIdentificationCode.class,
+ ReceivingInstitutionIdentificationCode.class
+ };
+
+ public void setUp()
+ throws Exception
+ {
+ }
+
+ public void testAssemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "populate"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2854 mti = new Mti2854( m_serviceManager );
+ ISOMessage mess = mti.assemble();
+ assertEquals( "2854", mess.getMtiNumber() );
+ }
+
+ public void testDisassemble()
+ throws Exception
+ {
+ Mock dataElementMock = new Mock( DataElement.class );
+ dataElementMock.expects( atLeastOnce() ).method( "extract"
).withAnyArguments();
+ DataElement dataElement = (DataElement) dataElementMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ for( int i = 0; i < DATAELEMENT_SET.length; i++ )
+ {
+ elementManagerMock.expects( once() ).method( "lookup" ).with(
eq( DATAELEMENT_SET[ i ] ) ).will( returnValue( dataElement ) );
+ }
+
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2854 mti = new Mti2854( m_serviceManager );
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2854" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+ assertTrue( mti.disassemble( mess ) );
+ }
+
+ public void testWrongMti()
+ throws Exception
+ {
+ Mock msgMock = new Mock( ISOMessage.class );
+ msgMock.expects( once() ).method( "getMtiNumber"
).withNoArguments().will( returnValue( "2120" ) );
+ ISOMessage mess = (ISOMessage) msgMock.proxy();
+
+ Mock elementManagerMock = new Mock( DataElementManager.class );
+ DataElementManager man = (DataElementManager)
elementManagerMock.proxy();
+ HashMap map = new HashMap();
+ map.put( "dataelement-manager", man );
+ m_serviceManager = new TestServiceManager( map );
+ Mti2854 mti = new Mti2854( m_serviceManager );
+ assertFalse( mti.disassemble( mess ) );
+ }
+}
Added: development/laboratory/users/niclas/iso8583/network/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/iso8583/network/build.xml Wed
Apr 27 21:41:37 2005
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2005 Niclas Hedhman
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.
+
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="dpml-iso8583-network" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core"
+>
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="build" depends="standard.build" >
+ <x:block name="network">
+ <x:component name="network-service"
class="net.dpml.iso8583.network.impl.DefaultNetworkService" >
+ <x:dependencies>
+ <x:dependency key="mti804" source="mti2804" />
+ <x:dependency key="mti805" source="mti2805" />
+ <x:dependency key="mti814" source="mti2814" />
+ <x:dependency key="mti824" source="mti2824" />
+ <x:dependency key="mti825" source="mti2825" />
+ <x:dependency key="mti834" source="mti2834" />
+ <x:dependency key="mti844" source="mti2844" />
+ <x:dependency key="mti854" source="mti2854" />
+ </x:dependencies>
+ </x:component>
+
+ <x:component name="mti2804"
class="net.dpml.iso8583.data.mti.Mti2804" >
+
+ </x:component>
+ <x:component name="mti2805"
class="net.dpml.iso8583.data.mti.Mti2805" >
+
+ </x:component>
+ <x:component name="mti2814"
class="net.dpml.iso8583.data.mti.Mti2814" >
+
+ </x:component>
+ <x:component name="mti2824"
class="net.dpml.iso8583.data.mti.Mti2824" >
+
+ </x:component>
+ <x:component name="mti2825"
class="net.dpml.iso8583.data.mti.Mti2825" >
+
+ </x:component>
+ <x:component name="mti2834"
class="net.dpml.iso8583.data.mti.Mti2834" >
+
+ </x:component>
+ <x:component name="mti2844"
class="net.dpml.iso8583.data.mti.Mti2844" >
+
+ </x:component>
+ <x:component name="mti2854"
class="net.dpml.iso8583.data.mti.Mti2854" >
+
+ </x:component>
+ </x:block>
+ </target>
+</project>
Added: development/laboratory/users/niclas/iso8583/network/network.iml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/iso8583/network/network.iml Wed
Apr 27 21:41:37 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <exclude-output />
+ <exclude-exploded />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false"
/>
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="api" />
+ <orderEntry type="library" name="junit" level="application" />
+ <orderEntry type="library" name="Clover" level="application" />
+ <orderEntry type="library" name="Metro Public" level="application" />
+ <orderEntry type="module" module-name="elements" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Added:
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/network/impl/DefaultNetworkService.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/network/src/main/net/dpml/iso8583/network/impl/DefaultNetworkService.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,94 @@
+package net.dpml.iso8583.network.impl;
+
+import net.dpml.iso8583.network.NetworkService;
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.MTI;
+import net.dpml.iso8583.data.ISOMessage;
+import net.dpml.iso8583.data.elements.ActionCode;
+import net.dpml.iso8583.data.elements.DateAndTimeTransmission;
+import net.dpml.iso8583.data.elements.SystemsTraceAuditNumber;
+import net.dpml.iso8583.data.elements.DateAndTimeLocalTransaction;
+import net.dpml.iso8583.data.elements.FunctionCode;
+import net.dpml.iso8583.comm.Channel;
+import net.dpml.service.ServiceManager;
+import net.dpml.service.ServiceException;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
+
+/**
+ * @metro.component name="default-network-service" lifestyle="singleton"
+ * @metro.service type="net.dpml.iso8583.network.NetworkService"
+ */
+public class DefaultNetworkService
+ implements NetworkService
+{
+ private DataElementManager m_dataElementManager;
+ private MTI m_mti804;
+ private MTI m_mti805;
+ private MTI m_mti814;
+ private MTI m_mti824;
+ private MTI m_mti825;
+ private MTI m_mti834;
+ private MTI m_mti844;
+ private MTI m_mti854;
+ private Channel m_channel;
+ private SimpleDateFormat m_formatterLocal;
+ private SimpleDateFormat m_formatterUtc;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ * @throws ServiceException if the dependencies can not be fulfilled
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti804"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti805"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti814"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti824"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti825"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti834"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti844"
+ * @metro.dependency type="net.dpml.iso8583.data.MTI" key="mti854"
+ * @metro.dependency type="net.dpml.iso8583.comm.Channel" key="channel"
+ * @metro.dependency key="dataelement-manager"
type="net.dpml.iso8583.data.DataElementManager"
+ */
+ public DefaultNetworkService( ServiceManager man )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ m_mti804 = (MTI) man.lookup( "mti804" );
+ m_mti805 = (MTI) man.lookup( "mti805" );
+ m_mti814 = (MTI) man.lookup( "mti814" );
+ m_mti824 = (MTI) man.lookup( "mti824" );
+ m_mti825 = (MTI) man.lookup( "mti825" );
+ m_mti834 = (MTI) man.lookup( "mti834" );
+ m_mti844 = (MTI) man.lookup( "mti844" );
+ m_mti854 = (MTI) man.lookup( "mti854" );
+ m_channel = (Channel) man.lookup( "channel" );
+ m_formatterLocal = new SimpleDateFormat( "MMDDhhmmss" );
+ m_formatterUtc = new SimpleDateFormat( "MMDDhhmmss" );
+
+ final TimeZone timeZone = TimeZone.getTimeZone( "UTC" );
+ m_formatterUtc.setTimeZone( timeZone );
+ }
+
+ public DataElement ping()
+ throws ISOException
+ {
+ Date now = new Date();
+ String localtime = m_formatterLocal.format( now );
+ String utc = m_formatterUtc.format( now );
+ m_dataElementManager.lookup( DateAndTimeTransmission.class ).set(
utc );
+ m_dataElementManager.lookup( SystemsTraceAuditNumber.class ).set( ""
+ System.currentTimeMillis() );
+ m_dataElementManager.lookup( DateAndTimeLocalTransaction.class
).set( localtime );
+ m_dataElementManager.lookup( FunctionCode.class ).set( "851" );
+ ISOMessage msg = m_mti804.assemble();
+ ISOMessage result = m_channel.send( msg );
+ m_mti805.disassemble( result );
+ ActionCode code = (ActionCode) m_dataElementManager.lookup(
ActionCode.class );
+ return code;
+ }
+}
Modified: development/laboratory/users/niclas/iso8583/packaging/packaging.iml
==============================================================================
--- development/laboratory/users/niclas/iso8583/packaging/packaging.iml
(original)
+++ development/laboratory/users/niclas/iso8583/packaging/packaging.iml Wed
Apr 27 21:41:37 2005
@@ -14,6 +14,7 @@
<orderEntry type="library" name="Metro Public" level="application" />
<orderEntry type="library" name="JPos" level="project" />
<orderEntry type="library" name="Clover" level="application" />
+ <orderEntry type="module" module-name="api" />
<orderEntryProperties />
</component>
</module>
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1Packager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1Packager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1Packager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,36 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
+import org.jpos.iso.ISOComponent;
+import org.jpos.iso.ISOException;
+
+import java.io.InputStream;
+import java.io.IOException;
/** Metro Wrapper for the Base1Packager in JPos.
*
* @metro.component name="base1-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class Base1Packager extends org.jpos.iso.packager.Base1Packager
+public class Base1Packager
+ implements Packager
{
+ private final org.jpos.iso.packager.Base1Packager m_base1Packager;
+
/**
* @metro.logger name="base1"
*/
public Base1Packager( Logger logger )
{
- super();
+ m_base1Packager = new org.jpos.iso.packager.Base1Packager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_base1Packager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1SubFieldPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1SubFieldPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base1SubFieldPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the Base1SubFieldPackager in JPos.
*
* @metro.component name="base1-subfield-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class Base1SubFieldPackager extends
org.jpos.iso.packager.Base1SubFieldPackager
+public class Base1SubFieldPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.Base1SubFieldPackager
m_base1SubFieldPackager;
+
/**
* @metro.logger name="base1"
*/
public Base1SubFieldPackager( Logger logger )
{
- super();
+ m_base1SubFieldPackager = new
org.jpos.iso.packager.Base1SubFieldPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_base1SubFieldPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base24Packager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base24Packager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Base24Packager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the Base24Packager in JPos.
*
* @metro.component name="base24-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class Base24Packager extends org.jpos.iso.packager.BASE24Packager
+public class Base24Packager
+ implements Packager
{
+ private final org.jpos.iso.packager.BASE24Packager m_base24Packager;
+
/**
* @metro.logger name="base24"
*/
public Base24Packager( Logger logger )
{
- super();
+ m_base24Packager = new org.jpos.iso.packager.BASE24Packager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_base24Packager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubElementPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubElementPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubElementPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the CTCSubElementPackager in JPos.
*
* @metro.component name="base1-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class CtcSubElementPackager extends
org.jpos.iso.packager.CTCSubElementPackager
+public class CtcSubElementPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.CTCSubElementPackager
m_ctcSubElementPackager;
+
/**
* @metro.logger name="ctc-se"
*/
public CtcSubElementPackager( Logger logger )
{
- super();
+ m_ctcSubElementPackager = new
org.jpos.iso.packager.CTCSubElementPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_ctcSubElementPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubFieldPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubFieldPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/CtcSubFieldPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the CTCSubFieldPackager in JPos.
*
* @metro.component name="base1-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class CtcSubFieldPackager extends
org.jpos.iso.packager.CTCSubFieldPackager
+public class CtcSubFieldPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.CTCSubFieldPackager
m_ctcSubFieldPackager;
+
/**
* @metro.logger name="ctc-se"
*/
public CtcSubFieldPackager( Logger logger )
{
- super();
+ m_ctcSubFieldPackager = new
org.jpos.iso.packager.CTCSubFieldPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_ctcSubFieldPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the EuroPackager in JPos.
*
* @metro.component name="euro-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class EuroPackager extends org.jpos.iso.packager.EuroPackager
+public class EuroPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.EuroPackager m_euroPackager;
+
/**
* @metro.logger name="euro"
*/
public EuroPackager( Logger logger )
{
- super();
+ m_euroPackager = new org.jpos.iso.packager.EuroPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_euroPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroSubFieldPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroSubFieldPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/EuroSubFieldPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the EuroSubFieldPackager in JPos.
*
* @metro.component name="euro-subfield-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class EuroSubFieldPackager extends
org.jpos.iso.packager.EuroSubFieldPackager
+public class EuroSubFieldPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.EuroSubFieldPackager
m_euroSubFieldPackager;
+
/**
* @metro.logger name="euro-subfield"
*/
public EuroSubFieldPackager( Logger logger )
{
- super();
+ m_euroSubFieldPackager = new
org.jpos.iso.packager.EuroSubFieldPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_euroSubFieldPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericPackager.java
Wed Apr 27 21:41:37 2005
@@ -28,6 +28,7 @@
import net.dpml.parameters.ParameterException;
import net.dpml.parameters.Parameters;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -35,17 +36,20 @@
/** Metro Wrapper for the GenericPackager in JPos.
*
* @metro.component name="generic-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class GenericPackager extends org.jpos.iso.packager.GenericPackager
+public class GenericPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.GenericPackager m_genericPackager;
+
/**
* @metro.logger name="generic"
*/
public GenericPackager( Logger logger, Parameters params )
throws ParameterException, MalformedURLException, ISOException,
IOException
{
- super( resolve( params ) );
+ m_genericPackager = new org.jpos.iso.packager.GenericPackager(
resolve( params ) );
}
static private InputStream resolve( Parameters params )
@@ -55,5 +59,10 @@
URL url = new URL( uri );
return url.openStream();
}
+
+ public ISOPackager getISOPackager()
+ {
+ return m_genericPackager;
+ }
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericSubFieldPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericSubFieldPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericSubFieldPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,6 +19,7 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -26,17 +27,25 @@
/** Metro Wrapper for the GenericSubFieldPackager in JPos.
*
* @metro.component name="generic-subfield-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class GenericSubFieldPackager extends
org.jpos.iso.packager.GenericSubFieldPackager
+public class GenericSubFieldPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.GenericSubFieldPackager
m_genericSubFieldPackager;
+
/**
* @metro.logger name="generic-subfield"
*/
public GenericSubFieldPackager( Logger logger )
throws ISOException
{
- super();
+ m_genericSubFieldPackager = new
org.jpos.iso.packager.GenericSubFieldPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_genericSubFieldPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericValidatingPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericValidatingPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/GenericValidatingPackager.java
Wed Apr 27 21:41:37 2005
@@ -28,6 +28,7 @@
import net.dpml.parameters.ParameterException;
import net.dpml.parameters.Parameters;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -35,18 +36,20 @@
/** Metro Wrapper for the GenericValidatingPackager in JPos.
*
* @metro.component name="generic-validating-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
- * @metro.service type="org.jpos.iso.ISOValidator"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class GenericValidatingPackager extends
org.jpos.iso.packager.GenericValidatingPackager
+public class GenericValidatingPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.GenericValidatingPackager
m_genericValidatingPackager;
+
/**
* @metro.logger name="generic-validating"
*/
public GenericValidatingPackager( Logger logger, Parameters params )
throws ParameterException, MalformedURLException, ISOException,
IOException
{
- super( resolve( params ) );
+ m_genericValidatingPackager = new
org.jpos.iso.packager.GenericValidatingPackager( resolve( params ) );
}
static private InputStream resolve( Parameters params )
@@ -56,5 +59,10 @@
URL url = new URL( uri );
return url.openStream();
}
+
+ public ISOPackager getISOPackager()
+ {
+ return m_genericValidatingPackager;
+ }
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISO87APackager in JPos.
*
* @metro.component name="ISO87A-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISO87APackager extends org.jpos.iso.packager.ISO87APackager
+public class ISO87APackager
+ implements Packager
{
+ private final org.jpos.iso.packager.ISO87APackager m_iso87APackager;
+
/**
* @metro.logger name="iso87a"
*/
public ISO87APackager( Logger logger )
{
- super();
+ m_iso87APackager = new org.jpos.iso.packager.ISO87APackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_iso87APackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackagerBBitmap.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackagerBBitmap.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87APackagerBBitmap.java
Wed Apr 27 21:41:37 2005
@@ -19,19 +19,28 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISO87APackagerBBitmap in JPos.
*
* @metro.component name="ISO87APackagerBBitmap-packager"
lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISO87APackagerBBitmap extends
org.jpos.iso.packager.ISO87APackagerBBitmap
+public class ISO87APackagerBBitmap
+ implements Packager
{
+ private final org.jpos.iso.packager.ISO87APackagerBBitmap
m_iso87APackagerBBitmap;
+
public ISO87APackagerBBitmap( Logger logger )
{
- super();
+ m_iso87APackagerBBitmap = new
org.jpos.iso.packager.ISO87APackagerBBitmap();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_iso87APackagerBBitmap;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87BPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87BPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO87BPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISO87BPackager in JPos.
*
* @metro.component name="ISO87B-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISO87BPackager extends org.jpos.iso.packager.ISO87BPackager
+public class ISO87BPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.ISO87BPackager m_iso87BPackager;
+
/**
* @metro.logger name="iso87b"
*/
public ISO87BPackager( Logger logger )
{
- super();
+ m_iso87BPackager = new org.jpos.iso.packager.ISO87BPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_iso87BPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93APackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93APackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93APackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISO93APackager in JPos.
*
* @metro.component name="ISO93A-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISO93APackager extends org.jpos.iso.packager.ISO93APackager
+public class ISO93APackager
+ implements Packager
{
+ private final org.jpos.iso.packager.ISO93APackager m_iso93APackager;
+
/**
* @metro.logger name="iso93a"
*/
public ISO93APackager( Logger logger )
{
- super();
+ m_iso93APackager = new org.jpos.iso.packager.ISO93APackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_iso93APackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93BPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93BPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISO93BPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISO93BPackager in JPos.
*
* @metro.component name="ISO93B-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISO93BPackager extends org.jpos.iso.packager.ISO93BPackager
+public class ISO93BPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.ISO93BPackager m_iso93BPackager;
+
/**
* @metro.logger name="iso93b"
*/
public ISO93BPackager( Logger logger )
{
- super();
+ m_iso93BPackager = new org.jpos.iso.packager.ISO93BPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_iso93BPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISOBaseValidatingPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISOBaseValidatingPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/ISOBaseValidatingPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,19 +19,28 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the ISOBaseValidatingPackager in JPos.
*
* @metro.component name="ISOBase-validating-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class ISOBaseValidatingPackager extends
org.jpos.iso.packager.ISOBaseValidatingPackager
+public class ISOBaseValidatingPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.ISOBaseValidatingPackager
m_isoBaseValidatingPackager;
+
public ISOBaseValidatingPackager( Logger logger )
{
- super();
+ m_isoBaseValidatingPackager = new
org.jpos.iso.packager.ISOBaseValidatingPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_isoBaseValidatingPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/LogPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/LogPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/LogPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,6 +19,7 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -26,17 +27,25 @@
/** Metro Wrapper for the LogPackager in JPos.
*
* @metro.component name="log-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class LogPackager extends org.jpos.iso.packager.LogPackager
+public class LogPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.LogPackager m_logPackager;
+
/**
* @metro.logger name="log"
*/
public LogPackager( Logger logger )
throws ISOException
{
- super();
+ m_logPackager = new org.jpos.iso.packager.LogPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_logPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/PostPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/PostPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/PostPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the PostPackager in JPos.
*
* @metro.component name="post-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class PostPackager extends org.jpos.iso.packager.PostPackager
+public class PostPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.PostPackager m_postPackager;
+
/**
* @metro.logger name="post"
*/
public PostPackager( Logger logger )
{
- super();
+ m_postPackager = new org.jpos.iso.packager.PostPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_postPackager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Visa1Packager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Visa1Packager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/Visa1Packager.java
Wed Apr 27 21:41:37 2005
@@ -27,23 +27,27 @@
import net.dpml.service.ServiceException;
import net.dpml.service.ServiceManager;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the VISA1 Packager in JPos.
*
* @metro.component name="visa1-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class Visa1Packager extends org.jpos.iso.packager.VISA1Packager
+public class Visa1Packager
+ implements Packager
{
+ private final org.jpos.iso.packager.VISA1Packager m_visa1Packager;
+
/**
* @metro.logger name="visa1"
*/
public Visa1Packager( Logger logger, Parameters params )
throws ServiceException, ParameterException
{
- super( convertIntegerArray( params ),
+ m_visa1Packager = new org.jpos.iso.packager.VISA1Packager(
convertIntegerArray( params ),
params.getParameterAsInteger( "response-field" ),
params.getParameter( "bas-result-code" ),
params.getParameter( "ok-pattern" )
@@ -64,4 +68,9 @@
}
return result;
}
+
+ public ISOPackager getISOPackager()
+ {
+ return m_visa1Packager;
+ }
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92GenericPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92GenericPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92GenericPackager.java
Wed Apr 27 21:41:37 2005
@@ -28,6 +28,7 @@
import net.dpml.parameters.ParameterException;
import net.dpml.parameters.Parameters;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -35,17 +36,20 @@
/** Metro Wrapper for the X92Packager in JPos.
*
* @metro.component name="x92-generic-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class X92GenericPackager extends
org.jpos.iso.packager.X92GenericPackager
+public class X92GenericPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.X92GenericPackager
m_x92GenericPackager;
+
/**
* @metro.logger name="x92-generic"
*/
public X92GenericPackager( Logger logger, Parameters params )
throws ParameterException, MalformedURLException, ISOException,
IOException
{
- super( resolve( params ) );
+ m_x92GenericPackager = new org.jpos.iso.packager.X92GenericPackager(
resolve( params ) );
}
static private InputStream resolve( Parameters params )
@@ -55,5 +59,10 @@
URL url = new URL( uri );
return url.openStream();
}
+
+ public ISOPackager getISOPackager()
+ {
+ return m_x92GenericPackager;
+ }
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92Packager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92Packager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/X92Packager.java
Wed Apr 27 21:41:37 2005
@@ -19,22 +19,31 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOPackager;
/** Metro Wrapper for the X92Packager in JPos.
*
* @metro.component name="x92-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class X92Packager extends org.jpos.iso.packager.X92Packager
+public class X92Packager
+ implements Packager
{
+ private final org.jpos.iso.packager.X92Packager m_x92Packager;
+
/**
* @metro.logger name="x92"
*/
public X92Packager( Logger logger )
{
- super();
+ m_x92Packager = new org.jpos.iso.packager.X92Packager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_x92Packager;
}
}
Modified:
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/XmlPackager.java
==============================================================================
---
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/XmlPackager.java
(original)
+++
development/laboratory/users/niclas/iso8583/packaging/src/main/net/dpml/iso8583/packaging/XmlPackager.java
Wed Apr 27 21:41:37 2005
@@ -19,6 +19,7 @@
package net.dpml.iso8583.packaging;
import net.dpml.logging.Logger;
+import net.dpml.iso8583.comm.Packager;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOPackager;
@@ -26,17 +27,25 @@
/** Metro Wrapper for the XMLPackager in JPos.
*
* @metro.component name="base1-packager" lifestyle="singleton"
- * @metro.service type="org.jpos.iso.ISOPackager"
+ * @metro.service type="net.dpml.iso8583.comm.Packager"
*/
-public class XmlPackager extends org.jpos.iso.packager.XMLPackager
+public class XmlPackager
+ implements Packager
{
+ private final org.jpos.iso.packager.XMLPackager m_xmlPackager;
+
/**
* @metro.logger name="xml"
*/
public XmlPackager( Logger logger )
throws ISOException
{
- super();
+ m_xmlPackager = new org.jpos.iso.packager.XMLPackager();
+ }
+
+ public ISOPackager getISOPackager()
+ {
+ return m_xmlPackager;
}
}
Added: development/laboratory/users/niclas/iso8583/test-app/build.xml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/iso8583/test-app/build.xml Wed
Apr 27 21:41:37 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2005 Niclas Hedhman
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.
+
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="dpml-iso8583-test-app" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="plugin:dpml/magic/dpml-magic-core"
+>
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="build" depends="standard.build" >
+ <x:property name="dataelementmanager.block"
key="dpml-iso8583-elements" feature="block" />
+ <x:property name="network.block" key="dpml-iso8583-network"
feature="block" />
+
+ <x:block name="main">
+
+ <x:component name="app" class="net.dpml.iso8583.test.app.Ping" >
+
+ </x:component>
+
+ <x:include name="elements" uri="${dataelementmanager.block}" />
+ <x:include name="network" uri="${network.block}" />
+ <x:component name="channel"
class="net.dpml.iso8583.channels.XmlChannel" >
+ <x:parameters>
+ <x:parameter name="host" value="localhost" />
+ <x:parameter name="port" value="2828" />
+ </x:parameters>
+ </x:component>
+
+ <x:component name="packager"
class="net.dpml.iso8583.packaging.XmlPackager" />
+ </x:block>
+ </target>
+</project>
Added:
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/test/app/Ping.java
==============================================================================
--- (empty file)
+++
development/laboratory/users/niclas/iso8583/test-app/src/main/net/dpml/iso8583/test/app/Ping.java
Wed Apr 27 21:41:37 2005
@@ -0,0 +1,88 @@
+package net.dpml.iso8583.test.app;
+
+import net.dpml.service.ServiceManager;
+import net.dpml.service.ServiceException;
+import net.dpml.iso8583.data.DataElementManager;
+import net.dpml.iso8583.data.ISOException;
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.network.NetworkService;
+import net.dpml.activity.Startable;
+import net.dpml.logging.Logger;
+
+/**
+ * @metro.component name="ping" lifestyle="singleton"
+ */
+public class Ping
+ implements Startable, Runnable
+{
+ private DataElementManager m_dataElementManager;
+ private Thread m_thread;
+ private NetworkService m_networkService;
+ private Logger m_logger;
+
+ /**
+ *
+ * @param man ServiceManager provided by the container.
+ * @throws ServiceException if lookup of dependencies failed.
+ *
+ * @metro.dependency type="net.dpml.iso8583.data.DataElementManager"
+ * key="dataelement-manager"
+ * @metro.dependency type="net.dpml.iso8583.network.NetworkService"
+ * key="network-service"
+ */
+ public Ping( ServiceManager man, Logger logger )
+ throws ServiceException
+ {
+ m_dataElementManager = (DataElementManager) man.lookup(
"dataelement-manager" );
+ m_networkService = (NetworkService) man.lookup( "network-service" );
+ m_logger = logger;
+ m_logger.info( "Ping component created." );
+ }
+
+ public void start()
+ throws Exception
+ {
+ m_thread = new Thread( this, "Ping" );
+ m_thread.start();
+ m_logger.info( "Ping component started." );
+ }
+
+ public void stop()
+ throws Exception
+ {
+ m_thread.interrupt();
+ }
+
+ public void run()
+ {
+ m_logger.info( "run" );
+ while( true )
+ {
+ try
+ {
+ synchronized( this )
+ {
+ m_logger.info( "wait" );
+ wait( 2000 );
+ m_logger.info( "ping" );
+ m_dataElementManager.beginSession();
+ try
+ {
+ DataElement response = m_networkService.ping();
+ m_logger.info( "pong: " + response );
+
+ } catch( ISOException e )
+ {
+ m_logger.error( e.getMessage(), e );
+ } finally
+ {
+ m_dataElementManager.doneSession();
+ }
+ }
+ } catch( InterruptedException e )
+ {
+ break;
+ }
+ }
+ }
+}
Added: development/laboratory/users/niclas/iso8583/test-app/test-app.iml
==============================================================================
--- (empty file)
+++ development/laboratory/users/niclas/iso8583/test-app/test-app.iml Wed
Apr 27 21:41:37 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <exclude-output />
+ <exclude-exploded />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false"
/>
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="api" />
+ <orderEntry type="module" module-name="elements" />
+ <orderEntry type="module" module-name="network" />
+ <orderEntry type="library" name="junit" level="application" />
+ <orderEntry type="library" name="Metro Public" level="application" />
+ <orderEntry type="library" name="Metro Unit" level="application" />
+ <orderEntryProperties />
+ </component>
+</module>
+
- svn commit: r2432 - in development/laboratory/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/authorization api/src/main/net/dpml/iso8583/comm api/src/main/net/dpml/iso8583/network authorization channels/src/main/net/dpml/iso8583/channels elements/src/main/net/dpml/iso8583/data/elements elements/src/main/net/dpml/iso8583/data/manager mti mti/src/main/net/dpml/iso8583/data/mti mti/src/test/net/dpml/iso8583/test/mti network network/src network/src/main network/src/main/net network/src/main/net/dpml network/src/main/net/dpml/iso8583 network/src/main/net/dpml/iso8583/network network/src/main/net/dpml/iso8583/network/impl network/src/test packaging packaging/src/main/net/dpml/iso8583/packaging test-app test-app/src test-app/src/main test-app/src/main/net test-app/src/main/net/dpml test-app/src/main/net/dpml/iso8583 test-app/src/main/net/dpml/iso8583/test test-app/src/main/net/dpml/iso8583/test/app test-app/src/test, niclas, 04/27/2005
Archive powered by MHonArc 2.6.24.