Commit c716057a authored by Brian Long's avatar Brian Long
Browse files

several fixes after developing more

parent ce6e4752
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import com.inteligr8.alfresco.activiti.api.ProcessInstancesApi;
import com.inteligr8.alfresco.activiti.api.ProfileApi;
import com.inteligr8.alfresco.activiti.api.ShareApi;
import com.inteligr8.alfresco.activiti.api.TasksApi;
import com.inteligr8.alfresco.activiti.api.TemplatesApi;

/**
 * This interface consolidates the JAX-RS APIs available in the APS Public
@@ -75,4 +76,8 @@ public interface ApsPublicRestApi extends ActivitiPublicRestApi {
		return this.getApi(ShareApi.class);
	}

    default TemplatesApi getTemplatesApi() {
        return this.getApi(TemplatesApi.class);
    }

}
+5 −0
Original line number Diff line number Diff line
package com.inteligr8.alfresco.activiti;

import com.inteligr8.alfresco.activiti.api.AppDefinitionsCxfApi;
import com.inteligr8.alfresco.activiti.api.TemplatesCxfApi;

/**
 * This interface appends Apache CXF implementation specific methods to the
@@ -15,4 +16,8 @@ public interface ApsPublicRestCxfApi extends ApsPublicRestApi {
		return this.getApi(AppDefinitionsCxfApi.class);
	}
	
	default TemplatesCxfApi getTemplatesCxfApi() {
	    return this.getApi(TemplatesCxfApi.class);
	}

}
+5 −0
Original line number Diff line number Diff line
package com.inteligr8.alfresco.activiti;

import com.inteligr8.alfresco.activiti.api.AppDefinitionsJerseyApi;
import com.inteligr8.alfresco.activiti.api.TemplatesJerseyApi;

/**
 * This interface appends Jersey implementation specific methods to the JAX-RS
@@ -15,4 +16,8 @@ public interface ApsPublicRestJerseyApi extends ApsPublicRestApi {
		return this.getApi(AppDefinitionsJerseyApi.class);
	}
    
    default TemplatesJerseyApi getTemplatesJerseyApi() {
        return this.getApi(TemplatesJerseyApi.class);
    }

}
+11 −10
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public interface TemplatesApi {
    @Path("email-templates/system")
    @Produces({ MediaType.APPLICATION_JSON })
    public ResultList<EmailTemplateLight> getSystemEmailTemplates(
            @QueryParam("tenantId") Integer tenantId);
            @QueryParam("tenantId") Long tenantId);

    @GET
    @Path("email-templates/custom")
@@ -53,21 +53,21 @@ public interface TemplatesApi {
    		@QueryParam("start") Integer start,
    		@QueryParam("size") Integer size,
    		@QueryParam("sort") String sort,
    		@QueryParam("tenantId") Integer tenantId);
    		@QueryParam("tenantId") Long tenantId);

    @GET
    @Path("email-templates/custom/{templateName}")
    @Produces({ MediaType.APPLICATION_JSON })
    public EmailTemplate getSystemEmailTemplate(
            @PathParam("templateName") String name,
            @QueryParam("tenantId") Integer tenantId);
            @QueryParam("tenantId") Long tenantId);

    @GET
    @Path("email-templates/custom/{templateId}")
    @Produces({ MediaType.APPLICATION_JSON })
    public EmailTemplate getCustomEmailTemplate(
            @PathParam("templateId") int id,
            @QueryParam("tenantId") Integer tenantId);
            @PathParam("templateId") long id,
            @QueryParam("tenantId") Long tenantId);

    @POST
    @Path("email-templates/custom")
@@ -89,14 +89,14 @@ public interface TemplatesApi {
    @Consumes({ MediaType.APPLICATION_JSON })
    @Produces({ MediaType.APPLICATION_JSON })
    public EmailTemplate updateCustomEmailTemplate(
            @PathParam("templateId") int id,
            @PathParam("templateId") long id,
            EmailTemplate template);

    @DELETE
    @Path("email-templates/custom/{templateId}")
    public void deleteCustomEmailTemplate(
            @PathParam("templateId") int id,
            @QueryParam("tenantId") Integer tenantId);
            @PathParam("templateId") long id,
            @QueryParam("tenantId") Long tenantId);
    
    

@@ -108,11 +108,11 @@ public interface TemplatesApi {
            @QueryParam("start") Integer start,
            @QueryParam("size") Integer size,
            @QueryParam("sort") String sort,
            @QueryParam("tenantId") Integer tenantId);
            @QueryParam("tenantId") Long tenantId);

    default Response getDocumentTemplate(
            DocumentTemplateLight template) {
        return this.getDocumentTemplate(template.getCreated().toInstant().toEpochMilli());
        return this.getDocumentTemplate(template.getId(), template.getCreated().toInstant().toEpochMilli());
    }

    @GET
@@ -123,6 +123,7 @@ public interface TemplatesApi {
        "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
    })
    public Response getDocumentTemplate(
            @PathParam("templateId") long id,
            @QueryParam("version") long version);

    @DELETE
+3 −3
Original line number Diff line number Diff line
@@ -36,15 +36,15 @@ public interface TemplatesCxfApi extends TemplatesApi {
    @Path("admin/document-templates")
    @Produces({ MediaType.APPLICATION_JSON })
    public DocumentTemplateLight createDocumentTemplate(
            @QueryParam("tenantId") Integer tenantId,
            @QueryParam("tenantId") Long tenantId,
            FileMultipartCxf file);

    @POST
    @Path("admin/document-templates/{templateId}")
    @Produces({ MediaType.APPLICATION_JSON })
    public DocumentTemplateLight updateDocumentTemplate(
            @PathParam("templateId") int id,
            @QueryParam("tenantId") Integer tenantId,
            @PathParam("templateId") long id,
            @QueryParam("tenantId") Long tenantId,
            FileMultipartCxf file);

}
Loading