Package org.ocpsoft.rewrite.faces.config
Class PhaseOperation<T extends PhaseOperation<T>>
java.lang.Object
org.ocpsoft.rewrite.config.DefaultOperationBuilder
org.ocpsoft.rewrite.servlet.config.HttpOperation
org.ocpsoft.rewrite.faces.config.PhaseOperation<T>
- All Implemented Interfaces:
org.ocpsoft.common.pattern.Weighted,org.ocpsoft.rewrite.config.Operation,org.ocpsoft.rewrite.config.OperationBuilder
- Direct Known Subclasses:
PhaseAction
public abstract class PhaseOperation<T extends PhaseOperation<T>>
extends HttpOperation
implements org.ocpsoft.common.pattern.Weighted
An
Operation that wraps another operation to be performed during the JavaServer Faces lifecycle.- Author:
- Fabien Marsaud, Lincoln Baxter, III
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafter(jakarta.faces.event.PhaseId... phases) Perform thisPhaseOperationafter the given phases (ExceptPhaseId.RENDER_RESPONSE).before(jakarta.faces.event.PhaseId... phases) Perform thisPhaseOperationbefore the given phases (ExceptPhaseId.RESTORE_VIEW).static PhaseOperation<?>enqueue(org.ocpsoft.rewrite.config.Operation operation) Create anOperationthat will defer a givenOperationuntil one or more specified JavaServer FacesPhaseIdinstances specified viabefore(PhaseId...)orafter(PhaseId...).static PhaseOperation<?>enqueue(org.ocpsoft.rewrite.config.Operation operation, int priority) Create anOperationthat will enqueue a givenOperationto be performed before or after one or more JavaServer FacesPhaseIdinstances specified viabefore(PhaseId...)orafter(PhaseId...).Set<jakarta.faces.event.PhaseId>Get the phases after which thisPhaseOperationwill be performed.Set<jakarta.faces.event.PhaseId>Get the phases before which thisPhaseOperationwill be performed.getSortedPhaseOperations(jakarta.servlet.http.HttpServletRequest request) final voidperformHttp(HttpServletRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) abstract voidperformOperation(HttpServletRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) Perform the wrapped operation before or after the specified phases.Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpOperation
performMethods inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder
andMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ocpsoft.common.pattern.Weighted
priority
-
Constructor Details
-
PhaseOperation
public PhaseOperation()
-
-
Method Details
-
performOperation
public abstract void performOperation(HttpServletRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) Perform the wrapped operation before or after the specified phases. -
enqueue
Create anOperationthat will defer a givenOperationuntil one or more specified JavaServer FacesPhaseIdinstances specified viabefore(PhaseId...)orafter(PhaseId...). -
enqueue
public static PhaseOperation<?> enqueue(org.ocpsoft.rewrite.config.Operation operation, int priority) Create anOperationthat will enqueue a givenOperationto be performed before or after one or more JavaServer FacesPhaseIdinstances specified viabefore(PhaseId...)orafter(PhaseId...). -
getBeforePhases
Get the phases before which thisPhaseOperationwill be performed. -
getAfterPhases
Get the phases after which thisPhaseOperationwill be performed. -
before
Perform thisPhaseOperationbefore the given phases (ExceptPhaseId.RESTORE_VIEW). The deferredOperationwill be performed once for eachPhaseIdprovided. -
after
Perform thisPhaseOperationafter the given phases (ExceptPhaseId.RENDER_RESPONSE). The deferredOperationwill be performed once for eachPhaseIdprovided. -
performHttp
public final void performHttp(HttpServletRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context) - Specified by:
performHttpin classHttpOperation
-
getSortedPhaseOperations
public static ArrayList<PhaseOperation.DeferredOperation> getSortedPhaseOperations(jakarta.servlet.http.HttpServletRequest request)
-