| java.lang.Object com.ivata.mask.web.struts.MaskRequestProcessorImplementation
Method Summary | |
protected Action | createAction(String className, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping, ActionServlet servlet, Map actionsParam)
Override this method to define how to create actions in your environment.
This lets you use ivata masks with a standard framework.
The default implementation looks for the action classes it knows about
and initializes them directly. | protected ActionForm | createActionForm(FormBeanConfig formBeanConfig, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
Override this method to define how to create action forms in your
environment. | public ClientSession | createClientSession(HttpServletRequest request, ServletContext servletContext) Retrieve the client session from the request (if there), or create a new
client session.
Parameters: request - Current servlet request we are processing. Parameters: servletContext - Current servlet context of the servlet processingthis action. | public FieldValueConvertorFactory | getFieldValueConvertorFactory() Used to generate convertors to convert property types from strings. | public ActionForm | getSavedForm(HttpServletRequest request, ActionMapping mapping) Restore a form from the scope it was saved in.
Parameters: request - Current servlet request we are processing. Parameters: mapping - Struts mapping. | public void | init(ActionServlet servletParam, ModuleConfig moduleConfigParam) | protected void | processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping)
Overridden to populate forms, and convert the string values of value
object properties into the correct form for their class. | public void | saveForm(HttpServletRequest request, ActionMapping mapping, ActionForm form) Save a form back to the appropriate scope, after it has been successfully
processed. | protected void | setValueObject(HttpServletRequest request, ValueObject valueObject, Field field, Class propertyType, String id)
Set an individual value object. |
MaskRequestProcessorImplementation | public MaskRequestProcessorImplementation(MaskFactory maskFactoryParam, PersistenceManager persistenceManagerParam, FieldValueConvertorFactory fieldValueConvertorFactoryParam, SessionManager sessionManagerParam)(Code) | |
Initializes the mask factory, the value object locator and the the
standard field value convertors.
Parameters: maskFactoryParam - needed to access the masks and groups of masks. Parameters: persistenceManagerParam - used to locate the value objects by their shared base class. Parameters: fieldValueConvertorFactoryParam - Used to generate convertors, usedto set field values from string request parameters. Parameters: sessionManagerParam - This session manager is used to marshall and unmarshall client sessions. |
createAction | protected Action createAction(String className, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping, ActionServlet servlet, Map actionsParam) throws IOException, SystemException(Code) | |
Override this method to define how to create actions in your environment.
This lets you use ivata masks with a standard framework.
The default implementation looks for the action classes it knows about
and initializes them directly. This is a simple starting point; in real
life it is better to use a standard framework such as picocontainer .
Parameters: className - full path and name of the action class to be created. Parameters: request - request for which we are creating an action. Parameters: response - response we are sending. Parameters: mapping - Struts mapping. Parameters: servlet - current servlet which is processing the action. Parameters: actionsParam - Map of all existing system actions, keyed by classname. valid action for the path, or null if the actioncan and should be created using the default Struts framework. throws: IOException - if the action cannot be created. throws: SystemException - can be thrown by overridden methods, if theaction cannot be created. |
createActionForm | protected ActionForm createActionForm(FormBeanConfig formBeanConfig, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws SystemException(Code) | |
Override this method to define how to create action forms in your
environment. This lets you use ivata masks with a standard framework.
The default implementation looks for the form classes it knows about and
initializes them directly. This is a simple starting point; in real life
it is better to use a standard framework such as picocontainer .
Parameters: formBeanConfig - instance of FormBeanConfig definingthe form to be created. Parameters: request - request for which we are creating an action. Parameters: response - response we are sending. Parameters: mapping - Struts mapping. valid action for the path, or null if the form canand should be created using the default Struts framework. throws: SystemException - if the form cannot be created for any reason. |
createClientSession | public ClientSession createClientSession(HttpServletRequest request, ServletContext servletContext) throws MarshallingException(Code) | | Retrieve the client session from the request (if there), or create a new
client session.
Parameters: request - Current servlet request we are processing. Parameters: servletContext - Current servlet context of the servlet processingthis action. Valid client session object. throws: MarshallingException - Thrown by the client session manager. |
getFieldValueConvertorFactory | public FieldValueConvertorFactory getFieldValueConvertorFactory()(Code) | | Used to generate convertors to convert property types from strings.
Returns the FieldValueConvertor factory. |
getSavedForm | public ActionForm getSavedForm(HttpServletRequest request, ActionMapping mapping)(Code) | | Restore a form from the scope it was saved in.
Parameters: request - Current servlet request we are processing. Parameters: mapping - Struts mapping. The saved form, or null if no saved form isavailable. |
processPopulate | protected void processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws ServletException(Code) | |
Overridden to populate forms, and convert the string values of value
object properties into the correct form for their class.
Parameters: request - Parameters: response - Parameters: form - Parameters: mapping - exception: ServletException - |
saveForm | public void saveForm(HttpServletRequest request, ActionMapping mapping, ActionForm form)(Code) | | Save a form back to the appropriate scope, after it has been successfully
processed.
Parameters: request - Current servlet request we are processing. Parameters: mapping - Struts mapping. Parameters: form - Form to be saved. |
setValueObject | protected void setValueObject(HttpServletRequest request, ValueObject valueObject, Field field, Class propertyType, String id) throws ServletException(Code) | |
Set an individual value object.
Parameters: request - Current request we are processing. Parameters: valueObject - value object containing the value object to be set.Note this is the container, not the 'property' value object. Parameters: field - field definition of this value object. Parameters: propertyType - class of value object. Parameters: id - value object unique identifier. throws: ServletException - if the value object cannot be set for anyreason. |
|
|