diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/StepExecutionRequest.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/PerformStepRequest.java
similarity index 92%
rename from geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/StepExecutionRequest.java
rename to geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/PerformStepRequest.java
index d6d1f86..895b02d 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/StepExecutionRequest.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/model/rest/PerformStepRequest.java
@@ -13,7 +13,7 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class StepExecutionRequest {
+public class PerformStepRequest {
private String stepID;
@XmlAttribute(required = false)
diff --git a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/rest/Projects.java b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/rest/Projects.java
index df02750..1a9e207 100644
--- a/geoportal-common/src/main/java/org/gcube/application/geoportal/common/rest/Projects.java
+++ b/geoportal-common/src/main/java/org/gcube/application/geoportal/common/rest/Projects.java
@@ -13,7 +13,7 @@ import org.gcube.application.geoportal.common.model.rest.CreateRelationshipReque
import org.gcube.application.geoportal.common.model.rest.DeleteRelationshipRequest;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
-import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
+import org.gcube.application.geoportal.common.model.rest.PerformStepRequest;
public interface Projects
{
@@ -39,7 +39,7 @@ public interface Projects
{
public String queryForJSON(QueryRequest request)throws RemoteException;
//Execution
- public P performStep(String id, StepExecutionRequest request) throws RemoteException;
+ public P performStep(String id, PerformStepRequest request) throws RemoteException;
//FileSets
public P registerFileSet(String id, RegisterFileSetRequest req) throws RemoteException, InvalidRequestException;
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/ProfiledDocuments.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/ProfiledDocuments.java
index a407811..72e1310 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/ProfiledDocuments.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/ProfiledDocuments.java
@@ -34,7 +34,7 @@ import org.gcube.application.geoportal.common.model.document.lifecycle.Lifecycle
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
-import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
+import org.gcube.application.geoportal.common.model.rest.PerformStepRequest;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.service.engine.mongo.ProfiledMongoManager;
import org.gcube.application.geoportal.service.engine.providers.ConfigurationCache;
@@ -312,20 +312,20 @@ public class ProfiledDocuments {
@Produces(MediaType.APPLICATION_JSON)
@Path("/" + InterfaceConstants.Methods.STEP + "/{" + InterfaceConstants.Parameters.PROJECT_ID + "}")
public Project performStep(@PathParam(InterfaceConstants.Parameters.PROJECT_ID) String id,
- StepExecutionRequest request) {
+ PerformStepRequest performStepRequest) {
Project theProject = new GuardedMethod() {
@Override
protected Project run() throws Exception, WebApplicationException {
- log.info("Executing step {} on Project ({},ID,{}) with options {}", request.getStepID(),
- manager.getUseCaseDescriptor().getId(), id, request.getOptions());
- return manager.performStep(id, request.getStepID(), request.getOptions());
+ log.info("Executing step {} on Project ({},ID,{}) with options {}", performStepRequest.getStepID(),
+ manager.getUseCaseDescriptor().getId(), id, performStepRequest.getOptions());
+ return manager.performStep(id, performStepRequest.getStepID(), performStepRequest.getOptions());
}
}.execute().getResult();
log.info("Starting event...");
if(log.isInfoEnabled()) {
- List allFields = Arrays.asList(StepExecutionRequest.class.getDeclaredFields());
+ List allFields = Arrays.asList(PerformStepRequest.class.getDeclaredFields());
String fieldsName = allFields.stream().map(e -> e.getName()).collect(Collectors.joining(","));
log.info("Fields name: "+fieldsName);
}
@@ -339,7 +339,7 @@ public class ProfiledDocuments {
item.setUserCaller(user.getUser());
item.setContext(user.getContext());
item.setEvent(event);
- item.setOptionalMessage(request.getMessage());
+ item.setOptionalMessage(performStepRequest.getMessage());
item.setUseCaseDescriptor(manager.getUseCaseDescriptor());
item.setProject(theProject);
log.info("By notifying event ({}, ID {})", event, item.getProjectId());
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
index 238f104..1b563ec 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/AbstractProfiledDocumentsTests.java
@@ -21,7 +21,7 @@ import org.gcube.application.geoportal.common.model.document.access.Access;
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
-import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
+import org.gcube.application.geoportal.common.model.rest.PerformStepRequest;
import org.gcube.application.geoportal.common.rest.InterfaceConstants;
import org.gcube.application.geoportal.common.utils.FileSets;
import org.gcube.application.geoportal.common.utils.StorageUtils;
@@ -180,7 +180,7 @@ public abstract class AbstractProfiledDocumentsTests extends BasicServiceTestUni
}
- protected Project step(String id, StepExecutionRequest request) throws Exception {
+ protected Project step(String id, PerformStepRequest request) throws Exception {
Project toReturn= check(baseTarget().
path(InterfaceConstants.Methods.STEP).path(id).request(MediaType.APPLICATION_JSON).
post(Entity.entity(Serialization.write(request),
diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
index f4caa38..1150454 100644
--- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
+++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/profiledDocuments/ProfiledConcessioniTests.java
@@ -9,7 +9,7 @@ import org.gcube.application.geoportal.common.model.document.access.Access;
import org.gcube.application.geoportal.common.model.document.identification.SpatialReference;
import org.gcube.application.geoportal.common.model.document.lifecycle.LifecycleInformation;
import org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest;
-import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
+import org.gcube.application.geoportal.common.model.rest.PerformStepRequest;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.Field;
import org.gcube.application.geoportal.common.utils.StorageUtils;
import org.gcube.application.geoportal.common.utils.tests.GCubeTest;
@@ -69,7 +69,7 @@ public class ProfiledConcessioniTests extends AbstractProfiledDocumentsTests{
System.out.println("Registered posizionamento, result is "+ Serialization.write(doc));
// invoke step SUBMIT-FOR-REVIEW
- StepExecutionRequest submitReq=new StepExecutionRequest();
+ PerformStepRequest submitReq=new PerformStepRequest();
submitReq.setStepID("SUBMIT-FOR-REVIEW");
// doc=step(doc.getId(),submitReq);
doc=step(doc.getId(),submitReq);
@@ -79,7 +79,7 @@ public class ProfiledConcessioniTests extends AbstractProfiledDocumentsTests{
// invoke step Publish
- StepExecutionRequest approveDraftReq=new StepExecutionRequest();
+ PerformStepRequest approveDraftReq=new PerformStepRequest();
approveDraftReq.setStepID("APPROVE-SUBMITTED");
doc=step(doc.getId(),approveDraftReq);
System.out.println(doc);
@@ -137,7 +137,7 @@ public class ProfiledConcessioniTests extends AbstractProfiledDocumentsTests{
assertEquals(doc2.getRelationships().get(0).getTargetUCD(),doc1.getProfileID());
assertEquals(doc2.getRelationships().get(0).getRelationshipName(),reverse);
- StepExecutionRequest stepReq = new StepExecutionRequest();
+ PerformStepRequest stepReq = new PerformStepRequest();
stepReq.setStepID("SUBMIT-FOR-REVIEW");
step(doc1.getId(),stepReq);