fixed activiti ProcessDefinitionApi
This commit is contained in:
parent
16553363ab
commit
8440b9ec44
@ -15,12 +15,11 @@
|
|||||||
package com.inteligr8.activiti.api;
|
package com.inteligr8.activiti.api;
|
||||||
|
|
||||||
import com.inteligr8.activiti.api.ProcessInstanceApi.Sort;
|
import com.inteligr8.activiti.api.ProcessInstanceApi.Sort;
|
||||||
|
import com.inteligr8.activiti.model.ProcessDefinition;
|
||||||
import com.inteligr8.activiti.model.ProcessDefinitionAction;
|
import com.inteligr8.activiti.model.ProcessDefinitionAction;
|
||||||
import com.inteligr8.activiti.model.ResultList;
|
import com.inteligr8.activiti.model.ResultList;
|
||||||
import com.inteligr8.activiti.model.SortOrder;
|
import com.inteligr8.activiti.model.SortOrder;
|
||||||
import com.inteligr8.activiti.model.ProcessDefinitionAction.ActionValue;
|
import com.inteligr8.activiti.model.ProcessDefinitionAction.ActionValue;
|
||||||
import com.inteligr8.alfresco.activiti.model.ProcessDefinition;
|
|
||||||
import com.inteligr8.alfresco.activiti.model.ProcessInstance;
|
|
||||||
|
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@ -57,7 +56,7 @@ public interface ProcessDefinitionApi {
|
|||||||
@PathParam("processDefinitionId") String processDefinitionId,
|
@PathParam("processDefinitionId") String processDefinitionId,
|
||||||
ProcessDefinitionAction action);
|
ProcessDefinitionAction action);
|
||||||
|
|
||||||
default ResultList<ProcessInstance> getByTenant(
|
default ResultList<ProcessDefinition> getByTenant(
|
||||||
String category,
|
String category,
|
||||||
String categoryLike,
|
String categoryLike,
|
||||||
String categoryNotEquals,
|
String categoryNotEquals,
|
||||||
@ -83,7 +82,7 @@ public interface ProcessDefinitionApi {
|
|||||||
tenantId, null, sort, sortOrder, pageStart, pageSize);
|
tenantId, null, sort, sortOrder, pageStart, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
default ResultList<ProcessInstance> getByTenants(
|
default ResultList<ProcessDefinition> getByTenants(
|
||||||
String category,
|
String category,
|
||||||
String categoryLike,
|
String categoryLike,
|
||||||
String categoryNotEquals,
|
String categoryNotEquals,
|
||||||
@ -111,7 +110,7 @@ public interface ProcessDefinitionApi {
|
|||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
public ResultList<ProcessInstance> getByAny(
|
public ResultList<ProcessDefinition> getByAny(
|
||||||
@QueryParam("category") String category,
|
@QueryParam("category") String category,
|
||||||
@QueryParam("categoryLike") String categoryLike,
|
@QueryParam("categoryLike") String categoryLike,
|
||||||
@QueryParam("categoryNotEquals") String categoryNotEquals,
|
@QueryParam("categoryNotEquals") String categoryNotEquals,
|
||||||
|
@ -0,0 +1,243 @@
|
|||||||
|
|
||||||
|
|
||||||
|
package com.inteligr8.activiti.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class ProcessDefinition extends Datum {
|
||||||
|
|
||||||
|
@JsonProperty("category")
|
||||||
|
private String category;
|
||||||
|
@JsonProperty("deploymentId")
|
||||||
|
private String deploymentId;
|
||||||
|
@JsonProperty("deploymentUrl")
|
||||||
|
private String deploymentUrl;
|
||||||
|
@JsonProperty("diagramResource")
|
||||||
|
private String diagramResource;
|
||||||
|
@JsonProperty("description")
|
||||||
|
private String description;
|
||||||
|
@JsonProperty("graphicalNotationDefined")
|
||||||
|
private boolean graphicalNotationDefined;
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
@JsonProperty("key")
|
||||||
|
private String key;
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name;
|
||||||
|
@JsonProperty("resource")
|
||||||
|
private String resource;
|
||||||
|
@JsonProperty("startFormDefined")
|
||||||
|
private boolean startFormDefined;
|
||||||
|
@JsonProperty("suspended")
|
||||||
|
private boolean suspended;
|
||||||
|
@JsonProperty("tenantId")
|
||||||
|
private String tenantId;
|
||||||
|
@JsonProperty("url")
|
||||||
|
private String url;
|
||||||
|
@JsonProperty("version")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No args constructor for use in serialization
|
||||||
|
*/
|
||||||
|
public ProcessDefinition() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeploymentId() {
|
||||||
|
return deploymentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeploymentId(String deploymentId) {
|
||||||
|
this.deploymentId = deploymentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withDeploymentId(String deploymentId) {
|
||||||
|
this.deploymentId = deploymentId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeploymentUrl() {
|
||||||
|
return deploymentUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeploymentUrl(String deploymentUrl) {
|
||||||
|
this.deploymentUrl = deploymentUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withDeploymentUrl(String deploymentUrl) {
|
||||||
|
this.deploymentUrl = deploymentUrl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiagramResource() {
|
||||||
|
return diagramResource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiagramResource(String diagramResource) {
|
||||||
|
this.diagramResource = diagramResource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withDiagramResource(String diagramResource) {
|
||||||
|
this.diagramResource = diagramResource;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGraphicalNotationDefined() {
|
||||||
|
return graphicalNotationDefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGraphicalNotationDefined(boolean graphicalNotationDefined) {
|
||||||
|
this.graphicalNotationDefined = graphicalNotationDefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withGraphicalNotationDefined(boolean graphicalNotationDefined) {
|
||||||
|
this.graphicalNotationDefined = graphicalNotationDefined;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResource() {
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResource(String resource) {
|
||||||
|
this.resource = resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withResource(String resource) {
|
||||||
|
this.resource = resource;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isStartFormDefined() {
|
||||||
|
return startFormDefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartFormDefined(boolean startFormDefined) {
|
||||||
|
this.startFormDefined = startFormDefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withStartFormDefined(boolean startFormDefined) {
|
||||||
|
this.startFormDefined = startFormDefined;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuspended() {
|
||||||
|
return suspended;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuspended(boolean suspended) {
|
||||||
|
this.suspended = suspended;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withSuspended(boolean suspended) {
|
||||||
|
this.suspended = suspended;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTenantId() {
|
||||||
|
return tenantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTenantId(String tenantId) {
|
||||||
|
this.tenantId = tenantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withTenantId(String tenantId) {
|
||||||
|
this.tenantId = tenantId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(Integer version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessDefinition withVersion(Integer version) {
|
||||||
|
this.version = version;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -16,6 +16,12 @@ package com.inteligr8.alfresco.activiti.api;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import com.inteligr8.activiti.model.ResultList;
|
||||||
|
import com.inteligr8.alfresco.activiti.model.AppDefinitionPublishRepresentation;
|
||||||
|
import com.inteligr8.alfresco.activiti.model.AppDefinitionRepresentation;
|
||||||
|
import com.inteligr8.alfresco.activiti.model.AppDefinitionSaveRepresentation;
|
||||||
|
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
||||||
|
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@ -26,22 +32,22 @@ import jakarta.ws.rs.PathParam;
|
|||||||
import jakarta.ws.rs.Produces;
|
import jakarta.ws.rs.Produces;
|
||||||
import jakarta.ws.rs.core.MediaType;
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
|
||||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionPublishRepresentation;
|
@Path("/api/enterprise")
|
||||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionRepresentation;
|
|
||||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionSaveRepresentation;
|
|
||||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
|
||||||
|
|
||||||
@Path("/api/enterprise/app-definitions")
|
|
||||||
public interface AppDefinitionsApi {
|
public interface AppDefinitionsApi {
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("{modelId}")
|
@Path("runtime-app-definitions")
|
||||||
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
|
ResultList<AppDefinitionRepresentation> get();
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("app-definitions/{modelId}")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionRepresentation get(
|
AppDefinitionRepresentation get(
|
||||||
@PathParam("modelId") Long appId);
|
@PathParam("modelId") Long appId);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("{modelId}")
|
@Path("app-definitions/{modelId}")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation update(
|
AppDefinitionUpdateResultRepresentation update(
|
||||||
@ -49,22 +55,29 @@ public interface AppDefinitionsApi {
|
|||||||
AppDefinitionSaveRepresentation updatedModel);
|
AppDefinitionSaveRepresentation updatedModel);
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("{appDefinitionId}")
|
@Path("app-definitions/{appDefinitionId}")
|
||||||
void delete(
|
void delete(
|
||||||
@PathParam("appDefinitionId") Long appId);
|
@PathParam("appDefinitionId") Long appId);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("{modelId}/export")
|
@Path("app-definitions/{modelId}/export")
|
||||||
@Produces({ MediaType.APPLICATION_JSON, "application/zip" })
|
@Produces({ MediaType.APPLICATION_JSON, "application/zip" })
|
||||||
File export(
|
File export(
|
||||||
@PathParam("modelId") Long appId);
|
@PathParam("modelId") Long appId);
|
||||||
|
|
||||||
|
// @POST
|
||||||
|
// @Path("runtime-app-definitions")
|
||||||
|
// @Consumes({ MediaType.APPLICATION_JSON })
|
||||||
|
// @Produces({ MediaType.APPLICATION_JSON })
|
||||||
|
// void publish(
|
||||||
|
// AppDefinitionsRepresentation publishModel);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("{modelId}/publish")
|
@Path("app-definitions/{modelId}/publish")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
AppDefinitionUpdateResultRepresentation publish(
|
AppDefinitionUpdateResultRepresentation publish(
|
||||||
@PathParam("modelId") Long appId,
|
@PathParam("modelId") Long appId,
|
||||||
AppDefinitionPublishRepresentation publishModel);
|
AppDefinitionPublishRepresentation publishModel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user