fr.paris.lutece.plugins.form.service.validator
Class ValidatorService

java.lang.Object
  extended by fr.paris.lutece.plugins.form.service.validator.ValidatorService

public class ValidatorService
extends java.lang.Object

ValidatorService


Method Summary
 java.util.Collection<IValidator> getAllValidators()
          Returns all validators
static ValidatorService getInstance()
          Returns the unique instance of ValidatorService
 boolean isAssociatedWithForm(int nIdForm)
          Checks if at least one validator is associated with the form
 void removeAssociationsWithForm(int nIdForm)
          Removes the associations between all validators and the form
 void validateForm(javax.servlet.http.HttpServletRequest request, FormSubmit formSubmit, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Validates the form using all validators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ValidatorService getInstance()
Returns the unique instance of ValidatorService

Returns:
the unique instance of ValidatorService

getAllValidators

public java.util.Collection<IValidator> getAllValidators()
Returns all validators

Returns:
all validators

validateForm

public void validateForm(javax.servlet.http.HttpServletRequest request,
                         FormSubmit formSubmit,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
                  throws fr.paris.lutece.portal.service.message.SiteMessageException
Validates the form using all validators

Parameters:
request - HttpServletRequest
formSubmit - the form submit
plugin - the plugin
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException

isAssociatedWithForm

public boolean isAssociatedWithForm(int nIdForm)
Checks if at least one validator is associated with the form

Parameters:
nIdForm - the form id
Returns:
true if at least one validator is associated with the form, otherwise false

removeAssociationsWithForm

public void removeAssociationsWithForm(int nIdForm)
Removes the associations between all validators and the form

Parameters:
nIdForm - the form id


Copyright © 2011 Mairie de Paris. All Rights Reserved.