rewrite-integration-faces 2.0.0.Alpha3

org.ocpsoft.rewrite.faces.config
Class PhaseOperation<T extends PhaseOperation<T>>

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultOperationBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpOperation
          extended by org.ocpsoft.rewrite.faces.config.PhaseOperation<T>
All Implemented Interfaces:
org.ocpsoft.common.pattern.Weighted, ConfigurationElement, Operation, OperationBuilder
Direct Known Subclasses:
PhaseAction

public abstract class PhaseOperation<T extends PhaseOperation<T>>
extends HttpOperation
implements org.ocpsoft.common.pattern.Weighted

This class encapsulates another operation that should be performed during the JSF lifecycle

Author:
Fabien Marsaud, Lincoln Baxter, III

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder
DefaultOperationBuilder.NoOp
 
Constructor Summary
PhaseOperation()
           
 
Method Summary
 T after(javax.faces.event.PhaseId... phases)
          Perform this PhaseOperation after the given phases (Except PhaseId.RENDER_RESPONSE).
 T before(javax.faces.event.PhaseId... phases)
          Perform this PhaseOperation before the given phases (Except PhaseId.RESTORE_VIEW).
static PhaseOperation<?> enqueue(Operation operation)
          Defer the given Operation until the specified phases.
static PhaseOperation<?> enqueue(Operation operation, int priority)
          Enqueue an Operation to be performed before or after one or many JavaServer Faces life-cycle phases, specified via invoking before(PhaseId...) or after(PhaseId...).
 Set<javax.faces.event.PhaseId> getAfterPhases()
          Get the phases after which this PhaseOperation will be performed.
 Set<javax.faces.event.PhaseId> getBeforePhases()
          Get the phases before which this PhaseOperation will be performed.
 EvaluationContext getContext()
          Get the EvaluationContext with which this PhaseOperation was deferred.
 HttpServletRewrite getEvent()
          Get the HttpServletRewrite with which this PhaseOperation was deferred.
static ArrayList<PhaseOperation<?>> getSortedPhaseOperations(javax.servlet.http.HttpServletRequest request)
           
 void performHttp(HttpServletRewrite event, EvaluationContext context)
          Invoked during the rewrite process, just add "this" to a queue of deferred bindings in the request
abstract  void performOperation(HttpServletRewrite event, EvaluationContext context)
          Perform operation before or after the specified phases.
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpOperation
perform
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder
and, create, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ocpsoft.common.pattern.Weighted
priority
 

Constructor Detail

PhaseOperation

public PhaseOperation()
Method Detail

performOperation

public abstract void performOperation(HttpServletRewrite event,
                                      EvaluationContext context)
Perform operation before or after the specified phases.


getBeforePhases

public Set<javax.faces.event.PhaseId> getBeforePhases()
Get the phases before which this PhaseOperation will be performed.


getAfterPhases

public Set<javax.faces.event.PhaseId> getAfterPhases()
Get the phases after which this PhaseOperation will be performed.


before

public T before(javax.faces.event.PhaseId... phases)
Perform this PhaseOperation before the given phases (Except PhaseId.RESTORE_VIEW). The deferred Operation will be performed once for each PhaseId provided.


after

public T after(javax.faces.event.PhaseId... phases)
Perform this PhaseOperation after the given phases (Except PhaseId.RENDER_RESPONSE). The deferred Operation will be performed once for each PhaseId provided.


performHttp

public final void performHttp(HttpServletRewrite event,
                              EvaluationContext context)
Invoked during the rewrite process, just add "this" to a queue of deferred bindings in the request

Specified by:
performHttp in class HttpOperation

getSortedPhaseOperations

public static ArrayList<PhaseOperation<?>> getSortedPhaseOperations(javax.servlet.http.HttpServletRequest request)

getEvent

public HttpServletRewrite getEvent()
Get the HttpServletRewrite with which this PhaseOperation was deferred.


getContext

public EvaluationContext getContext()
Get the EvaluationContext with which this PhaseOperation was deferred.


enqueue

public static PhaseOperation<?> enqueue(Operation operation)
Defer the given Operation until the specified phases.


enqueue

public static PhaseOperation<?> enqueue(Operation operation,
                                        int priority)
Enqueue an Operation to be performed before or after one or many JavaServer Faces life-cycle phases, specified via invoking before(PhaseId...) or after(PhaseId...).


rewrite-integration-faces 2.0.0.Alpha3

Copyright © 2013 OCPsoft. All Rights Reserved.