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

java.lang.Object
  extended by org.kuali.rice.kew.routelog.web.RouteLogAction.RouteNodeInstanceFabricator
All Implemented Interfaces:
DTOConverter.RouteNodeInstanceLoader
Enclosing class:
RouteLogAction

private static class RouteLogAction.RouteNodeInstanceFabricator
extends Object
implements DTOConverter.RouteNodeInstanceLoader

Creates dummy RouteNodeInstances based on imported data from RouteNodeInstanceDTOs. It is then able to vend those RouteNodeInstanceS back by their IDs.

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

Field Summary
private  Map<Long,Branch> branches
           
private  Map<Long,NodeState> nodeStates
           
private  Map<Long,RouteNodeInstance> routeNodeInstances
           
private  Map<Long,RouteNode> routeNodes
           
private  RouteNodeService routeNodeService
           
 
Constructor Summary
RouteLogAction.RouteNodeInstanceFabricator(RouteNodeService routeNodeService)
          This constructs a FutureRouteNodeInstanceFabricator, which will generate bogus RouteNodeInstances for SimulationEngine results
 
Method Summary
private  RouteNodeInstance _importRouteNodeInstanceDTO(RouteNodeInstanceDTO nodeInstanceDTO)
          helper method for importRouteNodeInstanceDTO(RouteNodeInstanceDTO) which does all the work.
private  Branch getBranch(Long branchId)
          This method creates bogus BranchES as needed
private  NodeState getNodeState(Long nodeStateId)
          This method creates bogus NodeStateS as needed
private  RouteNode getRouteNode(Long routeNodeId)
          This method creates bogus RouteNodeS as needed
 RouteNodeInstance getRouteNodeInstance(Long routeNodeInstanceId)
          This method creates bogus RouteNodeInstanceS as needed
 void importRouteNodeInstanceDTO(RouteNodeInstanceDTO nodeInstanceDTO)
          This method looks at the given RouteNodeInstanceDTO and imports it (and all it's ancestors) as dummy RouteNodeInstanceS
 RouteNodeInstance load(Long routeNodeInstanceID)
          This method returns a dummy RouteNodeInstance for the given ID, or null if it hasn't imported from a RouteNodeInstanceDTO with that ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

branches

private Map<Long,Branch> branches

routeNodeInstances

private Map<Long,RouteNodeInstance> routeNodeInstances

routeNodes

private Map<Long,RouteNode> routeNodes

nodeStates

private Map<Long,NodeState> nodeStates

routeNodeService

private RouteNodeService routeNodeService
Constructor Detail

RouteLogAction.RouteNodeInstanceFabricator

public RouteLogAction.RouteNodeInstanceFabricator(RouteNodeService routeNodeService)
This constructs a FutureRouteNodeInstanceFabricator, which will generate bogus RouteNodeInstances for SimulationEngine results

Method Detail

importRouteNodeInstanceDTO

public void importRouteNodeInstanceDTO(RouteNodeInstanceDTO nodeInstanceDTO)
This method looks at the given RouteNodeInstanceDTO and imports it (and all it's ancestors) as dummy RouteNodeInstanceS

Parameters:
nodeInstanceDTO -

_importRouteNodeInstanceDTO

private RouteNodeInstance _importRouteNodeInstanceDTO(RouteNodeInstanceDTO nodeInstanceDTO)
helper method for importRouteNodeInstanceDTO(RouteNodeInstanceDTO) which does all the work. The public method just wraps this one but hides the returned RouteNodeInstance, which is used for the recursive call to populate the nextNodeInstanceS inside our RouteNodeInstanceS.

Parameters:
nodeInstanceDTO -
Returns:

load

public RouteNodeInstance load(Long routeNodeInstanceID)
This method returns a dummy RouteNodeInstance for the given ID, or null if it hasn't imported from a RouteNodeInstanceDTO with that ID

Specified by:
load in interface DTOConverter.RouteNodeInstanceLoader
See Also:
DTOConverter.RouteNodeInstanceLoader.load(java.lang.Long)

getBranch

private Branch getBranch(Long branchId)
This method creates bogus BranchES as needed

Parameters:
branchId -
Returns:

getRouteNode

private RouteNode getRouteNode(Long routeNodeId)
This method creates bogus RouteNodeS as needed

Parameters:
routeNodeId -
Returns:

getRouteNodeInstance

public RouteNodeInstance getRouteNodeInstance(Long routeNodeInstanceId)
This method creates bogus RouteNodeInstanceS as needed

Parameters:
routeNodeInstanceId -
Returns:

getNodeState

private NodeState getNodeState(Long nodeStateId)
This method creates bogus NodeStateS as needed

Parameters:
nodeStateId -
Returns:


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