rewrite-integration-faces 2.0.0.Alpha3

org.ocpsoft.rewrite.faces.config
Class PhaseBinding

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.PhaseBinding
All Implemented Interfaces:
Binding, Converter<Object>, Retrieval, Submission, Validator<Object>, ConfigurationElement, Operation, OperationBuilder

public class PhaseBinding
extends HttpOperation
implements Binding

Wraps & holds a Submission until before or after a given JavaServer Faces PhaseId. This means that validation and conversion are also deferred to within the Faces lifecycle.

Author:
Lincoln Baxter, III, Fabien Marsaud

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ocpsoft.rewrite.config.DefaultOperationBuilder
DefaultOperationBuilder.NoOp
 
Method Summary
 PhaseBinding after(javax.faces.event.PhaseId... phases)
          Perform this PhaseBinding after the given phases (Except PhaseId.RENDER_RESPONSE).
 PhaseBinding before(javax.faces.event.PhaseId... phases)
          Perform this PhaseBinding before the given phases (Except PhaseId.RESTORE_VIEW).
 Object convert(Rewrite event, EvaluationContext context, Object value)
           
 PhaseBinding onValidationFailure(Operation operation)
          On validation failure, perform the given Operation; defaults to SendStatus.code(int) error code 404 unless otherwise specified.
 void performHttp(HttpServletRewrite event, EvaluationContext context)
           
 Object retrieve(Rewrite event, EvaluationContext context)
           
 Object submit(Rewrite event, EvaluationContext context, Object value)
           
 boolean supportsRetrieval()
           
 boolean supportsSubmission()
           
static PhaseBinding to(Submission submission)
          Process the given Submission during the Faces life-cycle.
 boolean validate(Rewrite event, EvaluationContext context, Object value)
           
 
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
 

Method Detail

to

public static PhaseBinding to(Submission submission)
Process the given Submission during the Faces life-cycle.


performHttp

public void performHttp(HttpServletRewrite event,
                        EvaluationContext context)
Specified by:
performHttp in class HttpOperation

retrieve

public Object retrieve(Rewrite event,
                       EvaluationContext context)
Specified by:
retrieve in interface Retrieval

submit

public Object submit(Rewrite event,
                     EvaluationContext context,
                     Object value)
Specified by:
submit in interface Submission

validate

public boolean validate(Rewrite event,
                        EvaluationContext context,
                        Object value)
Specified by:
validate in interface Validator<Object>

convert

public Object convert(Rewrite event,
                      EvaluationContext context,
                      Object value)
Specified by:
convert in interface Converter<Object>

supportsRetrieval

public boolean supportsRetrieval()
Specified by:
supportsRetrieval in interface Binding

supportsSubmission

public boolean supportsSubmission()
Specified by:
supportsSubmission in interface Binding

before

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


after

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


onValidationFailure

public PhaseBinding onValidationFailure(Operation operation)
On validation failure, perform the given Operation; defaults to SendStatus.code(int) error code 404 unless otherwise specified.


rewrite-integration-faces 2.0.0.Alpha3

Copyright © 2013 OCPsoft. All Rights Reserved.