it.eng.spagobi.commons.validation
Class SpagoBIValidationImpl

java.lang.Object
  extended by it.eng.spagobi.commons.validation.SpagoBIValidationImpl
All Implemented Interfaces:
it.eng.spago.validation.ValidationEngineIFace

public class SpagoBIValidationImpl
extends java.lang.Object
implements it.eng.spago.validation.ValidationEngineIFace

Author:
zoppello TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
static java.lang.String ERROR_ALFANUMERIC
           
static java.lang.String ERROR_BOOLEAN
           
static java.lang.String ERROR_DATE
           
static java.lang.String ERROR_DECIMALS
           
static java.lang.String ERROR_EMAIL
           
static java.lang.String ERROR_EXTENDED_ALFANUMERIC
           
static java.lang.String ERROR_FISCALCODE
           
static java.lang.String ERROR_GENERIC
           
static java.lang.String ERROR_LETTERSTRING
           
static java.lang.String ERROR_MANDATORY
           
static java.lang.String ERROR_MAXLENGTH
           
static java.lang.String ERROR_MINLENGTH
           
static java.lang.String ERROR_NUMERIC
           
static java.lang.String ERROR_RANGE
           
static java.lang.String ERROR_REGEXP
           
static java.lang.String ERROR_URL
           
static java.lang.String ERROR_XSS
           
static java.lang.String NAME_ATTRIBUTE
           
static java.lang.String TOUPPERCASE_ATTRIBUTE
           
 
Constructor Summary
SpagoBIValidationImpl()
          Thise methodis called everyTime a service with label serviceName is called, if the service validator is configured correctly into the validator.xml configuration file.
 
Method Summary
 boolean isBlocking()
          A method which says if a validator has blocking properties.
 boolean validate(java.lang.String serviceType, java.lang.String serviceName, it.eng.spago.dispatching.service.RequestContextIFace context)
          From the request and response container this method controls if validation conditions declarated into the validator.xml>/code> file are verifyed, and, if yes, acknowledge to start validation control.
static it.eng.spago.validation.EMFValidationError validateField(java.lang.String fieldName, java.lang.String fieldLabel, java.lang.String value, java.lang.String validatorName, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
See Also:
Constant Field Values

TOUPPERCASE_ATTRIBUTE

public static final java.lang.String TOUPPERCASE_ATTRIBUTE
See Also:
Constant Field Values

ERROR_GENERIC

public static final java.lang.String ERROR_GENERIC
See Also:
Constant Field Values

ERROR_MANDATORY

public static final java.lang.String ERROR_MANDATORY
See Also:
Constant Field Values

ERROR_LETTERSTRING

public static final java.lang.String ERROR_LETTERSTRING
See Also:
Constant Field Values

ERROR_ALFANUMERIC

public static final java.lang.String ERROR_ALFANUMERIC
See Also:
Constant Field Values

ERROR_NUMERIC

public static final java.lang.String ERROR_NUMERIC
See Also:
Constant Field Values

ERROR_EMAIL

public static final java.lang.String ERROR_EMAIL
See Also:
Constant Field Values

ERROR_FISCALCODE

public static final java.lang.String ERROR_FISCALCODE
See Also:
Constant Field Values

ERROR_DECIMALS

public static final java.lang.String ERROR_DECIMALS
See Also:
Constant Field Values

ERROR_RANGE

public static final java.lang.String ERROR_RANGE
See Also:
Constant Field Values

ERROR_MAXLENGTH

public static final java.lang.String ERROR_MAXLENGTH
See Also:
Constant Field Values

ERROR_MINLENGTH

public static final java.lang.String ERROR_MINLENGTH
See Also:
Constant Field Values

ERROR_REGEXP

public static final java.lang.String ERROR_REGEXP
See Also:
Constant Field Values

ERROR_DATE

public static final java.lang.String ERROR_DATE
See Also:
Constant Field Values

ERROR_URL

public static final java.lang.String ERROR_URL
See Also:
Constant Field Values

ERROR_BOOLEAN

public static final java.lang.String ERROR_BOOLEAN
See Also:
Constant Field Values

ERROR_XSS

public static final java.lang.String ERROR_XSS
See Also:
Constant Field Values

ERROR_EXTENDED_ALFANUMERIC

public static final java.lang.String ERROR_EXTENDED_ALFANUMERIC
See Also:
Constant Field Values
Constructor Detail

SpagoBIValidationImpl

public SpagoBIValidationImpl()
Thise methodis called everyTime a service with label serviceName is called, if the service validator is configured correctly into the validator.xml configuration file. It starts the validation procedure.

Method Detail

validate

public boolean validate(java.lang.String serviceType,
                        java.lang.String serviceName,
                        it.eng.spago.dispatching.service.RequestContextIFace context)
From the request and response container this method controls if validation conditions declarated into the validator.xml>/code> file are verifyed, and, if yes, acknowledge to start validation control.

Specified by:
validate in interface it.eng.spago.validation.ValidationEngineIFace
Parameters:
serviceType - the service type
serviceName - the service name
context - the context
Returns:
a boolean value which says if conditions are verified.
Throws:
java.lang.Exception - if an exception occurs.

isBlocking

public boolean isBlocking()
A method which says if a validator has blocking properties. If a validator is blocking and his validation is not passed, all execution will be interrupted.

Specified by:
isBlocking in interface it.eng.spago.validation.ValidationEngineIFace
Returns:
A boolean value saying if validator is blocking or not.

validateField

public static it.eng.spago.validation.EMFValidationError validateField(java.lang.String fieldName,
                                                                       java.lang.String fieldLabel,
                                                                       java.lang.String value,
                                                                       java.lang.String validatorName,
                                                                       java.lang.String arg0,
                                                                       java.lang.String arg1,
                                                                       java.lang.String arg2)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception