public class TemplateDBDAO extends TemplateDAO
The statements to create the tables are now in scripts/sql/createfullhddb.sql
Modifier and Type | Method and Description |
---|---|
void |
create(String orderXmlName,
HeritrixTemplate orderXml)
Create a template.
|
boolean |
exists(String orderXmlName)
Return true if the database contains a template with the given name.
|
Iterator<String> |
getAll()
Returns an iterator with all names of order.xml-templates.
|
Iterator<String> |
getAll(boolean active)
Returns an iterator with names of either all active or all inactive order.xml-templates.
|
HeritrixTemplate |
read(String orderXmlName)
Read an XML order file for the named order XML.
|
void |
update(String orderXmlName,
HeritrixTemplate orderXml)
Update a template.
|
getInstance, iterator
public HeritrixTemplate read(String orderXmlName)
read
in class TemplateDAO
orderXmlName
- The name of the order.xml documentpublic Iterator<String> getAll()
getAll
in class TemplateDAO
public Iterator<String> getAll(boolean active)
TemplateDAO
getAll
in class TemplateDAO
active
- true if active templates are wanted, false otherwise.public boolean exists(String orderXmlName)
exists
in class TemplateDAO
orderXmlName
- Name of an order.xml template (without .xml).ArgumentNotValid
- If the orderXmlName is null or an empty Stringpublic void create(String orderXmlName, HeritrixTemplate orderXml)
create
in class TemplateDAO
orderXmlName
- Name of the template.orderXml
- XML documents that is a Heritrix order.xml template.ArgumentNotValid
- If the orderXmlName is null or an empty String, or the orderXml is null.public void update(String orderXmlName, HeritrixTemplate orderXml)
update
in class TemplateDAO
orderXmlName
- Name of the template.orderXml
- XML document that is a Heritrix order.xml template.PermissionDenied
- If the template does not existIOFailure
- If the template could not beArgumentNotValid
- If the orderXmlName is null or an empty String, or the orderXml is null.Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.