public abstract class PhaseOperation<T extends PhaseOperation<T>> extends HttpOperation implements org.ocpsoft.common.pattern.Weighted
Operation that wraps another operation to be performed during the JavaServer Faces lifecycle.| Modifier and Type | Class and Description |
|---|---|
static class |
PhaseOperation.DeferredOperation |
| Constructor and Description |
|---|
PhaseOperation() |
| Modifier and Type | Method and Description |
|---|---|
T |
after(PhaseId... phases)
Perform this
PhaseOperation after the given phases (Except PhaseId.RENDER_RESPONSE). |
T |
before(PhaseId... phases)
Perform this
PhaseOperation before the given phases (Except PhaseId.RESTORE_VIEW). |
static PhaseOperation<?> |
enqueue(Operation operation)
Create an
Operation that will defer a given Operation until one or more specified JavaServer Faces
PhaseId instances specified via before(PhaseId...) or after(PhaseId...). |
static PhaseOperation<?> |
enqueue(Operation operation,
int priority)
Create an
Operation that will enqueue a given Operation to be performed before or after one or
more JavaServer Faces PhaseId instances specified via before(PhaseId...) or
after(PhaseId...). |
Set<PhaseId> |
getAfterPhases()
Get the phases after which this
PhaseOperation will be performed. |
Set<PhaseId> |
getBeforePhases()
Get the phases before which this
PhaseOperation will be performed. |
static ArrayList<PhaseOperation.DeferredOperation> |
getSortedPhaseOperations(HttpServletRequest request) |
void |
performHttp(HttpServletRewrite event,
EvaluationContext context) |
abstract void |
performOperation(HttpServletRewrite event,
EvaluationContext context)
Perform the wrapped operation before or after the specified phases.
|
performandpublic abstract void performOperation(HttpServletRewrite event, EvaluationContext context)
public static PhaseOperation<?> enqueue(Operation operation)
Operation that will defer a given Operation until one or more specified JavaServer Faces
PhaseId instances specified via before(PhaseId...) or after(PhaseId...).public static PhaseOperation<?> enqueue(Operation operation, int priority)
Operation that will enqueue a given Operation to be performed before or after one or
more JavaServer Faces PhaseId instances specified via before(PhaseId...) or
after(PhaseId...).public Set<PhaseId> getBeforePhases()
PhaseOperation will be performed.public Set<PhaseId> getAfterPhases()
PhaseOperation will be performed.public T before(PhaseId... phases)
PhaseOperation before the given phases (Except PhaseId.RESTORE_VIEW). The deferred
Operation will be performed once for each PhaseId provided.public T after(PhaseId... phases)
PhaseOperation after the given phases (Except PhaseId.RENDER_RESPONSE). The deferred
Operation will be performed once for each PhaseId provided.public final void performHttp(HttpServletRewrite event, EvaluationContext context)
performHttp in class HttpOperationpublic static ArrayList<PhaseOperation.DeferredOperation> getSortedPhaseOperations(HttpServletRequest request)
Copyright © 2015 OCPsoft. All Rights Reserved.