org.apache.myfaces.extensions.validator.core.interceptor
Class AbstractRendererInterceptor

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.interceptor.AbstractRendererInterceptor
All Implemented Interfaces:
RendererInterceptor
Direct Known Subclasses:
AbstractValidationInterceptor

public abstract class AbstractRendererInterceptor
extends Object
implements RendererInterceptor

Empty base implementation which allows concrete implementations to override just the needed methods.

Since:
1.x.1
Author:
Gerhard Petracek

Field Summary
protected  Logger logger
           
 
Constructor Summary
protected AbstractRendererInterceptor()
           
 
Method Summary
 void afterDecode(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void afterEncodeBegin(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void afterEncodeChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void afterEncodeEnd(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void afterGetConvertedValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object o, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void beforeDecode(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void beforeEncodeBegin(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void beforeEncodeChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void beforeEncodeEnd(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.render.Renderer wrapped)
          Intercepts a method of the renderer.
 void beforeGetConvertedValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, Object o, javax.faces.render.Renderer wrapped)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Logger logger
Constructor Detail

AbstractRendererInterceptor

protected AbstractRendererInterceptor()
Method Detail

getInterceptorId

public final String getInterceptorId()
Specified by:
getInterceptorId in interface RendererInterceptor

getReturnValueOnSkipRendererDelegationException

public 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.

Specified by:
getReturnValueOnSkipRendererDelegationException in interface RendererInterceptor
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

public void beforeDecode(javax.faces.context.FacesContext facesContext,
                         javax.faces.component.UIComponent uiComponent,
                         javax.faces.render.Renderer wrapped)
                  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').

Specified by:
beforeDecode in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void beforeEncodeBegin(javax.faces.context.FacesContext facesContext,
                              javax.faces.component.UIComponent uiComponent,
                              javax.faces.render.Renderer wrapped)
                       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').

Specified by:
beforeEncodeBegin in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void beforeEncodeChildren(javax.faces.context.FacesContext facesContext,
                                 javax.faces.component.UIComponent uiComponent,
                                 javax.faces.render.Renderer wrapped)
                          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').

Specified by:
beforeEncodeChildren in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void beforeEncodeEnd(javax.faces.context.FacesContext facesContext,
                            javax.faces.component.UIComponent uiComponent,
                            javax.faces.render.Renderer wrapped)
                     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').

Specified by:
beforeEncodeEnd in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void beforeGetConvertedValue(javax.faces.context.FacesContext facesContext,
                                    javax.faces.component.UIComponent uiComponent,
                                    Object o,
                                    javax.faces.render.Renderer wrapped)
                             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').

Specified by:
beforeGetConvertedValue in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
o - The submitted value
wrapped - 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

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

Specified by:
afterDecode in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - The intercepted renderer
Throws:
SkipAfterInterceptorsException - Can be thrown to stop the execution of the subsequent interceptors.

afterEncodeBegin

public void afterEncodeBegin(javax.faces.context.FacesContext facesContext,
                             javax.faces.component.UIComponent uiComponent,
                             javax.faces.render.Renderer wrapped)
                      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').

Specified by:
afterEncodeBegin in interface RendererInterceptor
Parameters:
facesContext - The JSF context
uiComponent - The current component
wrapped - 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

public void afterEncodeChildren(javax.faces.context.FacesContext facesContext,
                                javax.faces.component.UIComponent uiComponent,
                                javax.faces.render.Renderer wrapped)
                         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').

Specified by:
afterEncodeChildren in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void afterEncodeEnd(javax.faces.context.FacesContext facesContext,
                           javax.faces.component.UIComponent uiComponent,
                           javax.faces.render.Renderer wrapped)
                    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').

Specified by:
afterEncodeEnd in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
wrapped - 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

public void afterGetConvertedValue(javax.faces.context.FacesContext facesContext,
                                   javax.faces.component.UIComponent uiComponent,
                                   Object o,
                                   javax.faces.render.Renderer wrapped)
                            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').

Specified by:
afterGetConvertedValue in interface RendererInterceptor
Parameters:
facesContext - The JSF Context
uiComponent - The current component
o - The submitted value
wrapped - 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.