1
|
using Core.Entities;
|
2
|
using Models.Enums;
|
3
|
using Models.Tags;
|
4
|
using Models.Users;
|
5
|
using System;
|
6
|
using System.Collections.Generic;
|
7
|
using System.Linq;
|
8
|
using System.Text;
|
9
|
using System.Threading.Tasks;
|
10
|
|
11
|
namespace Core.Services.TagService
|
12
|
{
|
13
|
public interface ITagService
|
14
|
{
|
15
|
/// <summary>
|
16
|
/// Returns a tree-like structure with tag categories, tags, and subtags
|
17
|
/// </summary>
|
18
|
/// <param name="userRole">Role is used to discriminate categories available to admins only</param>
|
19
|
/// <returns></returns>
|
20
|
public TagTreeResponse GetTagTree(ERole userRole);
|
21
|
/// <summary>
|
22
|
/// Creates a new category
|
23
|
/// </summary>
|
24
|
/// <param name="request"></param>
|
25
|
public void CreateCategory(CreateCategoryRequest request);
|
26
|
/// <summary>
|
27
|
/// Deleted a category by Id
|
28
|
/// </summary>
|
29
|
/// <param name="categoryId"></param>
|
30
|
public void DeleteCategory(Guid categoryId);
|
31
|
/// <summary>
|
32
|
/// Updates a category by Id
|
33
|
/// </summary>
|
34
|
/// <param name="request"></param>
|
35
|
/// <param name="categoryId"></param>
|
36
|
public void UpdateCategory(ModifyCategoryRequest request, Guid categoryId);
|
37
|
/// <summary>
|
38
|
/// Creates a new tag
|
39
|
/// </summary>
|
40
|
/// <param name="request"></param>
|
41
|
public void CreateTag(CreateTagRequest request);
|
42
|
/// <summary>
|
43
|
/// Delete tag by Id
|
44
|
/// </summary>
|
45
|
/// <param name="tagId"></param>
|
46
|
public void DeleteTag(Guid tagId);
|
47
|
/// <summary>
|
48
|
/// Update tag by Id
|
49
|
/// </summary>
|
50
|
/// <param name="request"></param>
|
51
|
/// <param name="tagId"></param>
|
52
|
public void UpdateTag(ModifyTagRequest request, Guid tagId);
|
53
|
/// <summary>
|
54
|
/// Create a subtag
|
55
|
/// </summary>
|
56
|
/// <param name="request"></param>
|
57
|
public void CreateSubTag(CreateSubTagRequest request);
|
58
|
/// <summary>
|
59
|
/// Delete subtag by Id
|
60
|
/// </summary>
|
61
|
/// <param name="subtagId"></param>
|
62
|
public void DeleteSubTag(Guid subtagId);
|
63
|
/// <summary>
|
64
|
/// Update subtag by Id
|
65
|
/// </summary>
|
66
|
/// <param name="request"></param>
|
67
|
/// <param name="subtagId"></param>
|
68
|
public void UpdateSubTag(ModifySubTagRequest request, Guid subtagId);
|
69
|
/// <summary>
|
70
|
/// Adds a note to tag's instance
|
71
|
/// </summary>
|
72
|
/// <param name="annotationId">Annotation</param>
|
73
|
/// <param name="occurrenceId">Id of the Tag</param>
|
74
|
/// <param name="user">User that's doing the adding</param>
|
75
|
/// <param name="request"></param>
|
76
|
/// <param name="isFinal">Whether the annotationId is for a FinalAnnotation or Annotation</param>
|
77
|
public void AddNoteToTagInstance(Guid annotationId, Guid occurrenceId, User user, AddNoteToTagOccurenceRequest request, bool isFinal);
|
78
|
}
|
79
|
}
|