Project

General

Profile

1
package eu.dnetlib.validator.web.api;
2

    
3
import java.util.List;
4
import java.util.Map;
5
import java.util.Set;
6

    
7
import eu.dnetlib.domain.functionality.validator.JobForValidation;
8
import eu.dnetlib.domain.functionality.validator.RuleSet;
9
import eu.dnetlib.domain.functionality.validator.StoredJob;
10

    
11
/**
12
 * 
13
 * @author Nikon Gasparis
14
 * 
15
 */
16
public interface ValidatorWebApi {
17

    
18
	public boolean userOverridesRepoRegistration(String user)
19
			throws  ValidatorWebException;
20
	
21
	public StoredJob getJobSummary(int jobId, String groupBy) throws ValidatorWebException;
22

    
23
	public List<StoredJob> getJobsOfUser(String user, String jobType, Integer offset, Integer limit, String dateFrom, String dateTo) throws ValidatorWebException;
24
			
25
	public Map<String, List<StoredJob>> getJobsOfUserSplitted(String user)
26
			throws ValidatorWebException;
27

    
28
	public int getJobsTotalNumberOfUser(String user, String jobType) throws ValidatorWebException;
29

    
30
	public Map<String, String> getRuleSetsMap(String deployEnvironment) throws ValidatorWebException;
31

    
32
	public RuleSet getRuleSet(String acronym) throws ValidatorWebException;
33

    
34
	public void submitValidationJob(JobForValidation job) throws ValidatorWebException;
35

    
36
	public void reSubmitValidationJob(JobForValidation job, Set<Integer> rules) throws ValidatorWebException;
37

    
38
	boolean userIsMasterAdmin(String user) throws ValidatorWebException;
39

    
40
	boolean userIsSecondaryAdmin(String user) throws ValidatorWebException;
41

    
42
	boolean isUserBlacklisted(String email) throws ValidatorWebException;
43

    
44
	
45

    
46
/*  public String getRuleSetName(int setId) throws  OpenAIREValidatorException;
47
	
48
	public RuleSet getRuleSet(int setId) throws  OpenAIREValidatorException;
49

    
50
	public List<RuleSet> getRuleSets() throws  OpenAIREValidatorException;
51

    
52
	public List<String> getRuleSetRuleIdsByJobType(int setId, String jobType)
53
			throws  OpenAIREValidatorException;
54

    
55
	public List<RuleS> getAllRulesForPresentationByJobType(String jobType)
56
			throws  OpenAIREValidatorException;
57

    
58
	public List<RuleS> getAllRulesForPresentationByJobTypeByRuleSet(
59
			List<String> ruleSetRuleIds, String jobType)
60
			throws  OpenAIREValidatorException;
61

    
62
	public List<RuleD> getRulesForJobValidationByJobType(String jobType)
63
			throws  OpenAIREValidatorException;
64

    
65
	public List<RuleD> getRulesForJobValidationByJobTypeByRuleSet(int setId,
66
			String jobType) throws  OpenAIREValidatorException;
67

    
68
	public List<RuleStored> getAllRulesByJobType(String jobType)
69
			throws  OpenAIREValidatorException;
70

    
71
	public List<RulePair> getAllRulesToRulePair() throws  OpenAIREValidatorException;
72

    
73
	public JobSubmitted submitContentJob(Properties pros, Set<Integer> crules,
74
			String user, String groupBy_xpath, OpenAIREValidatorRegistrationListener regListener) throws  OpenAIREValidatorException;
75

    
76
	public JobSubmitted submitUsageJob(Properties pros, Set<Integer> urules,
77
			String user, OpenAIREValidatorRegistrationListener regListener) throws  OpenAIREValidatorException;
78

    
79
	public Map<String, List<JobSubmitted>> getJobsOfUser(String userName)
80
			throws  OpenAIREValidatorException;
81

    
82
	public List<String> getAllRuleIdsByJobType(String jobType)
83
			throws  OpenAIREValidatorException;
84

    
85
	public List<RuleD> convertRuleIdsListToRuleDList(List<String> ruleIds);
86

    
87
	public List<String> getValidationErrors(int jobId, int ruleId)
88
			throws  OpenAIREValidatorException;
89

    
90

    
91
	public JobSubmitted getJobSubmitted(String jobId) throws  OpenAIREValidatorException;
92

    
93
	public List<TaskStored> getJobTasks(String jobId, JobSubmitted job)
94
			throws  OpenAIREValidatorException;
95

    
96

    
97
	public void deleteOldJobs(String date,String target) throws OpenAIREValidatorException;
98

    
99
	public Map<String, String> getRuleSetsMap() throws OpenAIREValidatorException;
100

    
101
	public RuleStored getRule(String ruleId) throws OpenAIREValidatorException;
102

    
103
	public void restore();
104

    
105
	public List<String> getDistinctGroupByValues(String jobId) throws  OpenAIREValidatorException;
106

    
107
	public String getFilteredScore(String jobId, String groupBy) throws  OpenAIREValidatorException;
108

    
109
	public void preRegistrationValidations(JobForRegistration job) throws OpenAIREValidatorException;
110

    
111
	public void storeJobForRegistration(JobForRegistration job) throws OpenAIREValidatorException;
112

    
113
	public JobForRegistration getJobForRegistration(String activationId) throws OpenAIREValidatorException;
114

    
115
	public void deleteJobForRegistration(String activationId) throws OpenAIREValidatorException;
116

    
117
	public void cleanUncompletedJobs() throws OpenAIREValidatorException;
118

    
119
	public Map<String, Set<Integer>> prepareCrisJobs(Set<Integer> chosenContentRules, Boolean referential, String selectedEntities) throws OpenAIREValidatorException;
120

    
121
	public Map<String, String> getRuleSetsMap(String deployEnvironment)
122
			throws OpenAIREValidatorException;
123

    
124
	public Boolean isRepoAdmin(String user) throws OpenAIREValidatorException;
125

    
126
	public void submitContentJobForCris(Properties pros,
127
			Set<Integer> chosenRules, String selectedEntities,
128
			Boolean checkReferential, String user, OpenAIREValidatorRegistrationListener regListener) throws OpenAIREValidatorException;
129
*/
130
}
(1-1/2)