(Interval)
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 repositoryItem
property returns an item.
- scheduleType
- Determines the type of schedule. Valid values or calendar and
interval.
Start date properties
- startDate
- The localized formatted string is used to generate a start date. The time
portion is always normalized to 12:00am
End date properties
- endDateOption
- This property determine which end date option has been selected. There are
three options: none, afterOccurrences and endBy. With afterOccurrences the end date
will be calculated by rolling the schedule forward by the number specified by
selectedOccurrences
. With endBy, the end date is set to the date specific by the
endDate property.
- selectedInterval
- The property determines the number of iterations the schedule should run before
it becomes expired (e.g. past the end date). The end date will be automatically set
based on this information.
- endDate
- The localized formatted string is used to generate an end date. The time
portion is always normalized to 11:59pm
Calendar schedule properties
- daysOption
- This property determines how the days are selected in the calendar. The
valid values are: allDays, selectedDays and selectedDates
- selectedDays
- This property returns the array of days that are selected for the selectedDays day option.
CalendarSchedule.addDayOfTheWeek
is called for each day specified in this array
- selectedDates
- This property returns the array of dates that are selected for the selectedDates day option.
CalendarSchedule.addDate
is called for each date specified in this array
- occurrencesOption
- This property returns the select occurrences option for the schedule. Valid values are
allOccurrences and selectedOccurrences
- selectedOccurences
- This property returns the select occurrences when the selectedOccurrences occurrences option is specified.
CalendarSchedule.addOccurrenceInTheMonth
is called for each selected occurrence in this array.
- selectedHours
- This property returns the select hours for the CalendarSchedule.
CalendarSchedule.addHour
is called for each selected hour in this array.
- selectedMinutes
- This property returns the select minutes for the CalendarSchedule.
CalendarSchedule.addMinute
is called for each selected minute in this array.
Periodic(interval) schedule properties
- selectedInterval
- This property is used along with the interval option to calculate the
interval period of the PeriodicSchedule
- intervalOption
- This property is used along with the selectedInterval to calculate the
interval period of the PeriodicSchedule. There are two valid options: weeks and
days. The selected interval is multiplied by a period of 1 week or 1 day to
determine the interval period.
Configurable default values:
- defaultDaysOption
- This property defines the default days option for new schedules
- defaultScheduleType
- This property defines the default scheduleType for new schedules
- defaultInterval
- This property defines the default interval for periodic schedules
- defaultIntervalOption
- This property defines the default interval option for periodic schedules
- defaultDaysOption
- This property defines the default days option for calendar schedules
- defaultMonthsOption
- This property defines the default months option for calendar schedules
- defaultEndDateOption
- This property defines the default end date option for new schedules
- defaultOccurrencesOption
- This property defines the default occurrences option for new schedules
Fields inherited from class atg.repository.servlet.RepositoryFormHandler |
STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS |
Fields inherited from class atg.droplet.GenericFormHandler |
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
SERVICE_INFO_KEY |
Fields inherited from interface atg.repository.servlet.RepositoryFormConstants |
NULL_SENTINEL, REPOSITORY_ID_PROPERTY_NAME, RESOURCE_BUNDLE_NAME, UPDATE_APPEND, UPDATE_PREPEND, UPDATE_REMOVE, UPDATE_REPLACE |
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 |
Method Summary |
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. |
Methods inherited from class atg.repository.servlet.RepositoryFormHandler |
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 |
Methods inherited from class atg.droplet.GenericFormHandler |
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 |
Methods inherited from class atg.droplet.EmptyFormHandler |
afterGet, beforeGet |
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 |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
CANCEL_PROCESS_PARAM_NAME
public static final java.lang.String CANCEL_PROCESS_PARAM_NAME
- the name of the request parameter for specifying the cancel process key
- See Also:
- Constant Field Values
CANCEL_REVIEW_SCHEDULE
public static final 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.
- See Also:
- Constant Field Values
CANCEL_REVIEW_SUBMIT_AND_SCHEDULE
public static final 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.
- See Also:
- Constant Field Values
CANCEL_CREATE_NEW_SCHEDULE
public static final 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
- See Also:
- Constant Field Values
CANCEL_UPDATE_SCHEDULE
public static final 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
- See Also:
- Constant Field Values
TYPE_CALENDAR
public static final java.lang.String TYPE_CALENDAR
- The schedule type uses for calendar schedules
- See Also:
- Constant Field Values
TYPE_INTERVAL
public static final java.lang.String TYPE_INTERVAL
- The schedule type uses for interval(Periodic) schedules
- See Also:
- Constant Field Values
DAYS_OPTION_ALLDAYS
public static final java.lang.String DAYS_OPTION_ALLDAYS
- The days option that causes all days to be included in the calendar schedule
- See Also:
- Constant Field Values
DAYS_OPTION_SELECTEDDAYS
public static final java.lang.String DAYS_OPTION_SELECTEDDAYS
- The days option that causes only selected days to be included in the calendar schedule
- See Also:
- Constant Field Values
DAYS_OPTION_SELECTEDDATES
public static final java.lang.String DAYS_OPTION_SELECTEDDATES
- The days option that causes only selected dates to be included in the calendar schedule
- See Also:
- Constant Field Values
OCCURRENCES_OPTION_ALLOCCURRENCES
public static final java.lang.String OCCURRENCES_OPTION_ALLOCCURRENCES
- The occurrences option that causes only all occurrences to be included in the calendar schedule
- See Also:
- Constant Field Values
OCCURRENCES_OPTION_SELECTEDOCCURRENCES
public static final java.lang.String OCCURRENCES_OPTION_SELECTEDOCCURRENCES
- The occurrences option that causes only selected occurrences to be included in the calendar schedule
- See Also:
- Constant Field Values
MONTHS_OPTION_ALLMONTHS
public static final java.lang.String MONTHS_OPTION_ALLMONTHS
- The months option that causes all months to be included in the calendar schedule
- See Also:
- Constant Field Values
MONTHS_OPTION_SELECTEDMONTHS
public static final java.lang.String MONTHS_OPTION_SELECTEDMONTHS
- The months option that causes only selected months to be included in the calendar schedule
- See Also:
- Constant Field Values
INTERVAL_OPTION_DAYS
public static final java.lang.String INTERVAL_OPTION_DAYS
- The interval option that causes the interval period to be calculated based on days
- See Also:
- Constant Field Values
INTERVAL_OPTION_WEEKS
public static final java.lang.String INTERVAL_OPTION_WEEKS
- The interval option that causes the interval period to be calculated based on weeks
- See Also:
- Constant Field Values
ENDDATE_OPTION_NONE
public static final java.lang.String ENDDATE_OPTION_NONE
- The end date option that causes there to be no end date associated with the schedule
- See Also:
- Constant Field Values
ENDDATE_OPTION_AFTEROCCURRENCES
public static final 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
- See Also:
- Constant Field Values
ENDDATE_OPTION_ENDBY
public static final java.lang.String ENDDATE_OPTION_ENDBY
- The end date option that causes the end date to be set based on a selected end date
- See Also:
- Constant Field Values
mConfirmationInfo
protected ConfirmationInfo mConfirmationInfo
- Configurable properties
mAutoSendEmail
protected boolean mAutoSendEmail
mCSRAgentTools
protected CSRAgentTools mCSRAgentTools
mCSRScheduledOrderTools
protected CSRScheduledOrderTools mCSRScheduledOrderTools
mDefaultDaysOption
protected java.lang.String mDefaultDaysOption
mDefaultMonthsOption
protected java.lang.String mDefaultMonthsOption
mDefaultIntervalOption
protected java.lang.String mDefaultIntervalOption
mDefaultEndDateOption
protected java.lang.String mDefaultEndDateOption
mDefaultScheduleType
protected java.lang.String mDefaultScheduleType
mDefaultOccurrencesOption
protected java.lang.String mDefaultOccurrencesOption
mDefaultInterval
protected long mDefaultInterval
mTransactionManager
protected javax.transaction.TransactionManager mTransactionManager
mMessageTools
protected atg.web.messaging.MessageTools mMessageTools
mProfile
protected atg.userprofiling.Profile mProfile
mEndDate
protected java.lang.String mEndDate
mStartDate
protected java.lang.String mStartDate
mSelectedDays
protected java.lang.Integer[] mSelectedDays
mSelectedHours
protected java.lang.Integer[] mSelectedHours
mSelectedMinutes
protected java.lang.Integer[] mSelectedMinutes
mScheduleType
protected java.lang.String mScheduleType
mEndDateOption
protected java.lang.String mEndDateOption
mIntervalOption
protected java.lang.String mIntervalOption
mNumberOfOccurrences
protected java.lang.Long mNumberOfOccurrences
mSelectedInterval
protected java.lang.Long mSelectedInterval
mDaysOption
protected java.lang.String mDaysOption
mOccurrencesOption
protected java.lang.String mOccurrencesOption
mMonthsOption
protected java.lang.String mMonthsOption
mSelectedOccurrences
protected java.lang.Integer[] mSelectedOccurrences
mSelectedMonths
protected java.lang.Integer[] mSelectedMonths
mSelectedDates
protected java.lang.Integer[] mSelectedDates
mTemplateOrder
protected atg.commerce.order.Order mTemplateOrder
mScheduleEndDate
protected java.util.Date mScheduleEndDate
mScheduleStartDate
protected java.util.Date mScheduleStartDate
mSchedule
protected atg.service.scheduler.Schedule mSchedule
CSRScheduledOrderFormHandler
public CSRScheduledOrderFormHandler()
getConfirmationInfo
public ConfirmationInfo getConfirmationInfo()
- Returns the confirmation info object used for sending email confirmations.
- Returns:
- ConfirmationInfo
setConfirmationInfo
public void setConfirmationInfo(ConfirmationInfo pConfirmationInfo)
isAutoSendEmail
public boolean isAutoSendEmail()
- Gets the AutoSendEmail
- Returns:
- the AutoSendEmail
setAutoSendEmail
public void setAutoSendEmail(boolean pAutoSendEmail)
- Sets the AutoSendEmail
- Parameters:
pAutoSendEmail
- The AutoSendEmail to set
getCSRAgentTools
public CSRAgentTools getCSRAgentTools()
setCSRAgentTools
public void setCSRAgentTools(CSRAgentTools pAgentTools)
getCSRScheduledOrderTools
public CSRScheduledOrderTools getCSRScheduledOrderTools()
- Returns a reference to the CSRScheduledOrderTools component
setCSRScheduledOrderTools
public void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)
getDefaultDaysOption
public java.lang.String getDefaultDaysOption()
- Returns the default days option for a new calendar schedule.
Default is DAYS_OPTION_ALLDAYS
- See Also:
DAYS_OPTION_ALLDAYS
,
DAYS_OPTION_SELECTEDDATES
,
DAYS_OPTION_SELECTEDDAYS
setDefaultDaysOption
public void setDefaultDaysOption(java.lang.String pDefaultDaysOption)
getDefaultMonthsOption
public java.lang.String getDefaultMonthsOption()
- Returns the default months option for a new calendar schedule.
Default is MONTHS_OPTION_ALLMONTHS
- See Also:
MONTHS_OPTION_ALLMONTHS
,
MONTHS_OPTION_SELECTEDMONTHS
setDefaultMonthsOption
public void setDefaultMonthsOption(java.lang.String pDefaultMonthsOption)
getDefaultIntervalOption
public java.lang.String getDefaultIntervalOption()
- Returns the default interval option for a new interval schedule.
Default is INTERVAL_OPTION_DAYS
- See Also:
INTERVAL_OPTION_DAYS
,
INTERVAL_OPTION_WEEKS
setDefaultIntervalOption
public void setDefaultIntervalOption(java.lang.String pDefaultIntervalOption)
getDefaultEndDateOption
public java.lang.String getDefaultEndDateOption()
- Returns the default end date option for all new schedules.
Default is ENDDATE_OPTION_NONE
- See Also:
ENDDATE_OPTION_NONE
,
ENDDATE_OPTION_ENDBY
,
ENDDATE_OPTION_AFTEROCCURRENCES
setDefaultEndDateOption
public void setDefaultEndDateOption(java.lang.String pDefaultEndDateOption)
getDefaultScheduleType
public java.lang.String getDefaultScheduleType()
- Returns the default schedule type when creating new schedules.
Default is TYPE_CALENDAR
- See Also:
TYPE_CALENDAR
,
TYPE_INTERVAL
setDefaultScheduleType
public void setDefaultScheduleType(java.lang.String pDefaultScheduleType)
getDefaultOccurrencesOption
public java.lang.String getDefaultOccurrencesOption()
- Returns the default occurrences option when creating new calendar schedules.
Default is OCCURRENCES_OPTION_ALLOCCURRENCES
- See Also:
OCCURRENCES_OPTION_ALLOCCURRENCES
,
OCCURRENCES_OPTION_SELECTEDOCCURRENCES
setDefaultOccurrencesOption
public void setDefaultOccurrencesOption(java.lang.String pDefaultOccurrencesOption)
getDefaultInterval
public long getDefaultInterval()
- Returns the default interval when creating new interval schedules.
Default is 1
setDefaultInterval
public void setDefaultInterval(long pDefaultInterval)
setTransactionManager
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
- Sets property TransactionManager
- Parameters:
pTransactionManager
- the value to set for property TransactionManager
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
- Returns property TransactionManager
- Overrides:
getTransactionManager
in class atg.repository.servlet.RepositoryFormHandler
- Returns:
- returns property TransactionManager
getMessageTools
public atg.web.messaging.MessageTools getMessageTools()
- Returns the MessageTools component
- Returns:
- MessageTools
setMessageTools
public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
setProfile
public void setProfile(atg.userprofiling.Profile pProfile)
- Sets property Profile
- Parameters:
pProfile
- the value to set for property Profile
getProfile
public atg.userprofiling.Profile getProfile()
- Returns property Profile
- Returns:
- returns property Profile
getEndDate
public java.lang.String getEndDate()
- Returns the end date is localized String format. This date will be
used to create the end date for a schedule.
If this value is not set, it will initialize itself
from the scheduled order end date in the value dictionary
setEndDate
public void setEndDate(java.lang.String pEndDate)
getStartDate
public java.lang.String getStartDate()
- Returns the state date is localized String format. This date will be
used to create the start date for a schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
setStartDate
public void setStartDate(java.lang.String pStartDate)
getSelectedDays
public java.lang.Integer[] getSelectedDays()
- Returns the days selected for a Calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
setSelectedDays
public void setSelectedDays(java.lang.Integer[] pSelectedDays)
getSelectedHours
public java.lang.Integer[] getSelectedHours()
- Returns the hours selected for a Calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
setSelectedHours
public void setSelectedHours(java.lang.Integer[] pSelectedHours)
getSelectedMinutes
public java.lang.Integer[] getSelectedMinutes()
- Returns the mintues selected for a Calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
setSelectedMinutes
public void setSelectedMinutes(java.lang.Integer[] pSelectedMinutes)
getScheduleType
public java.lang.String getScheduleType()
- Returns the type of schedule.
getScheduleTypeFromSchedule
protected java.lang.String getScheduleTypeFromSchedule(atg.repository.RepositoryItem pScheduledOrderItem)
- Returns the type of an existing schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- Parameters:
pScheduledOrderItem
-
- Returns:
TYPE_CALENDAR
or TYPE_INTERVAL
- See Also:
getScheduleFromScheduledOrderItem(RepositoryItem)
setScheduleType
public void setScheduleType(java.lang.String pScheduleType)
getEndDateOption
public java.lang.String getEndDateOption()
- Returns the option used for determine a schedule's end date.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- See Also:
ENDDATE_OPTION_AFTEROCCURRENCES
,
ENDDATE_OPTION_ENDBY
,
ENDDATE_OPTION_NONE
setEndDateOption
public void setEndDateOption(java.lang.String pEndDateOption)
getIntervalOption
public java.lang.String getIntervalOption()
- Returns the interval option for a Periodic schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- See Also:
INTERVAL_OPTION_DAYS
,
INTERVAL_OPTION_WEEKS
setIntervalOption
public void setIntervalOption(java.lang.String pIntervalOption)
setNumberOfOccurrences
public 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
- Parameters:
pNumberOfOccurrences
-
getNumberOfOccurrences
public java.lang.Long getNumberOfOccurrences()
setSelectedInterval
public void setSelectedInterval(java.lang.Long pSelectedInterval)
getSelectedInterval
public java.lang.Long getSelectedInterval()
- Returns the number of intervals for a Periodic schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
getDaysOption
public java.lang.String getDaysOption()
- Returns the days option selected for a Calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- See Also:
getDefaultDaysOption()
,
DAYS_OPTION_ALLDAYS
,
DAYS_OPTION_SELECTEDDATES
,
DAYS_OPTION_SELECTEDDAYS
setDaysOption
public void setDaysOption(java.lang.String pDaysOption)
getOccurrencesOption
public java.lang.String getOccurrencesOption()
- Returns the occurrences option selected for a Calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- See Also:
getDefaultOccurrencesOption()
,
OCCURRENCES_OPTION_ALLOCCURRENCES
,
OCCURRENCES_OPTION_SELECTEDOCCURRENCES
setOccurrencesOption
public void setOccurrencesOption(java.lang.String pOccurrencesOption)
getMonthsOption
public java.lang.String getMonthsOption()
- Returns the months option selected for a calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- See Also:
getDefaultMonthsOption()
,
MONTHS_OPTION_ALLMONTHS
,
MONTHS_OPTION_SELECTEDMONTHS
setMonthsOption
public void setMonthsOption(java.lang.String pMonthsOption)
getSelectedOccurrences
public java.lang.Integer[] getSelectedOccurrences()
- Returns the occurrences in the month selected for a calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- Returns:
- Integer[]
setSelectedOccurrences
public void setSelectedOccurrences(java.lang.Integer[] pSelectedOccurrences)
getSelectedMonths
public java.lang.Integer[] getSelectedMonths()
- Returns the months selected for a calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- Returns:
- Integer[]
setSelectedMonths
public void setSelectedMonths(java.lang.Integer[] pSelectedMonths)
getSelectedDates
public java.lang.Integer[] getSelectedDates()
- Returns the dates selected for a calendar schedule.
If this value is not set, it will initialize itself
from the scheduled order repository item returned
by getRepositoryItem
- Returns:
- Integer[]
setSelectedDates
public void setSelectedDates(java.lang.Integer[] pSelectedDates)
setTemplateOrder
public void setTemplateOrder(atg.commerce.order.Order pTemplateOrder)
getTemplateOrder
public atg.commerce.order.Order getTemplateOrder()
- Returns the template order for the new schedule.
This implementation will return either the configured
template order or will load the order specified by the
templateOrderId in the value dictionary.
- Returns:
- Order
validateScheduleInputForUpdate
protected void validateScheduleInputForUpdate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
- Executed as part of preUpdate to perform validation of form input values.
- Parameters:
pRequest
- pResponse
- - See Also:
validateScheduleInput(DynamoHttpServletRequest, DynamoHttpServletResponse)
validateScheduleInputForCreate
protected void validateScheduleInputForCreate(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
- Executed as part of preCreate to perform validation of the form input values.
In additiona to basic validation, checks that the start date is a future date.
- Parameters:
pRequest
- pResponse
- - See Also:
validateScheduleInput(DynamoHttpServletRequest, DynamoHttpServletResponse)
setValuesBeforeCreate
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.
- Parameters:
pRequest
- pResponse
- - See Also:
createSchedule()
,
createScheduledOrderStartDate()
,
createScheduledOrderEndDate(Schedule)
,
calculateNextRunTime(Schedule)
setValuesBeforeUpdate
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.
- Parameters:
pRequest
- pResponse
- - See Also:
createSchedule()
,
createScheduledOrderStartDate()
,
calculateNextRunTime(Schedule)
,
createScheduledOrderEndDate(Schedule)
validateScheduleInput
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.
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.
- Parameters:
pRequest
- pResponse
-
createScheduledOrderStartDate
protected java.util.Date createScheduledOrderStartDate()
- This method generates a date based on the
startDate
and
startTime
property values.
- Returns:
- Date
- See Also:
generateDate(String, String)
generateDate
protected java.util.Date generateDate(java.lang.String pDate,
java.lang.String pTime)
throws java.text.ParseException
- Generates a date from the given date and time strings.
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.
- Parameters:
pDate
- pTime
-
- Returns:
- Date
- Throws:
java.text.ParseException
createScheduledOrderEndDate
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.
- See Also:
getEndDateOption()
,
calculateEndTimeForOccurrences(Schedule)
calculateEndTimeForOccurrences
protected java.util.Date calculateEndTimeForOccurrences(atg.service.scheduler.Schedule pSchedule)
- Calculates the end date for a schedule based on the selected number of occurrences
- Parameters:
pSchedule
-
- Returns:
- the calculated end date
- See Also:
CSRScheduledOrderTools.calculateEndTimeForOccurrences(Schedule, Date, long)
createSchedule
protected atg.service.scheduler.Schedule createSchedule()
- Creates a new
Schedule
based on the type of schedule specified by
the scheduleType
property
- Returns:
- a new Schedule object based on form input
- See Also:
createCalendarSchedule()
,
createPeriodicSchedule()
createCalendarSchedule
protected atg.service.scheduler.CalendarSchedule createCalendarSchedule()
- Creates a new
CalendarSchedule
based on the
form input.
- Returns:
- CalendarSchedule object
- See Also:
getDaysOption()
,
getOccurrencesOption()
,
getMonthsOption()
,
getSelectedHours()
,
getSelectedMonths()
,
getSelectedDays()
,
getSelectedDates()
createPeriodicSchedule
protected atg.service.scheduler.PeriodicSchedule createPeriodicSchedule()
- Creates a new
PeriodicSchedule
based on the
form input.
- Returns:
- PeriodicSchedule
- See Also:
calculateIntervalForPeriodicSchedule()
calculateIntervalForPeriodicSchedule
protected long calculateIntervalForPeriodicSchedule()
- Calculates the interval for a
PeriodicSchedule
based on the
form input.
- Returns:
- the interval value
- See Also:
getIntervalOption()
,
getSelectedInterval()
preCreateItem
protected void preCreateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Called prior to creating the item.
This method sets the appropriate values in the value dictionary based
on the current form selections.
- Overrides:
preCreateItem
in class atg.repository.servlet.RepositoryFormHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
- See Also:
validateScheduleInputForCreate(DynamoHttpServletRequest, DynamoHttpServletResponse)
,
setValuesBeforeCreate(DynamoHttpServletRequest, DynamoHttpServletResponse)
calculateNextRunTime
protected long calculateNextRunTime(atg.service.scheduler.Schedule pSchedule)
- Calculates the next runtime for the given schedule
- Parameters:
pSchedule
- the schedule
- Returns:
- the next scheduled run time
- See Also:
CSRScheduledOrderTools.calculateNextRunTime(Schedule, Date)
getPropertyUpdates
protected java.util.Collection getPropertyUpdates()
- Returns the collection of PropertyUpdates generated for an update.
- Returns:
- Collection
setPropertyUpdates
protected void setPropertyUpdates(java.util.Collection pPropertyUpdates)
preUpdateItem
protected void preUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Execute prior to updating the item.
This method sets the appropriate values in the value dictionary based
on the current form selections.
- Overrides:
preUpdateItem
in class atg.repository.servlet.RepositoryFormHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
- See Also:
validateScheduleInputForUpdate(DynamoHttpServletRequest, DynamoHttpServletResponse)
,
setValuesBeforeUpdate(DynamoHttpServletRequest, DynamoHttpServletResponse)
validateNextRunTime
protected void validateNextRunTime()
- Validates that the next run time occurs before the end date. Adds a form execption
if it isn't.
postCreateItem
protected void postCreateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Executed after the item is created.
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
- Overrides:
postCreateItem
in class atg.repository.servlet.RepositoryFormHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
doAutoConfirmation
protected void doAutoConfirmation(ConfirmationInfo pConfirmationInfo)
- If
autoConfirmation
is true
an automatic email confirmation is sent
using CSRAgentTools
- Parameters:
pConfirmationInfo
-
- Throws:
atg.userprofiling.email.TemplateEmailException
- See Also:
CSRAgentTools.sendAutomaticConfirmation(ConfirmationInfo)
postUpdateItem
protected void postUpdateItem(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws java.io.IOException,
javax.servlet.ServletException
- Executed after the item is updated.
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.
- Overrides:
postUpdateItem
in class atg.repository.servlet.RepositoryFormHandler
- Throws:
java.io.IOException
javax.servlet.ServletException
initializeConfirmationInfoForCreateSchedule
protected void initializeConfirmationInfoForCreateSchedule(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
- Initializes the confirmation info object when a new order is submitted
- Parameters:
pRequest
- pResponse
-
initializeConfirmationInfoForUpdateSchedule
protected void initializeConfirmationInfoForUpdateSchedule(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
- Initializes the confirmation info object when a scheduled order is updated
- Parameters:
pRequest
- pResponse
-
handleCancel
public boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- This method redirects to the value of the cancelURL property, if
that property is set to a non-null value.
- Overrides:
handleCancel
in class atg.droplet.GenericFormHandler
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
cancel(DynamoHttpServletRequest, DynamoHttpServletResponse)
cancel
protected void cancel(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
- Executes cancel processing.
Based on the value of the cancel schedule process input parameter, performs
cancel processing.
- Parameters:
pRequest
- pResponse
- - See Also:
CANCEL_PROCESS_PARAM_NAME
,
CANCEL_REVIEW_SCHEDULE
,
CANCEL_REVIEW_SUBMIT_AND_SCHEDULE
,
CANCEL_CREATE_NEW_SCHEDULE
,
CANCEL_UPDATE_SCHEDULE
getScheduleEndDate
public java.util.Date getScheduleEndDate()
- Returns the selected end date for a schedule.
- Returns:
- Date
getScheduleStartDate
public java.util.Date getScheduleStartDate()
- Returns the selected start date for a schedule.
- Returns:
- Date
getDefaultScheduleStartDate
protected java.util.Date getDefaultScheduleStartDate()
- Returns the default start date for a new schedule.
- Returns:
- Date
getDefaultScheduleEndDate
protected java.util.Date getDefaultScheduleEndDate()
- Returns the default end date for a new schedule.
- Returns:
- Date
getLocalizedDateFormatString
public java.lang.String getLocalizedDateFormatString()
- Returns the localized version of the date format string.
- Returns:
- String
getLocalizedTimeFormatString
public java.lang.String getLocalizedTimeFormatString()
- Returns the localized version of the time format string.
- Returns:
- String
getUserLocale
protected java.util.Locale getUserLocale()
- This method gets the current Locale
- Returns:
- the current Locale
getScheduleFromScheduledOrderItem
protected atg.service.scheduler.Schedule getScheduleFromScheduledOrderItem(atg.repository.RepositoryItem pScheduledOrderItem)
- Returns a Schedule object based on the given scheduled order repository item.
Note that the schedule object is cached for the duration of the request (with
a request scoped form handler).
- Parameters:
pScheduledOrderItem
-
- Returns:
- Schedule
- See Also:
ScheduledOrderTools.getScheduleFromScheduledOrder(RepositoryItem)