use @BeanParam for queries
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
package com.inteligr8.activiti.api;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import com.inteligr8.activiti.model.Job;
|
||||
import com.inteligr8.activiti.model.JobsQueryParams;
|
||||
import com.inteligr8.activiti.model.ProcessInstanceAction;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.activiti.model.SortOrder;
|
||||
|
||||
import jakarta.ws.rs.BeanParam;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.DELETE;
|
||||
import jakarta.ws.rs.GET;
|
||||
@@ -29,7 +29,6 @@ import jakarta.ws.rs.POST;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
public interface BaseJobsApi {
|
||||
@@ -61,110 +60,6 @@ public interface BaseJobsApi {
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("withoutTenantId") Boolean withoutTenatId,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("withException") Boolean withException,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("exceptionMessage") String exceptionMessage,
|
||||
@QueryParam("withoutTenantId") Boolean withoutTenatId,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("withException") Boolean withException,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("exceptionMessage") String exceptionMessage,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("id") String jobId,
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("withException") Boolean withException,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("exceptionMessage") String exceptionMessage,
|
||||
@QueryParam("withoutTenantId") Boolean withoutTenatId,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<Job> queryJobs(
|
||||
@QueryParam("id") String jobId,
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("executionId") String executionId,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("withRetriesLeft") Boolean withRetriesLeft,
|
||||
@QueryParam("executable") Boolean executable,
|
||||
@QueryParam("withException") Boolean withException,
|
||||
@QueryParam("dueBefore") LocalDate dueBefore,
|
||||
@QueryParam("dueAfter") LocalDate dueAfter,
|
||||
@QueryParam("exceptionMessage") String exceptionMessage,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
@BeanParam JobsQueryParams jobsConstraint);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.inteligr8.activiti.model.Execution;
|
||||
import com.inteligr8.activiti.model.ExecutionsQueryParams;
|
||||
import com.inteligr8.activiti.model.ProcessInstanceAction;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.activiti.model.SortOrder;
|
||||
import com.inteligr8.activiti.model.Variable;
|
||||
import com.inteligr8.activiti.model.VariableScope;
|
||||
|
||||
import jakarta.ws.rs.BeanParam;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.POST;
|
||||
@@ -46,13 +48,6 @@ public interface ExecutionApi {
|
||||
@JsonProperty("processDefinitionKey")
|
||||
ProcessDefinitionKey;
|
||||
}
|
||||
|
||||
public enum VariableScope {
|
||||
@JsonProperty("local")
|
||||
Local,
|
||||
@JsonProperty("global")
|
||||
Global,
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{executionId}")
|
||||
@@ -76,56 +71,8 @@ public interface ExecutionApi {
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
ResultList<Execution> getByTenant(
|
||||
@QueryParam("id") String executionId,
|
||||
@QueryParam("activityId") String activityId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("messageEventSubscriptionName") String messageEventSubscriptionName,
|
||||
@QueryParam("signalEventSubscriptionName") String signalEventSubscriptionName,
|
||||
@QueryParam("parentId") String parentId,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
ResultList<Execution> getByTenants(
|
||||
@QueryParam("id") String executionId,
|
||||
@QueryParam("activityId") String activityId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("messageEventSubscriptionName") String messageEventSubscriptionName,
|
||||
@QueryParam("signalEventSubscriptionName") String signalEventSubscriptionName,
|
||||
@QueryParam("parentId") String parentId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
ResultList<Execution> getByAny(
|
||||
@QueryParam("id") String executionId,
|
||||
@QueryParam("activityId") String activityId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("processInstanceId") String processInstanceId,
|
||||
@QueryParam("messageEventSubscriptionName") String messageEventSubscriptionName,
|
||||
@QueryParam("signalEventSubscriptionName") String signalEventSubscriptionName,
|
||||
@QueryParam("parentId") String parentId,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("withoutTenantId") Boolean withoutTenantId,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
ResultList<Execution> query(
|
||||
@BeanParam ExecutionsQueryParams params);
|
||||
|
||||
@GET
|
||||
@Path("{executionId}/variables")
|
||||
|
||||
@@ -14,19 +14,18 @@
|
||||
*/
|
||||
package com.inteligr8.activiti.api;
|
||||
|
||||
import com.inteligr8.activiti.api.ProcessInstanceApi.Sort;
|
||||
import com.inteligr8.activiti.model.ProcessDefinition;
|
||||
import com.inteligr8.activiti.model.ProcessDefinitionAction;
|
||||
import com.inteligr8.activiti.model.ProcessDefinitionsQueryParams;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.activiti.model.SortOrder;
|
||||
|
||||
import jakarta.ws.rs.BeanParam;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.GET;
|
||||
import jakarta.ws.rs.PUT;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/api/repository/process-definitions")
|
||||
@@ -47,26 +46,7 @@ public interface ProcessDefinitionApi {
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<ProcessDefinition> getByAny(
|
||||
@QueryParam("category") String category,
|
||||
@QueryParam("categoryLike") String categoryLike,
|
||||
@QueryParam("categoryNotEquals") String categoryNotEquals,
|
||||
@QueryParam("key") String key,
|
||||
@QueryParam("keyLike") String keyLike,
|
||||
@QueryParam("name") String name,
|
||||
@QueryParam("nameLike") String nameLike,
|
||||
@QueryParam("resourceName") String resourceName,
|
||||
@QueryParam("resourceNameLike") String resourceNameLike,
|
||||
@QueryParam("version") String version,
|
||||
@QueryParam("suspended") Boolean suspended,
|
||||
@QueryParam("latest") Boolean latest,
|
||||
@QueryParam("deploymentId") String deploymentId,
|
||||
@QueryParam("startableByUser") String startableByUser,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
public ResultList<ProcessDefinition> query(
|
||||
@BeanParam ProcessDefinitionsQueryParams params);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,12 +18,13 @@ import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.inteligr8.activiti.model.ProcessInstance;
|
||||
import com.inteligr8.activiti.model.ProcessInstanceAction;
|
||||
import com.inteligr8.activiti.model.ProcessInstancesQueryParams;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.activiti.model.SortOrder;
|
||||
import com.inteligr8.activiti.model.Variable;
|
||||
import com.inteligr8.alfresco.activiti.model.ProcessInstance;
|
||||
|
||||
import jakarta.ws.rs.BeanParam;
|
||||
import jakarta.ws.rs.Consumes;
|
||||
import jakarta.ws.rs.DELETE;
|
||||
import jakarta.ws.rs.GET;
|
||||
@@ -32,7 +33,6 @@ import jakarta.ws.rs.PUT;
|
||||
import jakarta.ws.rs.Path;
|
||||
import jakarta.ws.rs.PathParam;
|
||||
import jakarta.ws.rs.Produces;
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
import jakarta.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/api/runtime/process-instances")
|
||||
@@ -69,62 +69,8 @@ public interface ProcessInstanceApi {
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<ProcessInstance> getByTenant(
|
||||
@QueryParam("id") String processInstanceId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("businessKey") String businessKey,
|
||||
@QueryParam("involvedUser") String involvedUser,
|
||||
@QueryParam("suspended") Boolean suspended,
|
||||
@QueryParam("superProcessInstanceId") String superProcessInstanceId,
|
||||
@QueryParam("subProcessInstanceId") String subProcessInstanceId,
|
||||
@QueryParam("excludeSubprocesses") Boolean excludeSubprocesses,
|
||||
@QueryParam("includeProcessVariables") Boolean includeProcessVariables,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<ProcessInstance> getByTenants(
|
||||
@QueryParam("id") String processInstanceId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("businessKey") String businessKey,
|
||||
@QueryParam("involvedUser") String involvedUser,
|
||||
@QueryParam("suspended") Boolean suspended,
|
||||
@QueryParam("superProcessInstanceId") String superProcessInstanceId,
|
||||
@QueryParam("subProcessInstanceId") String subProcessInstanceId,
|
||||
@QueryParam("excludeSubprocesses") Boolean excludeSubprocesses,
|
||||
@QueryParam("includeProcessVariables") Boolean includeProcessVariables,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
|
||||
@GET
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<ProcessInstance> getByAny(
|
||||
@QueryParam("id") String processInstanceId,
|
||||
@QueryParam("processDefinitionKey") String processDefinitionKey,
|
||||
@QueryParam("processDefinitionId") String processDefinitionId,
|
||||
@QueryParam("businessKey") String businessKey,
|
||||
@QueryParam("involvedUser") String involvedUser,
|
||||
@QueryParam("suspended") Boolean suspended,
|
||||
@QueryParam("superProcessInstanceId") String superProcessInstanceId,
|
||||
@QueryParam("subProcessInstanceId") String subProcessInstanceId,
|
||||
@QueryParam("excludeSubprocesses") Boolean excludeSubprocesses,
|
||||
@QueryParam("includeProcessVariables") Boolean includeProcessVariables,
|
||||
@QueryParam("tenantId") String tenantId,
|
||||
@QueryParam("tenantIdLike") String tenantIdLike,
|
||||
@QueryParam("withoutTenantId") Boolean withoutTenantId,
|
||||
@QueryParam("sort") Sort sort,
|
||||
@QueryParam("order") SortOrder sortOrder,
|
||||
@QueryParam("start") Integer pageStart,
|
||||
@QueryParam("size") Integer pageSize);
|
||||
public ResultList<ProcessInstance> query(
|
||||
@BeanParam ProcessInstancesQueryParams params);
|
||||
|
||||
@GET
|
||||
@Path("{processInstanceId}/diagram")
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.inteligr8.activiti.jackson;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
public class CollectionJsonSerializer extends JsonSerializer<Collection<?>> {
|
||||
|
||||
@Override
|
||||
public void serialize(Collection<?> values, JsonGenerator gen, SerializerProvider serializers) throws IOException {
|
||||
if (values == null) {
|
||||
gen.writeNull();
|
||||
} else if (values.isEmpty()) {
|
||||
gen.writeString("");
|
||||
} else {
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (Object value : values)
|
||||
str.append(value).append(',');
|
||||
str.deleteCharAt(str.length()-1);
|
||||
gen.writeString(str.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.inteligr8.activiti.jackson;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.core.JacksonException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
|
||||
public class StringListJsonDeserializer extends JsonDeserializer<List<String>> {
|
||||
|
||||
@Override
|
||||
public List<String> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
|
||||
String values = ctxt.readValue(p, String.class);
|
||||
if (values == null)
|
||||
return null;
|
||||
return Arrays.asList(values.split(","));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.inteligr8.activiti.jakarta;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
import jakarta.ws.rs.ext.ParamConverter;
|
||||
|
||||
public class OffsetDateTimeConverter implements ParamConverter<OffsetDateTime> {
|
||||
|
||||
private final DateTimeFormatter formatter;
|
||||
|
||||
public OffsetDateTimeConverter(DateTimeFormatter formatter) {
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OffsetDateTime fromString(String value) {
|
||||
if (value == null)
|
||||
return null;
|
||||
return OffsetDateTime.parse(value, this.formatter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(OffsetDateTime value) {
|
||||
if (value == null)
|
||||
return null;
|
||||
return value.format(this.formatter);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.inteligr8.activiti.jakarta;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Type;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
import jakarta.ws.rs.ext.ParamConverter;
|
||||
import jakarta.ws.rs.ext.ParamConverterProvider;
|
||||
|
||||
public class OffsetDateTimeConverterProvider implements ParamConverterProvider {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
|
||||
if (OffsetDateTime.class.isAssignableFrom(rawType)) {
|
||||
return (ParamConverter<T>) new OffsetDateTimeConverter(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXX"));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public enum DelegationState {
|
||||
|
||||
@JsonProperty("pending")
|
||||
Pending,
|
||||
@JsonProperty("resolved")
|
||||
Resolved
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
public class ExecutionsQueryParams extends QueryParams<ExecutionsQueryParams> {
|
||||
|
||||
@QueryParam("id")
|
||||
private String id;
|
||||
@QueryParam("activityId")
|
||||
private String activityId;
|
||||
@QueryParam("processInstanceId")
|
||||
private String processInstanceId;
|
||||
@QueryParam("processDefinitionId")
|
||||
private String processDefinitionId;
|
||||
@QueryParam("processDefinitionKey")
|
||||
private String processDefinitionKey;
|
||||
@QueryParam("messageEventSubscriptionName")
|
||||
private String messageEventSubscriptionName;
|
||||
@QueryParam("signalEventSubscriptionName")
|
||||
private String signalEventSubscriptionName;
|
||||
@QueryParam("parentId")
|
||||
private String parentId;
|
||||
@QueryParam("tenantId")
|
||||
private String tenantId;
|
||||
@QueryParam("tenantIdLike")
|
||||
private String tenantIdLike;
|
||||
@QueryParam("withoutTenantId")
|
||||
private Boolean withoutTenantId;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public ExecutionsQueryParams() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public void setActivityId(String activityId) {
|
||||
this.activityId = activityId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withActivityId(String activityId) {
|
||||
this.activityId = activityId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionKey() {
|
||||
return processDefinitionKey;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMessageEventSubscriptionName() {
|
||||
return messageEventSubscriptionName;
|
||||
}
|
||||
|
||||
public void setMessageEventSubscriptionName(String messageEventSubscriptionName) {
|
||||
this.messageEventSubscriptionName = messageEventSubscriptionName;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withMessageEventSubscriptionName(String messageEventSubscriptionName) {
|
||||
this.messageEventSubscriptionName = messageEventSubscriptionName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSignalEventSubscriptionName() {
|
||||
return signalEventSubscriptionName;
|
||||
}
|
||||
|
||||
public void setSignalEventSubscriptionName(String signalEventSubscriptionName) {
|
||||
this.signalEventSubscriptionName = signalEventSubscriptionName;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withSignalEventSubscriptionName(String signalEventSubscriptionName) {
|
||||
this.signalEventSubscriptionName = signalEventSubscriptionName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantIdLike() {
|
||||
return tenantIdLike;
|
||||
}
|
||||
|
||||
public void setTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getWithoutTenantId() {
|
||||
return withoutTenantId;
|
||||
}
|
||||
|
||||
public void setWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
}
|
||||
|
||||
public ExecutionsQueryParams withWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -30,8 +30,8 @@ public class Job extends Datum {
|
||||
@JsonProperty("exceptionMessage")
|
||||
private String exceptionMessage;
|
||||
@JsonProperty("dueDate")
|
||||
private OffsetDateTime dueDate;
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
|
||||
private OffsetDateTime dueDate;
|
||||
@JsonProperty("tenantId")
|
||||
private String tenantId;
|
||||
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
public class JobsQueryParams extends QueryParams<JobsQueryParams> {
|
||||
|
||||
@QueryParam("id")
|
||||
private String id;
|
||||
@QueryParam("processInstanceId")
|
||||
private String processInstanceId;
|
||||
@QueryParam("processDefinitionId")
|
||||
private String processDefinitionId;
|
||||
@QueryParam("executionId")
|
||||
private String executionId;
|
||||
@QueryParam("withRetriesLeft")
|
||||
private Boolean withRetriesLeft;
|
||||
@QueryParam("executable")
|
||||
private Boolean executable;
|
||||
@QueryParam("withException")
|
||||
private Boolean withException;
|
||||
@QueryParam("dueAfter")
|
||||
private OffsetDateTime dueAfter;
|
||||
@QueryParam("dueBefore")
|
||||
private OffsetDateTime dueBefore;
|
||||
@QueryParam("exceptionMessage")
|
||||
private String exceptionMessage;
|
||||
@QueryParam("tenantId")
|
||||
private String tenantId;
|
||||
@QueryParam("tenantIdLike")
|
||||
private String tenantIdLike;
|
||||
@QueryParam("withoutTenantId")
|
||||
private Boolean withoutTenantId;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public JobsQueryParams() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public JobsQueryParams withId(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public JobsQueryParams withProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public JobsQueryParams withProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExecutionId() {
|
||||
return executionId;
|
||||
}
|
||||
|
||||
public void setExecutionId(String executionId) {
|
||||
this.executionId = executionId;
|
||||
}
|
||||
|
||||
public JobsQueryParams withExecutionId(String executionId) {
|
||||
this.executionId = executionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getWithRetriesLeft() {
|
||||
return withRetriesLeft;
|
||||
}
|
||||
|
||||
public void setWithRetriesLeft(Boolean withRetriesLeft) {
|
||||
this.withRetriesLeft = withRetriesLeft;
|
||||
}
|
||||
|
||||
public JobsQueryParams withRetriesLeft(Boolean withRetriesLeft) {
|
||||
this.withRetriesLeft = withRetriesLeft;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getExecutable() {
|
||||
return executable;
|
||||
}
|
||||
|
||||
public void setExecutable(Boolean executable) {
|
||||
this.executable = executable;
|
||||
}
|
||||
|
||||
public JobsQueryParams withExecutable(Boolean executable) {
|
||||
this.executable = executable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getWithException() {
|
||||
return withException;
|
||||
}
|
||||
|
||||
public void setWithException(Boolean withException) {
|
||||
this.withException = withException;
|
||||
}
|
||||
|
||||
public JobsQueryParams withException(Boolean withException) {
|
||||
this.withException = withException;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDueBefore() {
|
||||
return dueBefore;
|
||||
}
|
||||
|
||||
public void setDueBefore(OffsetDateTime dueBefore) {
|
||||
this.dueBefore = dueBefore;
|
||||
}
|
||||
|
||||
public JobsQueryParams withDueBefore(OffsetDateTime dueBefore) {
|
||||
this.dueBefore = dueBefore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getDueAfter() {
|
||||
return dueAfter;
|
||||
}
|
||||
|
||||
public void setDueAfter(OffsetDateTime dueAfter) {
|
||||
this.dueAfter = dueAfter;
|
||||
}
|
||||
|
||||
public JobsQueryParams withDueAfter(OffsetDateTime dueAfter) {
|
||||
this.dueAfter = dueAfter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExceptionMessage() {
|
||||
return exceptionMessage;
|
||||
}
|
||||
|
||||
public void setExceptionMessage(String exceptionMessage) {
|
||||
this.exceptionMessage = exceptionMessage;
|
||||
}
|
||||
|
||||
public JobsQueryParams withExceptionMessage(String exceptionMessage) {
|
||||
this.exceptionMessage = exceptionMessage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public JobsQueryParams withTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantIdLike() {
|
||||
return tenantIdLike;
|
||||
}
|
||||
|
||||
public void setTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
}
|
||||
|
||||
public JobsQueryParams withTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getWithoutTenantId() {
|
||||
return withoutTenantId;
|
||||
}
|
||||
|
||||
public void setWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
}
|
||||
|
||||
public JobsQueryParams withWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
public class ProcessDefinitionsQueryParams extends QueryParams<ProcessDefinitionsQueryParams> {
|
||||
|
||||
@QueryParam("category")
|
||||
private String category;
|
||||
@QueryParam("categoryLike")
|
||||
private String categoryLike;
|
||||
@QueryParam("categoryNotEquals")
|
||||
private String categoryNotEquals;
|
||||
@QueryParam("key")
|
||||
private String key;
|
||||
@QueryParam("keyLike")
|
||||
private String keyLike;
|
||||
@QueryParam("name")
|
||||
private String name;
|
||||
@QueryParam("nameLike")
|
||||
private String nameLike;
|
||||
@QueryParam("resourceName")
|
||||
private String resourceName;
|
||||
@QueryParam("resourceNameLike")
|
||||
private String resourceNameLike;
|
||||
@QueryParam("version")
|
||||
private String version;
|
||||
@QueryParam("suspended")
|
||||
private Boolean suspended;
|
||||
@QueryParam("latest")
|
||||
private Boolean latest;
|
||||
@QueryParam("deploymentId")
|
||||
private String deploymentId;
|
||||
@QueryParam("startableByUser")
|
||||
private String startableByUser;
|
||||
@QueryParam("tenantId")
|
||||
private String tenantId;
|
||||
@QueryParam("tenantIdLike")
|
||||
private String tenantIdLike;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public ProcessDefinitionsQueryParams() {
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withCategory(String category) {
|
||||
this.category = category;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCategoryLike() {
|
||||
return categoryLike;
|
||||
}
|
||||
|
||||
public void setCategoryLike(String categoryLike) {
|
||||
this.categoryLike = categoryLike;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withCategoryLike(String categoryLike) {
|
||||
this.categoryLike = categoryLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getCategoryNotEquals() {
|
||||
return categoryNotEquals;
|
||||
}
|
||||
|
||||
public void setCategoryNotEquals(String categoryNotEquals) {
|
||||
this.categoryNotEquals = categoryNotEquals;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withCategoryNotEquals(String categoryNotEquals) {
|
||||
this.categoryNotEquals = categoryNotEquals;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withKey(String key) {
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getKeyLike() {
|
||||
return keyLike;
|
||||
}
|
||||
|
||||
public void setKeyLike(String keyLike) {
|
||||
this.keyLike = keyLike;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withKeyLike(String keyLike) {
|
||||
this.keyLike = keyLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNameLike() {
|
||||
return nameLike;
|
||||
}
|
||||
|
||||
public void setNameLike(String nameLike) {
|
||||
this.nameLike = nameLike;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withNameLike(String nameLike) {
|
||||
this.nameLike = nameLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getResourceName() {
|
||||
return resourceName;
|
||||
}
|
||||
|
||||
public void setResourceName(String resourceName) {
|
||||
this.resourceName = resourceName;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withResourceName(String resourceName) {
|
||||
this.resourceName = resourceName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getResourceNameLike() {
|
||||
return resourceNameLike;
|
||||
}
|
||||
|
||||
public void setResourceNameLike(String resourceNameLike) {
|
||||
this.resourceNameLike = resourceNameLike;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withResourceNameLike(String resourceNameLike) {
|
||||
this.resourceNameLike = resourceNameLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withVersion(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isSuspended() {
|
||||
return suspended;
|
||||
}
|
||||
|
||||
public void setSuspended(Boolean suspended) {
|
||||
this.suspended = suspended;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withSuspended(Boolean suspended) {
|
||||
this.suspended = suspended;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isLatest() {
|
||||
return latest;
|
||||
}
|
||||
|
||||
public void setLatest(Boolean latest) {
|
||||
this.latest = latest;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withLatest(Boolean latest) {
|
||||
this.latest = latest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDeploymentId() {
|
||||
return deploymentId;
|
||||
}
|
||||
|
||||
public void setDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartableByUser() {
|
||||
return startableByUser;
|
||||
}
|
||||
|
||||
public void setStartableByUser(String startableByUser) {
|
||||
this.startableByUser = startableByUser;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withStartableByUser(String startableByUser) {
|
||||
this.startableByUser = startableByUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantIdLike() {
|
||||
return tenantIdLike;
|
||||
}
|
||||
|
||||
public void setTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
}
|
||||
|
||||
public ProcessDefinitionsQueryParams withTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -146,6 +146,19 @@ public class ProcessInstance extends Datum {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionUrl() {
|
||||
return processDefinitionUrl;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionUrl(String processDefinitionUrl) {
|
||||
this.processDefinitionUrl = processDefinitionUrl;
|
||||
}
|
||||
|
||||
public ProcessInstance withProcessDefinitionUrl(String processDefinitionUrl) {
|
||||
this.processDefinitionUrl = processDefinitionUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean getSuspended() {
|
||||
return suspended;
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
public class ProcessInstancesQueryParams extends QueryParams<ProcessDefinitionsQueryParams> {
|
||||
|
||||
@QueryParam("id")
|
||||
private String processInstanceId;
|
||||
@QueryParam("processDefinitionKey")
|
||||
private String processDefinitionKey;
|
||||
@QueryParam("processDefinitionId")
|
||||
private String processDefinitionId;
|
||||
@QueryParam("businessKey")
|
||||
private String businessKey;
|
||||
@QueryParam("involvedUser")
|
||||
private String involvedUser;
|
||||
@QueryParam("suspended")
|
||||
private Boolean suspended;
|
||||
@QueryParam("superProcessInstanceId")
|
||||
private String superProcessInstanceId;
|
||||
@QueryParam("subProcessInstanceId")
|
||||
private String subProcessInstanceId;
|
||||
@QueryParam("excludeSubprocesses")
|
||||
private Boolean excludeSubprocesses;
|
||||
@QueryParam("includeProcessVariables")
|
||||
private Boolean includeProcessVariables;
|
||||
@QueryParam("tenantId")
|
||||
private String tenantId;
|
||||
@QueryParam("tenantIdLike")
|
||||
private String tenantIdLike;
|
||||
@QueryParam("withoutTenantId")
|
||||
private Boolean withoutTenantId;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public ProcessInstancesQueryParams() {
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionKey() {
|
||||
return processDefinitionKey;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getBusinessKey() {
|
||||
return businessKey;
|
||||
}
|
||||
|
||||
public void setBusinessKey(String businessKey) {
|
||||
this.businessKey = businessKey;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withBusinessKey(String businessKey) {
|
||||
this.businessKey = businessKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getInvolvedUser() {
|
||||
return involvedUser;
|
||||
}
|
||||
|
||||
public void setInvolvedUser(String involvedUser) {
|
||||
this.involvedUser = involvedUser;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withInvolvedUser(String involvedUser) {
|
||||
this.involvedUser = involvedUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isSuspended() {
|
||||
return suspended;
|
||||
}
|
||||
|
||||
public void setSuspended(Boolean suspended) {
|
||||
this.suspended = suspended;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withSuspended(Boolean suspended) {
|
||||
this.suspended = suspended;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSuperProcessInstanceId() {
|
||||
return superProcessInstanceId;
|
||||
}
|
||||
|
||||
public void setSuperProcessInstanceId(String superProcessInstanceId) {
|
||||
this.superProcessInstanceId = superProcessInstanceId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withSuperProcessInstanceId(String superProcessInstanceId) {
|
||||
this.superProcessInstanceId = superProcessInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSubProcessInstanceId() {
|
||||
return subProcessInstanceId;
|
||||
}
|
||||
|
||||
public void setSubProcessInstanceId(String subProcessInstanceId) {
|
||||
this.subProcessInstanceId = subProcessInstanceId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withSubProcessInstanceId(String subProcessInstanceId) {
|
||||
this.subProcessInstanceId = subProcessInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isExcludeSubprocesses() {
|
||||
return excludeSubprocesses;
|
||||
}
|
||||
|
||||
public void setExcludeSubprocesses(Boolean excludeSubprocesses) {
|
||||
this.excludeSubprocesses = excludeSubprocesses;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withExcludeSubprocesses(Boolean excludeSubprocesses) {
|
||||
this.excludeSubprocesses = excludeSubprocesses;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isIncludeProcessVariables() {
|
||||
return includeProcessVariables;
|
||||
}
|
||||
|
||||
public void setIncludeProcessVariables(Boolean includeProcessVariables) {
|
||||
this.includeProcessVariables = includeProcessVariables;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withIncludeProcessVariables(Boolean includeProcessVariables) {
|
||||
this.includeProcessVariables = includeProcessVariables;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantIdLike() {
|
||||
return tenantIdLike;
|
||||
}
|
||||
|
||||
public void setTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isWithoutTenantId() {
|
||||
return withoutTenantId;
|
||||
}
|
||||
|
||||
public void setWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
}
|
||||
|
||||
public ProcessInstancesQueryParams withWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import jakarta.ws.rs.QueryParam;
|
||||
|
||||
public class QueryParams<C extends QueryParams<?>> {
|
||||
|
||||
@QueryParam("sort")
|
||||
private String sortField;
|
||||
@QueryParam("order")
|
||||
private SortOrder sortDirection;
|
||||
@QueryParam("start")
|
||||
private Integer startIndex;
|
||||
@QueryParam("size")
|
||||
private Integer maxSize;
|
||||
|
||||
public String getSortField() {
|
||||
return sortField;
|
||||
}
|
||||
|
||||
public void setSortField(String sortField) {
|
||||
this.sortField = sortField;
|
||||
}
|
||||
|
||||
public C withSortField(String sortField) {
|
||||
this.sortField = sortField;
|
||||
return this.castThis();
|
||||
}
|
||||
|
||||
public SortOrder getSortDirection() {
|
||||
return sortDirection;
|
||||
}
|
||||
|
||||
public void setSortDirection(SortOrder sortDirection) {
|
||||
this.sortDirection = sortDirection;
|
||||
}
|
||||
|
||||
public C withSortDirection(SortOrder sortDirection) {
|
||||
this.sortDirection = sortDirection;
|
||||
return this.castThis();
|
||||
}
|
||||
|
||||
public Integer getStartIndex() {
|
||||
return startIndex;
|
||||
}
|
||||
|
||||
public void setStartIndex(Integer startIndex) {
|
||||
this.startIndex = startIndex;
|
||||
}
|
||||
|
||||
public C withStartIndex(Integer startIndex) {
|
||||
this.startIndex = startIndex;
|
||||
return this.castThis();
|
||||
}
|
||||
|
||||
public Integer getMaxSize() {
|
||||
return maxSize;
|
||||
}
|
||||
|
||||
public void setMaxSize(Integer maxSize) {
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
public C withMaxSize(Integer maxSize) {
|
||||
this.maxSize = maxSize;
|
||||
return this.castThis();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected C castThis() {
|
||||
return (C) this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class Variable {
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("scope")
|
||||
private String scope;
|
||||
private VariableScope scope;
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
@JsonProperty("value")
|
||||
@@ -28,7 +28,7 @@ public class Variable {
|
||||
public Variable() {
|
||||
}
|
||||
|
||||
public Variable(String name, String scope, String type, Object value) {
|
||||
public Variable(String name, VariableScope scope, String type, Object value) {
|
||||
this.name = name;
|
||||
this.scope = scope;
|
||||
this.type = type;
|
||||
@@ -48,15 +48,15 @@ public class Variable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getScope() {
|
||||
public VariableScope getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
public void setScope(String scope) {
|
||||
public void setScope(VariableScope scope) {
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
public Variable withScope(String scope) {
|
||||
public Variable withScope(VariableScope scope) {
|
||||
this.scope = scope;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.inteligr8.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public enum VariableScope {
|
||||
|
||||
@JsonProperty("local")
|
||||
Task,
|
||||
@JsonProperty("global")
|
||||
ProcessInstance
|
||||
|
||||
}
|
||||
@@ -61,13 +61,13 @@ public class Task extends Datum {
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
@JsonProperty("dueDate")
|
||||
private OffsetDateTime dueDate;
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
|
||||
private OffsetDateTime dueDate;
|
||||
@JsonProperty("duration")
|
||||
private Long duration;
|
||||
@JsonProperty("endDate")
|
||||
private OffsetDateTime endDate;
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
|
||||
private OffsetDateTime endDate;
|
||||
@JsonProperty("executionId")
|
||||
private String executionId;
|
||||
@JsonProperty("formKey")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.inteligr8.activiti.model.VariableScope;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Variable extends com.inteligr8.activiti.model.Variable {
|
||||
@@ -11,7 +12,7 @@ public class Variable extends com.inteligr8.activiti.model.Variable {
|
||||
public Variable() {
|
||||
}
|
||||
|
||||
public Variable(String name, String scope, String type, Object value) {
|
||||
public Variable(String name, VariableScope scope, String type, Object value) {
|
||||
super(name, scope, type, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user