Compare commits
55 Commits
develop-v2
...
v2.0.14
Author | SHA1 | Date | |
---|---|---|---|
6dff96f35f | |||
09d6f5b885 | |||
bf779a8d18 | |||
6e0e1eaa1c | |||
f4183d7897 | |||
cced7e76e4 | |||
550a01278a | |||
39abfcfc22 | |||
31b1823b76 | |||
20a9504301 | |||
b4b57b7594 | |||
6067a2e551 | |||
dbbf71b692 | |||
8dd46fd1f1 | |||
12530dd951 | |||
998d69f3b9 | |||
a358be79fb | |||
8d2b207886 | |||
cddf59689a | |||
fd80199050 | |||
e29b460ed4 | |||
a98005618a | |||
3dcdfe7415 | |||
1e17f5f638 | |||
7eba0541b4 | |||
a1ea5ddf17 | |||
6596bf16b1 | |||
df7c41628a | |||
96880f911f | |||
707053915f | |||
57efd8fe4e | |||
59adc9cea4 | |||
92b038f65b | |||
e917e3c5aa | |||
6853324d2d | |||
debfb8d998 | |||
2c77100246 | |||
3521365f86 | |||
bca4ea6db0 | |||
5d2fb8e47b | |||
9d4c8b5cbf | |||
e5cb8e7517 | |||
94f3de6386 | |||
a3ab8a5c08 | |||
78f006849f | |||
3d0cb56680 | |||
6dbb73fa17 | |||
7c0dfe919e | |||
8c31f098d4 | |||
fe41dbef76 | |||
4fe407de0f | |||
f7ad93797e | |||
aad2ed6406 | |||
6125c6b92e | |||
d81322dd33 |
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.inteligr8.alfresco</groupId>
|
||||
<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>
|
||||
<description>An APS API library for building REST API clients that support both the CXF and Jersey frameworks</description>
|
||||
|
@@ -16,12 +16,10 @@ 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.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.ModelRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
|
||||
|
||||
@Path("/api/enterprise/models")
|
||||
public interface ModelsApi {
|
||||
@@ -42,14 +40,8 @@ public interface ModelsApi {
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{id}")
|
||||
@Produces({ "application/json" })
|
||||
public ModelRepresentation get(
|
||||
@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Produces({ "application/json" })
|
||||
public ResultList<ModelRepresentation> get(
|
||||
public ResultListDataRepresentation get(
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("modelType") Integer modelType,
|
||||
|
@@ -26,7 +26,6 @@ import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.DocumentTemplateLight;
|
||||
import com.inteligr8.alfresco.activiti.model.EmailTemplate;
|
||||
@@ -39,13 +38,6 @@ import com.inteligr8.alfresco.activiti.model.EmailTemplateLight;
|
||||
*/
|
||||
@Path("/app/rest")
|
||||
public interface TemplatesApi {
|
||||
|
||||
public enum TemplateSort {
|
||||
@JsonProperty("sort_by_name_asc")
|
||||
NameAscending,
|
||||
@JsonProperty("sort_by_name_desc")
|
||||
NameDescending
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("email-templates/system")
|
||||
@@ -64,17 +56,7 @@ public interface TemplatesApi {
|
||||
@QueryParam("tenantId") Long tenantId);
|
||||
|
||||
@GET
|
||||
@Path("email-templates/custom")
|
||||
@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}")
|
||||
@Path("email-templates/custom/{templateName}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public EmailTemplate getSystemEmailTemplate(
|
||||
@PathParam("templateName") String name,
|
||||
@@ -95,7 +77,7 @@ public interface TemplatesApi {
|
||||
EmailTemplate template);
|
||||
|
||||
@PUT
|
||||
@Path("email-templates/system/{templateName}")
|
||||
@Path("email-templates/custom/{templateName}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public EmailTemplate updateSystemEmailTemplate(
|
||||
@@ -128,27 +110,11 @@ public interface TemplatesApi {
|
||||
@QueryParam("sort") String sort,
|
||||
@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(
|
||||
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
|
||||
@Path("document-templates/{templateId}/file")
|
||||
@Produces({
|
||||
|
@@ -14,7 +14,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -35,7 +34,6 @@ 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,
|
||||
@@ -43,7 +41,6 @@ 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,
|
||||
|
@@ -14,7 +14,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -35,7 +34,6 @@ 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,
|
||||
@@ -43,7 +41,6 @@ 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,
|
||||
|
@@ -2,11 +2,9 @@ package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@@ -17,7 +15,6 @@ public class BaseTemplateLight {
|
||||
@JsonProperty(required = true)
|
||||
private String name;
|
||||
@JsonProperty
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
|
||||
private OffsetDateTime created;
|
||||
@JsonProperty
|
||||
private UserLight createdBy;
|
||||
|
@@ -1,13 +1,10 @@
|
||||
|
||||
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;
|
||||
@@ -45,7 +42,7 @@ public class ModelRepresentation {
|
||||
@JsonProperty("comment")
|
||||
private String comment;
|
||||
@JsonProperty("createdBy")
|
||||
private Long createdBy;
|
||||
private Integer createdBy;
|
||||
@JsonProperty("createdByFullName")
|
||||
private String createdByFullName;
|
||||
@JsonProperty("description")
|
||||
@@ -53,12 +50,11 @@ public class ModelRepresentation {
|
||||
@JsonProperty("favorite")
|
||||
private Boolean favorite;
|
||||
@JsonProperty("id")
|
||||
private Long id;
|
||||
private Integer id;
|
||||
@JsonProperty("lastUpdated")
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
|
||||
private OffsetDateTime lastUpdated;
|
||||
private String lastUpdated;
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
private Long lastUpdatedBy;
|
||||
private Integer lastUpdatedBy;
|
||||
@JsonProperty("lastUpdatedByFullName")
|
||||
private String lastUpdatedByFullName;
|
||||
@JsonProperty("latestVersion")
|
||||
@@ -70,11 +66,11 @@ public class ModelRepresentation {
|
||||
@JsonProperty("permission")
|
||||
private String permission;
|
||||
@JsonProperty("referenceId")
|
||||
private Long referenceId;
|
||||
private Integer referenceId;
|
||||
@JsonProperty("stencilSet")
|
||||
private Long stencilSet;
|
||||
private Integer stencilSet;
|
||||
@JsonProperty("tenantId")
|
||||
private Long tenantId;
|
||||
private Integer tenantId;
|
||||
@JsonProperty("version")
|
||||
private Integer version;
|
||||
@JsonIgnore
|
||||
@@ -96,16 +92,16 @@ public class ModelRepresentation {
|
||||
}
|
||||
|
||||
@JsonProperty("createdBy")
|
||||
public Long getCreatedBy() {
|
||||
public Integer getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
@JsonProperty("createdBy")
|
||||
public void setCreatedBy(Long createdBy) {
|
||||
public void setCreatedBy(Integer createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public ModelRepresentation withCreatedBy(Long createdBy) {
|
||||
public ModelRepresentation withCreatedBy(Integer createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
return this;
|
||||
}
|
||||
@@ -156,46 +152,46 @@ public class ModelRepresentation {
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public Long getId() {
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public void setId(Long id) {
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public ModelRepresentation withId(Long id) {
|
||||
public ModelRepresentation withId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public OffsetDateTime getLastUpdated() {
|
||||
public String getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public void setLastUpdated(OffsetDateTime lastUpdated) {
|
||||
public void setLastUpdated(String lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdated(OffsetDateTime lastUpdated) {
|
||||
public ModelRepresentation withLastUpdated(String lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
public Long getLastUpdatedBy() {
|
||||
public Integer getLastUpdatedBy() {
|
||||
return lastUpdatedBy;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
public void setLastUpdatedBy(Long lastUpdatedBy) {
|
||||
public void setLastUpdatedBy(Integer lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdatedBy(Long lastUpdatedBy) {
|
||||
public ModelRepresentation withLastUpdatedBy(Integer lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
return this;
|
||||
}
|
||||
@@ -276,46 +272,46 @@ public class ModelRepresentation {
|
||||
}
|
||||
|
||||
@JsonProperty("referenceId")
|
||||
public Long getReferenceId() {
|
||||
public Integer getReferenceId() {
|
||||
return referenceId;
|
||||
}
|
||||
|
||||
@JsonProperty("referenceId")
|
||||
public void setReferenceId(Long referenceId) {
|
||||
public void setReferenceId(Integer referenceId) {
|
||||
this.referenceId = referenceId;
|
||||
}
|
||||
|
||||
public ModelRepresentation withReferenceId(Long referenceId) {
|
||||
public ModelRepresentation withReferenceId(Integer referenceId) {
|
||||
this.referenceId = referenceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("stencilSet")
|
||||
public Long getStencilSet() {
|
||||
public Integer getStencilSet() {
|
||||
return stencilSet;
|
||||
}
|
||||
|
||||
@JsonProperty("stencilSet")
|
||||
public void setStencilSet(Long stencilSet) {
|
||||
public void setStencilSet(Integer stencilSet) {
|
||||
this.stencilSet = stencilSet;
|
||||
}
|
||||
|
||||
public ModelRepresentation withStencilSet(Long stencilSet) {
|
||||
public ModelRepresentation withStencilSet(Integer stencilSet) {
|
||||
this.stencilSet = stencilSet;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public Long getTenantId() {
|
||||
public Integer getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public void setTenantId(Long tenantId) {
|
||||
public void setTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public ModelRepresentation withTenantId(Long tenantId) {
|
||||
public ModelRepresentation withTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user