summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-05-20 14:43:56 +0000
committerRüdiger Timm <rt@openoffice.org>2005-05-20 14:43:56 +0000
commit05cf31a04c2208c3d0746535f5f6f07080b929f8 (patch)
treec4491572b411798bd519fe078e1573d059437fba /configmgr
parent24d2684a575e3ddf7267a4eaf032aa4c02d40e83 (diff)
INTEGRATION: CWS nativefixer9 (1.2.76); FILE MERGED
2005/05/19 07:24:40 jb 1.2.76.1: #i49148# Add support for tagging configuration schemas with a version (XVersionedSchemaSupplier); Use <buildid> as global version tag, to support schema upgrades with patches and updates.
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/localbe/localschemasupplier.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/configmgr/source/localbe/localschemasupplier.cxx b/configmgr/source/localbe/localschemasupplier.cxx
index a78e9d3d9190..d30b31d60667 100644
--- a/configmgr/source/localbe/localschemasupplier.cxx
+++ b/configmgr/source/localbe/localschemasupplier.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: localschemasupplier.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-03-30 14:58:01 $
+ * last change: $Author: rt $ $Date: 2005-05-20 15:43:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,6 +120,9 @@ LocalSchemaSupplier::~LocalSchemaSupplier(void) {}
static const rtl::OUString kSchemaDataUrl(
RTL_CONSTASCII_USTRINGPARAM(CONTEXT_ITEM_PREFIX_"SchemaDataUrl")) ;
+static const rtl::OUString kSchemaVersion(
+ RTL_CONSTASCII_USTRINGPARAM(CONTEXT_ITEM_PREFIX_"SchemaVersion")) ;
+
void SAL_CALL LocalSchemaSupplier::initialize(
const uno::Sequence<uno::Any>& aParameters)
throw (uno::RuntimeException, uno::Exception,
@@ -139,6 +142,11 @@ void SAL_CALL LocalSchemaSupplier::initialize(
if (aParameters [i] >>= context) { break ; }
}
+ // Setting: schema version
+ // TODO: Add support for repository-specific versions
+ uno::Any const aSchemaVersionSetting = context->getValueByName(kSchemaVersion);
+ aSchemaVersionSetting >>= mSchemaVersion;
+
// Setting: schema diretory(ies)
uno::Any const aSchemaDataSetting = context->getValueByName(kSchemaDataUrl);
uno::Sequence< OUString > aSchemas;
@@ -192,6 +200,16 @@ void SAL_CALL LocalSchemaSupplier::initialize(
mSchemaDataUrls.realloc(nSchemaLocations);
}
//------------------------------------------------------------------------------
+
+rtl::OUString SAL_CALL
+ LocalSchemaSupplier::getSchemaVersion(const rtl::OUString& /*aComponent*/)
+ throw (backend::BackendAccessException, lang::IllegalArgumentException,
+ uno::RuntimeException)
+{
+ // TODO: Add support for repository-specific versions
+ return mSchemaVersion;
+}
+//------------------------------------------------------------------------------
static const rtl::OUString kSchemaSuffix(RTL_CONSTASCII_USTRINGPARAM(".xcs")) ;
static const rtl::OUString kXMLSchemaParser(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.backend.xml.SchemaParser")) ;