Class LifecycleRefreshPathBuilder
java.lang.Object
org.kuali.rice.krad.uif.lifecycle.LifecycleRefreshPathBuilder
For components that can be refreshed, builds out the various paths the lifecycle needs to be run on when
the component refresh process is run.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddElementRefreshPath(String path, String phase, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths) Adds the given path to the refresh path list for the given phase.protected static voidaddElementRefreshPaths(String elementPath, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths, Set<String> visitedPaths) Retrieves the lifecycle element from the view index that has the given path, then adds its refresh paths to the given lists.protected static voidbuildRefreshPathMappings(LifecycleElement lifecycleElement, ComponentPostMetadata componentPostMetadata) Builds the refresh paths for the given lifecycle element and sets onto the post metadata for storage.protected static voidprocessElementPath(String path, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths, Set<String> visitedPaths) Processes the element at the given path, and all its parents (given by properties within the path) adding their refresh paths to the lists being built.protected static voidprocessLifecycleElement(LifecycleElement element) Determines whether the given lifecycle element is capable of being refreshed, and if so invokesbuildRefreshPathMappings(org.kuali.rice.krad.uif.util.LifecycleElement, org.kuali.rice.krad.uif.lifecycle.ComponentPostMetadata)to build the refresh paths.static voidIterates through eachLifecycleElementthat has been collected in the view index and invokes refresh path processing.protected static voidstorePhasePathMapping(LifecycleElement lifecycleElement, ComponentPostMetadata componentPostMetadata) Store phase path mapping for component if there are any paths different from the final path.
-
Constructor Details
-
LifecycleRefreshPathBuilder
public LifecycleRefreshPathBuilder()
-
-
Method Details
-
processLifecycleElements
public static void processLifecycleElements()Iterates through eachLifecycleElementthat has been collected in the view index and invokes refresh path processing. -
processLifecycleElement
Determines whether the given lifecycle element is capable of being refreshed, and if so invokesbuildRefreshPathMappings(org.kuali.rice.krad.uif.util.LifecycleElement, org.kuali.rice.krad.uif.lifecycle.ComponentPostMetadata)to build the refresh paths.- Parameters:
element- lifecycle element to build refresh paths for (if necessary)
-
buildRefreshPathMappings
protected static void buildRefreshPathMappings(LifecycleElement lifecycleElement, ComponentPostMetadata componentPostMetadata) Builds the refresh paths for the given lifecycle element and sets onto the post metadata for storage.For each lifecycle phase, a list of paths that the refresh lifecycle for the given should process is built. These are then stored on the component post metadata for retrieval on the refresh call
- Parameters:
lifecycleElement- lifecycle element to build paths forcomponentPostMetadata- post metadata instance to store the paths
-
storePhasePathMapping
protected static void storePhasePathMapping(LifecycleElement lifecycleElement, ComponentPostMetadata componentPostMetadata) Store phase path mapping for component if there are any paths different from the final path.- Parameters:
lifecycleElement- lifecycle element to store phase mapping forcomponentPostMetadata- post metadata instance to hold mapping
-
processElementPath
protected static void processElementPath(String path, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths, Set<String> visitedPaths) Processes the element at the given path, and all its parents (given by properties within the path) adding their refresh paths to the lists being built.- Parameters:
path- path of the element to processinitializePaths- list of refresh paths for the intialize phaseapplyModelPaths- list of refresh paths for the apply model phasefinalizePaths- list of refresh paths for the finalize phasevisitedPaths- list of paths that have already been processed
-
addElementRefreshPaths
protected static void addElementRefreshPaths(String elementPath, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths, Set<String> visitedPaths) Retrieves the lifecycle element from the view index that has the given path, then adds its refresh paths to the given lists.If the lifecycle element had a different path in one the phases, a call is made back to
processElementPath(java.lang.String, java.util.List<java.lang.String>, java.util.List<java.lang.String>, java.util.List<java.lang.String>, java.util.Set<java.lang.String>)to process any new parents.- Parameters:
elementPath- path of the element to add paths forinitializePaths- list of refresh paths for the intialize phaseapplyModelPaths- list of refresh paths for the apply model phasefinalizePaths- list of refresh paths for the finalize phasevisitedPaths- list of paths that have already been processed
-
addElementRefreshPath
protected static void addElementRefreshPath(String path, String phase, List<String> initializePaths, List<String> applyModelPaths, List<String> finalizePaths) Adds the given path to the refresh path list for the given phase.- Parameters:
path- path to addphase- phase for the list the path should be added toinitializePaths- list of refresh paths for the intialize phaseapplyModelPaths- list of refresh paths for the apply model phasefinalizePaths- list of refresh paths for the finalize phase
-