Class SimpleResponseValidator

java.lang.Object
fr.paris.lutece.util.httpaccess.SimpleResponseValidator
All Implemented Interfaces:
ResponseStatusValidator

public class SimpleResponseValidator extends Object implements ResponseStatusValidator
SimpleResponseValidator
  • Constructor Details

    • SimpleResponseValidator

      public SimpleResponseValidator(String strList)
      Constructor
      Parameters:
      strList - The list of authorized status
  • Method Details

    • loadFromProperty

      public static ResponseStatusValidator loadFromProperty(String strProperty, String strDefault)
      Load a Status validator from properties
      Parameters:
      strProperty - The property key
      strDefault - The default value
      Returns:
      A responseValidator initialized with the authorized status list
    • validate

      public boolean validate(int nStatus)
      Validate response status
      Specified by:
      validate in interface ResponseStatusValidator
      Parameters:
      nStatus - the response status
      Returns:
      true if validated