Project

General

Profile

« Previous | Next » 

Revision 56761

Triggering validation job from provide on Interface Update and Interface Add

View differences:

ValidatorServiceImpl.java
88 88

  
89 89
    @Override
90 90
    @PreAuthorize("hasRole('ROLE_USER') and #jobForValidation.userEmail == authentication.userInfo.email")
91
    public JobForValidation submitJobForValidation(@RequestBody JobForValidation jobForValidation) throws ValidatorServiceException {
91
    public JobForValidation submitJobForValidation(JobForValidation jobForValidation) throws ValidatorServiceException {
92 92
        LOGGER.debug("Submit job for validation with id : " + jobForValidation.getDatasourceId());
93 93
        try {
94 94
            emailUtils.sendSubmitJobForValidationEmail(SecurityContextHolder.getContext().getAuthentication(),jobForValidation);
......
105 105

  
106 106
    @Override
107 107
    @PreAuthorize("hasRole('ROLE_USER') and #email == authentication.userInfo.email")
108
    public ResponseEntity<Object> reSubmitJobForValidation(@PathVariable("email") String email,
109
                                                           @PathVariable("jobId") String jobId) throws JSONException, ValidatorServiceException {
108
    public ResponseEntity<Object> reSubmitJobForValidation(String email,
109
                                                           String jobId) throws JSONException, ValidatorServiceException {
110 110
        LOGGER.debug("Resubmit validation job with id : " + jobId);
111 111
        StoredJob job = monitorApi.getJobSummary(jobId,"all");
112 112
        Set<Integer> contentRules = new HashSet<Integer>();
......
136 136
    }
137 137

  
138 138
    @Override
139
    public List<RuleSet> getRuleSets(@PathVariable("mode") String mode) {
139
    public List<RuleSet> getRuleSets(String mode) {
140 140
        LOGGER.info("Getting rulesets for mode: " + mode);
141 141
        return rulesetMap.get(mode);
142 142
    }
143 143

  
144 144
    @Override
145
    public List<String> getSetsOfRepository(@RequestParam(value = "url", required = true) String url) {
145
    public List<String> getSetsOfRepository(String url) {
146 146
        LOGGER.debug("Getting sets of repository with url : " + url);
147 147
        try {
148 148
            return OaiTools.getSetsOfRepo(url);
......
154 154
    }
155 155

  
156 156
    @Override
157
    public boolean identifyRepo(@RequestParam(value = "url", required = true) String url) {
157
    public boolean identifyRepo(String url) {
158 158
        LOGGER.debug("Identify repository with url : " + url);
159 159
        try {
160 160
            return OaiTools.identifyRepository(url);
......
166 166
    }
167 167

  
168 168
    @Override
169
    public RuleSet getRuleSet(@PathVariable("acronym") String acronym) {
169
    public RuleSet getRuleSet(String acronym) {
170 170
        LOGGER.debug("Getting ruleset with acronym : " + acronym);
171 171
        RuleSet ruleSet = null;
172 172
        try {
......
187 187

  
188 188
    @Override
189 189
    @PreAuthorize("hasRole('ROLE_USER')")
190
    public List<StoredJob> getStoredJobsNew(@RequestParam("user") @ApiParam(value = "User email", required = true) String user,
191
                                            @RequestParam(value = "jobType", required = false)
192
                                            @ApiParam(value = "Equals to filter job type on validation history page") String jobType,
193
                                            @RequestParam("offset") @ApiParam(value = "Page number", required = true) String offset,
194
                                            @RequestParam(value = "limit", required = false,defaultValue = "10") @ApiParam(value = "Null value") String limit,
195
                                            @RequestParam(value = "dateFrom", required = false) @ApiParam(value = "Null value") String dateFrom,
196
                                            @RequestParam(value = "dateTo", required = false) @ApiParam(value = "Null value") String dateTo,
197
                                            @RequestParam("validationStatus") @ApiParam(value = "Equals to filter validation jobs", required = true) String validationStatus
198
                                            ) throws ValidatorServiceException {
190
    public List<StoredJob> getStoredJobsNew(String user,
191
                                            String jobType,
192
                                            String offset,
193
                                            String limit,
194
                                            String dateFrom,
195
                                            String dateTo,
196
                                            String validationStatus ) throws ValidatorServiceException {
199 197
        return getValidationService().getStoredJobsNew(user, jobType, Integer.parseInt(offset), Integer.parseInt(limit), dateFrom, dateTo, validationStatus);
200 198
    }
201 199

  
......
205 203
    }
206 204

  
207 205
    @Override
208
    public InterfaceInformation getInterfaceInformation(@RequestParam(value = "baseUrl", required = true) String baseUrl) throws ValidationServiceException {
206
    public InterfaceInformation getInterfaceInformation(String baseUrl) throws ValidationServiceException {
209 207
        try {
210 208
            LOGGER.debug("Getting interface information with url: " + baseUrl);
211 209
            InterfaceInformation interfaceInformation = new InterfaceInformation();

Also available in: Unified diff