Project

General

Profile

Download (2.78 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id: IEntityConstraintViolationService.java 22374 2014-12-10 23:02:58Z ayco_holleman $
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.api.service;
12

    
13
import java.util.List;
14

    
15
import eu.etaxonomy.cdm.model.validation.EntityConstraintViolation;
16
import eu.etaxonomy.cdm.model.validation.Severity;
17

    
18
/**
19
 * A service that provides several retrieval methods for entity validation outcomes. The
20
 * focus is on the constraints being violated rather than on the entities that violated
21
 * them.
22
 *
23
 * @author ayco_holleman
24
 *
25
 */
26
public interface IEntityConstraintViolationService extends IService<EntityConstraintViolation> {
27

    
28
	/**
29
	 * Get all constraint violations for all validated entities. The constraint violations
30
	 * are sorted according to the type and id of the validated entities.
31
	 *
32
	 * @param validatedEntityClass
33
	 *            The fully qualified class name of the entity class
34
	 *
35
	 * @return The {@code EntityConstraintViolation}s
36
	 */
37
	List<EntityConstraintViolation> getConstraintViolations();
38

    
39

    
40
	/**
41
	 * Get all constraint violations for all entities of the specified type. The
42
	 * constraint violations are sorted according to the type and id of the validated
43
	 * entities.
44
	 *
45
	 * @param validatedEntityClass
46
	 *            The fully qualified class name of the entity class
47
	 *
48
	 * @return The {@code EntityConstraintViolation}s
49
	 */
50
	List<EntityConstraintViolation> getConstraintViolations(String validatedEntityClass);
51

    
52

    
53
	/**
54
	 * Get all constraint violations of the specified severity for all entities of the
55
	 * specified type. The constraint violations are sorted according to the type and id
56
	 * of the validated entities.
57
	 *
58
	 * @param validatedEntityClass
59
	 *            The fully qualified class name of the entity class
60
	 * @param severity
61
	 *            The severity of the {@link EntityConstraintViolation}s associated with
62
	 *            the {@code EntityValidation}
63
	 *
64
	 * @return The {@code EntityConstraintViolation}s
65
	 */
66
	List<EntityConstraintViolation> getConstraintViolations(String validatedEntityClass, Severity severity);
67

    
68

    
69
	/**
70
	 * Get all constraint violations of the specified severity. The constraint violations
71
	 * are sorted according to the type and id of the validated entities.
72
	 *
73
	 * @param severity
74
	 *            The severity of the {@link EntityConstraintViolation}s associated with
75
	 *            the {@code EntityValidation}
76
	 *
77
	 * @return The {@code EntityConstraintViolation}s
78
	 */
79
	List<EntityConstraintViolation> getConstraintViolations(Severity severity);
80

    
81
}
(35-35/97)