public class SimpleScheduleEvaluateCmdImpl extends TaskCommandImpl implements ScheduleEvaluateCmd
SubscriptionFacadeConstants.MAXIMUM_DATE
.
If the scheduled is time bound, this class computes :
ScheduleEvaluateCmd.UnitOfMeasure
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright field.
|
NAME
Constructor and Description |
---|
SimpleScheduleEvaluateCmdImpl()
Default constructor for the class.
|
Modifier and Type | Method and Description |
---|---|
void |
computeFullSchedule()
This method computes the complete schedule information using the schedule information provided
through
ScheduleInfoType that was set using setScheduleToEvaluate method. |
void |
computeNextOccurrence()
This method computes the next occurrence of the schedule using the
previous occurrence info and the schedule information specified through
the
ScheduleInfoType that was set in the setScheduleToEvaluate method. |
boolean |
isScheduleEnded()
This method indicates if the schedule has ended.
|
java.util.Date |
nextOccurrence()
This method returns the next occurrence of the schedule from the current
date.
|
void |
performExecute()
Based on the value returned by the
getEvaluateMode method, this method
invokes the computeFullSchedule method to compute
the schedule information or the computeNextOccurrence method to compute
the details of the next occurrence. |
void |
setComputeFullSchedule()
This method sets the evaluation mode of the command to compute the full
schedule.
|
void |
setComputeNextOccurenceFromSchedule()
This method sets the evaluation mode of the command to compute the next
occurrence of the schedule.
|
void |
setPreviousOccurrence(java.util.Date previousOccurrence)
This method sets the previous occurrence of the schedule for the command
to calculate its next occurrence.
|
void |
setScheduleToEvaluate(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType scheduleInfo)
Sets the schedule to be evaluated.
|
void |
validateParameters()
This method checks if the schedule information is provided and calls the
validate schedule method.
|
void |
validateSchedule()
This method validates if the schedule information provided is sufficient
to evaluate it.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public SimpleScheduleEvaluateCmdImpl()
public void computeFullSchedule() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
ScheduleInfoType
that was set using setScheduleToEvaluate
method.
The method validates the information in the ScheduleInfoType
and computes the total
number of occurrences, duration or the end date related info based on the input values specified.
It then saves the fully computed schedule information back into ScheduleInfoType
.computeFullSchedule
in interface ScheduleEvaluateCmd
com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public java.util.Date nextOccurrence()
nextOccurrence
in interface ScheduleEvaluateCmd
public void setScheduleToEvaluate(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType scheduleInfo)
setScheduleToEvaluate
in interface ScheduleEvaluateCmd
scheduleInfo
- The schedule information object to be evaluated.public void validateSchedule() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
validateSchedule
in interface ScheduleEvaluateCmd
com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
public void performExecute() throws ECException
getEvaluateMode
method, this method
invokes the computeFullSchedule
method to compute
the schedule information or the computeNextOccurrence
method to compute
the details of the next occurrence.performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
public boolean isScheduleEnded()
isScheduleEnded
in interface ScheduleEvaluateCmd
public void setComputeFullSchedule()
setComputeFullSchedule
in interface ScheduleEvaluateCmd
public void setComputeNextOccurenceFromSchedule()
setComputeNextOccurenceFromSchedule
in interface ScheduleEvaluateCmd
public void setPreviousOccurrence(java.util.Date previousOccurrence)
setPreviousOccurrence
in interface ScheduleEvaluateCmd
previousOccurrence
- The previous occurrence of the schedule.public void computeNextOccurrence() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
ScheduleInfoType
that was set in the setScheduleToEvaluate
method.
It then saves the computed value back into ScheduleInfoType
.computeNextOccurrence
in interface ScheduleEvaluateCmd
com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException