org.apache.myfaces.extensions.validator.core.interceptor
Interface RendererInterceptor

All Known Implementing Classes:
AbstractRendererInterceptor, AbstractValidationInterceptor, BeanValidationModuleValidationInterceptor, MappedConstraintSourceBeanValidationModuleValidationInterceptor, MappedConstraintSourcePropertyValidationModuleValidationInterceptor, PropertyValidationModuleValidationInterceptor, TrinidadRendererInterceptor, ValidationInterceptor

public interface RendererInterceptor

Allows to intercept renderer methods.
It's the base mechanism of ExtVal which enables most of the concepts provided by the framework. Furthermore, it allows to add custom concepts.

Since:
1.x.1
Author:
Gerhard Petracek

Method Summary
 void afterDecode(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void afterEncodeBegin(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void afterEncodeChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void afterEncodeEnd(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void afterGetConvertedValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object submittedValue, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void beforeDecode(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void beforeEncodeBegin(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void beforeEncodeChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void beforeEncodeEnd(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 void beforeGetConvertedValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object submittedValue, javax.faces.render.Renderer renderer)
          Intercepts a method of the renderer.
 String getInterceptorId()
           
 Object getReturnValueOnSkipRendererDelegationException(SkipRendererDelegationException skipRendererDelegationException, Object currentReturnValue)
          In case of the converted value it defines the value that should be returned by the getConvertedValue method in case there was a SkipRendererDelegationException.
 

Method Detail

getInterceptorId

String getInterceptorId()

getReturnValueOnSkipRendererDelegationException

Object getReturnValueOnSkipRendererDelegationException(SkipRendererDelegationException skipRendererDelegationException,
                                                       Object currentReturnValue)
In case of the converted value it defines the value that should be returned by the getConvertedValue method in case there was a SkipRendererDelegationException.

Parameters:
skipRendererDelegationException - The exception thrown to abort further RendererInterceptors.
currentReturnValue - The converted value that is defined at this time.
Returns:
value that should be used as converted value.

beforeDecode

void beforeDecode(javax.faces.context.FacesContext facesContext,
                  javax.faces.component.UIComponent uiComponent,
                  javax.faces.render.Renderer renderer)
                  throws SkipBeforeInterceptorsException,
                         SkipRendererDelegationException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('before').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
SkipBeforeInterceptorsException - can be thrown to stop the execution of the subsequent interceptors
SkipRendererDelegationException - can be thorwn to skip the invocation of the intercepted renderer method.

beforeEncodeBegin

void beforeEncodeBegin(javax.faces.context.FacesContext facesContext,
                       javax.faces.component.UIComponent uiComponent,
                       javax.faces.render.Renderer renderer)
                       throws IOException,
                              SkipBeforeInterceptorsException,
                              SkipRendererDelegationException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('before').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipBeforeInterceptorsException - can be thrown to stop the execution of the subsequent interceptors
SkipRendererDelegationException - can be thorwn to skip the invocation of the intercepted renderer method.

beforeEncodeChildren

void beforeEncodeChildren(javax.faces.context.FacesContext facesContext,
                          javax.faces.component.UIComponent uiComponent,
                          javax.faces.render.Renderer renderer)
                          throws IOException,
                                 SkipBeforeInterceptorsException,
                                 SkipRendererDelegationException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('before').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipBeforeInterceptorsException - can be thrown to stop the execution of the subsequent interceptors
SkipRendererDelegationException - can be thorwn to skip the invocation of the intercepted renderer method.

beforeEncodeEnd

void beforeEncodeEnd(javax.faces.context.FacesContext facesContext,
                     javax.faces.component.UIComponent uiComponent,
                     javax.faces.render.Renderer renderer)
                     throws IOException,
                            SkipBeforeInterceptorsException,
                            SkipRendererDelegationException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('before').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipBeforeInterceptorsException - can be thrown to stop the execution of the subsequent interceptors
SkipRendererDelegationException - can be thorwn to skip the invocation of the intercepted renderer method.

beforeGetConvertedValue

void beforeGetConvertedValue(javax.faces.context.FacesContext facesContext,
                             javax.faces.component.UIComponent uiComponent,
                             Object submittedValue,
                             javax.faces.render.Renderer renderer)
                             throws javax.faces.convert.ConverterException,
                                    SkipBeforeInterceptorsException,
                                    SkipRendererDelegationException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('before').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
submittedValue - The submitted value
renderer - The intercepted renderer
Throws:
javax.faces.convert.ConverterException - ExtVal validation strategies can throw ValidatorExceptions. Due to the trick used by ExtVal it has to be converted to a ConverterException (see AbstractValidationInterceptor).
SkipBeforeInterceptorsException - can be thrown to stop the execution of the subsequent interceptors
SkipRendererDelegationException - can be thorwn to skip the invocation of the intercepted renderer method.

afterDecode

void afterDecode(javax.faces.context.FacesContext facesContext,
                 javax.faces.component.UIComponent uiComponent,
                 javax.faces.render.Renderer renderer)
                 throws SkipAfterInterceptorsException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('after').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.

afterEncodeBegin

void afterEncodeBegin(javax.faces.context.FacesContext facesContext,
                      javax.faces.component.UIComponent uiComponent,
                      javax.faces.render.Renderer renderer)
                      throws IOException,
                             SkipAfterInterceptorsException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('after').

Parameters:
facesContext - The JSF context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.

afterEncodeChildren

void afterEncodeChildren(javax.faces.context.FacesContext facesContext,
                         javax.faces.component.UIComponent uiComponent,
                         javax.faces.render.Renderer renderer)
                         throws IOException,
                                SkipAfterInterceptorsException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('after').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.

afterEncodeEnd

void afterEncodeEnd(javax.faces.context.FacesContext facesContext,
                    javax.faces.component.UIComponent uiComponent,
                    javax.faces.render.Renderer renderer)
                    throws IOException,
                           SkipAfterInterceptorsException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('after').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
renderer - The intercepted renderer
Throws:
IOException - In case the response writer is accessed and there was an IO problem.
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.

afterGetConvertedValue

void afterGetConvertedValue(javax.faces.context.FacesContext facesContext,
                            javax.faces.component.UIComponent uiComponent,
                            Object submittedValue,
                            javax.faces.render.Renderer renderer)
                            throws javax.faces.convert.ConverterException,
                                   SkipAfterInterceptorsException
Intercepts a method of the renderer. The name of the intercepted method is the name of this method without the prefix ('after').

Parameters:
facesContext - The JSF Context
uiComponent - The current component
submittedValue - The submitted value
renderer - The intercepted renderer
Throws:
javax.faces.convert.ConverterException - ExtVal validation strategies can throw ValidatorExceptions. Due to the trick used by ExtVal it has to be converted to a ConverterException (see AbstractValidationInterceptor).
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.