Compare commits

..

55 Commits

Author SHA1 Message Date
6dff96f35f v2.0.14 pom 2023-11-15 16:30:13 -05:00
09d6f5b885 Merge branch 'develop' into stable 2023-11-15 16:25:43 -05:00
bf779a8d18 v2.0.13 pom 2023-11-13 17:35:23 -05:00
6e0e1eaa1c Merge branch 'develop' into stable 2023-11-13 17:35:08 -05:00
f4183d7897 v2.0.12 pom 2023-11-13 17:14:08 -05:00
cced7e76e4 Merge branch 'develop' into stable 2023-11-13 17:08:53 -05:00
550a01278a v2.0.11 pom 2023-06-01 10:25:17 -04:00
39abfcfc22 Merge branch 'develop' into stable 2023-06-01 10:24:56 -04:00
31b1823b76 v2.0.10 pom 2023-05-30 13:28:28 -04:00
20a9504301 Merge branch 'develop' into stable 2023-05-30 13:28:00 -04:00
b4b57b7594 v2.0.10 pom 2023-05-30 12:46:54 -04:00
6067a2e551 Merge branch 'develop' into stable 2023-05-30 12:46:36 -04:00
dbbf71b692 v2.0.9 pom 2023-05-30 10:53:36 -04:00
8dd46fd1f1 Merge branch 'develop' into stable 2023-05-30 10:53:11 -04:00
12530dd951 v2.0.8 pom 2023-05-28 11:56:05 -04:00
998d69f3b9 Merge branch 'develop' into stable 2023-05-28 11:54:12 -04:00
a358be79fb Merge branch 'develop' into stable 2023-05-27 12:31:08 -04:00
8d2b207886 v2.0.6 pom 2023-01-19 17:06:10 -05:00
cddf59689a Merge branch 'develop' into stable 2023-01-19 17:04:42 -05:00
fd80199050 v2.0.5 pom 2023-01-10 17:07:06 -05:00
e29b460ed4 Merge branch 'develop' into stable 2023-01-10 17:06:24 -05:00
a98005618a v2.0.4 pom 2022-12-02 12:18:38 -05:00
3dcdfe7415 Merge branch 'develop' into stable 2022-12-02 12:16:21 -05:00
1e17f5f638 Merge branch 'develop' into stable 2022-10-03 10:20:23 -04:00
7eba0541b4 Merge branch 'develop' into stable 2022-10-03 09:59:06 -04:00
a1ea5ddf17 v2.0.1 pom 2022-05-03 17:11:54 -04:00
6596bf16b1 Merge branch 'develop' into stable 2022-05-03 17:11:23 -04:00
df7c41628a Merge branch 'develop' into stable 2022-05-02 23:40:01 +01:00
96880f911f v1.2.3 pom 2022-04-18 15:50:07 -04:00
707053915f updated common-rest-api to support multipart 2022-04-18 15:48:12 -04:00
57efd8fe4e Merge branch 'develop' into stable 2022-04-18 15:46:53 -04:00
59adc9cea4 v1.2.2 pom 2022-04-07 23:49:57 -04:00
92b038f65b Merge branch 'develop' into stable 2022-04-07 23:48:42 -04:00
e917e3c5aa v1.2.1 pom 2022-03-28 15:04:40 -04:00
6853324d2d Merge branch 'develop' into stable 2022-03-28 14:48:35 -04:00
debfb8d998 updated commons-api to v1.1.2 2021-12-10 17:15:50 -05:00
2c77100246 Merge branch 'develop' into stable 2021-12-10 17:15:42 -05:00
3521365f86 v1.1.3 pom 2021-10-27 14:40:57 -04:00
bca4ea6db0 Merge branch 'develop' into stable 2021-10-27 14:40:30 -04:00
5d2fb8e47b v1.1.2 pom 2021-09-03 13:24:45 -04:00
9d4c8b5cbf Merge branch 'develop' into stable 2021-09-03 13:24:19 -04:00
e5cb8e7517 Merge branch 'develop' into stable 2021-09-01 14:41:53 -04:00
94f3de6386 v1.1.1 pom 2021-09-01 14:41:18 -04:00
a3ab8a5c08 Merge branch 'develop' into stable 2021-08-31 13:28:40 -04:00
78f006849f v1.0.3-v1 pom & common v1.0.1 2021-07-07 11:10:36 -04:00
3d0cb56680 Merge branch 'develop' into stable 2021-07-07 11:09:59 -04:00
6dbb73fa17 using common v1.0.0 2021-06-16 16:10:27 -04:00
7c0dfe919e v1.0.2-v1 pom 2021-06-16 16:03:17 -04:00
8c31f098d4 Merge branch 'develop' into stable 2021-06-16 16:02:42 -04:00
fe41dbef76 v1.0.1-v1 pom 2021-06-04 13:36:28 -04:00
4fe407de0f Merge branch 'develop' into stable 2021-06-04 13:36:05 -04:00
f7ad93797e Merge branch 'develop' into stable 2021-06-03 21:18:31 -04:00
aad2ed6406 Merge branch 'develop' into stable 2021-06-02 14:46:29 -04:00
6125c6b92e Merge branch 'develop' into stable 2021-05-18 21:49:20 -04:00
d81322dd33 v1.11-v2 pom 2021-05-17 15:51:37 -04:00
7 changed files with 34 additions and 89 deletions

