atg.b2bcommerce.order.scheduled
Class TemplateOrderProperty

java.lang.Object
  extended by atg.b2bcommerce.order.scheduled.ComplexScheduledOrderProperty
      extended by atg.b2bcommerce.order.scheduled.TemplateOrderProperty

public class TemplateOrderProperty
extends ComplexScheduledOrderProperty

This abstract class represents the schedule property in the scheduledOrder repositoryItem. The property is mapped to the user fields on the User Interface which are specific for this property. For example, the PeriodicSchedule, the Period Type and Period field. It implements some of the major functions inherited from the ComplexScheduledOrderProperty interface, but since there are different kinds of schedules and each one has different user input fields, most methods still remain abstract and left for the subclass which represents distinct schedules to fully implement.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
TemplateOrderProperty()
           
 
Method Summary
 Order createCloneOrder(java.lang.String pOrderId, RepositoryItem pProfile, DynamoHttpServletRequest pRequest)
          This method creates a cloned order.
 Order createNewTemplateOrder(java.lang.String pOrderId, RepositoryItem pProfile, DynamoHttpServletRequest pRequest)
          This method creates a template order from the existing order by cloning the existing order.
 void deleteTemplateOrder(java.lang.String pOrderId)
          This method deletes the template order.
protected  void initializeOrderIdInputField()
          This method initializes the user input values for the templateOrderId input.
protected  void initializeOrderInputField()
          This method initializes the user input values for the order input.
protected  void initializeUserInputField(java.lang.String pUserInputFieldName)
          This method initializes the user input values for a particular user input.
 void initializeUserInputFields()
          This method initializes all the user inputs.
 void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the templateOrder property in the repository to the User Interface.
 void remapValueFromUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the user inputs to the templateOrder property in the repository.
protected  void verifyTemplateOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method verifies that the template order id is set and checks the validity of each input field value.
 void verifyUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method verifies the values of the user input.
 
Methods inherited from class atg.b2bcommerce.order.scheduled.ComplexScheduledOrderProperty
getComplexScheduledOrderPropertyValue, getFormHandler, getScheduledOrderPropertyName, getUserInputField, getUserInputFieldNames, getUserInputFields, setFormHandler, setScheduledOrderPropertyName, setUserInputField, setUserInputFieldNames, setUserInputFields
 
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
Constructor Detail

TemplateOrderProperty

public TemplateOrderProperty()
Method Detail

verifyUserInputFields

public void verifyUserInputFields(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
This method verifies the values of the user input. It looks into each input field and checks the validity of each input field value.

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

verifyTemplateOrder

protected void verifyTemplateOrder(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
This method verifies that the template order id is set and checks the validity of each input field value.

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

createNewTemplateOrder

public Order createNewTemplateOrder(java.lang.String pOrderId,
                                    RepositoryItem pProfile,
                                    DynamoHttpServletRequest pRequest)
This method creates a template order from the existing order by cloning the existing order.

Parameters:
pOrderId - the existing order id
pProfile - the user's profile
pRequest - the servlet's request
Returns:
the template order

deleteTemplateOrder

public void deleteTemplateOrder(java.lang.String pOrderId)
This method deletes the template order.

Parameters:
pOrderId - the existing order id

createCloneOrder

public Order createCloneOrder(java.lang.String pOrderId,
                              RepositoryItem pProfile,
                              DynamoHttpServletRequest pRequest)
This method creates a cloned order. If there is no previously existed template order, it will create a template order via calling createNewTemplateOrder method. If there is a template order previously existed, then a check will be done to see whether its parent order(created by) equals to the new selected order. If yes, keep the previous order as it is, otherwise, we will delete the previous order and create a new template order. cloning the existing order.

Parameters:
pOrderId - the existing order id
pProfile - the user's profile
pRequest - the servlet's request
Returns:
the clone order

remapValueFromScheduledOrder

public void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
This method maps the templateOrder property in the repository to the User Interface.

Specified by:
remapValueFromScheduledOrder in class ComplexScheduledOrderProperty
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 templateOrder property in the repository.

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

initializeUserInputFields

public void initializeUserInputFields()
This method initializes all the user inputs.

Specified by:
initializeUserInputFields in class ComplexScheduledOrderProperty

initializeUserInputField

protected void initializeUserInputField(java.lang.String pUserInputFieldName)
This method initializes the user input values for a particular user input.

Parameters:
pUserInputFieldName - the user input field name

initializeOrderIdInputField

protected void initializeOrderIdInputField()
This method initializes the user input values for the templateOrderId input. Override it if different initialization requires


initializeOrderInputField

protected void initializeOrderInputField()
This method initializes the user input values for the order input. Override it if different initialization requires