template API func fixes
This commit is contained in:
parent
d1cf12e950
commit
715bf6fd1e
@ -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 })
|
||||
@ -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,
|
||||
@ -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(
|
||||
@ -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 })
|
||||
@ -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({
|
||||
|
@ -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)
|
||||
@ -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…
x
Reference in New Issue
Block a user