notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2168 - in development/planet/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/data elements/src/main/net/dpml/iso8583/data/elements
- From: niclas AT hedhman.org
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2168 - in development/planet/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/data elements/src/main/net/dpml/iso8583/data/elements
- Date: Mon, 28 Mar 2005 14:44:38 -0500
Author: niclas AT hedhman.org
Date: Mon Mar 28 14:44:38 2005
New Revision: 2168
Added:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/CompositeDataElement.java
(contents, props changed)
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/ConstructedDataElement.java
(contents, props changed)
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
(contents, props changed)
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AnonymousDataElement.java
(contents, props changed)
Removed:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/CompositeElement.java
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/ConstructedElement.java
Modified:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/DataElement.java
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/Dataset.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardHolderBilling.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardholderBillingFee.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountReconciliation.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountTransaction.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountsOriginal.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CardSequenceNumber.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ContinuationBit.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateCardholderBilling.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateConciliation.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodeAcquiringInstitution.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodePrimaryAccountNumber.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeLocalTransaction.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeTransmission.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateCapture.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateConversion.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateEffective.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateExpiration.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/FunctionCode.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageErrorIndicator.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageReasonCode.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/XX.java
development/planet/users/niclas/iso8583/iso8583.iws
Log:
some major refactoring to reduce the total codebase.
Added:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/CompositeDataElement.java
==============================================================================
--- (empty file)
+++
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/CompositeDataElement.java
Mon Mar 28 14:44:38 2005
@@ -0,0 +1,29 @@
+/*
+ * 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.data;
+
+
+/** Composite Data Elements are described in 5.4.4 of the ISO-8583-1:2003
spec.
+ * CompositeDataSElements are currently not supported, and this may be
revised in the future.
+ */
+public interface CompositeDataElement extends DataElement
+{
+
+ Dataset[] getDataset();
+
+}
Added:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/ConstructedDataElement.java
==============================================================================
--- (empty file)
+++
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/ConstructedDataElement.java
Mon Mar 28 14:44:38 2005
@@ -0,0 +1,29 @@
+/*
+ * 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.data;
+
+
+/** Constructed DataElements are described in 5.4.3 of the ISO-8583-1:2003
spec.
+ *
+ */
+public interface ConstructedDataElement extends DataElement
+{
+
+ DataElement[] getSubElements();
+
+}
Modified:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/DataElement.java
==============================================================================
---
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/DataElement.java
(original)
+++
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/DataElement.java
Mon Mar 28 14:44:38 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.
@@ -82,7 +82,7 @@
* argument is of the wrong class, contains illegal values,
* or is null.
*/
- void set( Object value )
+ void set( String value )
throws IllegalArgumentException;
}
Modified:
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/Dataset.java
==============================================================================
---
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/Dataset.java
(original)
+++
development/planet/users/niclas/iso8583/api/src/main/net/dpml/iso8583/data/Dataset.java
Mon Mar 28 14:44:38 2005
@@ -1,7 +1,25 @@
+/*
+ * 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;
/** Dataset are used in Composite DataElements, which are described in 5.4.4
of the ISO-8583-1:2003 spec.
- *
+ * CompositeElements are currently not supported, and this may be revised
in the future.
+ *
*/
public interface Dataset
{
Added:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
==============================================================================
--- (empty file)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java
Mon Mar 28 14:44:38 2005
@@ -0,0 +1,111 @@
+package net.dpml.iso8583.data.elements;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.Representation;
+import net.dpml.logging.Logger;
+import org.jpos.iso.ISOMsg;
+import org.jpos.iso.ISOException;
+
+/**
+ * Created by IntelliJ IDEA. User: niclas Date: Mar 28, 2005 Time: 3:27:33
PM To change this template use File |
+ * Settings | File Templates.
+ */
+public abstract class AbstractDataElement
+ implements DataElement
+{
+
+ protected Logger m_logger;
+
+ private String m_value;
+
+ protected AbstractDataElement( Logger logger )
+ {
+ m_logger = logger;
+ }
+
+ public String getName()
+ {
+ String str = getClass().getName();
+ int pos = str.lastIndexOf( "." );
+ String name = str.substring( pos + 1 );
+ return name;
+ }
+
+ /** Instructs the DataElement to populate the ISOMsg object.
+ * <p>
+ * <code>DataElement</code> implementations are responsible to know
+ * which field (a.k.a. bit) that it should populate in the
+ * <code>ISOMsg</code> structure. The caller must know whether the
+ * field is required or not, and if the <code>DataElement</code> has
+ * not been properly set, either in the course of the session or as
+ * part of its initialization, it should throw an ISOException.
+ * </p>
+ * <p>
+ * If the <code>DataElement</code> is nested, it is responsible for
+ * calling the <code>populate</code> method for each of the composite
+ * <code>DataElements</code>.
+ * </p>
+ * @param message the <code>ISOMsg</code> instance to populate with the
+ * value of the <code>DataElement</code>.
+ * @param required if true, the <code>DataElement</code> must make sure
+ * that its value object has been set during the session.
+ *
+ * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
+ */
+ public void populate( ISOMsg message, boolean required )
+ throws ISOException
+ {
+ if( m_logger.isDebugEnabled() )
+ {
+ m_logger.debug( "populate: " + message );
+ }
+
+ if( required && m_value == null )
+ {
+ throw new ISOException( "Required data element has not been set:
" + getName() );
+ }
+ message.set( getIsoBitNumber(), m_value );
+ }
+
+ /** Returns the value object of the DataElement.
+ * <p>
+ * Each <code>DataElement</code> implementation defines what the value
+ * object is, and whether a default value can be
configured/parameterized
+ * or must be set during the session.
+ * </p>
+ *
+ * @return the value object of the DataElement, which is the same object
+ * that has previously been set with the <code>set()</code>
+ * method.
+ */
+ public Object get()
+ {
+ return m_value;
+ }
+
+ /** Sets the value object of the DataElement.
+ * <p>
+ * Each <code>DataElement</code> implementation defines what the value
+ * object is, and whether a default value can be
configured/parameterized
+ * or must be set during the session.
+ * </p>
+ * <p>
+ * The provided argument must be of the correct type, and be within
+ * its specification defined bounds, or an <code>IllegalArgumentException
+ * </code> will be thrown.
+ * </p>
+ * @exception IllegalArgumentException if the provided <code>value</code>
+ * argument is of the wrong class, contains illegal values,
+ * or is null.
+ */
+ public void set( String value )
+ throws IllegalArgumentException
+ {
+ getRepresentation().validate( value );
+ m_value = value;
+ }
+
+ public abstract Representation getRepresentation();
+
+ public abstract int getIsoBitNumber();
+}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardHolderBilling.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardHolderBilling.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardHolderBilling.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of AmountCardHolderBilling.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="AmountCardHolderBilling"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class AmountCardHolderBilling
- implements DataElement
+public class AmountCardHolderBilling extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 6;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public AmountCardHolderBilling( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardholderBillingFee.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardholderBillingFee.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountCardholderBillingFee.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of AmountCardholderBillingFee.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="AmountCardholderBillingFee"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class AmountCardholderBillingFee
- implements DataElement
+public class AmountCardholderBillingFee extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 8;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public AmountCardholderBillingFee( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountReconciliation.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountReconciliation.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountReconciliation.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of AmountReconciliation.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="AmountReconciliation"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class AmountReconciliation
- implements DataElement
+public class AmountReconciliation extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 5;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public AmountReconciliation( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountTransaction.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountTransaction.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountTransaction.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of AmountTransaction.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="AmountTransaction"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class AmountTransaction
- implements DataElement
+public class AmountTransaction extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 4;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public AmountTransaction( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountsOriginal.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountsOriginal.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AmountsOriginal.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of AmountsOriginal.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="AmountsOriginal"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class AmountsOriginal
- implements DataElement
+public class AmountsOriginal extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 30;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public AmountsOriginal( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Added:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AnonymousDataElement.java
==============================================================================
--- (empty file)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/AnonymousDataElement.java
Mon Mar 28 14:44:38 2005
@@ -0,0 +1,64 @@
+/*
+ * 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.elements;
+
+import net.dpml.iso8583.data.DataElement;
+import net.dpml.iso8583.data.Representation;
+import org.jpos.iso.ISOMsg;
+import org.jpos.iso.ISOException;
+
+public class AnonymousDataElement
+ implements DataElement
+{
+ private Representation m_rep;
+ private String m_name;
+ private String m_value;
+ private int m_field;
+
+ public AnonymousDataElement( Representation rep, String name, int
fieldno )
+ {
+ m_name = name;
+ m_rep = rep;
+ m_field = fieldno;
+ }
+
+ public void populate( ISOMsg message, boolean required )
+ throws ISOException
+ {
+ message.set( m_field, m_value );
+ }
+
+ public Object get()
+ {
+ synchronized( this )
+ {
+ return m_value;
+ }
+ }
+
+ public void set( String value )
+ throws IllegalArgumentException
+ {
+ synchronized( this )
+ {
+ m_rep.validate( value );
+ m_value = value;
+ }
+ }
+}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CardSequenceNumber.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CardSequenceNumber.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CardSequenceNumber.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of CardSequenceNumber.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="CardSequenceNumber"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class CardSequenceNumber
- implements DataElement
+public class CardSequenceNumber extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 23;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public CardSequenceNumber( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ContinuationBit.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ContinuationBit.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ContinuationBit.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.B;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of ContinuationBit.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="ContinuationBit"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class ContinuationBit
- implements DataElement
+public class ContinuationBit extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 1;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public ContinuationBit( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateCardholderBilling.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateCardholderBilling.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateCardholderBilling.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of
ConversionRateCardholderBilling.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient"
name="ConversionRateCardholderBilling"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class ConversionRateCardholderBilling
- implements DataElement
+public class ConversionRateCardholderBilling extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 10;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public ConversionRateCardholderBilling( Logger logger, Parameters params
)
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateConciliation.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateConciliation.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ConversionRateConciliation.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of ConversionRateConciliation.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="ConversionRateConciliation"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class ConversionRateConciliation
- implements DataElement
+public class ConversionRateConciliation extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 9;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public ConversionRateConciliation( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodeAcquiringInstitution.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodeAcquiringInstitution.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodeAcquiringInstitution.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of
CountryCodeAcquiringInstitution.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient"
name="CountryCodeAcquiringInstitution"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class CountryCodeAcquiringInstitution
- implements DataElement
+public class CountryCodeAcquiringInstitution extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 19;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public CountryCodeAcquiringInstitution( Logger logger, Parameters params
)
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
- }
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
+ }
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public Representation getRepresentation()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return m_Representation;
}
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodePrimaryAccountNumber.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodePrimaryAccountNumber.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/CountryCodePrimaryAccountNumber.java
Mon Mar 28 14:44:38 2005
@@ -37,8 +37,7 @@
* @metro.component lifestyle="transient"
name="CountryCodePrimaryAccountNumber"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class CountryCodePrimaryAccountNumber
- implements DataElement
+public class CountryCodePrimaryAccountNumber extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 20;
@@ -46,9 +45,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +58,13 @@
*/
public CountryCodePrimaryAccountNumber( Logger logger, Parameters params
)
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeLocalTransaction.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeLocalTransaction.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeLocalTransaction.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateAndTimeLocalTransaction.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateAndTimeLocalTransaction"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateAndTimeLocalTransaction
- implements DataElement
+public class DateAndTimeLocalTransaction extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 12;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateAndTimeLocalTransaction( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeTransmission.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeTransmission.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateAndTimeTransmission.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateAndTimeTransmission.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateAndTimeTransmission"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateAndTimeTransmission
- implements DataElement
+public class DateAndTimeTransmission extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 7;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateAndTimeTransmission( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateCapture.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateCapture.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateCapture.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateCapture.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateCapture"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateCapture
- implements DataElement
+public class DateCapture extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 17;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateCapture( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateConversion.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateConversion.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateConversion.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of XX.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateConversion"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateConversion
- implements DataElement
+public class DateConversion extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 16;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateConversion( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
- }
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
+ }
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public Representation getRepresentation()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return m_Representation;
}
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateEffective.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateEffective.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateEffective.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateEffective.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateEffective"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateEffective
- implements DataElement
+public class DateEffective extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 13;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateEffective( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateExpiration.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateExpiration.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateExpiration.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateExpiration.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateExpiration"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateExpiration
- implements DataElement
+public class DateExpiration extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 14;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateExpiration( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateReconciliation.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateReconciliation"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateReconciliation
- implements DataElement
+public class DateReconciliation extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 28;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateReconciliation( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of DateSettlement.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="DateSettlement"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class DateSettlement
- implements DataElement
+public class DateSettlement extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 15;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public DateSettlement( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/FunctionCode.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/FunctionCode.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/FunctionCode.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of FunctionCode.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="FunctionCode"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class FunctionCode
- implements DataElement
+public class FunctionCode extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 24;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public FunctionCode( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of MerchantCategoryCode.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="MerchantCategoryCode"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class MerchantCategoryCode
- implements DataElement
+public class MerchantCategoryCode extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 26;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public MerchantCategoryCode( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageErrorIndicator.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageErrorIndicator.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageErrorIndicator.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.VariableANSB;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of MessageErrorIndicator.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="MessageErrorIndicator"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class MessageErrorIndicator
- implements DataElement
+public class MessageErrorIndicator extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 18;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public MessageErrorIndicator( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageReasonCode.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageReasonCode.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/MessageReasonCode.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of MessageReasonCode.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="MessageReasonCode"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class MessageReasonCode
- implements DataElement
+public class MessageReasonCode extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 25;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public MessageReasonCode( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.ANB;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of PosCapability.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="PosCapability"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class PosCapability
- implements DataElement
+public class PosCapability extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 27;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public PosCapability( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.B;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of PosDataCode.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="PosDataCode"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class PosDataCode
- implements DataElement
+public class PosDataCode extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 22;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public PosDataCode( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.VariableN;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of PrimaryAccountNumber.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="PrimaryAccountNumber"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class PrimaryAccountNumber
- implements DataElement
+public class PrimaryAccountNumber extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 2;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,82 +55,18 @@
*/
public PrimaryAccountNumber( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public Representation getRepresentation()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return m_Representation;
}
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
-
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.AN;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of ProcessingCode.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="ProcessingCode"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class ProcessingCode
- implements DataElement
+public class ProcessingCode extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 3;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,81 +55,18 @@
*/
public ProcessingCode( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of ReconciliationIndicator.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="ReconciliationIndicator"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class ReconciliationIndicator
- implements DataElement
+public class ReconciliationIndicator extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 29;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,82 +55,18 @@
*/
public ReconciliationIndicator( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public Representation getRepresentation()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return m_Representation;
}
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
-
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.N;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of SystemsTraceAuditNumber.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="SystemsTraceAuditNumber"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class SystemsTraceAuditNumber
- implements DataElement
+public class SystemsTraceAuditNumber extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 11;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,83 +55,18 @@
*/
public SystemsTraceAuditNumber( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public int getIsoBitNumber()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return ISO8583_BIT_NUMBER;
}
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
- {
- return m_value;
- }
-
-
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java
Mon Mar 28 14:44:38 2005
@@ -18,13 +18,10 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.ANS;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
/** <code>DataElement</code> implementation of
TransactionLifeCycleIdentificationData.
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient"
name="TransactionLifeCycleIdentificationData"
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class TransactionLifeCycleIdentificationData
- implements DataElement
+public class TransactionLifeCycleIdentificationData extends
AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 21;
@@ -46,9 +42,6 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
@@ -62,82 +55,18 @@
*/
public TransactionLifeCycleIdentificationData( Logger logger, Parameters
params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
- }
-
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception org.jpos.iso.ISOException if the ISOMsg can not be
populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
- {
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
+ public Representation getRepresentation()
{
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
+ return m_Representation;
}
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
-
}
Modified:
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/XX.java
==============================================================================
---
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/XX.java
(original)
+++
development/planet/users/niclas/iso8583/elements/src/main/net/dpml/iso8583/data/elements/XX.java
Mon Mar 28 14:44:38 2005
@@ -18,16 +18,13 @@
package net.dpml.iso8583.data.elements;
-import net.dpml.iso8583.data.DataElement;
import net.dpml.iso8583.data.Representation;
import net.dpml.iso8583.data.representation.B;
import net.dpml.logging.Logger;
import net.dpml.parameters.Parameters;
-import org.jpos.iso.ISOException;
-import org.jpos.iso.ISOMsg;
-/** <code>DataElement</code> implementation of XX.
+/** <code>DataElement</code> implementation of XX. // TODO ENTER
CORRECT NAME
*
* @author <a href="mailto:niclas AT hedhman.org";>Niclas Hedhman</a>
*
@@ -37,8 +34,7 @@
* @metro.component lifestyle="transient" name="XX" // TODO ENTER CORRECT
NAME
* @metro.service type="net.dpml.iso8583.data.DataElement"
*/
-public class XX
- implements DataElement
+public class XX extends AbstractDataElement
{
/** The ISO8583 bit number */
static private int ISO8583_BIT_NUMBER = 0; //TODO Enter correct one
@@ -46,97 +42,31 @@
/** ISO8583 Representation formatter and validator. */
static private Representation m_Representation;
- private String m_value;
- private Logger m_logger;
-
/** Sets up the element type in a generic fashion. */
static
{
m_Representation = new B( 0 ); // TODO; Enter correct
}
- /** Constructor of XX.
+ /** Constructor of XX. // TODO ENTER CORRECT NAME
*
* @param logger supplied <code>Logger</code> instance.
* @param params supplied configuration <code>Parameters</code>
*/
public XX( Logger logger, Parameters params )
{
- m_logger = logger;
- m_value = params.getParameter( "value", "" );
+ super( logger );
+ String value = params.getParameter( "value", "" );
+ set( value );
}
- /** Instructs the DataElement to populate the ISOMsg object.
- * <p>
- * <code>DataElement</code> implementations are responsible to know
- * which field (a.k.a. bit) that it should populate in the
- * <code>ISOMsg</code> structure. The caller must know whether the
- * field is required or not, and if the <code>DataElement</code> has
- * not been properly set, either in the course of the session or as
- * part of its initialization, it should throw an ISOException.
- * </p>
- * <p>
- * If the <code>DataElement</code> is nested, it is responsible for
- * calling the <code>populate</code> method for each of the composite
- * <code>DataElements</code>.
- * </p>
- * @param message the <code>ISOMsg</code> instance to populate with the
- * value of the <code>DataElement</code>.
- * @param required if true, the <code>DataElement</code> must make sure
- * that its value object has been set during the session.
- *
- * @exception ISOException if the ISOMsg can not be populated.
- */
- public void populate( ISOMsg message, boolean required )
- throws ISOException
+ public Representation getRepresentation()
{
- if( m_logger.isDebugEnabled() )
- {
- m_logger.debug( "populate: " + message );
- }
-
- if( required && m_value == null )
- {
- throw new ISOException( "Required data element has not been set:
PrimaryAccountNumber" );
- }
- message.set( ISO8583_BIT_NUMBER, m_value );
+ return m_Representation;
}
- /** Sets the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- * <p>
- * The provided argument must be of the correct type, and be within
- * its specification defined bounds, or an <code>IllegalArgumentException
- * </code> will be thrown.
- * </p>
- * @exception IllegalArgumentException if the provided <code>value</code>
- * argument is of the wrong class, contains illegal values,
- * or is null.
- */
- public void set( Object value )
- throws IllegalArgumentException
- {
- m_Representation.validate( value );
- m_value = m_Representation.format( value );
- }
-
- /** Returns the value object of the DataElement.
- * <p>
- * Each <code>DataElement</code> implementation defines what the value
- * object is, and whether a default value can be
configured/parameterized
- * or must be set during the session.
- * </p>
- *
- * @return the value object of the DataElement, which is the same object
- * that has previously been set with the <code>set()</code>
- * method.
- */
- public Object get()
+ public int getIsoBitNumber()
{
- return m_value;
+ return ISO8583_BIT_NUMBER;
}
}
Modified: development/planet/users/niclas/iso8583/iso8583.iws
==============================================================================
--- development/planet/users/niclas/iso8583/iso8583.iws (original)
+++ development/planet/users/niclas/iso8583/iso8583.iws Mon Mar 28 14:44:38
2005
@@ -146,85 +146,81 @@
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="FileEditorManager" split-orientation="vertical"
split-proportion="0.5">
- <first-group
selected-file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/Dataset.java">
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableANS.java"
pinned="false">
+ <first-group
selected-file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
+ <state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/N.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.114795916">
+ <state line="60" column="0" selection-start="1900"
selection-end="1900" vertical-scroll-proportion="0.80551904">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableAN.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1960"
selection-end="1960" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableB.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1915"
selection-end="1915" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableN.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1959"
selection-end="1959" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableZ.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1960"
selection-end="1960" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/CompositeElement.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="11" selection-start="808"
selection-end="808" vertical-scroll-proportion="0.19132653">
+ <state line="60" column="0" selection-start="2039"
selection-end="2039" vertical-scroll-proportion="0.80551904">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/Dataset.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/XX.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="7" column="0" selection-start="172"
selection-end="172" vertical-scroll-proportion="0.13392857">
- <folding />
+ <state line="50" column="55" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.67017084">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/DataElement.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="17" selection-start="1087"
selection-end="1087" vertical-scroll-proportion="0.24872449">
- <folding />
+ <state line="12" column="22" selection-start="396"
selection-end="396" vertical-scroll-proportion="-1.064389">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/ConstructedElement.java"
pinned="false">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="0" selection-start="801"
selection-end="801" vertical-scroll-proportion="0.19132653">
+ <state line="36" column="13" selection-start="1209"
selection-end="1209" vertical-scroll-proportion="0.33508542">
<folding />
</state>
</provider>
@@ -376,7 +372,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="10" y="0" width="1260" height="977" extended-state="0" />
+ <frame x="10" y="0" width="1260" height="977" extended-state="1" />
<editor active="true" />
<layout>
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.33" order="8"
/>
@@ -469,130 +465,116 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/ANS.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/DateReconciliation.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="45" column="0" selection-start="1410"
selection-end="1410" vertical-scroll-proportion="0.55484694">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1933"
selection-end="1933" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/ANSB.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/DateSettlement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="45" column="0" selection-start="1412"
selection-end="1412" vertical-scroll-proportion="0.55484694">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/AS.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/FunctionCode.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="45" column="0" selection-start="1408"
selection-end="1408" vertical-scroll-proportion="0.55484694">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1904"
selection-end="1904" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/B.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/MessageErrorIndicator.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.114795916">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1973"
selection-end="1973" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/N.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/MessageReasonCode.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.114795916">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1929"
selection-end="1929" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableAN.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosCapability.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
+ <state line="60" column="0" selection-start="1914"
selection-end="1914" vertical-scroll-proportion="0.80551904">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableANS.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PosDataCode.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
+ <state line="60" column="0" selection-start="1900"
selection-end="1900" vertical-scroll-proportion="0.80551904">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableANSB.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/PrimaryAccountNumber.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1960"
selection-end="1960" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableB.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/ProcessingCode.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1915"
selection-end="1915" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableN.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/ReconciliationIndicator.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1959"
selection-end="1959" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/representation/VariableZ.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/SystemsTraceAuditNumber.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="13" selection-start="771"
selection-end="771" vertical-scroll-proportion="0.11703511">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="60" column="0" selection-start="1960"
selection-end="1960" vertical-scroll-proportion="0.80551904">
+ <folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/CompositeElement.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/TransactionLifeCycleIdentificationData.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="11" selection-start="808"
selection-end="808" vertical-scroll-proportion="0.19132653">
+ <state line="60" column="0" selection-start="2039"
selection-end="2039" vertical-scroll-proportion="0.80551904">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/DataElement.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/MerchantCategoryCode.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="17" selection-start="1087"
selection-end="1087" vertical-scroll-proportion="0.24872449">
+ <state line="36" column="13" selection-start="1209"
selection-end="1209" vertical-scroll-proportion="0.33508542">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/ConstructedElement.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/AbstractDataElement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="0" selection-start="801"
selection-end="801" vertical-scroll-proportion="0.19132653">
- <folding />
+ <state line="12" column="22" selection-start="396"
selection-end="396" vertical-scroll-proportion="-1.064389">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/api/src/main/net/dpml/iso8583/data/Dataset.java">
+ <entry
file="file://$PROJECT_DIR$/elements/src/main/net/dpml/iso8583/data/elements/XX.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="7" column="0" selection-start="172" selection-end="172"
vertical-scroll-proportion="0.13392857">
- <folding />
+ <state line="50" column="55" selection-start="1684"
selection-end="1684" vertical-scroll-proportion="0.67017084">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- svn commit: r2168 - in development/planet/users/niclas/iso8583: . api/src/main/net/dpml/iso8583/data elements/src/main/net/dpml/iso8583/data/elements, niclas, 03/28/2005
Archive powered by MHonArc 2.6.24.