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
|
boolean |
hasInput(String inputName)
Returns whether or not the
TemplateInput already exists, based on the name, in the template. |
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
PropertyException
List<TemplateInput> addInput(TemplateInput input)
TemplateInput
to the list of template parameters.boolean hasInput(String inputName)
TemplateInput
already exists, based on the name, in the template.String getTemplateType()
TemplateProcessor
name.TemplateProcessor
name if any, null otherwisevoid initTemplate(boolean save)
save
- flag to indicate if target DocumentModel must be saved or notvoid initTypesBindings()
Blob getTemplateBlob() throws PropertyException
PropertyException
List<TemplateInput> getParams() throws PropertyException
PropertyException
DocumentModel saveParams(List<TemplateInput> params, boolean save)
params
- the updated list of parameterssave
- flag to indicate if target DocumentModel must be saved or notDocumentModel getAdaptedDoc()
DocumentModel
sDocumentModel save()
DocumentModel
boolean allowInstanceOverride()
boolean hasEditableParams()
List<String> getApplicableTypes()
List<String> getForcedTypes()
List<TemplateBasedDocument> getTemplateBasedDocuments()
TemplateBasedDocument
s associated to this templatevoid removeForcedType(String type, boolean save)
void setForcedTypes(String[] forcedTypes, boolean save)
void setOutputFormat(String mimetype, boolean save)
String getOutputFormat()
boolean useAsMainContent()
TemplateBasedDocument
(i.e. if the template is
editable by the end user)String getName()
DocumentModel
nameString getFileName()
Blob
filenameString getTitle()
DocumentModel
titleString getVersionLabel()
DocumentModel
versionLabelString getId()
DocumentModel
uuidvoid setTargetRenditioName(String renditionName, boolean save)
String getTargetRenditionName()
void setTemplateBlob(Blob blob, boolean save)
Blob
used to store the templateCopyright © 2016 Nuxeo SA. All rights reserved.