atg.commerce.order.scheduled
Class ScheduledOrderInfo

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.scheduled.ScheduledOrderInfo
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class ScheduledOrderInfo
extends DynamoServlet

This droplet provides info related to a given scheduled order item

input params

itemId, item
(required)Either the id of the scheduled order item or a scheduled order item

output parameters

scheduledOrderItem
a scheduled order repository item.
readableSchedule
a readable schedule string.
schedule
a reference to a Schedule object that represents the item's scheduling information.

oparams

output
rendered once upon successful lookup of items.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName INPUT_PARAM_LOCALE
          the input parameter name for the schdule item parameter
static ParameterName INPUT_PARAM_SCHEDULE_ITEM
          the input parameter name for the schdule item parameter
static ParameterName INPUT_PARAM_SCHEDULE_ITEM_ID
          the input parameter name for the schdule item id parameter
protected  ScheduledOrderTools mScheduleOrderTools
           
static java.lang.String OPARAM_OUTPUT
          the name for the output oparam
static java.lang.String OUTPUT_PARAM_READABLEDULE_SCHEDULE
          the name for the readableSchedule output parameter.
static java.lang.String OUTPUT_PARAM_SCHEDULE
          the name for the schedule output parameter.
static java.lang.String OUTPUT_PARAM_SCHEDULE_CLASSNAME
          the name for the readableSchedule output parameter.
static java.lang.String OUTPUT_PARAM_SCHEDULED_ORDER_ITEM
          the name for the readableSchedule output parameter.
 
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
ScheduledOrderInfo()
           
 
Method Summary
 java.util.Locale getDefaultLocale()
          Returns property DefaultLocale.
protected  java.lang.String getReadableSchedule(CalendarSchedule pSchedule, java.util.Locale pLocale)
          Generates the readable string representation of the CalendarSchedule.
protected  java.lang.String getReadableSchedule(PeriodicSchedule pSchedule, java.util.Locale pLocale)
          Generates the readable string representation of the PeriodicSchedule.
protected  java.lang.String getReadableSchedule(Schedule pSchedule, java.util.Locale pLocale)
          Generates the readable string representation of the Schedule.
 ScheduledOrderTools getScheduledOrderTools()
          returns a reference the scheduled order tools
 java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Returns the locale associated with the request.
 boolean isUseRequestLocale()
          Returns property UseRequestLocale
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Looks up the scheduled order items in the repository
 void setDefaultLocale(java.util.Locale pDefaultLocale)
          Sets property DefaultLocale
 void setInfoParametersForScheduledOrderItem(RepositoryItem pScheduledOrderItem, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called once for each scheduled order item to set output parameters with related info
 void setScheduledOrderTools(ScheduledOrderTools pScheduleOrderTools)
           
 void setUseRequestLocale(boolean pUseRequestLocale)
          Sets property UseRequestLocale
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, 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, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 java.lang.String CLASS_VERSION
Class version string


INPUT_PARAM_SCHEDULE_ITEM_ID

public static final ParameterName INPUT_PARAM_SCHEDULE_ITEM_ID
the input parameter name for the schdule item id parameter


INPUT_PARAM_SCHEDULE_ITEM

public static final ParameterName INPUT_PARAM_SCHEDULE_ITEM
the input parameter name for the schdule item parameter


INPUT_PARAM_LOCALE

public static final ParameterName INPUT_PARAM_LOCALE
the input parameter name for the schdule item parameter


OUTPUT_PARAM_SCHEDULED_ORDER_ITEM

public static final java.lang.String OUTPUT_PARAM_SCHEDULED_ORDER_ITEM
the name for the readableSchedule output parameter. contains a reference to a String

See Also:
Constant Field Values

OUTPUT_PARAM_READABLEDULE_SCHEDULE

public static final java.lang.String OUTPUT_PARAM_READABLEDULE_SCHEDULE
the name for the readableSchedule output parameter. contains a reference to a String

See Also:
Constant Field Values

OUTPUT_PARAM_SCHEDULE

public static final java.lang.String OUTPUT_PARAM_SCHEDULE
the name for the schedule output parameter. contains a reference to a Schedule object

See Also:
Constant Field Values

OUTPUT_PARAM_SCHEDULE_CLASSNAME

public static final java.lang.String OUTPUT_PARAM_SCHEDULE_CLASSNAME
the name for the readableSchedule output parameter. contains a reference to a String

See Also:
Constant Field Values

OPARAM_OUTPUT

public static final java.lang.String OPARAM_OUTPUT
the name for the output oparam

See Also:
Constant Field Values

mScheduleOrderTools

protected ScheduledOrderTools mScheduleOrderTools
Constructor Detail

ScheduledOrderInfo

public ScheduledOrderInfo()
Method Detail

getScheduledOrderTools

public ScheduledOrderTools getScheduledOrderTools()
returns a reference the scheduled order tools


setScheduledOrderTools

public void setScheduledOrderTools(ScheduledOrderTools pScheduleOrderTools)

setDefaultLocale

public void setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale


getDefaultLocale

public java.util.Locale getDefaultLocale()
Returns property DefaultLocale. If the property value is null, then JVM's default locale is returned.


setUseRequestLocale

public void setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale


isUseRequestLocale

public boolean isUseRequestLocale()
Returns property UseRequestLocale


getUserLocale

public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest,
                                      DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. The method first searches for a request paramater named locale. This value can be either a java.util.Locale object or a String which represents the locale. Next if the useRequestLocale property is true, then the locale of the request will be returned. Finally, if the locale cannot be determined, the the defaultLocale property is used.


service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Looks up the scheduled order items in the repository

Overrides:
service in class DynamoServlet
Parameters:
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - an application specific error occurred processing this request
java.io.IOException - an error occurred reading data from the request or writing data to the response.

setInfoParametersForScheduledOrderItem

public void setInfoParametersForScheduledOrderItem(RepositoryItem pScheduledOrderItem,
                                                   DynamoHttpServletRequest pRequest,
                                                   DynamoHttpServletResponse pResponse)
Called once for each scheduled order item to set output parameters with related info

Parameters:
pScheduledOrderItem -
pRequest -

getReadableSchedule

protected java.lang.String getReadableSchedule(Schedule pSchedule,
                                               java.util.Locale pLocale)
Generates the readable string representation of the Schedule.

Parameters:
pSchedule - the Schedule
pLocale - the locale to use for resourcing the readable value
Returns:
See Also:
#getReadableSchedule(CalendarSchedule), #getReadableSchedule(PeriodicSchedule)

getReadableSchedule

protected java.lang.String getReadableSchedule(PeriodicSchedule pSchedule,
                                               java.util.Locale pLocale)
Generates the readable string representation of the PeriodicSchedule.

By default this method returns the toString implementation of the PeriodicSchedule object

Parameters:
pSchedule - the PeriodicSchedule
pLocale - the locale to use for resourcing the readable value
Returns:

getReadableSchedule

protected java.lang.String getReadableSchedule(CalendarSchedule pSchedule,
                                               java.util.Locale pLocale)
Generates the readable string representation of the CalendarSchedule.

By default this method returns the toString implementation of the CalendarSchedule object

Parameters:
pSchedule - the PeriodicSchedule
pLocale - the locale to use for resourcing the readable value
Returns: