atg.commerce.order
Class AuthorizedPaymentTypesDroplet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.commerce.order.AuthorizedPaymentTypesDroplet
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class AuthorizedPaymentTypesDroplet
extends DynamoServlet

The AuthorizedPaymentTypesDroplet DynamoServlet determines the payment types that a user is authorized to use. To use this DynamoServlet there is a ServiceMap of payment types, to the Nucleus paths of UserPaymentTypeAuthorizer components. The payment types correspond to those types that are registered with the OrderTools service. The UserPaymentTypeAuthorizer is an interface whose contract authorizes a user payment type. The service method takes a user Profile as input. As a convenience to different applications the authorized payment types are exposed as two output parameters. One parameter specifies the List of all payment types authorized for the user. The other parameter specifies a Map of all tested payment types, to the boolean results that indicate user authorization or not for each type. In the event that a UserPaymentTypeAuthorizer fails to determine authorization, there is a global authorization property used to specify a default authorization for any problematic payment type.


Field Summary
static java.lang.String AUTHORIZED_PAYMENT_TYPES
           
static java.lang.String CLASS_VERSION
           
static ParameterName OUTPUT
           
static java.lang.String POTENTIAL_PAYMENT_TYPES
           
static ParameterName PROFILE
           
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
AuthorizedPaymentTypesDroplet()
          Creates a new AuthorizedPaymentTypesDroplet instance.
 
Method Summary
 java.util.List getAuthorizedPaymentTypes()
          Return the AuthorizedPaymentTypes property.
 ServiceMap getPaymentTypeAuthorizers()
          Return the PaymentTypeAuthorizers property.
 java.util.Map getPotentialPaymentTypes()
          Return the PotentialPaymentTypes property.
 boolean isGlobalAuthorization()
          Return the GlobalAuthorization property.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          DynamoServlet service method.
 void setAuthorizedPaymentTypes(java.util.List pAuthorizedPaymentTypes)
          Set the AuthorizedPaymentTypes property.
 void setGlobalAuthorization(boolean pGlobalAuthorization)
          Set the GlobalAuthorization property.
 void setPaymentTypeAuthorizers(ServiceMap pPaymentTypeAuthorizers)
          Set the PaymentTypeAuthorizers property.
 void setPotentialPaymentTypes(java.util.Map pPotentialPaymentTypes)
          Set the PotentialPaymentTypes property.
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

AUTHORIZED_PAYMENT_TYPES

public static final java.lang.String AUTHORIZED_PAYMENT_TYPES
See Also:
Constant Field Values

POTENTIAL_PAYMENT_TYPES

public static final java.lang.String POTENTIAL_PAYMENT_TYPES
See Also:
Constant Field Values

PROFILE

public static final ParameterName PROFILE

OUTPUT

public static final ParameterName OUTPUT
Constructor Detail

AuthorizedPaymentTypesDroplet

public AuthorizedPaymentTypesDroplet()
Creates a new AuthorizedPaymentTypesDroplet instance.

Method Detail

setPaymentTypeAuthorizers

public void setPaymentTypeAuthorizers(ServiceMap pPaymentTypeAuthorizers)
Set the PaymentTypeAuthorizers property.

Parameters:
pPaymentTypeAuthorizers - a ServiceMap value

getPaymentTypeAuthorizers

public ServiceMap getPaymentTypeAuthorizers()
Return the PaymentTypeAuthorizers property.

Returns:
a ServiceMap value

setGlobalAuthorization

public void setGlobalAuthorization(boolean pGlobalAuthorization)
Set the GlobalAuthorization property.

Parameters:
pGlobalAuthorization - a boolean value

isGlobalAuthorization

public boolean isGlobalAuthorization()
Return the GlobalAuthorization property.

Returns:
a boolean value

setAuthorizedPaymentTypes

public void setAuthorizedPaymentTypes(java.util.List pAuthorizedPaymentTypes)
Set the AuthorizedPaymentTypes property.

Parameters:
pAuthorizedPaymentTypes - a List value

getAuthorizedPaymentTypes

public java.util.List getAuthorizedPaymentTypes()
Return the AuthorizedPaymentTypes property.

Returns:
a List value

setPotentialPaymentTypes

public void setPotentialPaymentTypes(java.util.Map pPotentialPaymentTypes)
Set the PotentialPaymentTypes property.

Parameters:
pPotentialPaymentTypes - a Map value

getPotentialPaymentTypes

public java.util.Map getPotentialPaymentTypes()
Return the PotentialPaymentTypes property.

Returns:
a Map value

service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
DynamoServlet service method. This takes a user Profile and determines which payment types are authorized for use. The results are exposed as output parameters.

Overrides:
service in class DynamoServlet
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs