|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.importer.base.template.internal.XmlTemplateProvider
public class XmlTemplateProvider
Default implementation of ITemplateProvider
which reads templates from XML files.
Constructor Summary | |
---|---|
XmlTemplateProvider()
Constructor. |
Method Summary | |
---|---|
void |
exportTemplateToFile(IImportTemplate template,
File file)
Writes given template to the file. |
IImportTemplate |
importTemplateFromFile(File file)
Imports template from a given file. |
Collection<ImportTemplateGroup> |
readTemplateGroups()
Reads all template groups. |
Collection<IImportTemplate> |
readTemplates()
Reads import templates. |
void |
removeTemplate(UUID templateId)
Removes template with given id. |
void |
removeTemplateGroup(UUID groupId)
Removes templates group with given id. |
void |
saveTemplate(IImportTemplate template)
Saves given template. |
void |
saveTemplateGroup(ImportTemplateGroup group)
Saves given template group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlTemplateProvider() throws TemplateException
TemplateException
- when any error occurs during creating templates projectMethod Detail |
---|
public Collection<ImportTemplateGroup> readTemplateGroups() throws TemplateException
readTemplateGroups
in interface ITemplateProvider
TemplateException
- when any error occurs during reading template groupsITemplateProvider.readTemplateGroups()
public Collection<IImportTemplate> readTemplates() throws TemplateException
readTemplates
in interface ITemplateProvider
TemplateException
- when any error occurs during reading templateITemplateProvider.readTemplates()
public void removeTemplate(UUID templateId) throws TemplateException
removeTemplate
in interface ITemplateProvider
templateId
- id of template to remove
TemplateException
- when Eclipse core error occursITemplateProvider.removeTemplate(java.util.UUID)
public void removeTemplateGroup(UUID groupId) throws TemplateException
removeTemplateGroup
in interface ITemplateProvider
groupId
- group id
TemplateException
- when Eclipse core error occursITemplateProvider.removeTemplateGroup(java.util.UUID)
public void saveTemplate(IImportTemplate template) throws TemplateException
saveTemplate
in interface ITemplateProvider
template
- template to save
TemplateException
- when template cannot be saved as a result of core eclipse exceptions#saveTemplate(pl.edu.agh.cast.importer.base.template.IImportTemplate)
public void saveTemplateGroup(ImportTemplateGroup group) throws TemplateException
saveTemplateGroup
in interface ITemplateProvider
group
- group to save
TemplateException
#saveTemplateGroup(pl.edu.agh.cast.importer.base.template.ImportTemplateGroup)
public void exportTemplateToFile(IImportTemplate template, File file) throws TemplateException
exportTemplateToFile
in interface ITemplateProvider
template
- template to writefile
- destination file
TemplateException
- when any I/O exception occurs during exporting template#exportTemplateToFile(pl.edu.agh.cast.importer.base.template.IImportTemplate, java.io.File)
public IImportTemplate importTemplateFromFile(File file) throws ResourceTemplateException
importTemplateFromFile
in interface ITemplateProvider
file
- file which contains an import template
ResourceTemplateException
ITemplateProvider.importTemplateFromFile(java.io.File)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |