Package com.logicaldoc.core.metadata.validation

# Class Validator

java.lang.Object
com.logicaldoc.core.metadata.validation.Validator

Direct Known Subclasses:
  `DocumentValidator`, `FolderValidator`

public class Validator extends Object
A Validator performs the checks on a generic `ExtensibleObject`

Since:
  8.8.1
Author:
  Marco Meschieri - LogicalDOC

## Constructor Summary

Constructors
Constructor
Description
`Validator()`

## Method Summary

Modifier and Type
Method
Description
`void`
`validate(ExtensibleObject object, Template template, History transaction)`
Validates an object instance taking the validation logic from a given template

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Validator

public Validator()

## Method Details

### validate

public void validate(ExtensibleObject object, Template template, History transaction) throws ValidationException, AutomationException
Validates an object instance taking the validation logic from a given template

Parameters:
  `object` - the instance to validate
  `template` - the template that contains the validation logic
  `transaction` - the current transaction
Throws:
  `ValidationException` - in case of invalid object, this exception contains all the errors descriptions
  `AutomationException` - the automation has been evaluated but produced an error