public interface TemplateProcessorService
TemplateProcessor
and associated templates.String findProcessorName(Blob templateBlob)
Blob
. The template processor is found based on mime-types.templateBlob
- TemplateProcessor
nameTemplateProcessor findProcessor(Blob templateBlob)
TemplateProcessor
for a given Blob
. The template processor is found based on
mime-types.templateBlob
- TemplateProcessor
TemplateProcessor getProcessor(String name)
TemplateProcessor
by it's name. Name is defined in the associated descriptor.name
- TemplateProcessor
Collection<TemplateProcessorDescriptor> getRegisteredTemplateProcessors()
TemplateProcessor
sTemplateProcessorDescriptor
List<DocumentModel> getAvailableTemplateDocs(CoreSession session, String targetType) throws ClientException
TemplateSourceDocument
s that can be bound to a given doc type.session
- targetType
- the target Document TypeClientException
List<TemplateSourceDocument> getAvailableTemplates(CoreSession session, String targetType) throws ClientException
TemplateSourceDocument
s that can be bound to a given doc type.session
- targetType
- the target Document TypeTemplateSourceDocument
ClientException
List<TemplateSourceDocument> getAvailableOfficeTemplates(CoreSession session, String targetType) throws ClientException
TemplateSourceDocument
that can be used as an Office template (i.e that support to store the
template file as main blob of target DocumentModel)session
- targetType
- ClientException
List<TemplateBasedDocument> getLinkedTemplateBasedDocuments(DocumentModel source) throws ClientException
TemplateSourceDocument
source
- the TemplateSourceDocument
ClientException
Map<String,List<String>> getTypeMapping()
void registerTypeMapping(DocumentModel doc) throws ClientException
doc
- ClientException
DocumentModel makeTemplateBasedDocument(DocumentModel targetDoc, DocumentModel sourceTemplateDoc, boolean save) throws ClientException
DocumentModel
to a TemplateSourceDocument
. If the DocumentModel is not already a
TemplateBasedDocument
, the associated facet will be automatically added.targetDoc
- the DocumentModel to associate to a templatesourceTemplateDoc
- the DocumentModel holding the templatesave
- flag to indicate if target DocumentModel must be saved or notClientException
DocumentModel detachTemplateBasedDocument(DocumentModel targetDoc, String templateName, boolean save) throws ClientException
DocumentModel
targetDoc
- the DocumentModel to detachtemplateName
- the name of the template to detachsave
- save flag to indicate if target DocumentModel must be saved or notClientException
void addContextExtensions(DocumentModel currentDocument, DocumentWrapper wrapper, Map<String,Object> ctx)
Map<String,ContextExtensionFactoryDescriptor> getRegistredContextExtensions()
Collection<OutputFormatDescriptor> getOutputFormats()
OutputFormatDescriptor getOutputFormatDescriptor(String outputFormatId)
OutputFormatDescriptor
contains either an operation chain or a mime-type use to convert the
output of a rendered document.outputFormatId
- OutputFormatDescriptor
Copyright © 2015 Nuxeo SA. All rights reserved.