libdigidocpp
digidoc::XmlConfPrivate Class Reference
Collaboration diagram for digidoc::XmlConfPrivate:
Collaboration graph

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 &paramName, const std::string &value) throw (IOException)
void serializeUserConf (const Configuration &pConf) throw (IOException)

Public Attributes

XmlConfParam< intlogLevel
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::OCSPConfocsp

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"

Detailed Description

Definition at line 61 of file XmlConf.cpp.

Constructor & Destructor Documentation

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.

Here is the call graph for this function:

Member Function Documentation

void XmlConfPrivate::init ( const std::string &  path,
bool  global 
) throw (IOException)

Load and parse xml from path. Initialize XmlConf member variables from xml.

Parameters
pathto 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().

Here is the caller graph for this function:

std::auto_ptr< Configuration > XmlConfPrivate::read ( const std::string &  path) throw (IOException)

Parses xml configuration given path

Parameters
pathto parse xml config
Returns
returns parsed xml configuration

Definition at line 208 of file XmlConf.cpp.

References e, digidoc::XmlConf::getDefaultConfDir(), digidoc::util::File::path(), and THROW_IOEXCEPTION.

Here is the call graph for this function:

void XmlConfPrivate::serializeUserConf ( const Configuration &  pConf) throw (IOException)

Writes configuration data to user specific configuration xml file.

Parameters
pConfconfiguration data in xsd object using conf.xsd schema.
Exceptions
IOExceptionexception 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.

Here is the call graph for this function:

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.

Parameters
paramNamename of parameter that needs to be changed or created.
valuevalue for changing or adding to a given parameter. If value is an empty string, the walue for a given parameter will be erased.
Exceptions
IOExceptionexception 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.

Here is the call graph for this function:

Member Data Documentation

const std::string XmlConfPrivate::CERT_STORE_PATH = "cert.store.path"
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().

std::string XmlConfPrivate::DEFAULT_CONF_LOC = ""
static

Path to default configuration files

Definition at line 90 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::getDefaultConfDir(), digidoc::XmlConf::XmlConf(), and XmlConfPrivate().

const std::string XmlConfPrivate::DIGEST_URI = "digest.uri"
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().

const std::string XmlConfPrivate::DSIG_XSD_PATH = "dsig.xsd.path"
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().

const std::string XmlConfPrivate::LOG_FILE = "log.file"
static

Definition at line 94 of file XmlConf.cpp.

const std::string XmlConfPrivate::LOG_LEVEL = "log.level"
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().

const std::string XmlConfPrivate::MANIFEST_XSD_PATH = "manifest.xsd.path"
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().

const std::string XmlConfPrivate::PKCS11_DRIVER_PATH = "pkcs11.driver.path"
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().

const std::string XmlConfPrivate::PKCS12_CERT = "pkcs12.cert"
static

Definition at line 106 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::setPKCS12Cert().

const std::string XmlConfPrivate::PKCS12_DISABLE = "pkcs12.disable"
static

Definition at line 108 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::setPKCS12Disable().

const std::string XmlConfPrivate::PKCS12_PASS = "pkcs12.pass"
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().

const std::string XmlConfPrivate::PROXY_HOST = "proxy.host"
static

Definition at line 102 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::setProxyHost().

const std::string XmlConfPrivate::PROXY_PASS = "proxy.pass"
static

Definition at line 105 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::setProxyPass().

const std::string XmlConfPrivate::PROXY_PORT = "proxy.port"
static

Definition at line 103 of file XmlConf.cpp.

Referenced by digidoc::XmlConf::setProxyPort().

const std::string XmlConfPrivate::PROXY_USER = "proxy.user"
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().

const std::string XmlConfPrivate::SIGNATURE_URI = "signature.uri"
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().

std::string XmlConfPrivate::USER_CONF_LOC = ""
static
const std::string XmlConfPrivate::XADES_XSD_PATH = "xades.xsd.path"
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().


The documentation for this class was generated from the following file: