API corrections
This commit is contained in:
parent
da7cbdc30e
commit
359cb7a97d
@ -23,8 +23,8 @@ public interface AdminApi {
|
|||||||
@Path("/groups")
|
@Path("/groups")
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
public List<Group> getGroups(
|
public List<Group> getGroups(
|
||||||
@QueryParam("tenantId") int tenantId,
|
@QueryParam("tenantId") Long tenantId,
|
||||||
@QueryParam("functional") boolean functional,
|
@QueryParam("functional") Boolean functional,
|
||||||
@QueryParam("summary") boolean summary);
|
@QueryParam("summary") Boolean summary);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,33 +25,33 @@ public interface AppDefinitionsApi {
|
|||||||
@Path("{modelId}")
|
@Path("{modelId}")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation get(
|
AppDefinitionRepresentation get(
|
||||||
@PathParam("modelId") String modelId);
|
@PathParam("modelId") Long appId);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("{modelId}")
|
@Path("{modelId}")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation update(
|
AppDefinitionUpdateResultRepresentation update(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
AppDefinitionSaveRepresentation updatedModel);
|
AppDefinitionSaveRepresentation updatedModel);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("{appDefinitionId}")
|
@Path("{appDefinitionId}")
|
||||||
void delete(
|
void delete(
|
||||||
@PathParam("appDefinitionId") String appDefinitionId);
|
@PathParam("appDefinitionId") Long appId);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("{modelId}/export")
|
@Path("{modelId}/export")
|
||||||
@Produces({ MediaType.APPLICATION_OCTET_STREAM })
|
@Produces({ MediaType.APPLICATION_JSON, "application/zip" })
|
||||||
File export(
|
File export(
|
||||||
@PathParam("modelId") String modelId);
|
@PathParam("modelId") Long appId);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/publish")
|
@Path("{modelId}/publish")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publish(
|
AppDefinitionUpdateResultRepresentation publish(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
AppDefinitionPublishRepresentation publishModel);
|
AppDefinitionPublishRepresentation publishModel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,32 +20,32 @@ public interface AppDefinitionsCxfApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("import")
|
@Path("import")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation import_(
|
AppDefinitionRepresentation import_(
|
||||||
List<Attachment> attachments);
|
List<Attachment> attachments);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/import")
|
@Path("{modelId}/import")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation import_(
|
AppDefinitionRepresentation import_(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
List<Attachment> attachments);
|
List<Attachment> attachments);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("publish-app")
|
@Path("publish-app")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publishApp(
|
AppDefinitionUpdateResultRepresentation publishApp(
|
||||||
List<Attachment> attachments);
|
List<Attachment> attachments);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/publish-app")
|
@Path("{modelId}/publish-app")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publishApp(
|
AppDefinitionUpdateResultRepresentation publishApp(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
List<Attachment> attachments);
|
List<Attachment> attachments);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public interface AppDefinitionsJerseyApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("import")
|
@Path("import")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation import_(
|
AppDefinitionRepresentation import_(
|
||||||
@FormDataParam("file") InputStream filedataStream,
|
@FormDataParam("file") InputStream filedataStream,
|
||||||
@ -29,16 +29,16 @@ public interface AppDefinitionsJerseyApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/import")
|
@Path("{modelId}/import")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation import_(
|
AppDefinitionRepresentation import_(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
@FormDataParam("file") InputStream filedataStream,
|
@FormDataParam("file") InputStream filedataStream,
|
||||||
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("publish-app")
|
@Path("publish-app")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publishApp(
|
AppDefinitionUpdateResultRepresentation publishApp(
|
||||||
@FormDataParam("file") InputStream filedataStream,
|
@FormDataParam("file") InputStream filedataStream,
|
||||||
@ -46,10 +46,10 @@ public interface AppDefinitionsJerseyApi {
|
|||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/publish-app")
|
@Path("{modelId}/publish-app")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publishApp(
|
AppDefinitionUpdateResultRepresentation publishApp(
|
||||||
@PathParam("modelId") String modelId,
|
@PathParam("modelId") Long appId,
|
||||||
@FormDataParam("file") InputStream filedataStream,
|
@FormDataParam("file") InputStream filedataStream,
|
||||||
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
||||||
|
|
||||||
|
@ -31,11 +31,7 @@ public interface ModelsApi {
|
|||||||
public ResultListDataRepresentation get(
|
public ResultListDataRepresentation get(
|
||||||
@QueryParam("filter") String filter,
|
@QueryParam("filter") String filter,
|
||||||
@QueryParam("sort") String sort,
|
@QueryParam("sort") String sort,
|
||||||
@QueryParam("modelType") int modelType,
|
@QueryParam("modelType") Integer modelType,
|
||||||
@QueryParam("referenceId") int referenceId);
|
@QueryParam("referenceId") Long referenceId);
|
||||||
|
|
||||||
default ResultListDataRepresentation get(ModelType modelType, String filter, String sort) {
|
|
||||||
return this.get(filter, sort, modelType.getId(), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.inteligr8.alfresco.activiti;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
|
||||||
|
import com.inteligr8.rs.ClientConfiguration;
|
||||||
|
|
||||||
|
public class ConnectionCxfClientPojoIT extends ConnectionClientIT {
|
||||||
|
|
||||||
|
private static ApsPublicRestApi client;
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
public static void initClient() {
|
||||||
|
ApsClientConfiguration config = new ApsClientConfiguration();
|
||||||
|
config.setBaseUrl("http://localhost:8080/activiti-app");
|
||||||
|
config.setBasicAuthUsername("admin");
|
||||||
|
config.setBasicAuthPassword("admin");
|
||||||
|
|
||||||
|
client = new ApsPublicRestApiCxfImpl(
|
||||||
|
new ApsClientCxfImpl(config));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApsPublicRestApi getClient() {
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ClientConfiguration getConfiguration() {
|
||||||
|
return client.getConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.inteligr8.alfresco.activiti;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
|
|
||||||
|
import com.inteligr8.rs.ClientConfiguration;
|
||||||
|
|
||||||
|
public class ConnectionJerseyClientPojoIT extends ConnectionClientIT {
|
||||||
|
|
||||||
|
private static ApsPublicRestApi client;
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
public static void initClient() {
|
||||||
|
ApsClientConfiguration config = new ApsClientConfiguration();
|
||||||
|
config.setBaseUrl("http://localhost:8080/activiti-app");
|
||||||
|
config.setBasicAuthUsername("admin");
|
||||||
|
config.setBasicAuthPassword("admin");
|
||||||
|
|
||||||
|
client = new ApsPublicRestApiJerseyImpl(
|
||||||
|
new ApsClientJerseyImpl(config));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApsPublicRestApi getClient() {
|
||||||
|
return client;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ClientConfiguration getConfiguration() {
|
||||||
|
return client.getConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user