Merge branch 'develop' into stable

This commit is contained in:
Brian Long 2023-11-16 09:21:57 -05:00
commit 8937539a77
2 changed files with 42 additions and 30 deletions

View File

@ -16,10 +16,12 @@ package com.inteligr8.alfresco.activiti.api;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation; import com.inteligr8.activiti.model.ResultList;
import com.inteligr8.alfresco.activiti.model.ModelRepresentation;
@Path("/api/enterprise/models") @Path("/api/enterprise/models")
public interface ModelsApi { public interface ModelsApi {
@ -40,8 +42,14 @@ public interface ModelsApi {
} }
@GET @GET
@Path("{id}")
@Produces({ "application/json" }) @Produces({ "application/json" })
public ResultListDataRepresentation get( public ModelRepresentation get(
@PathParam("id") String id);
@GET
@Produces({ "application/json" })
public ResultList<ModelRepresentation> get(
@QueryParam("filter") String filter, @QueryParam("filter") String filter,
@QueryParam("sort") String sort, @QueryParam("sort") String sort,
@QueryParam("modelType") Integer modelType, @QueryParam("modelType") Integer modelType,

View File

@ -1,10 +1,13 @@
package com.inteligr8.alfresco.activiti.model; package com.inteligr8.alfresco.activiti.model;
import java.time.OffsetDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -42,7 +45,7 @@ public class ModelRepresentation {
@JsonProperty("comment") @JsonProperty("comment")
private String comment; private String comment;
@JsonProperty("createdBy") @JsonProperty("createdBy")
private Integer createdBy; private Long createdBy;
@JsonProperty("createdByFullName") @JsonProperty("createdByFullName")
private String createdByFullName; private String createdByFullName;
@JsonProperty("description") @JsonProperty("description")
@ -50,11 +53,12 @@ public class ModelRepresentation {
@JsonProperty("favorite") @JsonProperty("favorite")
private Boolean favorite; private Boolean favorite;
@JsonProperty("id") @JsonProperty("id")
private Integer id; private Long id;
@JsonProperty("lastUpdated") @JsonProperty("lastUpdated")
private String lastUpdated; @JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
private OffsetDateTime lastUpdated;
@JsonProperty("lastUpdatedBy") @JsonProperty("lastUpdatedBy")
private Integer lastUpdatedBy; private Long lastUpdatedBy;
@JsonProperty("lastUpdatedByFullName") @JsonProperty("lastUpdatedByFullName")
private String lastUpdatedByFullName; private String lastUpdatedByFullName;
@JsonProperty("latestVersion") @JsonProperty("latestVersion")
@ -66,11 +70,11 @@ public class ModelRepresentation {
@JsonProperty("permission") @JsonProperty("permission")
private String permission; private String permission;
@JsonProperty("referenceId") @JsonProperty("referenceId")
private Integer referenceId; private Long referenceId;
@JsonProperty("stencilSet") @JsonProperty("stencilSet")
private Integer stencilSet; private Long stencilSet;
@JsonProperty("tenantId") @JsonProperty("tenantId")
private Integer tenantId; private Long tenantId;
@JsonProperty("version") @JsonProperty("version")
private Integer version; private Integer version;
@JsonIgnore @JsonIgnore
@ -92,16 +96,16 @@ public class ModelRepresentation {
} }
@JsonProperty("createdBy") @JsonProperty("createdBy")
public Integer getCreatedBy() { public Long getCreatedBy() {
return createdBy; return createdBy;
} }
@JsonProperty("createdBy") @JsonProperty("createdBy")
public void setCreatedBy(Integer createdBy) { public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
public ModelRepresentation withCreatedBy(Integer createdBy) { public ModelRepresentation withCreatedBy(Long createdBy) {
this.createdBy = createdBy; this.createdBy = createdBy;
return this; return this;
} }
@ -152,46 +156,46 @@ public class ModelRepresentation {
} }
@JsonProperty("id") @JsonProperty("id")
public Integer getId() { public Long getId() {
return id; return id;
} }
@JsonProperty("id") @JsonProperty("id")
public void setId(Integer id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public ModelRepresentation withId(Integer id) { public ModelRepresentation withId(Long id) {
this.id = id; this.id = id;
return this; return this;
} }
@JsonProperty("lastUpdated") @JsonProperty("lastUpdated")
public String getLastUpdated() { public OffsetDateTime getLastUpdated() {
return lastUpdated; return lastUpdated;
} }
@JsonProperty("lastUpdated") @JsonProperty("lastUpdated")
public void setLastUpdated(String lastUpdated) { public void setLastUpdated(OffsetDateTime lastUpdated) {
this.lastUpdated = lastUpdated; this.lastUpdated = lastUpdated;
} }
public ModelRepresentation withLastUpdated(String lastUpdated) { public ModelRepresentation withLastUpdated(OffsetDateTime lastUpdated) {
this.lastUpdated = lastUpdated; this.lastUpdated = lastUpdated;
return this; return this;
} }
@JsonProperty("lastUpdatedBy") @JsonProperty("lastUpdatedBy")
public Integer getLastUpdatedBy() { public Long getLastUpdatedBy() {
return lastUpdatedBy; return lastUpdatedBy;
} }
@JsonProperty("lastUpdatedBy") @JsonProperty("lastUpdatedBy")
public void setLastUpdatedBy(Integer lastUpdatedBy) { public void setLastUpdatedBy(Long lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy; this.lastUpdatedBy = lastUpdatedBy;
} }
public ModelRepresentation withLastUpdatedBy(Integer lastUpdatedBy) { public ModelRepresentation withLastUpdatedBy(Long lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy; this.lastUpdatedBy = lastUpdatedBy;
return this; return this;
} }
@ -272,46 +276,46 @@ public class ModelRepresentation {
} }
@JsonProperty("referenceId") @JsonProperty("referenceId")
public Integer getReferenceId() { public Long getReferenceId() {
return referenceId; return referenceId;
} }
@JsonProperty("referenceId") @JsonProperty("referenceId")
public void setReferenceId(Integer referenceId) { public void setReferenceId(Long referenceId) {
this.referenceId = referenceId; this.referenceId = referenceId;
} }
public ModelRepresentation withReferenceId(Integer referenceId) { public ModelRepresentation withReferenceId(Long referenceId) {
this.referenceId = referenceId; this.referenceId = referenceId;
return this; return this;
} }
@JsonProperty("stencilSet") @JsonProperty("stencilSet")
public Integer getStencilSet() { public Long getStencilSet() {
return stencilSet; return stencilSet;
} }
@JsonProperty("stencilSet") @JsonProperty("stencilSet")
public void setStencilSet(Integer stencilSet) { public void setStencilSet(Long stencilSet) {
this.stencilSet = stencilSet; this.stencilSet = stencilSet;
} }
public ModelRepresentation withStencilSet(Integer stencilSet) { public ModelRepresentation withStencilSet(Long stencilSet) {
this.stencilSet = stencilSet; this.stencilSet = stencilSet;
return this; return this;
} }
@JsonProperty("tenantId") @JsonProperty("tenantId")
public Integer getTenantId() { public Long getTenantId() {
return tenantId; return tenantId;
} }
@JsonProperty("tenantId") @JsonProperty("tenantId")
public void setTenantId(Integer tenantId) { public void setTenantId(Long tenantId) {
this.tenantId = tenantId; this.tenantId = tenantId;
} }
public ModelRepresentation withTenantId(Integer tenantId) { public ModelRepresentation withTenantId(Long tenantId) {
this.tenantId = tenantId; this.tenantId = tenantId;
return this; return this;
} }