API corrections
This commit is contained in:
parent
da7cbdc30e
commit
359cb7a97d
@ -23,8 +23,8 @@ public interface AdminApi {
|
||||
@Path("/groups")
|
||||
@Produces({ "application/json" })
|
||||
public List<Group> getGroups(
|
||||
@QueryParam("tenantId") int tenantId,
|
||||
@QueryParam("functional") boolean functional,
|
||||
@QueryParam("summary") boolean summary);
|
||||
@QueryParam("tenantId") Long tenantId,
|
||||
@QueryParam("functional") Boolean functional,
|
||||
@QueryParam("summary") Boolean summary);
|
||||
|
||||
}
|
||||
|
@ -25,33 +25,33 @@ public interface AppDefinitionsApi {
|
||||
@Path("{modelId}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation get(
|
||||
@PathParam("modelId") String modelId);
|
||||
@PathParam("modelId") Long appId);
|
||||
|
||||
@PUT
|
||||
@Path("{modelId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation update(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
AppDefinitionSaveRepresentation updatedModel);
|
||||
|
||||
@DELETE
|
||||
@Path("{appDefinitionId}")
|
||||
void delete(
|
||||
@PathParam("appDefinitionId") String appDefinitionId);
|
||||
@PathParam("appDefinitionId") Long appId);
|
||||
|
||||
@GET
|
||||
@Path("{modelId}/export")
|
||||
@Produces({ MediaType.APPLICATION_OCTET_STREAM })
|
||||
@Produces({ MediaType.APPLICATION_JSON, "application/zip" })
|
||||
File export(
|
||||
@PathParam("modelId") String modelId);
|
||||
@PathParam("modelId") Long appId);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/publish")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publish(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
AppDefinitionPublishRepresentation publishModel);
|
||||
|
||||
}
|
||||
|
@ -20,32 +20,32 @@ public interface AppDefinitionsCxfApi {
|
||||
|
||||
@POST
|
||||
@Path("import")
|
||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
||||
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation import_(
|
||||
List<Attachment> attachments);
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionRepresentation import_(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
List<Attachment> attachments);
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
List<Attachment> attachments);
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
List<Attachment> attachments);
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public interface AppDefinitionsJerseyApi {
|
||||
|
||||
@POST
|
||||
@Path("import")
|
||||
@Consumes({ MediaType.APPLICATION_JSON, MediaType.MULTIPART_FORM_DATA })
|
||||
@Consumes({ MediaType.APPLICATION_JSON, "application/zip", MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation import_(
|
||||
@FormDataParam("file") InputStream filedataStream,
|
||||
@ -29,16 +29,16 @@ public interface AppDefinitionsJerseyApi {
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionRepresentation import_(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
@FormDataParam("file") InputStream filedataStream,
|
||||
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
@FormDataParam("file") InputStream filedataStream,
|
||||
@ -46,10 +46,10 @@ public interface AppDefinitionsJerseyApi {
|
||||
|
||||
@POST
|
||||
@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 })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
@PathParam("modelId") String modelId,
|
||||
@PathParam("modelId") Long appId,
|
||||
@FormDataParam("file") InputStream filedataStream,
|
||||
@FormDataParam("file") FormDataContentDisposition filedataDisposition);
|
||||
|
||||
|
@ -31,11 +31,7 @@ public interface ModelsApi {
|
||||
public ResultListDataRepresentation get(
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("modelType") int modelType,
|
||||
@QueryParam("referenceId") int referenceId);
|
||||
|
||||
default ResultListDataRepresentation get(ModelType modelType, String filter, String sort) {
|
||||
return this.get(filter, sort, modelType.getId(), 0);
|
||||
}
|
||||
@QueryParam("modelType") Integer modelType,
|
||||
@QueryParam("referenceId") Long referenceId);
|
||||
|
||||
}
|
||||
|
@ -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