1
|
package cz.zcu.kiv.backendapi.catalog;
|
2
|
|
3
|
import cz.zcu.kiv.backendapi.path.PathDto;
|
4
|
|
5
|
import java.util.List;
|
6
|
import java.util.UUID;
|
7
|
|
8
|
/**
|
9
|
* Catalog item service interface
|
10
|
*/
|
11
|
public interface ICatalogItemService {
|
12
|
/**
|
13
|
* Saves list of catalog items DTO
|
14
|
*
|
15
|
* @param catalogItemDtoList list of catalog items DTO
|
16
|
*/
|
17
|
void saveCatalogItems(List<CatalogItemDto> catalogItemDtoList);
|
18
|
|
19
|
/**
|
20
|
* Saves one catalog item (creates new if ID is null or does not exist, updates catalog item otherwise)
|
21
|
*
|
22
|
* @param catalogItemDto catalog item DTO
|
23
|
*/
|
24
|
void saveCatalogItem(CatalogItemDto catalogItemDto);
|
25
|
|
26
|
/**
|
27
|
* Deletes catalog item with given ID
|
28
|
*
|
29
|
* @param id ID
|
30
|
*/
|
31
|
void deleteCatalogItem(UUID id);
|
32
|
|
33
|
/**
|
34
|
* Returns catalog items satisfying given filter
|
35
|
*
|
36
|
* @param name name - optional
|
37
|
* @param country country - optional
|
38
|
* @param type type - optional
|
39
|
* @param writtenForm written form - optional
|
40
|
* @return list of catalog items satisfying given filter
|
41
|
*/
|
42
|
List<CatalogItemDto> getCatalog(String name, String country, String type, String writtenForm);
|
43
|
|
44
|
/**
|
45
|
* Returns catalog item with given ID
|
46
|
*
|
47
|
* @param id ID
|
48
|
* @return catalog item with given ID
|
49
|
*/
|
50
|
CatalogItemDto getCatalogItem(UUID id);
|
51
|
|
52
|
/**
|
53
|
* Returns highlighted searched text and searched items
|
54
|
*
|
55
|
* @param text text
|
56
|
* @return highlighted searched text and searched items
|
57
|
*/
|
58
|
PathDto getPath(String text);
|
59
|
|
60
|
}
|