1
|
package eu.dnetlib.goldoa.service;
|
2
|
|
3
|
//import eu.dnetlib.goldoa.domain.BankTransferReceipt;
|
4
|
//import eu.dnetlib.goldoa.domain.CommentTemplate;
|
5
|
import eu.dnetlib.goldoa.domain.*;
|
6
|
//import eu.dnetlib.goldoa.domain.RequestFilter;
|
7
|
//import eu.dnetlib.goldoa.domain.RequestInfo;
|
8
|
//import eu.dnetlib.goldoa.domain.RequestInfoPage;
|
9
|
//import eu.dnetlib.goldoa.domain.RequestManagerException;
|
10
|
//import eu.dnetlib.goldoa.domain.RequestSort;
|
11
|
//import eu.dnetlib.goldoa.domain.RequestSortOrder;
|
12
|
|
13
|
import java.io.InputStream;
|
14
|
import java.util.Date;
|
15
|
import java.util.List;
|
16
|
|
17
|
/**
|
18
|
* Created by antleb on 3/10/15.
|
19
|
*/
|
20
|
public interface RequestManager {
|
21
|
|
22
|
public Request saveRequest(Request request);
|
23
|
|
24
|
public Request getById(String requestId);
|
25
|
|
26
|
/**
|
27
|
* @param fromDate inclusive, starts with 0
|
28
|
* @param to non inclusive, < total count
|
29
|
* @param requestSortBy if not null, sorts by this field
|
30
|
* @param order the order of sort, if RequestSortBy != null
|
31
|
* @param requestFilter which request field to search for, searches for all if null and term != null
|
32
|
* @param term if not null, filters the requests
|
33
|
* @param fromDate
|
34
|
* @param to
|
35
|
* @return
|
36
|
*/
|
37
|
public RequestPage getRequests(Date fromDate, Date toDate, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter, int from, int to);
|
38
|
|
39
|
public RequestPage getForAccounting(Date fromDate, Date toDate, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter, int from, int to);
|
40
|
|
41
|
public RequestPage getForUser(String email, Date fromDate, Date toDate, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter, int from, int to);
|
42
|
|
43
|
public RequestPage getForPublisher(String publisher, Date fromDate, Date toDate, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter, int from, int to);
|
44
|
|
45
|
public RequestPage getForOrganization(List<String> organizationIds, Date fromDate, Date toDate, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter, int from, int to);
|
46
|
|
47
|
public List<Request> getForProject(String projectId);
|
48
|
|
49
|
public String getCSV(String mode, RequestSort requestSortBy, RequestSortOrder order, RequestFilter requestFilter, String term, Request.RequestStatus[] statusFilter);
|
50
|
|
51
|
public Request submitRequest(Request request) throws PersonManagerException;
|
52
|
|
53
|
public Request submitLibraryRequest(Request request) throws PersonManagerException;
|
54
|
|
55
|
public Request submitPublisherRequest(Request request) throws PersonManagerException;
|
56
|
|
57
|
public void conditionallyApproveRequest(String requestId, String personId, String comment, String template);
|
58
|
|
59
|
public void approveRequest(String requestId, String personId, String comment, String template);
|
60
|
|
61
|
public void rejectRequest(String requestId, String personId, String comment, String template);
|
62
|
|
63
|
public void processingRequest(String requestId, String personId, String comment, String template);
|
64
|
|
65
|
public void paidRequest(String requestId, String personId, String comment, String template, float apc_paid, float transfer_cost, float other_cost, Date datePaid);
|
66
|
|
67
|
public void paidLibraryRequest(String requestId, String personId, String comment, String template, float apc_paid, float transfer_cost, float other_cost, Date datePaid);
|
68
|
|
69
|
public void paidPublisherRequest(String requestId, String personId, String comment, String template, float apc_paid, float transfer_cost, float other_cost, Date datePaid);
|
70
|
|
71
|
public void onHoldRequest(String requestId, String personId, String comment, String template);
|
72
|
|
73
|
public void deniedRequest(String requestId, String personId, String comment, String template);
|
74
|
|
75
|
public void invoiceUploaded(String requestId, String invoiceId);
|
76
|
|
77
|
public void uploadTransferReceipt(String requestid, String contentType, InputStream inputStream);
|
78
|
|
79
|
public Integer getActiveNumber();
|
80
|
|
81
|
public Integer getPaidNumber();
|
82
|
|
83
|
public Integer getNumberOfProjects();
|
84
|
|
85
|
public Double getTotalAmount();
|
86
|
|
87
|
public Double getAverageAmount();
|
88
|
|
89
|
public Integer getAverageAmountPerType(PublicationType type);
|
90
|
|
91
|
public Integer getNumberOfPaidRequestsWithDOI();
|
92
|
|
93
|
public Integer getNumberOfApprovedRequestsWithDOI();
|
94
|
|
95
|
public Integer getNumnerOfPaidPublicationsPerType(PublicationType type);
|
96
|
|
97
|
public BankTransferReceipt downloadBankTransferReceipt(String requestId) throws RequestManagerException;
|
98
|
|
99
|
public List<CommentTemplate> getCommentTemplates(Request.RequestStatus requestStatus);
|
100
|
}
|