Revision b83da0d9
Added by Andreas Müller over 2 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptionService.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.util.Collection; |
12 | 12 |
import java.util.List; |
13 |
import java.util.Map; |
|
14 | 13 |
import java.util.Set; |
15 | 14 |
import java.util.UUID; |
16 | 15 |
|
17 | 16 |
import eu.etaxonomy.cdm.api.service.dto.DescriptionBaseDto; |
18 | 17 |
import eu.etaxonomy.cdm.api.service.dto.TaxonDistributionDTO; |
19 | 18 |
import eu.etaxonomy.cdm.api.service.pager.Pager; |
20 |
import eu.etaxonomy.cdm.model.common.Annotation; |
|
21 | 19 |
import eu.etaxonomy.cdm.model.common.Language; |
22 | 20 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
23 | 21 |
import eu.etaxonomy.cdm.model.description.DescriptionBase; |
... | ... | |
49 | 47 |
@Deprecated |
50 | 48 |
public TermVocabulary<Feature> getDefaultFeatureVocabulary(); |
51 | 49 |
|
52 |
/** |
|
53 |
* Gets a DescriptionElementBase instance matching the supplied uuid |
|
54 |
* |
|
55 |
* @param uuid the uuid of the DescriptionElement of interest |
|
56 |
* @return a DescriptionElement, or null if the DescriptionElement does not exist |
|
57 |
*/ |
|
58 |
public DescriptionElementBase getDescriptionElementByUuid(UUID uuid); |
|
59 |
|
|
60 |
/** |
|
61 |
* Loads and existing DescriptionElementBase instance matching the supplied uuid, |
|
62 |
* and recursively initializes all bean properties given in the |
|
63 |
* <code>propertyPaths</code> parameter. |
|
64 |
* <p> |
|
65 |
* For detailed description and examples <b>please refer to:</b> |
|
66 |
* {@link IBeanInitializer#initialize(Object, List)} |
|
67 |
* |
|
68 |
* @param uuid the uuid of the DescriptionElement of interest |
|
69 |
* @return a DescriptionElement, or null if the DescriptionElement does not exist |
|
70 |
*/ |
|
71 |
public DescriptionElementBase loadDescriptionElement(UUID uuid,List<String> propertyPaths); |
|
72 |
|
|
73 |
/** |
|
74 |
* Persists a <code>DescriptionElementBase</code> |
|
75 |
* @param descriptionElement |
|
76 |
* @return |
|
77 |
*/ |
|
78 |
public UUID saveDescriptionElement(DescriptionElementBase descriptionElement); |
|
79 |
|
|
80 |
/** |
|
81 |
* Persists a collection of <code>DescriptionElementBase</code> |
|
82 |
* @param descriptionElements |
|
83 |
* @return |
|
84 |
*/ |
|
85 |
public Map<UUID, DescriptionElementBase> saveDescriptionElement(Collection<DescriptionElementBase> descriptionElements); |
|
86 |
|
|
87 |
/** |
|
88 |
* Delete an existing description element |
|
89 |
* |
|
90 |
* @param descriptionElement the description element to be deleted |
|
91 |
* @return the unique identifier of the deleted entity |
|
92 |
*/ |
|
93 |
public UUID deleteDescriptionElement(DescriptionElementBase descriptionElement); |
|
94 |
|
|
95 |
public UUID deleteDescriptionElement(UUID descriptionElementUuid); |
|
96 |
|
|
97 | 50 |
/** |
98 | 51 |
* List the descriptions of type <T>, filtered using the following parameters |
99 | 52 |
* |
... | ... | |
239 | 192 |
*/ |
240 | 193 |
public <T extends DescriptionElementBase> List<T> listDescriptionElements(DescriptionBase description, Class<? extends DescriptionBase> descriptionType, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths); |
241 | 194 |
|
242 |
/** |
|
243 |
* Return a Pager containing Annotation entities belonging to the DescriptionElementBase instance supplied, optionally filtered by MarkerType |
|
244 |
* @param annotatedObj The object that "owns" the annotations returned |
|
245 |
* @param status Only return annotations which are marked with a Marker of this type (can be null to return all annotations) |
|
246 |
* @param pageSize The maximum number of terms returned (can be null for all annotations) |
|
247 |
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based) |
|
248 |
* @param orderHints may be null |
|
249 |
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)} |
|
250 |
* @return a Pager of Annotation entities |
|
251 |
*/ |
|
252 |
public Pager<Annotation> getDescriptionElementAnnotations(DescriptionElementBase annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths); |
|
253 |
|
|
254 | 195 |
|
255 | 196 |
/** |
256 | 197 |
* Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method |
Also available in: Unified diff
ref #694 add DescriptionElementService and move some methods