public interface ViewLifecyclePhase extends LifecycleElementState, Runnable
A phase is contains a collection of ViewLifecycleTask
instances
that are processed on each component in the view tree.
Modifier and Type | Method and Description |
---|---|
ViewLifecycleTask<?> |
getCurrentTask()
Gets the task currently running.
|
String |
getEndViewStatus()
Gets the expected view status after phase execution.
|
ViewLifecycle.LifecycleEvent |
getEventToNotify()
Gets the event to notify on completion.
|
Component |
getParent()
Retrieves the component that is a parent to the element being processed in the
view three.
|
ViewLifecyclePhase |
getPredecessor()
Gets the lifecycle phase that directly precedes this phase.
|
List<String> |
getRefreshPaths()
During a component refresh, returns the list of view paths the lifecycle phase will be processed on.
|
String |
getStartViewStatus()
Gets the expected view status prior to phase execution.
|
boolean |
hasPendingSuccessors()
Determines of there are any pending successors of this phase.
|
boolean |
isComplete()
Determines if this lifecycle phase and all successor phases, have completed processing.
|
boolean |
isProcessed()
Determines if this lifecycle phase has completed processing.
|
void |
notifyCompleted()
Invoked by the processor when this phase and all successors have completely processed.
|
void |
prepare(LifecycleElement element,
Component parent,
String parentPath,
List<String> refreshPaths)
Prepares a phase for use after being recycled (state cleared).
|
void |
recycle()
Prepares this phase instance for recycled use.
|
void |
removePendingSuccessor(String parentPath)
Remove a pending successor by path.
|
void |
setNextPhase(ViewLifecyclePhase nextPhase)
Sets the next phase, to queue for processing after this phase is completed.
|
void |
setPredecessor(ViewLifecyclePhase phase)
Sets the predecessor, for notification during processing.
|
void |
setRefreshPaths(List<String> refreshPaths)
Sets the refresh paths for this phase.
|
getDepth, getElement, getParentPath, getViewPath, getViewPhase
void prepare(LifecycleElement element, Component parent, String parentPath, List<String> refreshPaths)
element
- lifecycle element to prepareparentPath
- path of the element related to its parent (in other words the property of the parent
that holds this element)parent
- parent componentrefreshPaths
- during a component refresh request, the list of view paths that should be processed
by the phase (this includes a subset of the entire view tree)Component getParent()
boolean isProcessed()
This method will return true when this phase's tasks have been processed, but does not
necessarily indicate that successor phases have been completed. Use isComplete()
to
determine if the lifecycle has been fully completed for this phase.
boolean isComplete()
LifecycleElement.notifyCompleted(ViewLifecyclePhase)
ViewLifecycleTask<?> getCurrentTask()
ViewLifecycle.LifecycleEvent getEventToNotify()
ViewLifecycle.LifecycleEvent
String getStartViewStatus()
String getEndViewStatus()
ViewLifecyclePhase getPredecessor()
void setNextPhase(ViewLifecyclePhase nextPhase)
nextPhase
- next phaseIllegalArgumentException
- If nextPhase is null, or if the view status of the phases don't match.IllegalStateException
- If the nextPhase has been set to a non-null value already.void setPredecessor(ViewLifecyclePhase phase)
phase
- predecessor phasevoid setRefreshPaths(List<String> refreshPaths)
refreshPaths
- list of refresh paths.List<String> getRefreshPaths()
boolean hasPendingSuccessors()
void removePendingSuccessor(String parentPath)
parentPath
- pathvoid notifyCompleted()
void recycle()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.