libdigidocpp
|
Public Member Functions | |
XmlConfPrivate () | |
void | init (const std::string &path, bool global) throw (IOException) |
std::auto_ptr< Configuration > | read (const std::string &path) throw (IOException) |
void | setUserConf (const std::string ¶mName, const std::string &value) throw (IOException) |
void | serializeUserConf (const Configuration &pConf) throw (IOException) |
Public Attributes | |
XmlConfParam< int > | logLevel |
XmlConfParam< std::string > | logFile |
XmlConfParam< std::string > | digestUri |
XmlConfParam< std::string > | signatureUri |
XmlConfParam< std::string > | pkcs11DriverPath |
XmlConfParam< std::string > | certStorePath |
XmlConfParam< std::string > | manifestXsdPath |
XmlConfParam< std::string > | xadesXsdPath |
XmlConfParam< std::string > | dsigXsdPath |
XmlConfParam< std::string > | proxyHost |
XmlConfParam< std::string > | proxyPort |
XmlConfParam< std::string > | proxyUser |
XmlConfParam< std::string > | proxyPass |
XmlConfParam< std::string > | pkcs12Cert |
XmlConfParam< std::string > | pkcs12Pass |
XmlConfParam< bool > | pkcs12Disable |
std::vector< XmlConf::OCSPConf > | ocsp |
Static Public Attributes | |
static std::string | DEFAULT_CONF_LOC = "" |
static std::string | USER_CONF_LOC = "" |
static const std::string | LOG_LEVEL = "log.level" |
static const std::string | LOG_FILE = "log.file" |
static const std::string | DIGEST_URI = "digest.uri" |
static const std::string | SIGNATURE_URI = "signature.uri" |
static const std::string | PKCS11_DRIVER_PATH = "pkcs11.driver.path" |
static const std::string | CERT_STORE_PATH = "cert.store.path" |
static const std::string | MANIFEST_XSD_PATH = "manifest.xsd.path" |
static const std::string | XADES_XSD_PATH = "xades.xsd.path" |
static const std::string | DSIG_XSD_PATH = "dsig.xsd.path" |
static const std::string | PROXY_HOST = "proxy.host" |
static const std::string | PROXY_PORT = "proxy.port" |
static const std::string | PROXY_USER = "proxy.user" |
static const std::string | PROXY_PASS = "proxy.pass" |
static const std::string | PKCS12_CERT = "pkcs12.cert" |
static const std::string | PKCS12_PASS = "pkcs12.pass" |
static const std::string | PKCS12_DISABLE = "pkcs12.disable" |
Definition at line 61 of file XmlConf.cpp.
XmlConfPrivate::XmlConfPrivate | ( | ) |
Definition at line 143 of file XmlConf.cpp.
References DEBUG, digidoc::util::File::decodeName(), DEFAULT_CONF_LOC, digidoc::util::File::env(), TRUE, and USER_CONF_LOC.
void XmlConfPrivate::init | ( | const std::string & | path, |
bool | global | ||
) | throw (IOException) |
Load and parse xml from path. Initialize XmlConf member variables from xml.
path | to use for initializing conf |
Definition at line 295 of file XmlConf.cpp.
References digidoc::Conf::OCSPConf::cert, DEBUG, e, digidoc::Conf::OCSPConf::issuer, THROW_IOEXCEPTION, digidoc::Conf::OCSPConf::url, and WARN.
Referenced by digidoc::XmlConf::XmlConf().
std::auto_ptr< Configuration > XmlConfPrivate::read | ( | const std::string & | path | ) | throw (IOException) |
Parses xml configuration given path
path | to parse xml config |
Definition at line 208 of file XmlConf.cpp.
References e, digidoc::XmlConf::getDefaultConfDir(), digidoc::util::File::path(), and THROW_IOEXCEPTION.
void XmlConfPrivate::serializeUserConf | ( | const Configuration & | pConf | ) | throw (IOException) |
Writes configuration data to user specific configuration xml file.
pConf | configuration data in xsd object using conf.xsd schema. |
IOException | exception is thrown if opening of user configuration file fails. |
Definition at line 728 of file XmlConf.cpp.
References digidoc::util::File::createDirectory(), digidoc::util::File::directoryExists(), digidoc::util::File::encodeName(), f_string, digidoc::XmlConf::getDefaultConfDir(), digidoc::XmlConf::getUserConfDir(), digidoc::util::File::path(), and THROW_IOEXCEPTION.
void XmlConfPrivate::setUserConf | ( | const std::string & | paramName, |
const std::string & | value | ||
) | throw (IOException) |
Sets any parameter in a user configuration file. Also creates a configuration file if it is missing.
paramName | name of parameter that needs to be changed or created. |
value | value for changing or adding to a given parameter. If value is an empty string, the walue for a given parameter will be erased. |
IOException | exception is thrown if reading, writing or creating of a user configuration file fails. |
Definition at line 693 of file XmlConf.cpp.
References e, digidoc::util::File::fileExists(), THROW_IOEXCEPTION, and value.
|
static |
Definition at line 98 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::certStorePath |
Definition at line 77 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getCertStorePath().
|
static |
Path to default configuration files
Definition at line 90 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getDefaultConfDir(), digidoc::XmlConf::XmlConf(), and XmlConfPrivate().
|
static |
Definition at line 95 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::digestUri |
Definition at line 74 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getDigestUri().
|
static |
Definition at line 101 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::dsigXsdPath |
Definition at line 80 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getDsigXsdPath().
|
static |
Definition at line 94 of file XmlConf.cpp.
|
static |
Definition at line 93 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::logFile |
Definition at line 73 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getLogFile().
XmlConfParam<int> digidoc::XmlConfPrivate::logLevel |
Definition at line 72 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getLogLevel().
|
static |
Definition at line 99 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::manifestXsdPath |
Definition at line 78 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getManifestXsdPath().
std::vector<XmlConf::OCSPConf> digidoc::XmlConfPrivate::ocsp |
Definition at line 88 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getOCSP().
|
static |
Definition at line 97 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::pkcs11DriverPath |
Definition at line 76 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getPKCS11DriverPath().
|
static |
Definition at line 106 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setPKCS12Cert().
|
static |
Definition at line 108 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setPKCS12Disable().
|
static |
Definition at line 107 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setPKCS12Pass().
XmlConfParam<std::string> digidoc::XmlConfPrivate::pkcs12Cert |
Definition at line 85 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getPKCS12Cert().
XmlConfParam<bool> digidoc::XmlConfPrivate::pkcs12Disable |
Definition at line 87 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getPKCS12Disable().
XmlConfParam<std::string> digidoc::XmlConfPrivate::pkcs12Pass |
Definition at line 86 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getPKCS12Pass().
|
static |
Definition at line 102 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setProxyHost().
|
static |
Definition at line 105 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setProxyPass().
|
static |
Definition at line 103 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setProxyPort().
|
static |
Definition at line 104 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::setProxyUser().
XmlConfParam<std::string> digidoc::XmlConfPrivate::proxyHost |
Definition at line 81 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getProxyHost().
XmlConfParam<std::string> digidoc::XmlConfPrivate::proxyPass |
Definition at line 84 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getProxyPass().
XmlConfParam<std::string> digidoc::XmlConfPrivate::proxyPort |
Definition at line 82 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getProxyPort().
XmlConfParam<std::string> digidoc::XmlConfPrivate::proxyUser |
Definition at line 83 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getProxyUser().
|
static |
Definition at line 96 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::signatureUri |
Definition at line 75 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getSignatureUri().
|
static |
Definition at line 91 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getUserConfDir(), digidoc::XmlConf::setOCSP(), digidoc::XmlConf::XmlConf(), and XmlConfPrivate().
|
static |
Definition at line 100 of file XmlConf.cpp.
XmlConfParam<std::string> digidoc::XmlConfPrivate::xadesXsdPath |
Definition at line 79 of file XmlConf.cpp.
Referenced by digidoc::XmlConf::getXadesXsdPath().