Class PageTemplateXMLReader
java.lang.Object
com.yahoo.search.pagetemplates.config.PageTemplateXMLReader
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
-
Method Summary
Modifier and TypeMethodDescriptionReads all page template xml files in a given directory.Reads all page template xml files in a given list of readers.Reads a single page template file.
-
Constructor Details
-
PageTemplateXMLReader
public PageTemplateXMLReader()
-
-
Method Details
-
read
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
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
-