Skip to content

Commit

Permalink
added Override annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
autermann committed Oct 9, 2019
1 parent be304ff commit 478ca02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/n52/javaps/rest/ProcessesApiImpl.java
Expand Up @@ -124,6 +124,7 @@ public void setServiceURL(URI serviceURL) {
this.serviceURL = url.replace("/service", ProcessesApi.BASE_URL);
}

@Override
public ResponseEntity<?> execute(Execute body, String id)
throws EngineException, ExecutionException {

Expand Down Expand Up @@ -159,13 +160,15 @@ public ResponseEntity<?> execute(Execute body, String id)
}
}

@Override
public ResponseEntity<?> getJobList(String id) {
OwsCode owsCode = new OwsCode(id);
JobCollection jobCollection = new JobCollection();
engine.getJobIdentifiers(owsCode).stream().map(JobId::getValue).forEach(jobCollection::addJobsItem);
return ResponseEntity.ok(jobCollection);
}

@Override
public String getExecuteForm(String id, Model model) {
OwsCode owsCode = new OwsCode(id);
context.setAttribute("processId", id);
Expand All @@ -174,6 +177,7 @@ public String getExecuteForm(String id, Model model) {
return "../../../jsp/test_client";
}

@Override
public org.n52.javaps.rest.model.ProcessOffering getProcessDescription(String id) throws ProcessNotFoundException {
OwsCode owsCode = new OwsCode(id);
return engine.getProcessDescription(owsCode)
Expand All @@ -182,12 +186,14 @@ public org.n52.javaps.rest.model.ProcessOffering getProcessDescription(String id
.orElseThrow(() -> new ProcessNotFoundException(owsCode));
}

@Override
public ProcessCollection getProcesses() {
Set<ProcessOffering> offerings = engine.getProcessDescriptions().stream().map(ProcessOffering::new)
.collect(toSet());
return processSerializer.createProcessCollection(offerings);
}

@Override
public ResponseEntity<?> getResult(String processID, String jobID)
throws EngineException, ExecutionException {

Expand Down Expand Up @@ -234,6 +240,7 @@ private <T> ResponseEntity<T> handleExecutionException(java.util.concurrent.Exec
throw new EngineException(e);
}

@Override
public StatusInfo getStatus(String processId, String jobID) throws EngineException {
OwsCode identifier = new OwsCode(processId);
if (!engine.hasProcessDescription(identifier)) {
Expand Down

0 comments on commit 478ca02

Please sign in to comment.