public class ConfigurationPersistence extends java.lang.Object implements XmlConstants, ReportConstants
Currently, the following information is handled by this mechanism:
ATTR_ADMIN, ATTR_COND, ATTR_DB, ATTR_DUMPEXPR, ATTR_DUMPLVL, ATTR_DUMPTYPE, ATTR_ID, ATTR_MULTIPLEX, ATTR_NAME, ATTR_PASS_CHANGED, ATTR_PASSWORD, ATTR_SALT, ATTR_SORT, ATTR_SPEC, ATTR_SUPPORT, ATTR_TAG, ATTR_TITLE, ATTR_USER, ATTR_WILD, AUTO_EXPORT_FILTER_PATH, AUTO_EXPORT_RPT_SPEC, AUTO_EXPORT_SRCH_PATH, AUTO_EXPORT_USER_PATH, ELEM_FILTER, ELEM_LIST, ELEM_PROFILE, ELEM_RPT, ELEM_SEARCH, ELEM_USER, RPT_PATH, RPT_SUFFIXCVT_LVL_BASIC, CVT_LVL_FULL, CVT_LVL_FULL_RESTR, CVT_LVL_MASK, CVT_LVL_NONE, CVT_LVL_PARTIAL, LVL_UNKNOWN, RT_LVL_BASIC, RT_LVL_FULL, RT_LVL_FULL_RESTR, RT_LVL_MASK, RT_LVL_NONE, RT_LVL_PARTIAL, RT_LVL_STUB, RT_LVL_UNTESTED, SORT_ALL, SORT_NONE, SORT_NOT_LAST, SRC_CODE_BASE, SRC_CODE_CACHE, SRC_SCHEMA, SRC_UNKNOWN| Constructor and Description |
|---|
ConfigurationPersistence()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<FilterProfile> |
readXmlFilters(java.io.File file)
Read the given file, which is expected to contain an XML document defining one or more
file filter profiles.
|
int |
readXmlReports(java.io.File file,
java.util.List<ReportDefinition> reports)
Read the given file, which is expected to contain an XML document defining one or more
reports.
|
java.util.List<SearchHistory> |
readXmlSearches(java.io.File file)
Read the given file, which is expected to contain an XML document defining one or more
search history entries.
|
java.util.List<UserRecord> |
readXmlUsers(java.io.File file)
Read the given file, which is expected to contain an XML document defining one or more
sets of user credentials.
|
void |
writeXmlFilters(java.io.File file,
java.util.List<FilterProfile> profiles)
Create a new XML document and export the given list of file filter profiles into it.
|
void |
writeXmlReports(java.io.File file,
java.util.List<ReportDefinition> reports,
boolean schema)
Create a new XML document and export the given list of report definitions into it.
|
void |
writeXmlSearches(java.io.File file,
java.util.List<SearchHistory> searches)
Create a new XML document and export the given list of search history entries into it.
|
void |
writeXmlUsers(java.io.File file,
java.util.List<UserRecord> users)
Create a new XML document and export the given list of user credentials into it.
|
public int readXmlReports(java.io.File file,
java.util.List<ReportDefinition> reports)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
org.xml.sax.SAXException
file - File containing XML report definitions.reports - List of report definitions to be populated with those read from the file.javax.xml.parsers.ParserConfigurationException - if there is an error configuring the XML parser.org.xml.sax.SAXException - if the XML SAX parser encounters an error.java.io.IOException - if there is an error accessing the file.public void writeXmlReports(java.io.File file,
java.util.List<ReportDefinition> reports,
boolean schema)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException
file - Destination file.reports - List of report definitions to write.schema - True if reports are schema reports; false if they are code reports.javax.xml.parsers.ParserConfigurationException - if there is an XML parser configuration error.java.io.IOException - if there is an error writing the XML content to the file system.public java.util.List<UserRecord> readXmlUsers(java.io.File file) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
file - File containing XML user credentials.null.javax.xml.parsers.ParserConfigurationException - if there is an error configuring the XML parser.org.xml.sax.SAXException - if the XML SAX parser encounters an error.java.io.IOException - if there is an error accessing the file.public void writeXmlUsers(java.io.File file,
java.util.List<UserRecord> users)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException
file - Destination file.users - List of user credential records to write.javax.xml.parsers.ParserConfigurationException - if there is an XML parser configuration error.java.io.IOException - if there is an error writing the XML content to the file system.public java.util.List<FilterProfile> readXmlFilters(java.io.File file) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
file - File containing XML filter profile data.null.javax.xml.parsers.ParserConfigurationException - if there is an error configuring the XML parser.org.xml.sax.SAXException - if the XML SAX parser encounters an error.java.io.IOException - if there is an error accessing the file.public void writeXmlFilters(java.io.File file,
java.util.List<FilterProfile> profiles)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException
file - Destination file.profiles - List of filter profiles to write.javax.xml.parsers.ParserConfigurationException - if there is an XML parser configuration error.java.io.IOException - if there is an error writing the XML content to the file system.public java.util.List<SearchHistory> readXmlSearches(java.io.File file) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
file - File containing XML search history.null.javax.xml.parsers.ParserConfigurationException - if there is an error configuring the XML parser.org.xml.sax.SAXException - if the XML SAX parser encounters an error.java.io.IOException - if there is an error accessing the file.public void writeXmlSearches(java.io.File file,
java.util.List<SearchHistory> searches)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException
file - Destination file.searches - List of search history entries to write.javax.xml.parsers.ParserConfigurationException - if there is an XML parser configuration error.java.io.IOException - if there is an error writing the XML content to the file system.