public interface TemplateSourceDocument
TemplateBasedDocument to handle the rendering.| Modifier and Type | Field and Description |
|---|---|
static String |
INIT_DONE_FLAG |
| Modifier and Type | Method and Description |
|---|---|
List<TemplateInput> |
addInput(TemplateInput input)
Add or update a
TemplateInput to the list of template parameters. |
boolean |
allowInstanceOverride()
Return flag to indicate if Documents associated to this template can override parametes value
|
DocumentModel |
getAdaptedDoc()
Return the underlying adapted
DocumentModels |
List<String> |
getApplicableTypes()
Get List of Document Types than can be associated to this Template.
|
String |
getFileName()
Shortcut to access the underlying
Blob filename |
List<String> |
getForcedTypes()
Get List of Document Types that must be automatically bound to this template at creation time
|
String |
getId()
Shortcut to access the underlying
DocumentModel uuid |
String |
getLabel()
Return label key used for template
|
String |
getName()
Shortcut to access the underlying
DocumentModel name |
String |
getOutputFormat()
Return the expected mime-type of the resulting rendering
|
List<TemplateInput> |
getParams()
Retrieve the parameters associated to the Template file
|
String |
getParamsAsString()
Return the String representation of the parameters of the template
|
String |
getTargetRenditionName()
Get the associated Rendition if any
|
List<TemplateBasedDocument> |
getTemplateBasedDocuments()
Get the list of
TemplateBasedDocuments associated to this template |
Blob |
getTemplateBlob()
Retrieve the Blob holding the template file
|
String |
getTemplateType()
Return the template Type (i.e.
|
String |
getTitle()
Shortcut to access the underlying
DocumentModel title |
String |
getVersionLabel()
Shortcut to access the underlying
DocumentModel versionLabel |
boolean |
hasEditableParams()
Indicate of the associated Template has editable parameters or not
|
void |
initTemplate(boolean save)
Initialize the DocumentModel
finds associated TemplateProcessor
extract Template parameters
|
void |
initTypesBindings()
Initialize the Types2Template binding
|
void |
removeForcedType(String type,
boolean save)
Remove Type mapping for this template
|
DocumentModel |
save()
Save changes in the underlying
DocumentModel |
DocumentModel |
saveParams(List<TemplateInput> params,
boolean save)
Save parameters changes
|
void |
setForcedTypes(String[] forcedTypes,
boolean save)
Update the Type mapping for this template
|
void |
setOutputFormat(String mimetype,
boolean save)
Sets the expected output mime-type.
|
void |
setTargetRenditioName(String renditionName,
boolean save)
Associate Template to a Rendition
|
void |
setTemplateBlob(Blob blob,
boolean save)
Write accessor to the
Blob used to store the template |
boolean |
useAsMainContent()
Indicate if the template can be used as main blob in the
TemplateBasedDocument (i.e. |
static final String INIT_DONE_FLAG
String getParamsAsString() throws PropertyException, ClientException
PropertyExceptionClientExceptionList<TemplateInput> addInput(TemplateInput input) throws Exception
TemplateInput to the list of template parameters.input - ExceptionString getTemplateType()
TemplateProcessor name.TemplateProcessor name if any, null otherwisevoid initTemplate(boolean save)
throws Exception
save - flag to indicate if target DocumentModel must be saved or notExceptionvoid initTypesBindings()
throws Exception
ExceptionBlob getTemplateBlob() throws PropertyException, ClientException
PropertyExceptionClientExceptionList<TemplateInput> getParams() throws PropertyException, ClientException
PropertyExceptionClientExceptionDocumentModel saveParams(List<TemplateInput> params, boolean save) throws Exception
params - the updated list of parameterssave - flag to indicate if target DocumentModel must be saved or notExceptionDocumentModel getAdaptedDoc()
DocumentModelsDocumentModel save() throws ClientException
DocumentModelClientExceptionboolean allowInstanceOverride()
boolean hasEditableParams()
throws ClientException
ClientExceptionList<String> getApplicableTypes()
List<String> getForcedTypes()
List<TemplateBasedDocument> getTemplateBasedDocuments() throws ClientException
TemplateBasedDocuments associated to this templateClientExceptionvoid removeForcedType(String type, boolean save) throws ClientException
type - save - ClientExceptionvoid setForcedTypes(String[] forcedTypes, boolean save) throws ClientException
forcedTypes - save - ClientExceptionvoid setOutputFormat(String mimetype, boolean save)
mimetype - save - String getOutputFormat()
boolean useAsMainContent()
TemplateBasedDocument (i.e. if the template is
editable by the end user)String getName()
DocumentModel nameString getFileName() throws ClientException
Blob filenameClientExceptionString getTitle() throws ClientException
DocumentModel titleClientExceptionString getVersionLabel()
DocumentModel versionLabelString getId()
DocumentModel uuidString getLabel() throws ClientException
ClientExceptionvoid setTargetRenditioName(String renditionName, boolean save) throws ClientException
renditionName - save - ClientExceptionString getTargetRenditionName() throws ClientException
ClientExceptionCopyright © 2015 Nuxeo SA. All rights reserved.