atg.b2bcommerce.order.scheduled
Class ScheduleProperty

java.lang.Object
  extended by atg.b2bcommerce.order.scheduled.ComplexScheduledOrderProperty
      extended by atg.b2bcommerce.order.scheduled.ScheduleProperty
Direct Known Subclasses:
CalendarScheduleProperty, PeriodicScheduleProperty

public abstract class ScheduleProperty
extends ComplexScheduledOrderProperty

This abstract class represents the schedule property in the scheduledOrder item descriptor. The property is mapped to the user fields on the user interface(JHTML) which are specific for this property. It implements some of the major methods inherited from the ComplexScheduledOrderProperty class, but since there are different kinds of schedules and each one has different user input fields, some methods still remain abstract and left for the subclasses which represents distinct schedules to fully implement.

See Also:
ComplexScheduledOrderProperty

Field Summary
static java.lang.String CLASS_VERSION
           
protected static java.util.ResourceBundle sResourceBundle
          Resource Bundle
 
Constructor Summary
ScheduleProperty()
           
 
Method Summary
protected abstract  Schedule createScheduleFromUserInput(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method create the schedule object from the user inputs.
 java.lang.Object getComplexScheduledOrderPropertyValue()
          This method returns the schedule object of the scheduled Order.
abstract  java.lang.String getReadableScheduleString(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, Schedule pSchedule)
          This method translates the schedule object into a human readable string.
protected abstract  void remapNullScheduleToUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps to the user inputs when no schedule exists.
protected abstract  void remapScheduleToUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, Schedule pSchedule)
          This method maps the Schedule Object to the user inputs.
 void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the schedule property in the repository to the user inputs.
 void remapValueFromUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the user inputs to the schedule property in the repository.
 
Methods inherited from class atg.b2bcommerce.order.scheduled.ComplexScheduledOrderProperty
getFormHandler, getScheduledOrderPropertyName, getUserInputField, getUserInputFieldNames, getUserInputFields, initializeUserInputFields, setFormHandler, setScheduledOrderPropertyName, setUserInputField, setUserInputFieldNames, setUserInputFields, verifyUserInputFields
 
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

sResourceBundle

protected static java.util.ResourceBundle sResourceBundle
Resource Bundle

Constructor Detail

ScheduleProperty

public ScheduleProperty()
Method Detail

createScheduleFromUserInput

protected abstract Schedule createScheduleFromUserInput(DynamoHttpServletRequest pRequest,
                                                        DynamoHttpServletResponse pResponse)
This method create the schedule object from the user inputs. Since different Schedule objects map to different types of user inputs, this method is abstract and left for the subclass to implement it.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response

remapValueFromScheduledOrder

public void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
This method maps the schedule property in the repository to the user inputs. It retrieves the schedule property value from the ScheduledOrder repository, calls the SchedulePropertyValueParser to parse it to a Schedule object. Then, it calls the remapScheduleToUserInputFields method if the schedule is not null and calls the remapNullScheduleToUserInputFiels method if it is null, to map the schedule to the user inputs.

Specified by:
remapValueFromScheduledOrder in class ComplexScheduledOrderProperty
Parameters:
pRequest - the servlet's request
pResponse - the servlet's response

remapScheduleToUserInputFields

protected abstract void remapScheduleToUserInputFields(DynamoHttpServletRequest pRequest,
                                                       DynamoHttpServletResponse pResponse,
                                                       Schedule pSchedule)
This method maps the Schedule Object to the user inputs. Since different Schedule objects map to different types of user inputs, this method is abstract and left for the subclass to implement it.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pSchedule - the Schedule Object

remapNullScheduleToUserInputFields

protected abstract void remapNullScheduleToUserInputFields(DynamoHttpServletRequest pRequest,
                                                           DynamoHttpServletResponse pResponse)
This method maps to the user inputs when no schedule exists. Since the user might have different types of user inputs, this method is abstract and left for the subclass to implement it.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response

remapValueFromUserInputFields

public void remapValueFromUserInputFields(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
This method maps the user inputs to the schedule property in the repository. It creates a Schedule object from the user inputs, gets a shceduleString which represents the Schedule object and put it into the schedule property of the repository.

Specified by:
remapValueFromUserInputFields in class ComplexScheduledOrderProperty
Parameters:
pRequest - the servlet's request
pResponse - the servlet's response

getReadableScheduleString

public abstract java.lang.String getReadableScheduleString(DynamoHttpServletRequest pRequest,
                                                           DynamoHttpServletResponse pResponse,
                                                           Schedule pSchedule)
This method translates the schedule object into a human readable string.

Parameters:
pSchedule - the schedule object
Returns:
the readable schedule string

getComplexScheduledOrderPropertyValue

public java.lang.Object getComplexScheduledOrderPropertyValue()
This method returns the schedule object of the scheduled Order.

Overrides:
getComplexScheduledOrderPropertyValue in class ComplexScheduledOrderProperty
Returns:
the schedule object