Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jeteam.bean.task.web
Class NoteCRUDDispatchAction  view NoteCRUDDispatchAction download NoteCRUDDispatchAction.java

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended byorg.apache.struts.actions.DispatchAction
          extended byorg.jeteam.bean.common.web.AbstractCRUDDispatchAction
              extended byorg.jeteam.bean.task.web.NoteCRUDDispatchAction

public class NoteCRUDDispatchAction
extends org.jeteam.bean.common.web.AbstractCRUDDispatchAction


Field Summary
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, messages, methods, types
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
NoteCRUDDispatchAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward create(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private  org.jeteam.bean.task.NoteDTO getNote(NoteCRUDDispatchForm dataForm)
          Gets the note as a DTO from the form bean.
private  org.jeteam.bean.task.TaskDTO[] getProjectTasks(javax.servlet.http.HttpServletRequest request)
          Returns only those tasks that are registered under the current project (as cached into the session)
private  org.jeteam.bean.task.TaskDTO getTask(NoteCRUDDispatchForm dataForm)
          Gets the task as a DTO from the form bean.
 org.apache.struts.action.ActionForward goCreate(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward goRead(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           If there is a request parameter with key "subject" or the form bean has a non-null "noteSubject" property this method will execute a call to read(...) to populate the form bean with the properties of the note associated with the specified note subject, prior to forwarding.
 org.apache.struts.action.ActionForward goRemove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward goUpdate(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward populate(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Populates the form with the values of the note DTO instance corresponding with the current note name.
 org.apache.struts.action.ActionForward read(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward remove(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private  void setRequestParameterValue(javax.servlet.http.HttpServletRequest request, NoteCRUDDispatchForm dataForm)
          Reads the request and looks for a parameter with key "item", if found this value will be set as the note subject in the form bean.
 org.apache.struts.action.ActionForward unspecified(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This is the default executor for this dispatch action, it will simply return the "home" forward.
 org.apache.struts.action.ActionForward update(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, dispatchMethod, execute, getMethod, getMethodName, getParameter
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoteCRUDDispatchAction

public NoteCRUDDispatchAction()
Method Detail

unspecified

public org.apache.struts.action.ActionForward unspecified(org.apache.struts.action.ActionMapping mapping,
                                                          org.apache.struts.action.ActionForm form,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
                                                   throws java.lang.Exception
This is the default executor for this dispatch action, it will simply return the "home" forward.


populate

public org.apache.struts.action.ActionForward populate(org.apache.struts.action.ActionMapping mapping,
                                                       org.apache.struts.action.ActionForm form,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws java.lang.Exception
Populates the form with the values of the note DTO instance corresponding with the current note name.

Forwards to "update".


goRead

public org.apache.struts.action.ActionForward goRead(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws java.lang.Exception

If there is a request parameter with key "subject" or the form bean has a non-null "noteSubject" property this method will execute a call to read(...) to populate the form bean with the properties of the note associated with the specified note subject, prior to forwarding.


goCreate

public org.apache.struts.action.ActionForward goCreate(org.apache.struts.action.ActionMapping mapping,
                                                       org.apache.struts.action.ActionForm form,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws java.lang.Exception

goUpdate

public org.apache.struts.action.ActionForward goUpdate(org.apache.struts.action.ActionMapping mapping,
                                                       org.apache.struts.action.ActionForm form,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws java.lang.Exception

goRemove

public org.apache.struts.action.ActionForward goRemove(org.apache.struts.action.ActionMapping mapping,
                                                       org.apache.struts.action.ActionForm form,
                                                       javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
                                                throws java.lang.Exception

read

public org.apache.struts.action.ActionForward read(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws java.lang.Exception

create

public org.apache.struts.action.ActionForward create(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws java.lang.Exception

remove

public org.apache.struts.action.ActionForward remove(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws java.lang.Exception

update

public org.apache.struts.action.ActionForward update(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws java.lang.Exception

getNote

private final org.jeteam.bean.task.NoteDTO getNote(NoteCRUDDispatchForm dataForm)
Gets the note as a DTO from the form bean.

The note subject String value is used to lookup the corresponding DTO instance, this one is returned. In case none is found this method returns null.


getTask

private final org.jeteam.bean.task.TaskDTO getTask(NoteCRUDDispatchForm dataForm)
Gets the task as a DTO from the form bean.

The task name String value is used to lookup the corresponding DTO instance, this one is returned. In case none is found this method returns null.


getProjectTasks

private final org.jeteam.bean.task.TaskDTO[] getProjectTasks(javax.servlet.http.HttpServletRequest request)
                                                      throws java.lang.Exception
Returns only those tasks that are registered under the current project (as cached into the session)


setRequestParameterValue

private final void setRequestParameterValue(javax.servlet.http.HttpServletRequest request,
                                            NoteCRUDDispatchForm dataForm)
Reads the request and looks for a parameter with key "item", if found this value will be set as the note subject in the form bean.