Package org.italiangrid.voms.ac

# Class VOMSValidationResult

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

public class VOMSValidationResult extends Object
This class represents the outcome of a VOMS validation.

Author:
  Andrea Ceccanti

## Constructor Summary

Constructors
Constructor
Description
`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

Modifier and Type
Method
Description
`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 Details

### 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:
  `attributes` - the `VOMSAttribute` that will be validated
  `valid` - `true` in case of validation success, `false` otherwise
  `validationErrors` - a list of validation errors

## Method Details

### 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`