summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-07 09:09:49 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-07 09:09:49 +0000
commitbc616b101218183629e0d458d5cd463483f8f659 (patch)
tree0221835bd2072c02b85e31b1b0c6582a8c760edf /configmgr
parentf365709520d8beb44bef94b08cd1867a579ff5f3 (diff)
INTEGRATION: CWS cfgimpex (1.4.2); FILE MERGED
2004/12/10 09:04:36 jb 1.4.2.1: #118253# Refactor Stratum implementation to prepare for new MultiLayerStratum
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/localbe/localsinglestratum.cxx252
-rw-r--r--configmgr/source/localbe/localsinglestratum.hxx208
2 files changed, 57 insertions, 403 deletions
diff --git a/configmgr/source/localbe/localsinglestratum.cxx b/configmgr/source/localbe/localsinglestratum.cxx
index 7fcba50e4bd9..857cd07741cc 100644
--- a/configmgr/source/localbe/localsinglestratum.cxx
+++ b/configmgr/source/localbe/localsinglestratum.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: localsinglestratum.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obo $ $Date: 2004-11-15 13:36:40 $
+ * last change: $Author: rt $ $Date: 2005-01-07 10:09:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,14 +65,6 @@
#include "localfilehelper.hxx"
#endif
-#ifndef CONFIGMGR_LOCALBE_LOCALFILELAYER_HXX_
-#include "localfilelayer.hxx"
-#endif // CONFIGMGR_LOCALBE_LOCALFILELAYER_HXX_
-
-#ifndef _CONFIGMGR_OSLSTREAM_HXX_
-#include "oslstream.hxx"
-#endif // _CONFIGMGR_OSLSTREAM_HXX_
-
#ifndef CONFIGMGR_API_FACTORY_HXX_
#include "confapifactory.hxx"
#endif // CONFIGMGR_API_FACTORY_HXX_
@@ -81,13 +73,6 @@
#include "serviceinfohelper.hxx"
#endif // CONFIGMGR_SERVICEINFOHELPER_HXX_
-#ifndef CONFIGMGR_BOOTSTRAP_HXX_
-#include "bootstrap.hxx"
-#endif
-#ifndef _CONFIGMGR_FILEHELPER_HXX_
-#include "filehelper.hxx"
-#endif
-
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
#endif // _RTL_USTRBUF_HXX_
@@ -99,170 +84,32 @@
#include <com/sun/star/configuration/backend/InsufficientAccessRightsException.hpp>
#endif
-#ifndef _OSL_FILE_HXX_
-#include <osl/file.hxx>
-#endif
-#ifndef _OSL_PROCESS_H_
-#include <osl/process.h>
-#endif
-#include <memory>
-
namespace configmgr { namespace localbe {
//==============================================================================
-//------------------------------------------------------------------------------
+static inline rtl::OUString getDataSubPath()
+{ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/data")); }
-LocalSingleStratumBase::LocalSingleStratumBase(
- const uno::Reference<uno::XComponentContext>& xContext)
- : SingleBackendBase(mMutex), mFactory(xContext->getServiceManager(),uno::UNO_QUERY) {
-}
+static inline rtl::OUString getLocalisedDataSubPath()
+{ return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/res")); }
//------------------------------------------------------------------------------
-LocalSingleStratumBase::~LocalSingleStratumBase(void) {}
-
-//------------------------------------------------------------------------------
-void SAL_CALL LocalSingleStratumBase::initialize(
- const uno::Sequence<uno::Any>& aParameters)
- throw (uno::RuntimeException, uno::Exception,
- css::configuration::InvalidBootstrapFileException,
- backend::CannotConnectException,
- backend::BackendSetupException)
-{
-
-
-
- if (aParameters.getLength() == 0) {
- throw lang::IllegalArgumentException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "No parameters provided to LocalSingleStratum")),
- *this, 0) ;
- }
-
-
- for (sal_Int32 i = 0 ; i < aParameters.getLength() ; ++ i) {
- if (aParameters [i] >>= mStrataDataUrl )
- { break ; }
-
- }
-
- //OSL_TRACE ( " Url is %s " ,rtl::OUStringToOString(mStrataDataUrl, RTL_TEXTENCODING_ASCII_US).getStr());
- //validate DefaultDataUrls
- bool bOptional = checkOptionalArg(mStrataDataUrl);
-
- // get modified base for special layer implementations (e.g. resources)
- this->adjustBaseURL(mStrataDataUrl);
-
- validateFileURL(mStrataDataUrl, *this);
- //NormalizeURL
- implEnsureAbsoluteURL(mStrataDataUrl);
- normalizeURL(mStrataDataUrl,*this, true);
-
- if(FileHelper::fileExists(mStrataDataUrl))
- {
- checkIfDirectory(mStrataDataUrl, *this);
- }
-}
-
-//------------------------------------------------------------------------------
-
-void LocalSingleStratumBase::adjustBaseURL(rtl::OUString& )
+LocalSingleStratumBase::LocalSingleStratumBase(const uno::Reference<uno::XComponentContext>& xContext)
+: SingleStratumImplBase(xContext)
{
}
//------------------------------------------------------------------------------
-sal_Bool LocalSingleStratumBase::isMoreRecent(const rtl::OUString& aFileUrl,
- const rtl::OUString& aTimestamp) {
- rtl::OUString layerUrl ;
- rtl::OUString subLayerUrl ;
+LocalSingleStratumBase::~LocalSingleStratumBase() {}
- getLayerDirectories(layerUrl, subLayerUrl) ;
-
- return layerUrl.getLength() == 0 ||
- BasicLocalFileLayer::getTimestamp(layerUrl + aFileUrl).compareTo( aTimestamp) != 0;
-}
//------------------------------------------------------------------------------
-
-static const rtl::OUString kDataSuffix(RTL_CONSTASCII_USTRINGPARAM(".xcu")) ;
-static const rtl::OUString kDataSubPath(
- RTL_CONSTASCII_USTRINGPARAM("/data")) ;
-static const rtl::OUString kLocalisedDataSubPath(
- RTL_CONSTASCII_USTRINGPARAM("/res")) ;
-
-
uno::Reference<backend::XLayer> SAL_CALL
LocalSingleStratumBase::getLayer( const rtl::OUString& aComponent, const rtl::OUString& aTimestamp )
throw (backend::BackendAccessException, lang::IllegalArgumentException,
uno::RuntimeException)
{
-
- if (aComponent.getLength() == 0){
- throw lang::IllegalArgumentException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "LocalStratum:getLayer - no component specified")),
- *this, 0) ;
- }
- rtl::OUString const componentSubPath = componentToPath(aComponent) + kDataSuffix ;
- if (!isMoreRecent(componentSubPath, aTimestamp)) { return NULL ; }
-
- return createReadonlyFileLayer(componentSubPath);
-}
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-OUString SAL_CALL LocalSingleStratumBase::getOwnerEntity()
- throw (uno::RuntimeException)
-{
- return mStrataDataUrl ;
-}
-//------------------------------------------------------------------------------
-
-OUString SAL_CALL LocalSingleStratumBase::getAdminEntity()
- throw (uno::RuntimeException)
-{
- return OUString();
-}
-//------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL LocalSingleStratumBase::supportsEntity( const OUString& aEntity )
- throw (backend::BackendAccessException, uno::RuntimeException)
-{
- if(mStrataDataUrl.getLength() == 0)
- {
- return false;
- }
- if (aEntity.getLength() == 0)
- {
- return false;
- }
- return isEqualEntity(mStrataDataUrl,aEntity);
-}
-//------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL LocalSingleStratumBase::isEqualEntity(const OUString& aEntity, const OUString& aOtherEntity)
- throw (backend::BackendAccessException, lang::IllegalArgumentException, uno::RuntimeException)
-{
- if (aEntity.getLength() == 0)
- {
- rtl::OUString const sMsg(RTL_CONSTASCII_USTRINGPARAM(
- "LocalSingleBackend - Invalid empty entity."));
-
- throw lang::IllegalArgumentException(sMsg, *this, 1);
- }
- if (aOtherEntity.getLength() == 0)
- {
- rtl::OUString const sMsg(RTL_CONSTASCII_USTRINGPARAM(
- "LocalSingleBackend - Invalid empty entity."));
-
- throw lang::IllegalArgumentException(sMsg, *this, 2);
- }
- OUString aNormalizedEntity(aEntity);
- normalizeURL(aNormalizedEntity,*this);
-
- OUString aNormalizedOther(aOtherEntity);
- normalizeURL(aNormalizedOther,*this);
-
- return aNormalizedEntity == aNormalizedOther;
+ return LocalStratumBase::getLayer(aComponent,aTimestamp);
}
//------------------------------------------------------------------------------
uno::Reference<backend::XUpdatableLayer> SAL_CALL
@@ -276,28 +123,16 @@ uno::Reference<backend::XUpdatableLayer> SAL_CALL
"LocalSingleStratum:getLayer - no component specified")),
*this, 0) ;
}
- rtl::OUString const componentSubPath = componentToPath(aComponent) + kDataSuffix ;
+ rtl::OUString const componentSubPath = componentToPath(aComponent) + getDataSuffix();
return createUpdatableFileLayer( componentSubPath) ;
}
//------------------------------------------------------------------------------
-static
-void failReadonly(backend::XSingleLayerStratum * pContext,const rtl::OUString & aBaseUrl)
-{
- rtl::OUStringBuffer aMessage;
- aMessage.appendAscii("Configurations - ")
- .appendAscii("Cannot get update access to layer: ")
- .appendAscii("Local file-based stratum at ")
- .append(aBaseUrl)
- .appendAscii(" is readonly.");
- throw lang::NoSupportException(aMessage.makeStringAndClear(),pContext);
-}
-//------------------------------------------------------------------------------
uno::Reference<backend::XUpdatableLayer> SAL_CALL
LocalReadonlyStratum::getUpdatableLayer(const rtl::OUString& aComponent)
throw (backend::BackendAccessException, lang::IllegalArgumentException,
lang::NoSupportException, uno::RuntimeException)
{
- failReadonly(this,getBaseUrl());
+ failReadonly();
return 0;
}
uno::Reference<backend::XUpdatableLayer> SAL_CALL
@@ -305,7 +140,7 @@ uno::Reference<backend::XUpdatableLayer> SAL_CALL
throw (backend::BackendAccessException, lang::IllegalArgumentException,
lang::NoSupportException, uno::RuntimeException)
{
- failReadonly(this,getBaseUrl());
+ failReadonly();
return 0;
}
//------------------------------------------------------------------------------
@@ -314,7 +149,7 @@ inline
void impl_getLayerDataDirectory(rtl::OUString const & aLayerBaseUrl,
rtl::OUString& aMainLayerUrl)
{
- aMainLayerUrl = aLayerBaseUrl + kDataSubPath ;
+ aMainLayerUrl = aLayerBaseUrl + getDataSubPath() ;
}
//------------------------------------------------------------------------------
static
@@ -322,31 +157,31 @@ inline
void impl_getLayerResDirectory(rtl::OUString const & aLayerBaseUrl,
rtl::OUString& aSubLayerUrl)
{
- aSubLayerUrl = aLayerBaseUrl + kLocalisedDataSubPath ;
+ aSubLayerUrl = aLayerBaseUrl + getLocalisedDataSubPath() ;
}
//------------------------------------------------------------------------------
void LocalSingleStratum::getLayerDirectories(rtl::OUString& aLayerUrl,
rtl::OUString& aSubLayerUrl) const
{
- impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
- impl_getLayerResDirectory(getBaseUrl(),aSubLayerUrl);
+ impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
+ impl_getLayerResDirectory(getBaseUrl(),aSubLayerUrl);
}
//------------------------------------------------------------------------------
void LocalDataStratum::getLayerDirectories(rtl::OUString& aLayerUrl,
rtl::OUString& aSubLayerUrl) const
{
- impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
- aSubLayerUrl = OUString();
+ impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
+ aSubLayerUrl = OUString();
}
//------------------------------------------------------------------------------
void LocalReadonlyStratum::getLayerDirectories(rtl::OUString& aLayerUrl,
rtl::OUString& aSubLayerUrl) const
{
- impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
- aSubLayerUrl = OUString();
+ impl_getLayerDataDirectory(getBaseUrl(),aLayerUrl);
+ aSubLayerUrl = OUString();
}
//------------------------------------------------------------------------------
@@ -365,28 +200,6 @@ void LocalResourceStratum::getLayerDirectories(rtl::OUString& aLayerUrl,
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
-uno::Reference<backend::XLayer>
- LocalSingleStratumBase::createReadonlyFileLayer(const rtl::OUString& aComponent)
- throw (lang::IllegalArgumentException)
-{
- rtl::OUString layerPath ;
- rtl::OUString subLayerPath ;
-
- getLayerDirectories(layerPath, subLayerPath) ;
- return createReadonlyLocalFileLayer(mFactory, layerPath, aComponent, subLayerPath) ;
-}
-//------------------------------------------------------------------------------
-uno::Reference<backend::XUpdatableLayer>
- LocalSingleStratumBase::createUpdatableFileLayer(const rtl::OUString& aComponent)
- throw (lang::IllegalArgumentException)
-{
- rtl::OUString layerPath ;
- rtl::OUString subLayerPath ;
-
- getLayerDirectories(layerPath, subLayerPath) ;
- return createUpdatableLocalFileLayer(mFactory, layerPath, aComponent, subLayerPath) ;
-}
-//------------------------------------------------------------------------------
static const sal_Char * const kLegacyStratumImplementation =
"com.sun.star.comp.configuration.backend.LocalSingleStratum" ;
@@ -457,29 +270,6 @@ const ServiceImplementationInfo * LocalResourceStratum::getServiceInfoData() con
return &kResourceStratumServiceInfo;
}
//------------------------------------------------------------------------------
-
-rtl::OUString SAL_CALL LocalSingleStratumBase::getImplementationName(void)
- throw (uno::RuntimeException)
-{
- return ServiceInfoHelper(getServiceInfoData()).getImplementationName() ;
-}
-//------------------------------------------------------------------------------
-
-sal_Bool SAL_CALL LocalSingleStratumBase::supportsService(
- const rtl::OUString& aServiceName)
- throw (uno::RuntimeException)
-{
- return ServiceInfoHelper(getServiceInfoData()).supportsService(aServiceName);
-}
-//------------------------------------------------------------------------------
-
-uno::Sequence<rtl::OUString>
-SAL_CALL LocalSingleStratumBase::getSupportedServiceNames(void)
- throw (uno::RuntimeException)
-{
- return ServiceInfoHelper(getServiceInfoData()).getSupportedServiceNames() ;
-}
-
// ---------------------------------------------------------------------------------------
} } // configmgr.localsinglestratum
diff --git a/configmgr/source/localbe/localsinglestratum.hxx b/configmgr/source/localbe/localsinglestratum.hxx
index 5f524c61e3c9..b6b5da2cfb60 100644
--- a/configmgr/source/localbe/localsinglestratum.hxx
+++ b/configmgr/source/localbe/localsinglestratum.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: localsinglestratum.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obo $ $Date: 2004-11-15 13:36:53 $
+ * last change: $Author: rt $ $Date: 2005-01-07 10:09:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,49 +59,22 @@
*
************************************************************************/
-#ifndef CONFIGMGR_LOCALBE_LOCALSINGLEBACKEND_HXX_
-#define CONFIGMGR_LOCALBE_LOCALSINGLEBACKEND_HXX_
+#ifndef CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
+#define CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSCHEMASUPPLIER_HPP_
-#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XBACKENDENTITIES_HPP_
-#include <com/sun/star/configuration/backend/XBackendEntities.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
-#include <com/sun/star/lang/XInitialization.hpp>
-#endif // _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
-#include <com/sun/star/uno/XComponentContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#endif // _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
-
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif // _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XBACKENDENTITIES_HPP_
-#include <com/sun/star/configuration/backend/XBackendEntities.hpp>
+#ifndef CONFIGMGR_LOCALBE_LOCALSTRATUMBASE_HXX_
+#include "localstratumbase.hxx"
#endif
-#ifndef _COM_SUN_STAR_CONFIGURATION_INVALIDBOOTSTRAPFILEEXCEPTION_HPP_
-#include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
+#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSINGLELAYERSTRATUM_HPP_
+#include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
#endif
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_CANNOTCONNECTEXCEPTION_HPP_
-#include <com/sun/star/configuration/backend/CannotConnectException.hpp>
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
#endif
-#ifndef _CPPUHELPER_COMPBASE5_HXX_
-#include <cppuhelper/compbase4.hxx>
-#endif // _CPPUHELPER_COMPBASE4_HXX_
-
namespace configmgr
{
- struct ServiceImplementationInfo;
-
namespace localbe
{
@@ -110,149 +83,40 @@ namespace uno = css::uno ;
namespace lang = css::lang ;
namespace backend = css::configuration::backend ;
-typedef cppu::WeakComponentImplHelper4<backend::XSingleLayerStratum,
- lang::XInitialization,
- backend::XBackendEntities,
- lang::XServiceInfo> SingleBackendBase ;
+typedef cppu::ImplInheritanceHelper1< LocalStratumBase,
+ backend::XSingleLayerStratum
+ > SingleStratumImplBase ;
/**
Implements the SingleLayerStratum service for local file access.
*/
-class LocalSingleStratumBase : public SingleBackendBase {
- public :
- /**
- Service constructor from a service factory.
-
- @param xContext component context
- */
- LocalSingleStratumBase(const uno::Reference<uno::XComponentContext>& xContext) ;
-
- /** Destructor */
- ~LocalSingleStratumBase(void) ;
-
-
- // XInitialize
- virtual void SAL_CALL
- initialize( const uno::Sequence<uno::Any>& aParameters)
- throw (uno::RuntimeException, uno::Exception,
- css::configuration::InvalidBootstrapFileException,
- backend::CannotConnectException,
- backend::BackendSetupException);
-
-
- // XBackendEntities
- virtual rtl::OUString SAL_CALL
- getOwnerEntity( )
- throw (uno::RuntimeException);
-
- virtual rtl::OUString SAL_CALL
- getAdminEntity( )
- throw (uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL
- supportsEntity( const rtl::OUString& aEntity )
- throw (backend::BackendAccessException, uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL
- isEqualEntity( const rtl::OUString& aEntity, const rtl::OUString& aOtherEntity )
- throw (backend::BackendAccessException, lang::IllegalArgumentException, uno::RuntimeException);
- // XServiceInfo
- virtual rtl::OUString SAL_CALL
- getImplementationName( )
- throw (uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL
- supportsService( const rtl::OUString& aServiceName )
- throw (uno::RuntimeException) ;
-
- virtual uno::Sequence<rtl::OUString> SAL_CALL
- getSupportedServiceNames( )
- throw (uno::RuntimeException) ;
-
- // XSingleLayerStratum
- virtual uno::Reference<backend::XLayer> SAL_CALL
- getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
- throw (backend::BackendAccessException,
- lang::IllegalArgumentException,
- uno::RuntimeException) ;
-
- virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
- getUpdatableLayer( const rtl::OUString& aLayerId )
- throw (backend::BackendAccessException,
- lang::IllegalArgumentException,
- lang::NoSupportException,
- uno::RuntimeException) ;
-
- protected:
- rtl::OUString const & getBaseUrl() const
- { return mStrataDataUrl; }
-
- protected:
- /// Parses and adjusts the passed base URL
- virtual void adjustBaseURL(rtl::OUString& aBaseURL);
-
- /**
- Retrieves the appropriate layer and sublayers base directories.
-
- @param aLayerUrl layer base URL, filled on return
- @param aSubLayerUrl sublayer base URL, filled on return
- */
- virtual void getLayerDirectories(rtl::OUString& aLayerUrl,
- rtl::OUString& aSubLayerUrl) const = 0;
- private:
- virtual const ServiceImplementationInfo * getServiceInfoData() const = 0;
-
- private :
- /** Service factory */
- uno::Reference<lang::XMultiServiceFactory> mFactory ;
- /** Mutex for resources protection */
- osl::Mutex mMutex ;
- /**
- Base of the strata data.
- */
- rtl::OUString mStrataDataUrl ;
-
-
- /**
- Builds a LocalFileLayer object given a layer id.
- Since the LocalFileLayer implements the various
- interfaces a layer can be accessed as, a few methods
- need one. This method handles the layer id mapping
- and the existence or not of sublayers.
+class LocalSingleStratumBase : public SingleStratumImplBase
+{
+public :
+ /**
+ Service constructor from a service factory.
- @param aLayerId layer id
- @return local file layer
- @throws com::sun::star::lang::IllegalArgumentException
- if the layer id is invalid.
- */
- uno::Reference<backend::XLayer> createReadonlyFileLayer(const rtl::OUString& aLayerId)
- throw (lang::IllegalArgumentException) ;
+ @param xContext component context
+ */
+ LocalSingleStratumBase(const uno::Reference<uno::XComponentContext>& xContext) ;
- /**
- Builds a LocalFileLayer object given a layer id.
- Since the LocalFileLayer implements the various
- interfaces a layer can be accessed as, a few methods
- need one. This method handles the layer id mapping
- and the existence or not of sublayers.
+ /** Destructor */
+ ~LocalSingleStratumBase() ;
- @param aLayerId layer id
- @return local file layer
- @throws com::sun::star::lang::IllegalArgumentException
- if the layer id is invalid.
- */
- uno::Reference<backend::XUpdatableLayer> createUpdatableFileLayer(const rtl::OUString& aLayerId)
- throw (lang::IllegalArgumentException) ;
- /**
- Tells if a file is more recent than a given date.
- The date is formatted YYYYMMDDhhmmssZ.
+ // XSingleLayerStratum
+ virtual uno::Reference<backend::XLayer> SAL_CALL
+ getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
+ throw (backend::BackendAccessException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException) ;
- @param aComponent URL of the component to check
- @param aTimestamp timestamp to check against
- @return sal_True if the file is more recent, sal_False otherwise
- */
- sal_Bool isMoreRecent(const rtl::OUString& aComponent,
- const rtl::OUString& aTimestamp) ;
+ virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
+ getUpdatableLayer( const rtl::OUString& aLayerId )
+ throw (backend::BackendAccessException,
+ lang::IllegalArgumentException,
+ lang::NoSupportException,
+ uno::RuntimeException) ;
} ;
@@ -325,4 +189,4 @@ private:
} } // configmgr.localbe
-#endif // CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
+#endif