pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.shop.checkout
Class PaymentData

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.shop.checkout.PaymentData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
InvoicePaymentData, PayPalPaymentData, WirecardCCPaymentData, WirecardEFTPaymentData

@Entity(name="checkout_PaymentData")
public class PaymentData
extends AbstractBasicEntity

The PaymentData.

Version:
$Revision: 1979 $
Author:
Christian Schatt
See Also:
Serialized Form

Nested Class Summary
static class PaymentData.PaymentStatus
           
 
Constructor Summary
PaymentData()
          The no-argument constructor.
 
Method Summary
 java.math.BigDecimal getAmount()
          Returns the amount.
 java.lang.String getAuthorizationCanceledAction()
          Returns the name of the action the payment controller is supposed to redirect to, if the authorization has been canceled.
 java.lang.String getAuthorizationFailedAction()
          Returns the name of the action the payment controller is supposed to redirect to, if the authorization has failed.
 java.lang.String getAuthorizationFinishedAction()
          Returns the name of the action the payment controller is supposed to redirect to, after the authorization has been finished.
 java.lang.String getCaptureCanceledAction()
          Returns the name of the action the payment controller is supposed to redirect to, if the capture has been canceled.
 java.lang.String getCaptureFailedAction()
          Returns the name of the action the payment controller is supposed to redirect to, if the capture has failed.
 java.lang.String getCaptureFinishedAction()
          Returns the name of the action the payment controller is supposed to redirect to, after the capture has been finished.
 java.util.Currency getCurrency()
          Returns the Currency.
 java.util.Date getPaymentDate()
          Returns the Date of the payment.
 PaymentMethod getPaymentMethod()
          Returns the PaymentMethod.
 java.lang.String getProviderTransactionId()
          Returns the transaction id used by the payment provider.
 PaymentData.PaymentStatus getStatus()
          Returns the PaymentStatus.
 java.lang.String getTransactionId()
          Returns the transaction id.
static PaymentData newInstance(PaymentConfiguration config)
          Creates a new PaymentData from the given PaymentConfiguration.
 void reinitialize()
          Reinitializes this PaymentData.
 void setAmount(java.math.BigDecimal a)
          Sets the amount.
 void setCurrency(java.util.Currency c)
          Sets the Currency.
 void setPaymentDate(java.util.Date pd)
          Sets the Date of the payment.
 void setProviderTransactionId(java.lang.String ptid)
          Sets the transaction id used by the payment provider.
 void setStatus(PaymentData.PaymentStatus s)
          Sets the PaymentStatus.
 void setTransactionId(java.lang.String tid)
          Sets the transaction id.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentData

public PaymentData()
The no-argument constructor.

Method Detail

getPaymentMethod

public final PaymentMethod getPaymentMethod()
Returns the PaymentMethod.

Returns:
the PaymentMethod.

getAmount

public final java.math.BigDecimal getAmount()
Returns the amount.

Returns:
the amount.

setAmount

public final void setAmount(java.math.BigDecimal a)
Sets the amount.

Parameters:
a - the amount to set.

getCurrency

public final java.util.Currency getCurrency()
Returns the Currency.

Returns:
the Currency.

setCurrency

public final void setCurrency(java.util.Currency c)
Sets the Currency.

Parameters:
c - the Currency to set.

getTransactionId

public final java.lang.String getTransactionId()
Returns the transaction id.

Returns:
the transaction id.

setTransactionId

public final void setTransactionId(java.lang.String tid)
Sets the transaction id.

Parameters:
tid - the transaction id to set.

getProviderTransactionId

public final java.lang.String getProviderTransactionId()
Returns the transaction id used by the payment provider.

Returns:
the transaction id.

setProviderTransactionId

public final void setProviderTransactionId(java.lang.String ptid)
Sets the transaction id used by the payment provider.

Parameters:
ptid - the transaction id to set.

getStatus

public final PaymentData.PaymentStatus getStatus()
Returns the PaymentStatus.

Returns:
the PaymentStatus.

setStatus

public final void setStatus(PaymentData.PaymentStatus s)
Sets the PaymentStatus.

Parameters:
s - the PaymentStatus to set.
Throws:
java.lang.IllegalArgumentException - if the given PaymentStatus is null.

getPaymentDate

public final java.util.Date getPaymentDate()
Returns the Date of the payment.

Returns:
the Date.

setPaymentDate

public final void setPaymentDate(java.util.Date pd)
Sets the Date of the payment.

Parameters:
pd - the Date to set.

getAuthorizationFinishedAction

public final java.lang.String getAuthorizationFinishedAction()
Returns the name of the action the payment controller is supposed to redirect to, after the authorization has been finished.

Returns:
the name of the action.

getAuthorizationCanceledAction

public final java.lang.String getAuthorizationCanceledAction()
Returns the name of the action the payment controller is supposed to redirect to, if the authorization has been canceled.

Returns:
the name of the action.

getAuthorizationFailedAction

public final java.lang.String getAuthorizationFailedAction()
Returns the name of the action the payment controller is supposed to redirect to, if the authorization has failed.

Returns:
the name of the action.

getCaptureFinishedAction

public final java.lang.String getCaptureFinishedAction()
Returns the name of the action the payment controller is supposed to redirect to, after the capture has been finished.

Returns:
the name of the action.

getCaptureCanceledAction

public final java.lang.String getCaptureCanceledAction()
Returns the name of the action the payment controller is supposed to redirect to, if the capture has been canceled.

Returns:
the name of the action.

getCaptureFailedAction

public final java.lang.String getCaptureFailedAction()
Returns the name of the action the payment controller is supposed to redirect to, if the capture has failed.

Returns:
the name of the action.

reinitialize

public void reinitialize()
Reinitializes this PaymentData.

Attention: this method is supposed to be overridden by extending classes.

Throws:
java.lang.IllegalStateException - if the PaymentStatus of the PaymentData is CAPTURED, PENDING or BOOKED_BACK.

newInstance

public static final PaymentData newInstance(PaymentConfiguration config)
Creates a new PaymentData from the given PaymentConfiguration.

Parameters:
config - the PaymentConfiguration.
Returns:
the new PaymentData.