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)
TemplateSourceDocument
s that can be bound to a given doc type.session
- targetType
- the target Document TypeList<TemplateSourceDocument> getAvailableTemplates(CoreSession session, String targetType)
TemplateSourceDocument
s that can be bound to a given doc type.session
- targetType
- the target Document TypeTemplateSourceDocument
List<TemplateSourceDocument> getAvailableOfficeTemplates(CoreSession session, String targetType)
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
- List<TemplateBasedDocument> getLinkedTemplateBasedDocuments(DocumentModel source)
TemplateSourceDocument
source
- the TemplateSourceDocument
Map<String,List<String>> getTypeMapping()
void registerTypeMapping(DocumentModel doc)
doc
- DocumentModel makeTemplateBasedDocument(DocumentModel targetDoc, DocumentModel sourceTemplateDoc, boolean save)
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 notDocumentModel detachTemplateBasedDocument(DocumentModel targetDoc, String templateName, boolean save)
DocumentModel
targetDoc
- the DocumentModel to detachtemplateName
- the name of the template to detachsave
- save flag to indicate if target DocumentModel must be saved or notvoid addContextExtensions(DocumentModel currentDocument, DocumentWrapper wrapper, Map<String,Object> ctx)
Map<String,ContextExtensionFactoryDescriptor> getRegistredContextExtensions()
List<String> getReservedContextKeywords()
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.