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

Quick Search    Search Deep

org.jeteam.bean.security.web
Class RoleCRUDDispatchAction  view RoleCRUDDispatchAction download RoleCRUDDispatchAction.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.security.web.RoleCRUDDispatchAction

public class RoleCRUDDispatchAction
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
RoleCRUDDispatchAction()
           
 
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.security.PrivilegeDTO[] getPrivileges(RoleCRUDDispatchForm dataForm)
          Gets the privileges as a DTO Collection from the form bean.
private  org.jeteam.bean.security.RoleDTO getRole(RoleCRUDDispatchForm dataForm)
          Gets the role 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 "name" or the form bean has a non-null "roleName" property this method will execute a call to read(...) to populate the form bean with the properties of the role associated with the specified role name, 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 role DTO instance corresponding with the current role 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, RoleCRUDDispatchForm dataForm)
          Reads the request and looks for a parameter with key "item", if found this value will be set as the role 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)
           
 
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

RoleCRUDDispatchAction

public RoleCRUDDispatchAction()
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 role DTO instance corresponding with the current role 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 "name" or the form bean has a non-null "roleName" property this method will execute a call to read(...) to populate the form bean with the properties of the role associated with the specified role 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

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

getRole

private final org.jeteam.bean.security.RoleDTO getRole(RoleCRUDDispatchForm dataForm)
Gets the role as a DTO from the form bean.

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


getPrivileges

private final org.jeteam.bean.security.PrivilegeDTO[] getPrivileges(RoleCRUDDispatchForm dataForm)
Gets the privileges as a DTO Collection from the form bean.

The privilege permission String values are used to lookup the corresponding DTO instances, these ones are returned. In case none is found this method returns an empty collection, never null.


setRequestParameterValue

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