22#include <com/sun/star/deployment/DeploymentException.hpp>
23#include <com/sun/star/uno/XComponentContext.hpp>
30constexpr OUStringLiteral
EXTENSION_REG_NS =
u"http://openoffice.org/extensionmanager/component-registry/2010";
38 Reference<XComponentContext>
const &
xContext,
76 u"implementation-names",
91 catch(
const css::uno::Exception &)
93 Any exc( ::cppu::getCaughtException() );
94 throw css::deployment::DeploymentException(
95 "Extension Manager: failed to write data entry in backend db: " +
112 readList( aNode,
u"implementation-names",
u"name");
119 catch(
const css::uno::Exception &)
121 Any exc( ::cppu::getCaughtException() );
122 throw css::deployment::DeploymentException(
123 "Extension Manager: failed to read data entry in backend db: " +
void writeSimpleElement(std::u16string_view sElementName, OUString const &value, css::uno::Reference< css::xml::dom::XNode > const &xParent)
std::deque< OUString > readList(css::uno::Reference< css::xml::dom::XNode > const &parent, std::u16string_view sListTagName, std::u16string_view sMemberTagName)
OUString readSimpleElement(std::u16string_view sElementName, css::uno::Reference< css::xml::dom::XNode > const &xParent)
std::vector< std::pair< OUString, OUString > > readVectorOfPair(css::uno::Reference< css::xml::dom::XNode > const &parent, std::u16string_view sListTagName, std::u16string_view sPairTagName, std::u16string_view sFirstTagName, std::u16string_view sSecondTagName)
css::uno::Reference< css::xml::dom::XNode > writeKeyElement(OUString const &url)
The key elements have a url attribute and are always children of the root element.
css::uno::Reference< css::xml::dom::XNode > getKeyElement(std::u16string_view url)
void writeSimpleList(std::deque< OUString > const &list, std::u16string_view sListTagName, std::u16string_view sMemberTagName, css::uno::Reference< css::xml::dom::XNode > const &xParent)
void writeVectorOfPair(std::vector< std::pair< OUString, OUString > > const &vecPairs, std::u16string_view sVectorTagName, std::u16string_view sPairTagName, std::u16string_view sFirstTagName, std::u16string_view sSecondTagName, css::uno::Reference< css::xml::dom::XNode > const &xParent)
bool activateEntry(std::u16string_view url)
void addEntry(OUString const &url, Data const &data)
virtual OUString getDbNSName() override
virtual OUString getRootElementName() override
virtual OUString getKeyElementName() override
Data getEntry(std::u16string_view url)
ComponentBackendDb(css::uno::Reference< css::uno::XComponentContext > const &xContext, OUString const &url)
virtual OUString getNSPrefix() override
constexpr OUStringLiteral EXTENSION_REG_NS
constexpr OUStringLiteral NS_PREFIX
constexpr OUStringLiteral KEY_ELEMENT_NAME
constexpr OUStringLiteral ROOT_ELEMENT_NAME
static uno::Reference< css::uno::XComponentContext > xContext
std::vector< std::pair< OUString, OUString > > singletons
std::deque< OUString > implementationNames