Compare commits

...

7 Commits

Author SHA1 Message Date
44d87548bf v2.0.17 pom 2023-11-16 11:38:52 -05:00
775498670e Merge branch 'develop' into stable 2023-11-16 11:38:33 -05:00
c0916958f0 added @Consumes multipart/form-data for TemplatesApi 2023-11-16 11:34:53 -05:00
9ba16c4b3b v2.0.16 pom 2023-11-16 09:25:24 -05:00
8937539a77 Merge branch 'develop' into stable 2023-11-16 09:21:57 -05:00
09aabea4e3 int$64 is long 2023-11-16 09:20:22 -05:00
93c593bb41 added ModelsApi get 2023-11-15 20:16:10 -05:00
5 changed files with 49 additions and 31 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-api</artifactId>
<version>2.0.15</version>
<version>2.0.17</version>
<name>Alfresco Process Services ReST API for Java</name>
<description>An APS API library for building REST API clients that support both the CXF and Jersey frameworks</description>

View File

@@ -16,10 +16,12 @@ package com.inteligr8.alfresco.activiti.api;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
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")
public interface ModelsApi {
@@ -40,8 +42,14 @@ public interface ModelsApi {
}
@GET
@Path("{id}")
@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("sort") String sort,
@QueryParam("modelType") Integer modelType,

View File

@@ -14,6 +14,7 @@
*/
package com.inteligr8.alfresco.activiti.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -34,6 +35,7 @@ public interface TemplatesCxfApi extends TemplatesApi {
@POST
@Path("admin/document-templates")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
public DocumentTemplateLight createDocumentTemplate(
@QueryParam("tenantId") Long tenantId,
@@ -41,6 +43,7 @@ public interface TemplatesCxfApi extends TemplatesApi {
@POST
@Path("admin/document-templates/{templateId}")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
public DocumentTemplateLight updateDocumentTemplate(
@PathParam("templateId") long id,

View File

@@ -14,6 +14,7 @@
*/
package com.inteligr8.alfresco.activiti.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -34,6 +35,7 @@ public interface TemplatesJerseyApi extends TemplatesApi {
@POST
@Path("admin/document-templates")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
public DocumentTemplateLight createDocumentTemplate(
@QueryParam("tenantId") Long tenantId,
@@ -41,6 +43,7 @@ public interface TemplatesJerseyApi extends TemplatesApi {
@POST
@Path("admin/document-templates/{templateId}")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
public DocumentTemplateLight updateDocumentTemplate(
@PathParam("templateId") long id,

View File

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