View File

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

View File

@@ -16,12 +16,10 @@ 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.activiti.model.ResultList; import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
import com.inteligr8.alfresco.activiti.model.ModelRepresentation;
@Path("/api/enterprise/models") @Path("/api/enterprise/models")
public interface ModelsApi { public interface ModelsApi {
@@ -42,14 +40,8 @@ public interface ModelsApi {
} }
@GET @GET
@Path("{id}")
@Produces({ "application/json" }) @Produces({ "application/json" })
public ModelRepresentation get( public ResultListDataRepresentation 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

@@ -26,7 +26,6 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.inteligr8.activiti.model.ResultList; import com.inteligr8.activiti.model.ResultList;
import com.inteligr8.alfresco.activiti.model.DocumentTemplateLight; import com.inteligr8.alfresco.activiti.model.DocumentTemplateLight;
import com.inteligr8.alfresco.activiti.model.EmailTemplate; import com.inteligr8.alfresco.activiti.model.EmailTemplate;
@@ -40,13 +39,6 @@ import com.inteligr8.alfresco.activiti.model.EmailTemplateLight;
@Path("/app/rest") @Path("/app/rest")
public interface TemplatesApi { public interface TemplatesApi {
public enum TemplateSort {
@JsonProperty("sort_by_name_asc")
NameAscending,
@JsonProperty("sort_by_name_desc")
NameDescending
}
@GET @GET
@Path("email-templates/system") @Path("email-templates/system")
@Produces({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON })
@@ -64,17 +56,7 @@ public interface TemplatesApi {
@QueryParam("tenantId") Long tenantId); @QueryParam("tenantId") Long tenantId);
@GET @GET
@Path("email-templates/custom") @Path("email-templates/custom/{templateName}")
@Produces({ MediaType.APPLICATION_JSON })
public ResultList<EmailTemplateLight> getCustomEmailTemplates(
@QueryParam("nameFilter") String nameFilter,
@QueryParam("start") Integer start,
@QueryParam("size") Integer size,
@QueryParam("sort") TemplateSort sort,
@QueryParam("tenantId") Long tenantId);
@GET
@Path("email-templates/system/{templateName}")
@Produces({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON })
public EmailTemplate getSystemEmailTemplate( public EmailTemplate getSystemEmailTemplate(
@PathParam("templateName") String name, @PathParam("templateName") String name,
@@ -95,7 +77,7 @@ public interface TemplatesApi {
EmailTemplate template); EmailTemplate template);
@PUT @PUT
@Path("email-templates/system/{templateName}") @Path("email-templates/custom/{templateName}")
@Consumes({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON })
public EmailTemplate updateSystemEmailTemplate( public EmailTemplate updateSystemEmailTemplate(
@@ -128,27 +110,11 @@ public interface TemplatesApi {
@QueryParam("sort") String sort, @QueryParam("sort") String sort,
@QueryParam("tenantId") Long tenantId); @QueryParam("tenantId") Long tenantId);
@GET
@Path("document-templates")
@Produces({ MediaType.APPLICATION_JSON })
public ResultList<DocumentTemplateLight> getDocumentTemplates(
@QueryParam("nameFilter") String nameFilter,
@QueryParam("start") Integer start,
@QueryParam("size") Integer size,
@QueryParam("sort") TemplateSort sort,
@QueryParam("tenantId") Long tenantId);
default Response getDocumentTemplate( default Response getDocumentTemplate(
DocumentTemplateLight template) { DocumentTemplateLight template) {
return this.getDocumentTemplate(template.getId(), System.currentTimeMillis()); return this.getDocumentTemplate(template.getId(), template.getCreated().toInstant().toEpochMilli());
} }
@GET
@Path("document-templates/{templateId}")
@Produces({ MediaType.APPLICATION_JSON })
public DocumentTemplateLight getDocumentTemplate(
@PathParam("templateId") long id);
@GET @GET
@Path("document-templates/{templateId}/file") @Path("document-templates/{templateId}/file")
@Produces({ @Produces({

View File

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

View File

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

View File

@@ -2,11 +2,9 @@ package com.inteligr8.alfresco.activiti.model;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@@ -17,7 +15,6 @@ public class BaseTemplateLight {
@JsonProperty(required = true) @JsonProperty(required = true)
private String name; private String name;
@JsonProperty @JsonProperty
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
private OffsetDateTime created; private OffsetDateTime created;
@JsonProperty @JsonProperty
private UserLight createdBy; private UserLight createdBy;

View File

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