ibilling.client
Class XMLSessionConnection

java.lang.Object
  extended by ibilling.client.XMLSessionConnection
All Implemented Interfaces:
SessionConnection

public class XMLSessionConnection
extends java.lang.Object
implements SessionConnection

HTTP/XML based impelemtation of SessionConnection. Uses JDOM as underlying library.

Since:
1.0

Field Summary
private  java.util.Map<java.lang.String,java.lang.Object> config
          configuration map.
private  java.lang.Integer merchantAccountCode
          merchant account code.
private  java.lang.String password
          password.
 
Fields inherited from interface ibilling.client.SessionConnection
CLIENT_EMAIL_DOMAIN, CLIENT_EMAIL_ENCODED, CLIENT_IP_ADDRESS, CLIENT_PASSWORD_ENCODED, CLIENT_USER_NAME_ENCODED, CONNECTION_TYPE, DEBUG, FIND_ACCOUNT_TRANSACTION, FIND_CUSTOMER_ACCOUNT, FIND_PAYMENT_OPTION, FIND_PAYMENT_PLAN, KEYSTORE_PASSWORD, KEYSTORE_PATH, LOAD_OBJECT, PAYMENT_OPTION_VERIFICATION_AMOUNT, PROCESSOR_HOST
 
Constructor Summary
XMLSessionConnection()
           
 
Method Summary
 java.util.List<ClientObject> find(SessionContext sessionContext, java.lang.String queryName, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Communicates find message to server
 void login(java.lang.Integer merchantAccountCode, java.lang.String password, java.util.Map<java.lang.String,java.lang.Object> config)
          Communicates login message to the server
 void logout()
          Communicates logout message to the server for a single CustomerAccount
 void save(SessionContext sessionContext, java.util.List<CustomerAccount> customerAccounts)
          Communicates save message to the server for a list of CustomerAccounts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

merchantAccountCode

private java.lang.Integer merchantAccountCode
merchant account code.


password

private java.lang.String password
password.


config

private java.util.Map<java.lang.String,java.lang.Object> config
configuration map.

Constructor Detail

XMLSessionConnection

public XMLSessionConnection()
Method Detail

login

public void login(java.lang.Integer merchantAccountCode,
                  java.lang.String password,
                  java.util.Map<java.lang.String,java.lang.Object> config)
Description copied from interface: SessionConnection
Communicates login message to the server

Specified by:
login in interface SessionConnection
Parameters:
merchantAccountCode - merchant account code
password - password
config - configuration Map usually indicating connection URL and SSL related parameters

logout

public void logout()
Description copied from interface: SessionConnection
Communicates logout message to the server for a single CustomerAccount

Specified by:
logout in interface SessionConnection

save

public void save(SessionContext sessionContext,
                 java.util.List<CustomerAccount> customerAccounts)
          throws ClientException
Description copied from interface: SessionConnection
Communicates save message to the server for a list of CustomerAccounts

Specified by:
save in interface SessionConnection
customerAccounts - List of CustomerAccounts to be saved
Throws:
ClientException - in case of communication or validation issues

find

public java.util.List<ClientObject> find(SessionContext sessionContext,
                                         java.lang.String queryName,
                                         java.util.Map<java.lang.String,java.lang.Object> parameters)
                                  throws ClientException
Description copied from interface: SessionConnection
Communicates find message to server

Specified by:
find in interface SessionConnection
queryName - name of the query to be executed by the server
parameters - search parameters to use within the query
Returns:
List of objects that matched search criteria
Throws:
ClientException - in case of communication or validation issues