Perform STEP path fix
This commit is contained in:
parent
ae335a5289
commit
332807f8bb
|
@ -166,7 +166,8 @@ public class DefaultDocumentsClient<T extends Project> implements Projects<T> {
|
||||||
log.debug("Executing step on {} (class {}, useCaseDescriptor {}) with request {} ",
|
log.debug("Executing step on {} (class {}, useCaseDescriptor {}) with request {} ",
|
||||||
id, getManagedClass(),profileID, request);
|
id, getManagedClass(),profileID, request);
|
||||||
Call<WebTarget, T> call = endpoint -> {
|
Call<WebTarget, T> call = endpoint -> {
|
||||||
return ResponseCommons.check(endpoint.path(profileID).path(id).request(MediaType.APPLICATION_JSON).
|
return ResponseCommons.check(endpoint.path(profileID).path(InterfaceConstants.Methods.STEP)
|
||||||
|
.path(id).request(MediaType.APPLICATION_JSON).
|
||||||
post(Entity.entity(request, MediaType.APPLICATION_JSON)),getManagedClass());
|
post(Entity.entity(request, MediaType.APPLICATION_JSON)),getManagedClass());
|
||||||
};
|
};
|
||||||
T toReturn = delegate.make(call);
|
T toReturn = delegate.make(call);
|
||||||
|
|
|
@ -1,18 +1,28 @@
|
||||||
package org.gcube.application.geoportal.clients;
|
package org.gcube.application.geoportal.clients;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.bson.Document;
|
import org.bson.Document;
|
||||||
import org.gcube.application.geoportal.client.utils.Serialization;
|
import org.gcube.application.geoportal.client.utils.Serialization;
|
||||||
|
import org.gcube.application.geoportal.common.model.document.Project;
|
||||||
|
import org.gcube.application.geoportal.common.model.rest.StepExecutionRequest;
|
||||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
|
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
|
||||||
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
public class ProfiledConcessioniTest {
|
import java.rmi.RemoteException;
|
||||||
|
|
||||||
|
public class ProfiledConcessioniTest extends ProfiledDocumentsTest{
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
private static class MyClass {
|
private static class MyClass {
|
||||||
private String field;
|
private String field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getUCID() {
|
||||||
|
return "profiledConcessioni";
|
||||||
|
}
|
||||||
|
|
||||||
public void test(){
|
public void test(){
|
||||||
|
|
||||||
|
@ -25,4 +35,13 @@ public class ProfiledConcessioniTest {
|
||||||
System.out.println(Serialization.convert(doc, MyClass.class));
|
System.out.println(Serialization.convert(doc, MyClass.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void performSubmit() throws RemoteException, JsonProcessingException {
|
||||||
|
String id="630f912755e2947b0278c1be";
|
||||||
|
|
||||||
|
Project p = getClient().performStep(id,new StepExecutionRequest("SUBMIT-FOR-REVIEW",new Document()));
|
||||||
|
System.out.println("Result is "+Serialization.write(p));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue