Loading src/main/java/com/inteligr8/alfresco/activiti/api/TemplatesApi.java +29 −3 Changes for src/main/java/com/inteligr8/alfresco/activiti/api/TemplatesApi.java: 29 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,16 @@ public interface TemplatesApi { public ResultList<EmailTemplateLight> getSystemEmailTemplates( @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") String sort, @QueryParam("tenantId") Long tenantId); @GET @Path("email-templates/custom") @Produces({ MediaType.APPLICATION_JSON }) Loading @@ -64,7 +74,7 @@ public interface TemplatesApi { @QueryParam("tenantId") Long tenantId); @GET @Path("email-templates/custom/{templateName}") @Path("email-templates/system/{templateName}") @Produces({ MediaType.APPLICATION_JSON }) public EmailTemplate getSystemEmailTemplate( @PathParam("templateName") String name, Loading @@ -85,7 +95,7 @@ public interface TemplatesApi { EmailTemplate template); @PUT @Path("email-templates/custom/{templateName}") @Path("email-templates/system/{templateName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public EmailTemplate updateSystemEmailTemplate( Loading @@ -108,6 +118,16 @@ public interface TemplatesApi { @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") String sort, @QueryParam("tenantId") Long tenantId); @GET @Path("document-templates") @Produces({ MediaType.APPLICATION_JSON }) Loading @@ -120,9 +140,15 @@ public interface TemplatesApi { default Response getDocumentTemplate( DocumentTemplateLight template) { return this.getDocumentTemplate(template.getId(), template.getCreated().toInstant().toEpochMilli()); return this.getDocumentTemplate(template.getId(), System.currentTimeMillis()); } @GET @Path("document-templates/{templateId}") @Produces({ MediaType.APPLICATION_JSON }) public DocumentTemplateLight getDocumentTemplate( @PathParam("templateId") long id); @GET @Path("document-templates/{templateId}/file") @Produces({ Loading src/main/java/com/inteligr8/alfresco/activiti/model/BaseTemplateLight.java +3 −0 Changes for src/main/java/com/inteligr8/alfresco/activiti/model/BaseTemplateLight.java: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ 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) Loading @@ -15,6 +17,7 @@ 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; Loading Loading
src/main/java/com/inteligr8/alfresco/activiti/api/TemplatesApi.java +29 −3 Changes for src/main/java/com/inteligr8/alfresco/activiti/api/TemplatesApi.java: 29 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,16 @@ public interface TemplatesApi { public ResultList<EmailTemplateLight> getSystemEmailTemplates( @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") String sort, @QueryParam("tenantId") Long tenantId); @GET @Path("email-templates/custom") @Produces({ MediaType.APPLICATION_JSON }) Loading @@ -64,7 +74,7 @@ public interface TemplatesApi { @QueryParam("tenantId") Long tenantId); @GET @Path("email-templates/custom/{templateName}") @Path("email-templates/system/{templateName}") @Produces({ MediaType.APPLICATION_JSON }) public EmailTemplate getSystemEmailTemplate( @PathParam("templateName") String name, Loading @@ -85,7 +95,7 @@ public interface TemplatesApi { EmailTemplate template); @PUT @Path("email-templates/custom/{templateName}") @Path("email-templates/system/{templateName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public EmailTemplate updateSystemEmailTemplate( Loading @@ -108,6 +118,16 @@ public interface TemplatesApi { @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") String sort, @QueryParam("tenantId") Long tenantId); @GET @Path("document-templates") @Produces({ MediaType.APPLICATION_JSON }) Loading @@ -120,9 +140,15 @@ public interface TemplatesApi { default Response getDocumentTemplate( DocumentTemplateLight template) { return this.getDocumentTemplate(template.getId(), template.getCreated().toInstant().toEpochMilli()); return this.getDocumentTemplate(template.getId(), System.currentTimeMillis()); } @GET @Path("document-templates/{templateId}") @Produces({ MediaType.APPLICATION_JSON }) public DocumentTemplateLight getDocumentTemplate( @PathParam("templateId") long id); @GET @Path("document-templates/{templateId}/file") @Produces({ Loading
src/main/java/com/inteligr8/alfresco/activiti/model/BaseTemplateLight.java +3 −0 Changes for src/main/java/com/inteligr8/alfresco/activiti/model/BaseTemplateLight.java: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,9 +2,11 @@ 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) Loading @@ -15,6 +17,7 @@ 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; Loading