public interface TemplateBasedDocument
DocumentModel that support rendering via a Template. This Document can be
 associated with a TemplateSourceDocument that provides the rendering template as well as the default inputs
 used for rendering.| Modifier and Type | Method and Description | 
|---|---|
DocumentModel | 
getAdaptedDoc()
Return the underlying adapted  
DocumentModel | 
List<TemplateInput> | 
getParams(String templateName)
Retrieve parameters for the associated template 
 | 
TemplateSourceDocument | 
getSourceTemplate(String templateName)
Retrieve the  
TemplateSourceDocument for a given template name | 
DocumentModel | 
getSourceTemplateDoc(String templateName)
Retrieve the Template  
DocumentModel for a given template name | 
DocumentRef | 
getSourceTemplateDocRef(String templateName)
Retrieve the Template  
DocumentRef for a given template name | 
List<TemplateSourceDocument> | 
getSourceTemplates()
List all  
TemplateSourceDocuments that are bound to the underlying DocumentModel | 
Blob | 
getTemplateBlob(String templateName)
Return the  
Blob of the associated template | 
String | 
getTemplateNameForRendition(String renditionName)
Find the template associated to a given RenditionName 
 | 
List<String> | 
getTemplateNames()
Get the names of all the associated templates 
 | 
String | 
getTemplateType(String templateName)
Return the template type for a given template name 
 | 
boolean | 
hasEditableParams(String templateName)
Indicate of the associated Template has editable parameters or not 
 | 
boolean | 
hasParams(String templateName)
Indicate of the associated Template requires parameters or not 
 | 
DocumentModel | 
initializeFromTemplate(String templateName,
                      boolean save)
Initialize the template parameters from the associated template 
 | 
DocumentModel | 
removeTemplateBinding(String templateName,
                     boolean save)
Detach a template from the underlying  
DocumentModel | 
Blob | 
renderAndStoreAsAttachment(String templateName,
                          boolean save)
Render the named template against the underlying DocumentModel and store the result in the main Blob 
 | 
Blob | 
renderWithTemplate(String templateName)
Render the named template against the underlying DocumentModel 
 | 
DocumentModel | 
saveParams(String templateName,
          List<TemplateInput> params,
          boolean save)
Save parameters changes. 
 | 
DocumentModel | 
setTemplate(DocumentModel template,
           boolean save)
Associate the document to a Template. 
 | 
DocumentModel setTemplate(DocumentModel template, boolean save) throws PropertyException
template - DocumentModel holding the templatesave - flag to indicate if target DocumentModel must be saved or notPropertyExceptionTemplateSourceDocument getSourceTemplate(String templateName)
TemplateSourceDocument for a given template nametemplateName - name of the templateTemplateSourceDocumentDocumentRef getSourceTemplateDocRef(String templateName)
DocumentRef for a given template nametemplateName - name of the templateDocumentRefDocumentModel getSourceTemplateDoc(String templateName)
DocumentModel for a given template nametemplateName - name of the templateDocumentModelList<TemplateSourceDocument> getSourceTemplates()
TemplateSourceDocuments that are bound to the underlying DocumentModelString getTemplateType(String templateName)
templateName - DocumentModel initializeFromTemplate(String templateName, boolean save)
templateName - save - flag to indicate if target DocumentModel must be saved or notBlob renderAndStoreAsAttachment(String templateName, boolean save)
templateName - save - flag to indicate if target DocumentModel must be saved or notBlobBlob renderWithTemplate(String templateName)
templateName - Blobboolean hasParams(String templateName)
templateName - List<TemplateInput> getParams(String templateName)
templateName - DocumentModel saveParams(String templateName, List<TemplateInput> params, boolean save)
templateName - params - the updated list of parameterssave - flag to indicate if target DocumentModel must be saved or notDocumentModel getAdaptedDoc()
DocumentModelBlob getTemplateBlob(String templateName)
Blob of the associated templatetemplateName - boolean hasEditableParams(String templateName)
templateName - String getTemplateNameForRendition(String renditionName)
renditionName - List<String> getTemplateNames()
DocumentModel removeTemplateBinding(String templateName, boolean save)
DocumentModeltemplateName - save - Copyright © 2019 Nuxeo. All rights reserved.