org.italiangrid.voms.ac
Class VOMSValidationResult

java.lang.Object
  extended by org.italiangrid.voms.ac.VOMSValidationResult

public class VOMSValidationResult
extends Object

This class represents the outcome of a VOMS validation.

Author:
Andrea Ceccanti

Constructor Summary
VOMSValidationResult(VOMSAttribute attributes, boolean valid)
          Default constructor.
VOMSValidationResult(VOMSAttribute attributes, boolean valid, List<VOMSValidationErrorMessage> validationErrors)
          This constructor is used to pass in a list of validation errors as well.
 
Method Summary
 VOMSAttribute getAttributes()
          The attributes are to be considered valid only if the isValid() method for this VOMSValidationResult is true.
 List<VOMSValidationErrorMessage> getValidationErrors()
           
 boolean isValid()
          Tells if validation was successful or not.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VOMSValidationResult

public VOMSValidationResult(VOMSAttribute attributes,
                            boolean valid)
Default constructor.

Parameters:
attributes - the attributes this validation result refer to
valid - true in case of validation success, false otherwise

VOMSValidationResult

public VOMSValidationResult(VOMSAttribute attributes,
                            boolean valid,
                            List<VOMSValidationErrorMessage> validationErrors)
This constructor is used to pass in a list of validation errors as well.

Parameters:
valid - true in case of validation success, false otherwise
validationErrors - a list of validation errors
Method Detail

isValid

public boolean isValid()
Tells if validation was successful or not.

Returns:
valid true in case of validation success, false otherwise

getAttributes

public VOMSAttribute getAttributes()
The attributes are to be considered valid only if the isValid() method for this VOMSValidationResult is true.

Returns:
the attributes this validation result refer to

getValidationErrors

public List<VOMSValidationErrorMessage> getValidationErrors()
Returns:
the possibly empty list of validation errors

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.