net.authorize.api.controller.base
Class ApiOperationBase<Q extends ANetApiRequest,S extends ANetApiResponse>

java.lang.Object
  extended by net.authorize.api.controller.base.ApiOperationBase<Q,S>
All Implemented Interfaces:
IApiOperation<Q,S>
Direct Known Subclasses:
ARBCancelSubscriptionController, ARBCreateSubscriptionController, ARBGetSubscriptionListController, ARBGetSubscriptionStatusController, ARBUpdateSubscriptionController, AuthenticateTestController, CreateCustomerPaymentProfileController, CreateCustomerProfileController, CreateCustomerProfileFromTransactionConroller, CreateCustomerShippingAddressController, CreateFingerPrintController, CreateTransactionController, DeleteCustomerPaymentProfileController, DeleteCustomerProfileController, DeleteCustomerShippingAddressController, GetBatchStatisticsController, GetCustomerPaymentProfileController, GetCustomerProfileController, GetCustomerProfileIdsController, GetCustomerShippingAddressController, GetHostedProfilePageController, GetSettledBatchListController, GetTransactionDetailsController, GetTransactionListController, GetUnsettledTransactionListController, IsAliveController, LogoutController, MobileDeviceLoginController, MobileDeviceRegistrationController, SendCustomerTransactionReceiptController, UpdateCustomerPaymentProfileController, UpdateCustomerProfileController, UpdateCustomerShippingAddressController, UpdateSplitTenderGroupController, ValidateCustomerPaymentProfileController

public abstract class ApiOperationBase<Q extends ANetApiRequest,S extends ANetApiResponse>
extends Object
implements IApiOperation<Q,S>

Author:
ramittal

Field Summary
protected static org.apache.commons.logging.Log logger
           
protected  MessageTypeEnum resultCode
           
protected  List<String> results
           
 
Constructor Summary
protected ApiOperationBase(Q apiRequest)
           
 
Method Summary
protected  void afterExecute()
           
protected  void beforeExecute()
           
 void execute()
           
 void execute(Environment environment)
           
 S executeWithApiResponse()
           
 S executeWithApiResponse(Environment environment)
           
protected  Q getApiRequest()
           
 S getApiResponse()
           
static Environment getEnvironment()
           
 ANetApiResponse getErrorResponse()
           
static MerchantAuthenticationType getMerchantAuthentication()
           
protected abstract  Class<S> getResponseType()
           
 MessageTypeEnum getResultCode()
           
 List<String> getResults()
           
protected  void setApiRequest(Q apiRequest)
           
static void setEnvironment(Environment environment)
           
static void setMerchantAuthentication(MerchantAuthenticationType merchantAuthentication)
           
protected abstract  void validateRequest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.commons.logging.Log logger

results

protected List<String> results

resultCode

protected MessageTypeEnum resultCode
Constructor Detail

ApiOperationBase

protected ApiOperationBase(Q apiRequest)
Method Detail

getApiRequest

protected Q getApiRequest()

setApiRequest

protected void setApiRequest(Q apiRequest)

getApiResponse

public S getApiResponse()
Specified by:
getApiResponse in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

getErrorResponse

public ANetApiResponse getErrorResponse()
Specified by:
getErrorResponse in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

getEnvironment

public static Environment getEnvironment()

setEnvironment

public static void setEnvironment(Environment environment)

getMerchantAuthentication

public static MerchantAuthenticationType getMerchantAuthentication()

setMerchantAuthentication

public static void setMerchantAuthentication(MerchantAuthenticationType merchantAuthentication)

executeWithApiResponse

public S executeWithApiResponse()
Specified by:
executeWithApiResponse in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

executeWithApiResponse

public S executeWithApiResponse(Environment environment)
Specified by:
executeWithApiResponse in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

execute

public void execute()
Specified by:
execute in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

execute

public void execute(Environment environment)
Specified by:
execute in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

getResultCode

public MessageTypeEnum getResultCode()
Specified by:
getResultCode in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

getResults

public List<String> getResults()
Specified by:
getResults in interface IApiOperation<Q extends ANetApiRequest,S extends ANetApiResponse>

beforeExecute

protected void beforeExecute()

afterExecute

protected void afterExecute()

validateRequest

protected abstract void validateRequest()

getResponseType

protected abstract Class<S> getResponseType()


Copyright © 2014. All Rights Reserved.