T
- public interface TemplateStoreService<T>
Template
meta data for the template.Modifier and Type | Method and Description |
---|---|
T |
commitTemplate(T template,
String newContent)
Will ensure the current saved template, creates also a rollback point for any future reverts.
|
Object |
getDownloadableVersion(T template)
Get a downloadable version of the Template as a File or some object that can be represented as a download option
|
String |
getResourceContent(T template)
Get the contents of the template
|
T |
getTemplate(String id,
String path)
Get Template from id and/or path
|
String |
getTemplateHistoryAsMarkup(T template)
Get the history of the template edits (if possible) as Markup (HTML) or JSON
|
String |
getTemplateId(T template)
Get system id for the template
|
String |
getTemplatePath(T template)
Get the system path for the template
|
String |
getTemplateType(T template)
Get a type that the template represents.
|
List<String> |
getVersionIds(T template)
Get the version ids for all the templates.
|
List<T> |
getVersions(T template)
Get the versions for all the templates
|
boolean |
isCommitPossible(T template)
Any commit specific implementation available
|
boolean |
isRevertPossible(T template)
Is there a revert point to go back to for the given template
|
T |
revertTemplate(T template,
String versionId)
Revert to a rollback (committed) point.
|
T |
updateTemplate(T template,
String newContent)
Update template with latest content provided to the method
Will make changes to the current template |
String |
updateTemplateHistory(T template,
Map updates)
Update Template History with details
|
String getTemplateType(T template)
String getResourceContent(T template) throws Exception
Exception
String getTemplateHistoryAsMarkup(T template)
String updateTemplateHistory(T template, Map updates)
T updateTemplate(T template, String newContent)
T commitTemplate(T template, String newContent)
T revertTemplate(T template, String versionId)
version
- as String. null implies the last/latest commit point to rollback to.boolean isCommitPossible(T template)
boolean isRevertPossible(T template)
List<T> getVersions(T template)
List<String> getVersionIds(T template)
getVersions(Object)
, as it does not fetch the actual template.List
of version ids. Order of the list is assumed to chronological by defaultCopyright © 2018. All rights reserved.