org.camunda.bpm.model.xml.validation
Interface ModelElementValidator<T extends ModelElementInstance>

Type Parameters:
T - the type of the elements to validate.

public interface ModelElementValidator<T extends ModelElementInstance>

A validator for model element instances.

Since:
7.6
See Also:
ModelInstance.validate(java.util.Collection)

Method Summary
 Class<T> getElementType()
          The type of the element this validator is applied to.
 void validate(T element, ValidationResultCollector validationResultCollector)
          Validate an element.
 

Method Detail

getElementType

Class<T> getElementType()

The type of the element this validator is applied to. The validator is applied to all instances implementing this type.

Example from BPMN: Assume the type returned is 'Task'. Then the validator is invoked for all instances of task, including instances of 'ServiceTask', 'UserTask', ...

Returns:
the type of the element this validator is applied to.

validate

void validate(T element,
              ValidationResultCollector validationResultCollector)
Validate an element.

Parameters:
element - the element to validate
validationResultCollector - object used to collect validation results for this element.


Copyright © 2016 camunda services GmbH. All rights reserved.