HDIV API 2.0.4

org.hdiv.interceptor
Class EditableValidatorInterceptor

java.lang.Object
  extended by org.hdiv.interceptor.EditableValidatorInterceptor
All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor, java.io.Serializable

public class EditableValidatorInterceptor
extends java.lang.Object
implements com.opensymphony.xwork2.interceptor.Interceptor

Interceptor to visualize the errors produced in the editable fields detected by HDIV.

Author:
Gorka Vicente
See Also:
Interceptor, Serialized Form

Field Summary
static java.lang.String EDITABLE_PARAMETER_ERROR
          The request attributes key under HDIV should store errors produced in the editable fields.
 
Constructor Summary
EditableValidatorInterceptor()
           
 
Method Summary
 java.lang.String createMessageError(java.lang.String[] values)
          It creates the message error from the values values.
 void destroy()
          Called to let an interceptor clean up any resources it has allocated.
 void getEditableParametersErrors(javax.servlet.http.HttpServletRequest request, java.lang.Object action, java.util.Locale locale)
          Generate the errors detected by HDIV during the validation process of the editable parameters.
 void init()
          Called after an interceptor is created, but before any requests are processed using intercept , giving the Interceptor a chance to initialize any needed resources.
 java.lang.String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
          Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the ActionInvocation or to short-circuit the processing and just return a String return code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDITABLE_PARAMETER_ERROR

public static final java.lang.String EDITABLE_PARAMETER_ERROR
The request attributes key under HDIV should store errors produced in the editable fields.

See Also:
Constant Field Values
Constructor Detail

EditableValidatorInterceptor

public EditableValidatorInterceptor()
Method Detail

init

public void init()
Called after an interceptor is created, but before any requests are processed using intercept , giving the Interceptor a chance to initialize any needed resources.

Specified by:
init in interface com.opensymphony.xwork2.interceptor.Interceptor

intercept

public java.lang.String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                           throws java.lang.Exception
Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the ActionInvocation or to short-circuit the processing and just return a String return code.

Specified by:
intercept in interface com.opensymphony.xwork2.interceptor.Interceptor
Throws:
java.lang.Exception

destroy

public void destroy()
Called to let an interceptor clean up any resources it has allocated.

Specified by:
destroy in interface com.opensymphony.xwork2.interceptor.Interceptor

getEditableParametersErrors

public void getEditableParametersErrors(javax.servlet.http.HttpServletRequest request,
                                        java.lang.Object action,
                                        java.util.Locale locale)
Generate the errors detected by HDIV during the validation process of the editable parameters.

Parameters:
request - The servlet request we are processing
action - action object
locale -

createMessageError

public java.lang.String createMessageError(java.lang.String[] values)
It creates the message error from the values values.

Parameters:
values - values with not allowed characters
Returns:
message error to show

HDIV 2.0.4

Copyright © 2008 hdiv.org. All Rights Reserved.