|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.data.template.AbstractTemplateUtil
public abstract class AbstractTemplateUtil
Utility methods for the import templates.
Constructor Summary | |
---|---|
AbstractTemplateUtil()
|
Method Summary | |
---|---|
static void |
exportTemplate(Template template,
File target)
Exports specified template to target file. |
static HashSet<String> |
getTemplateLowerCaseNames()
Returns templates names converted to lower case. |
static Collection<Template> |
getTemplates()
Retrieves a collection of valid templates. |
static org.eclipse.core.resources.IProject |
getTemplatesProject()
Returns template's project. |
static Template |
loadTemplateFromFile(String path)
Imports and loads a new template from an XML file. |
static Template |
registerTemplate(String path)
Registers a new template from a given template file. |
static Template |
registerTemplate(Template template)
Registers a new given template. |
static void |
saveToXmlFile(Template template)
Exports and saves a given template to an XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTemplateUtil()
Method Detail |
---|
public static org.eclipse.core.resources.IProject getTemplatesProject() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static HashSet<String> getTemplateLowerCaseNames()
public static Collection<Template> getTemplates()
public static void saveToXmlFile(Template template) throws org.eclipse.core.runtime.CoreException, IOException
template
- the template to be saved
org.eclipse.core.runtime.CoreException
IOException
public static Template registerTemplate(String path) throws IOException, org.eclipse.core.runtime.CoreException, TemplateXmlException, ParserConfigurationException, SAXException
path
- the path to file containing a template to register
IOException
org.eclipse.core.runtime.CoreException
TemplateXmlException
ParserConfigurationException
SAXException
public static Template registerTemplate(Template template) throws org.eclipse.core.runtime.CoreException, IOException
template
- the template to register
org.eclipse.core.runtime.CoreException
IOException
public static Template loadTemplateFromFile(String path) throws SAXException, ParserConfigurationException, IOException
path
- the path to file containing a template to be loaded
SAXException
ParserConfigurationException
IOException
public static void exportTemplate(Template template, File target) throws IOException, org.eclipse.core.runtime.CoreException
template
- the template to exporttarget
- the file where new template will be exported
IOException
org.eclipse.core.runtime.CoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |