org.kuali.rice.kew.routelog.web
Class RouteLogAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.DispatchAction
          extended by org.kuali.rice.kns.web.struts.action.KualiAction
              extended by org.kuali.rice.kew.web.KewKualiAction
                  extended by org.kuali.rice.kew.routelog.web.RouteLogAction

public class RouteLogAction
extends KewKualiAction

A Struts Action used to display the routelog.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
private static class RouteLogAction.RouteNodeInstanceFabricator
          Creates dummy RouteNodeInstances based on imported data from RouteNodeInstanceDTOs.
 
Field Summary
private static org.apache.log4j.Logger LOG
           
private static Comparator<ActionRequestValue> ROUTE_LOG_ACTION_REQUEST_SORTER
           
 
Fields inherited from class org.kuali.rice.kew.web.KewKualiAction
DEFAULT_MAPPING
 
Fields inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
FORM_ACTION, FORWARD_NEXT, FORWARD_TEXT_AREA_UPDATE, METHOD_TO_CALL, POST_TEXT_AREA_TO_PARENT, TEXT_AREA_FIELD_ANCHOR, TEXT_AREA_FIELD_LABEL, TEXT_AREA_FIELD_NAME, TEXT_AREA_MAX_LENGTH, TEXT_AREA_READ_ONLY
 
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
RouteLogAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Entry point to all actions.
private  void fixActionRequestsPositions(DocumentRouteHeaderValue routeHeader)
           
private  Set<Long> getActionRequestIds(DocumentRouteHeaderValue document)
          This utility method returns a Set of LongS containing the IDs for the ActionRequestValueS associated with this DocumentRouteHeaderValue.
private  ActionRequestService getActionRequestService()
           
private  UserSession getUserSession(javax.servlet.http.HttpServletRequest request)
           
 org.apache.struts.action.ActionForward logActionMessageInRouteLog(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Logs a new message to the route log for the current document, then refreshes the action taken list to display back the new message in the route log tab.
 void populateRouteLogFormActionRequests(RouteLogForm rlForm, DocumentRouteHeaderValue routeHeader)
           
 void populateRouteLogFutureRequests(RouteLogForm rlForm, DocumentRouteHeaderValue document)
          executes a simulation of the future routing, and sets the futureRootRequests and futureActionRequestCount properties on the provided RouteLogForm.
private  List<ActionRequestValue> reconstituteActionRequestValues(DocumentDetailDTO documentDetail, Set<Long> preexistingActionRequestIds)
          This method creates ActionRequestValue objects from the DocumentDetailDTO output from WorkflowUtility.routingReport(ReportCriteriaDTO)Report()
private  ActionRequestValue switchActionRequestPositionIfPrimaryDelegatePresent(ActionRequestValue actionRequest)
           
private  List<ActionRequestValue> switchActionRequestPositionsIfPrimaryDelegatesPresent(Collection<ActionRequestValue> actionRequests)
           
 
Methods inherited from class org.kuali.rice.kew.web.KewKualiAction
defaultDispatch, getDefaultMapping, getReturnLocation, start
 
Methods inherited from class org.kuali.rice.kns.web.struts.action.KualiAction
addMethodToCallToUncheckedList, checkAuthorization, dispatchMethod, doProcessingAfterPost, findMethodToCall, getApplicationBaseUrl, getBasePath, getBusinessObjectAuthorizationService, getEncryptionService, getHeaderTabDispatch, getHeaderTabNavigateTo, getImageContext, getKualiModuleService, getLineToDelete, getRoleQualification, getSelectedLine, getTabToToggle, headerTab, hideAllTabs, performInquiry, performLookup, performQuestionWithInput, performQuestionWithInputAgainBecauseOfErrors, performQuestionWithoutInput, performWorkgroupLookup, postTextAreaToParent, refresh, retrieveLookupParameterValue, showAllTabs, toggleTab, updateTextArea, validateLookupInquiryFullParameter
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, getMethod, getMethodName, getParameter, unspecified
 
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
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

ROUTE_LOG_ACTION_REQUEST_SORTER

private static Comparator<ActionRequestValue> ROUTE_LOG_ACTION_REQUEST_SORTER
Constructor Detail

RouteLogAction

public RouteLogAction()
Method Detail

execute

public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
                                                      org.apache.struts.action.ActionForm form,
                                                      javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
                                               throws Exception
Description copied from class: KualiAction
Entry point to all actions. NOTE: No need to hook into execute for handling framwork setup anymore. Just implement the methodToCall for the framework setup, Constants.METHOD_REQUEST_PARAMETER will contain the full parameter, which can be sub stringed for getting framework parameters.

Overrides:
execute in class KualiAction
Throws:
Exception
See Also:
Action.execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

populateRouteLogFormActionRequests

public void populateRouteLogFormActionRequests(RouteLogForm rlForm,
                                               DocumentRouteHeaderValue routeHeader)

switchActionRequestPositionIfPrimaryDelegatePresent

private ActionRequestValue switchActionRequestPositionIfPrimaryDelegatePresent(ActionRequestValue actionRequest)

switchActionRequestPositionsIfPrimaryDelegatesPresent

private List<ActionRequestValue> switchActionRequestPositionsIfPrimaryDelegatesPresent(Collection<ActionRequestValue> actionRequests)

fixActionRequestsPositions

private void fixActionRequestsPositions(DocumentRouteHeaderValue routeHeader)

populateRouteLogFutureRequests

public void populateRouteLogFutureRequests(RouteLogForm rlForm,
                                           DocumentRouteHeaderValue document)
                                    throws Exception
executes a simulation of the future routing, and sets the futureRootRequests and futureActionRequestCount properties on the provided RouteLogForm.

Parameters:
rlForm - the RouteLogForm --used in a write-only fashion.
document - the DocumentRouteHeaderValue for the document whose future routing is being simulated.
Throws:
Exception

getActionRequestIds

private Set<Long> getActionRequestIds(DocumentRouteHeaderValue document)
This utility method returns a Set of LongS containing the IDs for the ActionRequestValueS associated with this DocumentRouteHeaderValue.


reconstituteActionRequestValues

private List<ActionRequestValue> reconstituteActionRequestValues(DocumentDetailDTO documentDetail,
                                                                 Set<Long> preexistingActionRequestIds)
This method creates ActionRequestValue objects from the DocumentDetailDTO output from WorkflowUtility.routingReport(ReportCriteriaDTO)Report()

Parameters:
documentDetail - contains the DTOs from which the ActionRequestValues are reconstituted
preexistingActionRequestIds - this is a Set of ActionRequest IDs that will not be reconstituted
Returns:
the ActionRequestValueS that have been created

getActionRequestService

private ActionRequestService getActionRequestService()

getUserSession

private UserSession getUserSession(javax.servlet.http.HttpServletRequest request)

logActionMessageInRouteLog

public org.apache.struts.action.ActionForward logActionMessageInRouteLog(org.apache.struts.action.ActionMapping mapping,
                                                                         org.apache.struts.action.ActionForm form,
                                                                         javax.servlet.http.HttpServletRequest request,
                                                                         javax.servlet.http.HttpServletResponse response)
                                                                  throws Exception
Logs a new message to the route log for the current document, then refreshes the action taken list to display back the new message in the route log tab. User must have permission to log a message for the doc type and the request must be coming from the route log tab display (not the route log page).

Throws:
Exception


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.