Class PageTemplateXMLReader
- java.lang.Object
-
- com.yahoo.search.pagetemplates.config.PageTemplateXMLReader
-
public class PageTemplateXMLReader extends Object
Reads all page template XML files from a given directory (or list of readers). Instances of this are for single-thread usage only.- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description PageTemplateXMLReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageTemplateRegistry
read(String directory)
Reads all page template xml files in a given directory.PageTemplateRegistry
read(List<com.yahoo.io.reader.NamedReader> pageReaders, boolean validateReaderNames)
Reads all page template xml files in a given list of readers.PageTemplate
readFile(String fileName)
Reads a single page template file.
-
-
-
Method Detail
-
read
public PageTemplateRegistry read(String directory)
Reads all page template xml files in a given directory.- Throws:
RuntimeException
- ifdirectory
is not a readable directory, or if there is some error in the XML
-
readFile
public PageTemplate readFile(String fileName)
Reads a single page template file.- Throws:
RuntimeException
- iffileName
is not a readable file, or if there is some error in the XML
-
read
public PageTemplateRegistry read(List<com.yahoo.io.reader.NamedReader> pageReaders, boolean validateReaderNames)
Reads all page template xml files in a given list of readers. This is called from the Vespa configuration model.- Parameters:
validateReaderNames
- should be set to true if the readers were created by files, not otherwise- Throws:
RuntimeException
- ifdirectory
is not a readable directory, or if there is some error in the XML
-
-