hr.tis.mgw.client.charging
Class ChargingManager2Impl

java.lang.Object
  extended byhr.tis.mgw.client.common.AbstractManager2
      extended byhr.tis.mgw.client.charging.ChargingManager2
          extended byhr.tis.mgw.client.charging.ChargingManager2Impl

public class ChargingManager2Impl
extends ChargingManager2

Implementation of ChargingManager2 that uses Axis SOAP library for communication with mGw Parlay X web services.

You have to specify Service URL to communicate with mGw Parlay X web services.

Specify username and password as default values when authenticating to mGw. If specified every method call that don't have username and password parameters will use them for authentication. If not specified exception will be thrown since authentication to mGw is required.


Constructor Summary
ChargingManager2Impl()
           
ChargingManager2Impl(java.lang.String serviceURL)
           
ChargingManager2Impl(java.lang.String serviceURL, java.lang.String username, java.lang.String password)
           
 
Method Summary
 void chargeAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode)
          Charge amount to user.
 void chargeAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Charge amount to user.
 void chargeAmountReservation(Charging charging, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode)
          Charge amount reservation to user.
 void chargeAmountReservation(Charging charging, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Charge amount reservation to user.
 void chargeVolume(java.lang.String user, long volume, java.lang.String billingText, java.lang.String referenceCode)
          Charge volume to user.
 void chargeVolume(java.lang.String user, long volume, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Charge volume to user.
 void chargeVolumeReservation(Charging charging, long volume, java.lang.String billingText, java.lang.String referenceCode)
          Charge volume reservation to user.
 void chargeVolumeReservation(Charging charging, long volume, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Charge volume reservation to user.
 java.math.BigDecimal getAmount(java.lang.String user, long volume)
          Get amount from volume.
 java.math.BigDecimal getAmount(java.lang.String user, long volume, java.lang.String username, java.lang.String password)
          Get amount from volume.
 java.math.BigDecimal getReservationAmount(java.lang.String user, long volume)
          Get amount from volume for reservation.
 java.math.BigDecimal getReservationAmount(java.lang.String user, long volume, java.lang.String username, java.lang.String password)
          Get amount from volume for reservation.
 void refundAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode)
          Refund amount to user.
 void refundAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Refund amount to user.
 void refundVolume(java.lang.String user, long volume, java.lang.String billingText, java.lang.String referenceCode)
          Refund volume to user.
 void refundVolume(java.lang.String user, long volume, java.lang.String billingText, java.lang.String referenceCode, java.lang.String username, java.lang.String password)
          Refund volume to user.
 void releaseAmountReservation(Charging charging)
          Release reservation.
 void releaseAmountReservation(Charging charging, java.lang.String username, java.lang.String password)
          Release reservation.
 void releaseVolumeReservation(Charging charging)
          Release reservation.
 void releaseVolumeReservation(Charging charging, java.lang.String username, java.lang.String password)
          Release reservation.
 void reserveAdditionalAmount(Charging charging, java.math.BigDecimal amount, java.lang.String billingText)
          Reserve additional amount to previous amount reservation.
 void reserveAdditionalAmount(Charging charging, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String username, java.lang.String password)
          Reserve additional amount to previous amount reservation.
 void reserveAdditionalVolume(Charging charging, long volume, java.lang.String billingText)
          Reserve additional volume to previous volume reservation.
 void reserveAdditionalVolume(Charging charging, long volume, java.lang.String billingText, java.lang.String username, java.lang.String password)
          Reserve additional volume to previous volume reservation.
 Charging reserveAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText)
          Reserve amount to be charged to user.
 Charging reserveAmount(java.lang.String user, java.math.BigDecimal amount, java.lang.String billingText, java.lang.String username, java.lang.String password)
          Reserve amount to be charged to user.
 Charging reserveVolume(java.lang.String user, long volume, java.lang.String billingText)
          Reserve volume to be charged to user.
 Charging reserveVolume(java.lang.String user, long volume, java.lang.String billingText, java.lang.String username, java.lang.String password)
          Reserve volume to be charged to user.
 
Methods inherited from class hr.tis.mgw.client.common.AbstractManager2
getPassword, getServerURL, getTimeout, getUsername, isThreadedListener, setPassword, setServerURL, setThreadedListener, setTimeout, setUsername
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargingManager2Impl

public ChargingManager2Impl()

ChargingManager2Impl

public ChargingManager2Impl(java.lang.String serviceURL)

ChargingManager2Impl

public ChargingManager2Impl(java.lang.String serviceURL,
                            java.lang.String username,
                            java.lang.String password)
Method Detail

chargeAmount

public void chargeAmount(java.lang.String user,
                         java.math.BigDecimal amount,
                         java.lang.String billingText,
                         java.lang.String referenceCode)
                  throws GatewayException
Description copied from class: ChargingManager2
Charge amount to user. Use default username and password for authentication.

Specified by:
chargeAmount in class ChargingManager2
Parameters:
user - User account to be charged
amount - Amount to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

chargeAmount

public void chargeAmount(java.lang.String user,
                         java.math.BigDecimal amount,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         java.lang.String username,
                         java.lang.String password)
                  throws GatewayException
Description copied from class: ChargingManager2
Charge amount to user. Specify username and password for authentication.

Specified by:
chargeAmount in class ChargingManager2
Parameters:
user - User account to be charged
amount - Amount to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

refundAmount

public void refundAmount(java.lang.String user,
                         java.math.BigDecimal amount,
                         java.lang.String billingText,
                         java.lang.String referenceCode)
                  throws GatewayException
Description copied from class: ChargingManager2
Refund amount to user. Use default username and password for authentication.

Specified by:
refundAmount in class ChargingManager2
Parameters:
user - User account to refund funds to
amount - Amount to refund
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

refundAmount

public void refundAmount(java.lang.String user,
                         java.math.BigDecimal amount,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         java.lang.String username,
                         java.lang.String password)
                  throws GatewayException
Description copied from class: ChargingManager2
Refund amount to user. Specify username and password for authentication.

Specified by:
refundAmount in class ChargingManager2
Parameters:
user - User account to refund funds to
amount - Amount to refund
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

chargeVolume

public void chargeVolume(java.lang.String user,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode)
                  throws GatewayException
Description copied from class: ChargingManager2
Charge volume to user. Use default username and password for authentication.

Specified by:
chargeVolume in class ChargingManager2
Parameters:
user - User account to be charged
volume - Volume to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

chargeVolume

public void chargeVolume(java.lang.String user,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         java.lang.String username,
                         java.lang.String password)
                  throws GatewayException
Description copied from class: ChargingManager2
Charge volume to user. Specify username and password for authentication.

Specified by:
chargeVolume in class ChargingManager2
Parameters:
user - User account to be charged
volume - Volume to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

refundVolume

public void refundVolume(java.lang.String user,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode)
                  throws GatewayException
Description copied from class: ChargingManager2
Refund volume to user. Use default username and password for authentication.

Specified by:
refundVolume in class ChargingManager2
Parameters:
user - User account to refund funds to
volume - Volume to refund
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

refundVolume

public void refundVolume(java.lang.String user,
                         long volume,
                         java.lang.String billingText,
                         java.lang.String referenceCode,
                         java.lang.String username,
                         java.lang.String password)
                  throws GatewayException
Description copied from class: ChargingManager2
Refund volume to user. Specify username and password for authentication.

Specified by:
refundVolume in class ChargingManager2
Parameters:
user - User account to refund funds to
volume - Volume to refund
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

getAmount

public java.math.BigDecimal getAmount(java.lang.String user,
                                      long volume)
                               throws GatewayException
Description copied from class: ChargingManager2
Get amount from volume. Use default username and password for authentication.

Specified by:
getAmount in class ChargingManager2
Parameters:
user - User account for which conversion is required
volume - Volume to convert to amount
Returns:
Amount to charge
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

getAmount

public java.math.BigDecimal getAmount(java.lang.String user,
                                      long volume,
                                      java.lang.String username,
                                      java.lang.String password)
                               throws GatewayException
Description copied from class: ChargingManager2
Get amount from volume. Specify username and password for authentication.

Specified by:
getAmount in class ChargingManager2
Parameters:
user - User account for which conversion is required
volume - Volume to convert to amount
username - Authentication username
password - Authentication password
Returns:
Amount to charge
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

reserveAmount

public Charging reserveAmount(java.lang.String user,
                              java.math.BigDecimal amount,
                              java.lang.String billingText)
                       throws GatewayException
Description copied from class: ChargingManager2
Reserve amount to be charged to user. Use default username and password for authentication.

Specified by:
reserveAmount in class ChargingManager2
Parameters:
user - User account for which reservation is required
amount - Amount to reserve
billingText - Text to appear on the bill
Returns:
Charging class holding reservation identifier
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveAmount

public Charging reserveAmount(java.lang.String user,
                              java.math.BigDecimal amount,
                              java.lang.String billingText,
                              java.lang.String username,
                              java.lang.String password)
                       throws GatewayException
Description copied from class: ChargingManager2
Reserve amount to be charged to user. Specify username and password for authentication.

Specified by:
reserveAmount in class ChargingManager2
Parameters:
user - User account for which reservation is required
amount - Amount to reserve
billingText - Text to appear on the bill
username - Authentication username
password - Authentication password
Returns:
Charging class holding reservation identifier
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveAdditionalAmount

public void reserveAdditionalAmount(Charging charging,
                                    java.math.BigDecimal amount,
                                    java.lang.String billingText)
                             throws GatewayException
Description copied from class: ChargingManager2
Reserve additional amount to previous amount reservation. Use default username and password for authentication.

Specified by:
reserveAdditionalAmount in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
amount - Amount to add to reservation
billingText - Text to appear on the bill
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveAdditionalAmount

public void reserveAdditionalAmount(Charging charging,
                                    java.math.BigDecimal amount,
                                    java.lang.String billingText,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws GatewayException
Description copied from class: ChargingManager2
Reserve additional amount to previous amount reservation. Specify username and password for authentication.

Specified by:
reserveAdditionalAmount in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
amount - Amount to add to reservation
billingText - Text to appear on the bill
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

chargeAmountReservation

public void chargeAmountReservation(Charging charging,
                                    java.math.BigDecimal amount,
                                    java.lang.String billingText,
                                    java.lang.String referenceCode)
                             throws GatewayException
Description copied from class: ChargingManager2
Charge amount reservation to user. Use default username and password for authentication.

Specified by:
chargeAmountReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
amount - Amount to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

chargeAmountReservation

public void chargeAmountReservation(Charging charging,
                                    java.math.BigDecimal amount,
                                    java.lang.String billingText,
                                    java.lang.String referenceCode,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws GatewayException
Description copied from class: ChargingManager2
Charge amount reservation to user. Specify username and password for authentication.

Specified by:
chargeAmountReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
amount - Amount to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

releaseAmountReservation

public void releaseAmountReservation(Charging charging)
                              throws GatewayException
Description copied from class: ChargingManager2
Release reservation. Use default username and password for authentication.

Specified by:
releaseAmountReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

releaseAmountReservation

public void releaseAmountReservation(Charging charging,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws GatewayException
Description copied from class: ChargingManager2
Release reservation. Specify username and password for authentication.

Specified by:
releaseAmountReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous amount reservation
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveVolume

public Charging reserveVolume(java.lang.String user,
                              long volume,
                              java.lang.String billingText)
                       throws GatewayException
Description copied from class: ChargingManager2
Reserve volume to be charged to user. Use default username and password for authentication.

Specified by:
reserveVolume in class ChargingManager2
Parameters:
user - User account for which reservation is required
volume - Volume to reserve
billingText - Text to appear on the bill
Returns:
Charging class holding reservation identifier
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveVolume

public Charging reserveVolume(java.lang.String user,
                              long volume,
                              java.lang.String billingText,
                              java.lang.String username,
                              java.lang.String password)
                       throws GatewayException
Description copied from class: ChargingManager2
Reserve volume to be charged to user. Specify username and password for authentication.

Specified by:
reserveVolume in class ChargingManager2
Parameters:
user - User account for which reservation is required
volume - Volume to reserve
billingText - Text to appear on the bill
username - Authentication username
password - Authentication password
Returns:
Charging class holding reservation identifier
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveAdditionalVolume

public void reserveAdditionalVolume(Charging charging,
                                    long volume,
                                    java.lang.String billingText)
                             throws GatewayException
Description copied from class: ChargingManager2
Reserve additional volume to previous volume reservation. Use default username and password for authentication.

Specified by:
reserveAdditionalVolume in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
volume - Volume to add to reservation
billingText - Text to appear on the bill
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

reserveAdditionalVolume

public void reserveAdditionalVolume(Charging charging,
                                    long volume,
                                    java.lang.String billingText,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws GatewayException
Description copied from class: ChargingManager2
Reserve additional volume to previous volume reservation. Specify username and password for authentication.

Specified by:
reserveAdditionalVolume in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
volume - Volume to add to reservation
billingText - Text to appear on the bill
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

chargeVolumeReservation

public void chargeVolumeReservation(Charging charging,
                                    long volume,
                                    java.lang.String billingText,
                                    java.lang.String referenceCode)
                             throws GatewayException
Description copied from class: ChargingManager2
Charge volume reservation to user. Use default username and password for authentication.

Specified by:
chargeVolumeReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
volume - Volume to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

chargeVolumeReservation

public void chargeVolumeReservation(Charging charging,
                                    long volume,
                                    java.lang.String billingText,
                                    java.lang.String referenceCode,
                                    java.lang.String username,
                                    java.lang.String password)
                             throws GatewayException
Description copied from class: ChargingManager2
Charge volume reservation to user. Specify username and password for authentication.

Specified by:
chargeVolumeReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
volume - Volume to charge
billingText - Text to appear on the bill
referenceCode - Code that uniquely identify request
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

releaseVolumeReservation

public void releaseVolumeReservation(Charging charging)
                              throws GatewayException
Description copied from class: ChargingManager2
Release reservation. Use default username and password for authentication.

Specified by:
releaseVolumeReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

releaseVolumeReservation

public void releaseVolumeReservation(Charging charging,
                                     java.lang.String username,
                                     java.lang.String password)
                              throws GatewayException
Description copied from class: ChargingManager2
Release reservation. Specify username and password for authentication.

Specified by:
releaseVolumeReservation in class ChargingManager2
Parameters:
charging - Charging obtained from previous volume reservation
username - Authentication username
password - Authentication password
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
Charging, GatewayException, hr.tis.mgw.client.exceptions

getReservationAmount

public java.math.BigDecimal getReservationAmount(java.lang.String user,
                                                 long volume)
                                          throws GatewayException
Description copied from class: ChargingManager2
Get amount from volume for reservation. Use default username and password for authentication.

Specified by:
getReservationAmount in class ChargingManager2
Parameters:
user - User account for which conversion is required
volume - Volume to convert to amount
Returns:
Amount to reserve
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions

getReservationAmount

public java.math.BigDecimal getReservationAmount(java.lang.String user,
                                                 long volume,
                                                 java.lang.String username,
                                                 java.lang.String password)
                                          throws GatewayException
Description copied from class: ChargingManager2
Get amount from volume for reservation. Specify username and password for authentication.

Specified by:
getReservationAmount in class ChargingManager2
Parameters:
user - User account for which conversion is required
volume - Volume to convert to amount
username - Authentication username
password - Authentication password
Returns:
Amount to reserve
Throws:
GatewayException - Generic exception base class for all exceptions.
See Also:
GatewayException, hr.tis.mgw.client.exceptions


Copyright © 2000-2007, TIS.kis d.o.o. All Rights Reserved.