1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.api.service;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.validation.EntityConstraintViolation;
|
15
|
import eu.etaxonomy.cdm.model.validation.Severity;
|
16
|
|
17
|
/**
|
18
|
* A service that provides several retrieval methods for entity validation outcomes. The
|
19
|
* focus is on the constraints being violated rather than on the entities that violated
|
20
|
* them.
|
21
|
*
|
22
|
* @author ayco_holleman
|
23
|
*
|
24
|
*/
|
25
|
public interface IEntityConstraintViolationService extends IService<EntityConstraintViolation> {
|
26
|
|
27
|
/**
|
28
|
* Get all constraint violations for all validated entities. The constraint violations
|
29
|
* are sorted according to the type and id of the validated entities.
|
30
|
*
|
31
|
* @param validatedEntityClass
|
32
|
* The fully qualified class name of the entity class
|
33
|
*
|
34
|
* @return The {@code EntityConstraintViolation}s
|
35
|
*/
|
36
|
List<EntityConstraintViolation> getConstraintViolations();
|
37
|
|
38
|
|
39
|
/**
|
40
|
* Get all constraint violations for all entities of the specified type. The
|
41
|
* constraint violations are sorted according to the type and id of the validated
|
42
|
* entities.
|
43
|
*
|
44
|
* @param validatedEntityClass
|
45
|
* The fully qualified class name of the entity class
|
46
|
*
|
47
|
* @return The {@code EntityConstraintViolation}s
|
48
|
*/
|
49
|
List<EntityConstraintViolation> getConstraintViolations(String validatedEntityClass);
|
50
|
|
51
|
|
52
|
/**
|
53
|
* Get all constraint violations of the specified severity for all entities of the
|
54
|
* specified type. The constraint violations are sorted according to the type and id
|
55
|
* of the validated entities.
|
56
|
*
|
57
|
* @param validatedEntityClass
|
58
|
* The fully qualified class name of the entity class
|
59
|
* @param severity
|
60
|
* The severity of the {@link EntityConstraintViolation}s associated with
|
61
|
* the {@code EntityValidation}
|
62
|
*
|
63
|
* @return The {@code EntityConstraintViolation}s
|
64
|
*/
|
65
|
List<EntityConstraintViolation> getConstraintViolations(String validatedEntityClass, Severity severity);
|
66
|
|
67
|
|
68
|
/**
|
69
|
* Get all constraint violations of the specified severity. The constraint violations
|
70
|
* are sorted according to the type and id of the validated entities.
|
71
|
*
|
72
|
* @param severity
|
73
|
* The severity of the {@link EntityConstraintViolation}s associated with
|
74
|
* the {@code EntityValidation}
|
75
|
*
|
76
|
* @return The {@code EntityConstraintViolation}s
|
77
|
*/
|
78
|
List<EntityConstraintViolation> getConstraintViolations(Severity severity);
|
79
|
|
80
|
}
|