public class CSRScheduledOrderFormHandler
extends atg.repository.servlet.RepositoryFormHandler
Two types of schedule can be created or updated:
The following properties are used to generate the startDate, endDate and
schedule properties of the item. These values are generated
from these properties and put into the value dictionary prior to creating a new
item. They are also initialized from an existing item when the
Start date properties
End date properties
Calendar schedule properties
Periodic(interval) schedule properties
Configurable default values:
CalendarSchedule
and
PeriodicSchedule
(Interval)
repositoryItem
property returns an item.
numberOfOccurrences
. With endBy, the end date is set to the date specific by the
endDate property.
CalendarSchedule.addDate
is called for each date specified in this array
CalendarSchedule.addDayOfTheWeek
is called for each day specified in this array
CalendarSchedule.addOccurrenceInTheMonth
is called for each selected occurrence in this array.
Valid values include 1=first; 4=fourth; LAST=last
CalendarSchedule.addAllMonths
) and selectedMonths
CalendarSchedule.addMonth
is called for each month specified in this array
CalendarSchedule.addHour
is called for each selected hour in this array.
CalendarSchedule.addMinute
is called for each selected minute in this array.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CANCEL_CREATE_NEW_SCHEDULE
the value of the cancel process parameter when canceling the create schedule process that was started from
the schedule order view page - add schedule option
|
static java.lang.String |
CANCEL_PROCESS_PARAM_NAME
the name of the request parameter for specifying the cancel process key
|
static java.lang.String |
CANCEL_REVIEW_SCHEDULE
the value of the cancel process parameter when canceling the create schedule process that was started from
the review order page - schedule option.
|
static java.lang.String |
CANCEL_REVIEW_SUBMIT_AND_SCHEDULE
the value of the cancel process parameter when canceling the create schedule process that was started from
the review order page - submit and schedule option.
|
static java.lang.String |
CANCEL_UPDATE_SCHEDULE
the value of the cancel process parameter when canceling the update schedule process that was started from
the schedule order view page - Change schedule option
|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
DAYS_OPTION_ALLDAYS
The days option that causes all days to be included in the calendar schedule
|
static java.lang.String |
DAYS_OPTION_SELECTEDDATES
The days option that causes only selected dates to be included in the calendar schedule
|
static java.lang.String |
DAYS_OPTION_SELECTEDDAYS
The days option that causes only selected days to be included in the calendar schedule
|
static java.lang.String |
ENDDATE_OPTION_AFTEROCCURRENCES
The end date option that causes the end date to be calculated based on the number of selected occurrences
|
static java.lang.String |
ENDDATE_OPTION_ENDBY
The end date option that causes the end date to be set based on a selected end date
|
static java.lang.String |
ENDDATE_OPTION_NONE
The end date option that causes there to be no end date associated with the schedule
|
static java.lang.String |
INTERVAL_OPTION_DAYS
The interval option that causes the interval period to be calculated based on days
|
static java.lang.String |
INTERVAL_OPTION_WEEKS
The interval option that causes the interval period to be calculated based on weeks
|
protected boolean |
mAutoSendEmail |
protected ConfirmationInfo |
mConfirmationInfo
Configurable properties
|
protected CSRAgentTools |
mCSRAgentTools |
protected CSRScheduledOrderTools |
mCSRScheduledOrderTools |
protected java.lang.String |
mDaysOption |
protected java.lang.String |
mDefaultDaysOption |
protected java.lang.String |
mDefaultEndDateOption |
protected long |
mDefaultInterval |
protected java.lang.String |
mDefaultIntervalOption |
protected java.lang.String |
mDefaultMonthsOption |
protected java.lang.String |
mDefaultOccurrencesOption |
protected java.lang.String |
mDefaultScheduleType |
protected java.lang.String |
mEndDate |
protected java.lang.String |
mEndDateOption |
protected java.lang.String |
mIntervalOption |
protected atg.web.messaging.MessageTools |
mMessageTools |
protected java.lang.String |
mMonthsOption |
protected java.lang.Long |
mNumberOfOccurrences |
protected java.lang.String |
mOccurrencesOption |
static java.lang.String |
MONTHS_OPTION_ALLMONTHS
The months option that causes all months to be included in the calendar schedule
|
static java.lang.String |
MONTHS_OPTION_SELECTEDMONTHS
The months option that causes only selected months to be included in the calendar schedule
|
protected atg.userprofiling.Profile |
mProfile |
protected atg.service.scheduler.Schedule |
mSchedule |
protected java.util.Date |
mScheduleEndDate |
protected java.util.Date |
mScheduleStartDate |
protected java.lang.String |
mScheduleType |
protected java.lang.Integer[] |
mSelectedDates |
protected java.lang.Integer[] |
mSelectedDays |
protected java.lang.Integer[] |
mSelectedHours |
protected java.lang.Long |
mSelectedInterval |
protected java.lang.Integer[] |
mSelectedMinutes |
protected java.lang.Integer[] |
mSelectedMonths |
protected java.lang.Integer[] |
mSelectedOccurrences |
protected java.lang.String |
mStartDate |
protected atg.commerce.order.Order |
mTemplateOrder |
protected javax.transaction.TransactionManager |
mTransactionManager |
static java.lang.String |
OCCURRENCES_OPTION_ALLOCCURRENCES
The occurrences option that causes only all occurrences to be included in the calendar schedule
|
static java.lang.String |
OCCURRENCES_OPTION_SELECTEDOCCURRENCES
The occurrences option that causes only selected occurrences to be included in the calendar schedule
|
static java.lang.String |
TYPE_CALENDAR
The schedule type uses for calendar schedules
|
static java.lang.String |
TYPE_INTERVAL
The schedule type uses for interval(Periodic) schedules
|
STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
NULL_SENTINEL, REPOSITORY_ID_PROPERTY_NAME, RESOURCE_BUNDLE_NAME, UPDATE_APPEND, UPDATE_PREPEND, UPDATE_REMOVE, UPDATE_REPLACE
Constructor and Description |
---|
CSRScheduledOrderFormHandler() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Date |
calculateEndTimeForOccurrences(atg.service.scheduler.Schedule pSchedule)
Calculates the end date for a schedule based on the selected number of occurrences
|
protected long |
calculateIntervalForPeriodicSchedule()
Calculates the interval for a
PeriodicSchedule based on the
form input. |
protected long |
calculateNextRunTime(atg.service.scheduler.Schedule pSchedule)
Calculates the next runtime for the given schedule
|
protected void |
cancel(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executes cancel processing.
|
protected atg.service.scheduler.CalendarSchedule |
createCalendarSchedule()
Creates a new
CalendarSchedule based on the
form input. |
protected atg.service.scheduler.PeriodicSchedule |
createPeriodicSchedule()
Creates a new
PeriodicSchedule based on the
form input. |
protected atg.service.scheduler.Schedule |
createSchedule()
Creates a new
Schedule based on the type of schedule specified by
the scheduleType property |
protected java.util.Date |
createScheduledOrderEndDate(atg.service.scheduler.Schedule pSchedule)
This method creates the end date based on the end date option specified
by the
endDateOption property. |
protected java.util.Date |
createScheduledOrderStartDate()
This method generates a date based on the
startDate and
startTime property values. |
protected void |
doAutoConfirmation(ConfirmationInfo pConfirmationInfo)
If
autoConfirmation is true an automatic email confirmation is sent
using CSRAgentTools |
protected java.util.Date |
generateDate(java.lang.String pDate,
java.lang.String pTime)
Generates a date from the given date and time strings.
|
ConfirmationInfo |
getConfirmationInfo()
Returns the confirmation info object used for sending email confirmations.
|
CSRAgentTools |
getCSRAgentTools() |
CSRScheduledOrderTools |
getCSRScheduledOrderTools()
Returns a reference to the CSRScheduledOrderTools component
|
java.lang.String |
getDaysOption()
Returns the days option selected for a Calendar schedule.
|
java.lang.String |
getDefaultDaysOption()
Returns the default days option for a new calendar schedule.
|
java.lang.String |
getDefaultEndDateOption()
Returns the default end date option for all new schedules.
|
long |
getDefaultInterval()
Returns the default interval when creating new interval schedules.
|
java.lang.String |
getDefaultIntervalOption()
Returns the default interval option for a new interval schedule.
|
java.lang.String |
getDefaultMonthsOption()
Returns the default months option for a new calendar schedule.
|
java.lang.String |
getDefaultOccurrencesOption()
Returns the default occurrences option when creating new calendar schedules.
|
protected java.util.Date |
getDefaultScheduleEndDate()
Returns the default end date for a new schedule.
|
protected java.util.Date |
getDefaultScheduleStartDate()
Returns the default start date for a new schedule.
|
java.lang.String |
getDefaultScheduleType()
Returns the default schedule type when creating new schedules.
|
java.lang.String |
getEndDate()
Returns the end date is localized String format.
|
java.lang.String |
getEndDateOption()
Returns the option used for determine a schedule's end date.
|
java.lang.String |
getIntervalOption()
Returns the interval option for a Periodic schedule.
|
java.lang.String |
getLocalizedDateFormatString()
Returns the localized version of the date format string.
|
java.lang.String |
getLocalizedTimeFormatString()
Returns the localized version of the time format string.
|
atg.web.messaging.MessageTools |
getMessageTools()
Returns the MessageTools component
|
java.lang.String |
getMonthsOption()
Returns the months option selected for a calendar schedule.
|
java.lang.Long |
getNumberOfOccurrences() |
java.lang.String |
getOccurrencesOption()
Returns the occurrences option selected for a Calendar schedule.
|
atg.userprofiling.Profile |
getProfile()
Returns property Profile
|
protected java.util.Collection |
getPropertyUpdates()
Returns the collection of PropertyUpdates generated for an update.
|
java.util.Date |
getScheduleEndDate()
Returns the selected end date for a schedule.
|
protected atg.service.scheduler.Schedule |
getScheduleFromScheduledOrderItem(atg.repository.RepositoryItem pScheduledOrderItem)
Returns a Schedule object based on the given scheduled order repository item.
|
java.util.Date |
getScheduleStartDate()
Returns the selected start date for a schedule.
|
java.lang.String |
getScheduleType()
Returns the type of schedule.
|
protected java.lang.String |
getScheduleTypeFromSchedule(atg.repository.RepositoryItem pScheduledOrderItem)
Returns the type of an existing schedule.
|
java.lang.Integer[] |
getSelectedDates()
Returns the dates selected for a calendar schedule.
|
java.lang.Integer[] |
getSelectedDays()
Returns the days selected for a Calendar schedule.
|
java.lang.Integer[] |
getSelectedHours()
Returns the hours selected for a Calendar schedule.
|
java.lang.Long |
getSelectedInterval()
Returns the number of intervals for a Periodic schedule.
|
java.lang.Integer[] |
getSelectedMinutes()
Returns the mintues selected for a Calendar schedule.
|
java.lang.Integer[] |
getSelectedMonths()
Returns the months selected for a calendar schedule.
|
java.lang.Integer[] |
getSelectedOccurrences()
Returns the occurrences in the month selected for a calendar schedule.
|
java.lang.String |
getStartDate()
Returns the state date is localized String format.
|
atg.commerce.order.Order |
getTemplateOrder()
Returns the template order for the new schedule.
|
javax.transaction.TransactionManager |
getTransactionManager()
Returns property TransactionManager
|
protected java.util.Locale |
getUserLocale()
This method gets the current Locale
|
boolean |
handleCancel(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method redirects to the value of the cancelURL property, if
that property is set to a non-null value.
|
protected void |
initializeConfirmationInfoForCreateSchedule(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Initializes the confirmation info object when a new order is submitted
|
protected void |
initializeConfirmationInfoForUpdateSchedule(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Initializes the confirmation info object when a scheduled order is updated
|
boolean |
isAutoSendEmail()
Gets the AutoSendEmail
|
protected void |
postCreateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executed after the item is created.
|
protected void |
postUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executed after the item is updated.
|
protected void |
preCreateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Called prior to creating the item.
|
protected void |
preUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Execute prior to updating the item.
|
void |
setAutoSendEmail(boolean pAutoSendEmail)
Sets the AutoSendEmail
|
void |
setConfirmationInfo(ConfirmationInfo pConfirmationInfo) |
void |
setCSRAgentTools(CSRAgentTools pAgentTools) |
void |
setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools) |
void |
setDaysOption(java.lang.String pDaysOption) |
void |
setDefaultDaysOption(java.lang.String pDefaultDaysOption) |
void |
setDefaultEndDateOption(java.lang.String pDefaultEndDateOption) |
void |
setDefaultInterval(long pDefaultInterval) |
void |
setDefaultIntervalOption(java.lang.String pDefaultIntervalOption) |
void |
setDefaultMonthsOption(java.lang.String pDefaultMonthsOption) |
void |
setDefaultOccurrencesOption(java.lang.String pDefaultOccurrencesOption) |
void |
setDefaultScheduleType(java.lang.String pDefaultScheduleType) |
void |
setEndDate(java.lang.String pEndDate) |
void |
setEndDateOption(java.lang.String pEndDateOption) |
void |
setIntervalOption(java.lang.String pIntervalOption) |
void |
setMessageTools(atg.web.messaging.MessageTools pMessageTools) |
void |
setMonthsOption(java.lang.String pMonthsOption) |
void |
setNumberOfOccurrences(java.lang.Long pNumberOfOccurrences)
returns the selected number of occurrences that will be used to
calculate the scheduled order item's end date
|
void |
setOccurrencesOption(java.lang.String pOccurrencesOption) |
void |
setProfile(atg.userprofiling.Profile pProfile)
Sets property Profile
|
protected void |
setPropertyUpdates(java.util.Collection pPropertyUpdates) |
void |
setScheduleType(java.lang.String pScheduleType) |
void |
setSelectedDates(java.lang.Integer[] pSelectedDates) |
void |
setSelectedDays(java.lang.Integer[] pSelectedDays) |
void |
setSelectedHours(java.lang.Integer[] pSelectedHours) |
void |
setSelectedInterval(java.lang.Long pSelectedInterval) |
void |
setSelectedMinutes(java.lang.Integer[] pSelectedMinutes) |
void |
setSelectedMonths(java.lang.Integer[] pSelectedMonths) |
void |
setSelectedOccurrences(java.lang.Integer[] pSelectedOccurrences) |
void |
setStartDate(java.lang.String pStartDate) |
void |
setTemplateOrder(atg.commerce.order.Order pTemplateOrder) |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property TransactionManager
|
protected void |
setValuesBeforeCreate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is where the values in the RepositoryFormHandler's value dictionary
are set based on the form input prior to a create.
|
protected void |
setValuesBeforeUpdate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method is where the values in the RepositoryFormHandler's value dictionary
are set based on the form input prior to an update.
|
protected void |
validateNextRunTime()
Validates that the next run time occurs before the end date.
|
protected void |
validateScheduleInput(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Performs basic validation of form input
Checks that the start and end date input can be parsed into valid dates.
|
protected void |
validateScheduleInputForCreate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executed as part of preCreate to perform validation of the form input values.
|
protected void |
validateScheduleInputForUpdate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Executed as part of preUpdate to perform validation of form input values.
|
checkFormError, checkFormSuccess, checkForRequiredProperties, deleteItem, getCheckForReadOnlyProperties, getCheckForRequiredProperties, getContentItemDescriptor, getContentNameProperty, getContentPathProperty, getCreateErrorURL, getCreateSuccessURL, getDeleteErrorURL, getDeleteSuccessURL, getEditMapsAsLists, getErrorHandler, getExtractDefaultValuesFromItem, getFolderIdProperty, getItemDescriptor, getItemDescriptorName, getItemProperty, getLogger, getMapKeyValueSeparator, getRemoveReferencesToDeletedItems, getRepository, getRepositoryId, getRepositoryItem, getRepositoryItemEditor, getRepositoryPathName, getRequireIdOnCreate, getSpecifiedIdPropertyValue, getTransactionDemarcation, getTrimProperties, getUpdateErrorURL, getUpdateSuccessURL, getValue, getValueProperty, handleCreate, handleDelete, handleUpdate, isClearValueOnSet, isCreateTransientItems, isRequireMapKeys, isSortRepositoryItemSets, isTrimProperty, isUpdateItemsInCollection, postDeleteItem, postUpdateItemProperties, preDeleteItem, setCheckForReadOnlyProperties, setCheckForRequiredProperties, setClearValueOnSet, setContentNameProperty, setContentPathProperty, setCreateErrorURL, setCreateSuccessURL, setCreateTransientItems, setDeleteErrorURL, setDeleteSuccessURL, setEditMapsAsLists, setExtractDefaultValuesFromItem, setFolderIdProperty, setItemDescriptorName, setMapKeyValueSeparator, setRemoveReferencesToDeletedItems, setRepository, setRepositoryId, setRepositoryItemEditor, setRepositoryPathName, setRequireIdOnCreate, setRequireMapKeys, setSortRepositoryItemSets, setTrimProperties, setUpdateErrorURL, setUpdateItemsInCollection, setUpdateSuccessURL, setValueProperty, testPropertyAttribute, updateChildItemProperty, updateContentItemValues, updateItem, updateItemProperties, updateListProperty, updateMapProperty
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String CANCEL_PROCESS_PARAM_NAME
public static final java.lang.String CANCEL_REVIEW_SCHEDULE
public static final java.lang.String CANCEL_REVIEW_SUBMIT_AND_SCHEDULE
public static final java.lang.String CANCEL_CREATE_NEW_SCHEDULE
public static final java.lang.String CANCEL_UPDATE_SCHEDULE
public static final java.lang.String TYPE_CALENDAR
public static final java.lang.String TYPE_INTERVAL
public static final java.lang.String DAYS_OPTION_ALLDAYS
public static final java.lang.String DAYS_OPTION_SELECTEDDAYS
public static final java.lang.String DAYS_OPTION_SELECTEDDATES
public static final java.lang.String OCCURRENCES_OPTION_ALLOCCURRENCES
public static final java.lang.String OCCURRENCES_OPTION_SELECTEDOCCURRENCES
public static final java.lang.String MONTHS_OPTION_ALLMONTHS
public static final java.lang.String MONTHS_OPTION_SELECTEDMONTHS
public static final java.lang.String INTERVAL_OPTION_DAYS
public static final java.lang.String INTERVAL_OPTION_WEEKS
public static final java.lang.String ENDDATE_OPTION_NONE
public static final java.lang.String ENDDATE_OPTION_AFTEROCCURRENCES
public static final java.lang.String ENDDATE_OPTION_ENDBY
protected ConfirmationInfo mConfirmationInfo
protected boolean mAutoSendEmail
protected CSRAgentTools mCSRAgentTools
protected CSRScheduledOrderTools mCSRScheduledOrderTools
protected java.lang.String mDefaultDaysOption
protected java.lang.String mDefaultMonthsOption
protected java.lang.String mDefaultIntervalOption
protected java.lang.String mDefaultEndDateOption
protected java.lang.String mDefaultScheduleType
protected java.lang.String mDefaultOccurrencesOption
protected long mDefaultInterval
protected javax.transaction.TransactionManager mTransactionManager
protected atg.web.messaging.MessageTools mMessageTools
protected atg.userprofiling.Profile mProfile
protected java.lang.String mEndDate
protected java.lang.String mStartDate
protected java.lang.Integer[] mSelectedDays
protected java.lang.Integer[] mSelectedHours
protected java.lang.Integer[] mSelectedMinutes
protected java.lang.String mScheduleType
protected java.lang.String mEndDateOption
protected java.lang.String mIntervalOption
protected java.lang.Long mNumberOfOccurrences
protected java.lang.Long mSelectedInterval
protected java.lang.String mDaysOption
protected java.lang.String mOccurrencesOption
protected java.lang.String mMonthsOption
protected java.lang.Integer[] mSelectedOccurrences
protected java.lang.Integer[] mSelectedMonths
protected java.lang.Integer[] mSelectedDates
protected atg.commerce.order.Order mTemplateOrder
protected java.util.Date mScheduleEndDate
protected java.util.Date mScheduleStartDate
protected atg.service.scheduler.Schedule mSchedule
public ConfirmationInfo getConfirmationInfo()
public void setConfirmationInfo(ConfirmationInfo pConfirmationInfo)
public boolean isAutoSendEmail()
public void setAutoSendEmail(boolean pAutoSendEmail)
pAutoSendEmail
- The AutoSendEmail to setpublic CSRAgentTools getCSRAgentTools()
public void setCSRAgentTools(CSRAgentTools pAgentTools)
public CSRScheduledOrderTools getCSRScheduledOrderTools()
public void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)
public java.lang.String getDefaultDaysOption()
Default is DAYS_OPTION_ALLDAYS
public void setDefaultDaysOption(java.lang.String pDefaultDaysOption)
public java.lang.String getDefaultMonthsOption()
Default is MONTHS_OPTION_ALLMONTHS
public void setDefaultMonthsOption(java.lang.String pDefaultMonthsOption)
public java.lang.String getDefaultIntervalOption()
Default is INTERVAL_OPTION_DAYS
INTERVAL_OPTION_DAYS
,
INTERVAL_OPTION_WEEKS
public void setDefaultIntervalOption(java.lang.String pDefaultIntervalOption)
public java.lang.String getDefaultEndDateOption()
Default is ENDDATE_OPTION_NONE
public void setDefaultEndDateOption(java.lang.String pDefaultEndDateOption)
public java.lang.String getDefaultScheduleType()
Default is TYPE_CALENDAR
TYPE_CALENDAR
,
TYPE_INTERVAL
public void setDefaultScheduleType(java.lang.String pDefaultScheduleType)
public java.lang.String getDefaultOccurrencesOption()
Default is OCCURRENCES_OPTION_ALLOCCURRENCES
public void setDefaultOccurrencesOption(java.lang.String pDefaultOccurrencesOption)
public long getDefaultInterval()
Default is 1
public void setDefaultInterval(long pDefaultInterval)
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- the value to set for property TransactionManagerpublic javax.transaction.TransactionManager getTransactionManager()
getTransactionManager
in class atg.repository.servlet.RepositoryFormHandler
public atg.web.messaging.MessageTools getMessageTools()
public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
public void setProfile(atg.userprofiling.Profile pProfile)
pProfile
- the value to set for property Profilepublic atg.userprofiling.Profile getProfile()
public java.lang.String getEndDate()
If this value is not set, it will initialize itself from the scheduled order end date in the value dictionary
public void setEndDate(java.lang.String pEndDate)
public java.lang.String getStartDate()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setStartDate(java.lang.String pStartDate)
public java.lang.Integer[] getSelectedDays()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedDays(java.lang.Integer[] pSelectedDays)
public java.lang.Integer[] getSelectedHours()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedHours(java.lang.Integer[] pSelectedHours)
public java.lang.Integer[] getSelectedMinutes()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedMinutes(java.lang.Integer[] pSelectedMinutes)
public java.lang.String getScheduleType()
protected java.lang.String getScheduleTypeFromSchedule(atg.repository.RepositoryItem pScheduledOrderItem)
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
pScheduledOrderItem
- TYPE_CALENDAR
or TYPE_INTERVAL
getScheduleFromScheduledOrderItem(RepositoryItem)
public void setScheduleType(java.lang.String pScheduleType)
public java.lang.String getEndDateOption()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setEndDateOption(java.lang.String pEndDateOption)
public java.lang.String getIntervalOption()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
INTERVAL_OPTION_DAYS
,
INTERVAL_OPTION_WEEKS
public void setIntervalOption(java.lang.String pIntervalOption)
public void setNumberOfOccurrences(java.lang.Long pNumberOfOccurrences)
pNumberOfOccurrences
- public java.lang.Long getNumberOfOccurrences()
public void setSelectedInterval(java.lang.Long pSelectedInterval)
public java.lang.Long getSelectedInterval()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public java.lang.String getDaysOption()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setDaysOption(java.lang.String pDaysOption)
public java.lang.String getOccurrencesOption()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setOccurrencesOption(java.lang.String pOccurrencesOption)
public java.lang.String getMonthsOption()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setMonthsOption(java.lang.String pMonthsOption)
public java.lang.Integer[] getSelectedOccurrences()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedOccurrences(java.lang.Integer[] pSelectedOccurrences)
public java.lang.Integer[] getSelectedMonths()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedMonths(java.lang.Integer[] pSelectedMonths)
public java.lang.Integer[] getSelectedDates()
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
public void setSelectedDates(java.lang.Integer[] pSelectedDates)
public void setTemplateOrder(atg.commerce.order.Order pTemplateOrder)
public atg.commerce.order.Order getTemplateOrder()
This implementation will return either the configured template order or will load the order specified by the templateOrderId in the value dictionary.
protected void validateScheduleInputForUpdate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- validateScheduleInput(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected void validateScheduleInputForCreate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
In additiona to basic validation, checks that the start date is a future date.
pRequest
- pResponse
- validateScheduleInput(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected void setValuesBeforeCreate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- createSchedule()
,
createScheduledOrderStartDate()
,
createScheduledOrderEndDate(Schedule)
,
calculateNextRunTime(Schedule)
protected void setValuesBeforeUpdate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- createSchedule()
,
createScheduledOrderStartDate()
,
calculateNextRunTime(Schedule)
,
createScheduledOrderEndDate(Schedule)
protected void validateScheduleInput(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
Checks that the end date is greater than the start date when a specific end date is provided.
Checks that at least one occurrence is specified for Calendar schedules that use selected days.
pRequest
- pResponse
- protected java.util.Date createScheduledOrderStartDate()
startDate
and
startTime
property values.generateDate(String, String)
protected java.util.Date generateDate(java.lang.String pDate, java.lang.String pTime) throws java.text.ParseException
The date string is expected to be in the localized string format
as returned by getLocalizedDateFormatString
The time string is expected to be in the HH:mm 24 hour format.
pDate
- pTime
- java.text.ParseException
protected java.util.Date createScheduledOrderEndDate(atg.service.scheduler.Schedule pSchedule)
endDateOption
property.protected java.util.Date calculateEndTimeForOccurrences(atg.service.scheduler.Schedule pSchedule)
pSchedule
- CSRScheduledOrderTools.calculateEndTimeForOccurrences(Schedule, Date, long)
protected atg.service.scheduler.Schedule createSchedule()
Schedule
based on the type of schedule specified by
the scheduleType
propertycreateCalendarSchedule()
,
createPeriodicSchedule()
protected atg.service.scheduler.CalendarSchedule createCalendarSchedule()
CalendarSchedule
based on the
form input.getDaysOption()
,
getOccurrencesOption()
,
getMonthsOption()
,
getSelectedHours()
,
getSelectedMonths()
,
getSelectedDays()
,
getSelectedDates()
protected atg.service.scheduler.PeriodicSchedule createPeriodicSchedule()
PeriodicSchedule
based on the
form input.calculateIntervalForPeriodicSchedule()
protected long calculateIntervalForPeriodicSchedule()
PeriodicSchedule
based on the
form input.getIntervalOption()
,
getSelectedInterval()
protected void preCreateItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method sets the appropriate values in the value dictionary based on the current form selections.
preCreateItem
in class atg.repository.servlet.RepositoryFormHandler
java.io.IOException
javax.servlet.ServletException
validateScheduleInputForCreate(DynamoHttpServletRequest, DynamoHttpServletResponse)
,
setValuesBeforeCreate(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected long calculateNextRunTime(atg.service.scheduler.Schedule pSchedule)
pSchedule
- the scheduleCSRScheduledOrderTools.calculateNextRunTime(Schedule, Date)
protected java.util.Collection getPropertyUpdates()
protected void setPropertyUpdates(java.util.Collection pPropertyUpdates)
protected void preUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method sets the appropriate values in the value dictionary based on the current form selections.
preUpdateItem
in class atg.repository.servlet.RepositoryFormHandler
java.io.IOException
javax.servlet.ServletException
validateScheduleInputForUpdate(DynamoHttpServletRequest, DynamoHttpServletResponse)
,
setValuesBeforeUpdate(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected void validateNextRunTime()
protected void postCreateItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method will save the template order if it is transient, initialize the confirmation info object, attempt to send the automatic email confirmation and send agent events
postCreateItem
in class atg.repository.servlet.RepositoryFormHandler
java.io.IOException
javax.servlet.ServletException
protected void doAutoConfirmation(ConfirmationInfo pConfirmationInfo)
autoConfirmation
is true
an automatic email confirmation is sent
using CSRAgentTools
pConfirmationInfo
- atg.userprofiling.email.TemplateEmailException
CSRAgentTools.sendAutomaticConfirmation(ConfirmationInfo)
protected void postUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method will initialize the confirmation info object, attempt to send the automatic email confirmation and send agent events.
If the no end date option is selected, the end date is nulled out here.
postUpdateItem
in class atg.repository.servlet.RepositoryFormHandler
java.io.IOException
javax.servlet.ServletException
protected void initializeConfirmationInfoForCreateSchedule(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- protected void initializeConfirmationInfoForUpdateSchedule(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
pRequest
- pResponse
- public boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleCancel
in class atg.droplet.GenericFormHandler
javax.servlet.ServletException
java.io.IOException
cancel(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected void cancel(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
Based on the value of the cancel schedule process input parameter, performs cancel processing.
pRequest
- pResponse
- CANCEL_PROCESS_PARAM_NAME
,
CANCEL_REVIEW_SCHEDULE
,
CANCEL_REVIEW_SUBMIT_AND_SCHEDULE
,
CANCEL_CREATE_NEW_SCHEDULE
,
CANCEL_UPDATE_SCHEDULE
public java.util.Date getScheduleEndDate()
public java.util.Date getScheduleStartDate()
protected java.util.Date getDefaultScheduleStartDate()
protected java.util.Date getDefaultScheduleEndDate()
public java.lang.String getLocalizedDateFormatString()
public java.lang.String getLocalizedTimeFormatString()
protected java.util.Locale getUserLocale()
protected atg.service.scheduler.Schedule getScheduleFromScheduledOrderItem(atg.repository.RepositoryItem pScheduledOrderItem)
Note that the schedule object is cached for the duration of the request (with a request scoped form handler).
pScheduledOrderItem
- ScheduledOrderTools.getScheduleFromScheduledOrder(RepositoryItem)