java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.DispatchAction
org.jeteam.bean.common.web.AbstractCRUDDispatchAction
org.jeteam.bean.task.web.TaskCRUDDispatchAction
- public class TaskCRUDDispatchAction
- extends org.jeteam.bean.common.web.AbstractCRUDDispatchAction
|
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.config.PriorityDTO |
getPriority(TaskCRUDDispatchForm dataForm)
Gets the priority 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.config.StatusDTO |
getStatus(TaskCRUDDispatchForm dataForm)
Gets the status as a DTO from the form bean. |
private org.jeteam.bean.task.TaskDTO |
getTask(TaskCRUDDispatchForm dataForm)
Gets the task as a DTO from the form bean. |
private org.jeteam.bean.user.UserDTO[] |
getUsers(TaskCRUDDispatchForm dataForm)
Retrieves the selected users from the form bean and returns the associated DTOs. |
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)
Gets the days, month and year representations from the session cache (different per user locale) and put them
in the form bean. |
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)
Sets the tasks and forwards to "read". |
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)
Sets the tasks into the form bean and forwards to "remove". |
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 task DTO instance corresponding with the current
task 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)
Reads the task and all associated details into the form bean, these include AssignedByUser, AssignedToUsers,
Status, Project and Priority. |
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,
TaskCRUDDispatchForm dataForm)
Reads the request and looks for a parameter with key "item", if found this value will be set as the
task name 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)
The assigned-by-user field cannot be updated, it is set once: at creation time. |
| 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 |
TaskCRUDDispatchAction
public TaskCRUDDispatchAction()
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 task DTO instance corresponding with the current
task 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
- Sets the tasks and forwards to "read".
If there is a request parameter with key "name" or the form bean has a non-null "taskName" property this
method will execute a call to read(...) to populate the form bean with the properties
of the task associated with the specified task name, 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
- Gets the days, month and year representations from the session cache (different per user locale) and put them
in the form bean.
Also set the users, statusses and priorities into that form.
Forwards to "create'.
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
- Sets the tasks into the form bean and forwards to "remove".
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
- Reads the task and all associated details into the form bean, these include AssignedByUser, AssignedToUsers,
Status, Project and Priority.
Always forwards to "read".
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
- The assigned-by-user field cannot be updated, it is set once: at creation time.
Some goes for the project context.
getUsers
private final org.jeteam.bean.user.UserDTO[] getUsers(TaskCRUDDispatchForm dataForm)
- Retrieves the selected users from the form bean and returns the associated DTOs.
For all selected user names a lookup is performed to find the corresponding DTO instance. This method
never returns null, in case no user is returned the array will be of size 0.
getStatus
private final org.jeteam.bean.config.StatusDTO getStatus(TaskCRUDDispatchForm dataForm)
- Gets the status as a DTO from the form bean.
The status name String value is used to lookup the corresponding DTO instance, this one is returned. In case
none is found this method returns null.
getPriority
private final org.jeteam.bean.config.PriorityDTO getPriority(TaskCRUDDispatchForm dataForm)
- Gets the priority as a DTO from the form bean.
The priority name 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(TaskCRUDDispatchForm 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)
For the moment (jeteam is still under heavy development) this method returns all active tasks.
todo: implement this method correctly
setRequestParameterValue
private final void setRequestParameterValue(javax.servlet.http.HttpServletRequest request,
TaskCRUDDispatchForm dataForm)
- Reads the request and looks for a parameter with key "item", if found this value will be set as the
task name in the form bean.