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/help-registry/2010";
38 Reference<XComponentContext>
const &
xContext,
70 Reference<css::xml::dom::XNode> helpNode
77 catch (
const css::deployment::DeploymentException& )
81 catch(
const css::uno::Exception &)
83 Any exc( ::cppu::getCaughtException() );
84 throw css::deployment::DeploymentException(
85 "Extension Manager: failed to write data entry in help backend db: " +
m_urlDb,
nullptr, exc);
90::std::optional<HelpBackendDb::Data>
103 return ::std::optional<Data>();
105 return ::std::optional<Data>(retData);
107 catch (
const css::deployment::DeploymentException& )
111 catch(
const css::uno::Exception &)
113 Any exc( ::cppu::getCaughtException() );
114 throw css::deployment::DeploymentException(
115 "Extension Manager: failed to read data entry in help backend db: " +
m_urlDb,
nullptr, exc);
void writeSimpleElement(std::u16string_view sElementName, OUString const &value, css::uno::Reference< css::xml::dom::XNode > const &xParent)
OUString readSimpleElement(std::u16string_view sElementName, css::uno::Reference< css::xml::dom::XNode > const &xParent)
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.
std::vector< OUString > getOneChildFromAllEntries(std::u16string_view sElementName)
css::uno::Reference< css::xml::dom::XNode > getKeyElement(std::u16string_view url)
bool activateEntry(std::u16string_view url)
virtual OUString getDbNSName() override
virtual OUString getNSPrefix() override
virtual OUString getRootElementName() override
void addEntry(OUString const &url, Data const &data)
HelpBackendDb(css::uno::Reference< css::uno::XComponentContext > const &xContext, OUString const &url)
std::vector< OUString > getAllDataUrls()
virtual OUString getKeyElementName() override
::std::optional< Data > getEntry(std::u16string_view url)
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