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/extension-registry/2010";
38 Reference<XComponentContext>
const &
xContext,
70 Reference<css::xml::dom::XNode> extensionNodeNode =
writeKeyElement(url);
72 u"url",
u"media-type", extensionNodeNode);
76 catch(
const css::uno::Exception &)
78 Any exc( ::cppu::getCaughtException() );
79 throw css::deployment::DeploymentException(
80 "Extension Manager: failed to write data entry in backend db: " +
96 u"url",
u"media-type");
100 catch(
const css::uno::Exception &)
102 Any exc( ::cppu::getCaughtException() );
103 throw css::deployment::DeploymentException(
104 "Extension Manager: failed to read data entry in backend db: " +
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 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)
virtual OUString getNSPrefix() override
Data getEntry(std::u16string_view url)
ExtensionBackendDb(css::uno::Reference< css::uno::XComponentContext > const &xContext, OUString const &url)
void addEntry(OUString const &url, Data const &data)
virtual OUString getKeyElementName() override
virtual OUString getRootElementName() override
virtual OUString getDbNSName() 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 > > items