atg.b2bcommerce.order.scheduled
Class ComplexScheduledOrderProperty

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

public abstract class ComplexScheduledOrderProperty
extends java.lang.Object

This abstract class represents a property in the scheduledOrder item descriptor. The property is mapped to one or more than one fields on the user interface(JHTML). Since the mapping is not trivial, there are two methods remapValueFromScheduledOrder and remapValueFromUserInputFields to facilitate the mapping. remapValueFromUserInputFields is called when the fields on the user interface(JHTML) need to be mapped to the property in the repository. The method normally gets called before it is about to create, update and delete an item (ScheduledOrder) in the repository. remapValueFromScheduledOrder is called when the property in the repository needs to be mapped to the fields on the user interface(JHTML). The method is normally called before it is about to access the detail scheduledOrder data. It also provides the method verifyUserInputFields to verify the validity of the user inputs. All these methods are abstarct and left for the subclasses to implement.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
ComplexScheduledOrderProperty()
           
 
Method Summary
 java.lang.Object getComplexScheduledOrderPropertyValue()
          This method returns the value of the property that this class represents from the scheduled order repository.
 ScheduledOrderHandler getFormHandler()
          returns the property FormHandler
 java.lang.String getScheduledOrderPropertyName()
          returns the property ScheduledOrderPropertyName
 java.lang.Object getUserInputField(java.lang.String pUserInputFieldName)
          Get the user input value based on the input field name
 java.lang.String[] getUserInputFieldNames()
          returns the property UserInputFieldNames.
 java.util.Map getUserInputFields()
          returns the property UserInputFields
abstract  void initializeUserInputFields()
          This method initializes all the user input fields that this property represents
abstract  void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the property that this class represents in the repository to the user inputs.
abstract  void remapValueFromUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method maps the user inputs to the property that this class represents in the repository.
 void setFormHandler(ScheduledOrderHandler pFormHandler)
          set the property FormHandler
 void setScheduledOrderPropertyName(java.lang.String pScheduledOrderPropertyName)
          set the property ScheduledOrderPropertyName
 void setUserInputField(java.lang.String pUserInputFieldName, java.lang.Object pUserInputFieldValue)
          Set the user input into the UserInputPropertyNames property
 void setUserInputFieldNames(java.lang.String[] pUserInputFieldNames)
          set the property UserInputFieldNames
 void setUserInputFields(java.util.Map pUserInputFields)
          set the property UserInputFields
abstract  void verifyUserInputFields(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method verifies all the values of the user inputs.
 
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

ComplexScheduledOrderProperty

public ComplexScheduledOrderProperty()
Method Detail

setFormHandler

public void setFormHandler(ScheduledOrderHandler pFormHandler)
set the property FormHandler

Parameters:
pFormHandler - the value to set for property FormHandler

getFormHandler

public ScheduledOrderHandler getFormHandler()
returns the property FormHandler

Returns:
returns property FormHandler

setScheduledOrderPropertyName

public void setScheduledOrderPropertyName(java.lang.String pScheduledOrderPropertyName)
set the property ScheduledOrderPropertyName

Parameters:
pScheduledOrderPropertyName - the value to set for property ScheduledOrderPropertyName

getScheduledOrderPropertyName

public java.lang.String getScheduledOrderPropertyName()
returns the property ScheduledOrderPropertyName

Returns:
returns property ScheduledOrderPropertyName

setUserInputFields

public void setUserInputFields(java.util.Map pUserInputFields)
set the property UserInputFields

Parameters:
pUserInputFields - the value to set for property UserInputFields

getUserInputFields

public java.util.Map getUserInputFields()
returns the property UserInputFields

Returns:
returns property UserInputFields

setUserInputFieldNames

public void setUserInputFieldNames(java.lang.String[] pUserInputFieldNames)
set the property UserInputFieldNames

Parameters:
pUserInputFieldNames - the value to set for property UserInputFieldNames

getUserInputFieldNames

public java.lang.String[] getUserInputFieldNames()
returns the property UserInputFieldNames. They are all the user input field names related to this property

Returns:
returns property UserInputFieldNames

setUserInputField

public void setUserInputField(java.lang.String pUserInputFieldName,
                              java.lang.Object pUserInputFieldValue)
Set the user input into the UserInputPropertyNames property

Parameters:
pUserInputFieldName - The field name
pUserInputFieldValue - The field value

getUserInputField

public java.lang.Object getUserInputField(java.lang.String pUserInputFieldName)
Get the user input value based on the input field name

Parameters:
pUserInputFieldName - The user input field name
Returns:
The user input field value

verifyUserInputFields

public abstract void verifyUserInputFields(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
This method verifies all the values of the user inputs. It is called before the ScheduledOrderHandler creates, updates or deletes the the scheduled order repositoryitem in the repository.

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

remapValueFromScheduledOrder

public abstract void remapValueFromScheduledOrder(DynamoHttpServletRequest pRequest,
                                                  DynamoHttpServletResponse pResponse)
This method maps the property that this class represents in the repository to the user inputs. It is called before the jhtml displays the user fields.

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

remapValueFromUserInputFields

public abstract void remapValueFromUserInputFields(DynamoHttpServletRequest pRequest,
                                                   DynamoHttpServletResponse pResponse)
This method maps the user inputs to the property that this class represents in the repository. It is called before the ScheduledOrderHandler creates, updates or deletes the scheduled order item in the repository.

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

initializeUserInputFields

public abstract void initializeUserInputFields()
This method initializes all the user input fields that this property represents


getComplexScheduledOrderPropertyValue

public java.lang.Object getComplexScheduledOrderPropertyValue()
This method returns the value of the property that this class represents from the scheduled order repository. It checks whether the repositoryId has been set. If it is not set, it just returns a null object, meaning this property value is not available yet. If the repositoryId is set, then it returns the property value based on the set repositoryId.