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
DocumentModel s |
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
TemplateBasedDocument s 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
PropertyException
ClientException
List<TemplateInput> addInput(TemplateInput input) throws Exception
TemplateInput
to the list of template parameters.input
- Exception
String 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 notException
void initTypesBindings() throws Exception
Exception
Blob getTemplateBlob() throws PropertyException, ClientException
PropertyException
ClientException
List<TemplateInput> getParams() throws PropertyException, ClientException
PropertyException
ClientException
DocumentModel saveParams(List<TemplateInput> params, boolean save) throws Exception
params
- the updated list of parameterssave
- flag to indicate if target DocumentModel must be saved or notException
DocumentModel getAdaptedDoc()
DocumentModel
sDocumentModel save() throws ClientException
DocumentModel
ClientException
boolean allowInstanceOverride()
boolean hasEditableParams() throws ClientException
ClientException
List<String> getApplicableTypes()
List<String> getForcedTypes()
List<TemplateBasedDocument> getTemplateBasedDocuments() throws ClientException
TemplateBasedDocument
s associated to this templateClientException
void removeForcedType(String type, boolean save) throws ClientException
type
- save
- ClientException
void setForcedTypes(String[] forcedTypes, boolean save) throws ClientException
forcedTypes
- save
- ClientException
void 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
filenameClientException
String getTitle() throws ClientException
DocumentModel
titleClientException
String getVersionLabel()
DocumentModel
versionLabelString getId()
DocumentModel
uuidString getLabel() throws ClientException
ClientException
void setTargetRenditioName(String renditionName, boolean save) throws ClientException
renditionName
- save
- ClientException
String getTargetRenditionName() throws ClientException
ClientException
Copyright © 2015 Nuxeo SA. All rights reserved.