diff --git a/configmgr/source/backend/backendaccess.cxx b/configmgr/source/backend/backendaccess.cxx index 49b734a38914..b4b144577d6e 100644 --- a/configmgr/source/backend/backendaccess.cxx +++ b/configmgr/source/backend/backendaccess.cxx @@ -2,9 +2,9 @@ * * $RCSfile: backendaccess.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: ssmith $ $Date: 2002-10-24 12:59:32 $ + * last change: $Author: ssmith $ $Date: 2002-12-13 10:14:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -123,13 +123,12 @@ static rtl::OUString findBestLocale( } //------------------------------------------------------------------------------ -static NodeResult merge( +static void merge( const uno::Reference& aFactory, MergedComponentData& aData, const uno::Sequence >& aLayers, sal_Int32 aNbLayers, - const rtl::OUString& aLocale, - const AbsolutePath& aRootPath) + const rtl::OUString& aLocale) { LayerMergeHandler * pMerger = new LayerMergeHandler(aFactory, aData, OUString()); uno::Reference xLayerMerger(pMerger); @@ -155,29 +154,36 @@ static NodeResult merge( } } } - NodeInstance retCode(aData.extractSchemaTree(), aRootPath) ; - - return NodeResult(retCode) ; } //------------------------------------------------------------------------------ -NodeResult BackendAccess::getNodeData(const NodeRequest& aRequest, - INodeDataListener *aListener) +ComponentResult BackendAccess::getNodeData(const ComponentRequest& aRequest, + INodeDataListener *aListener) CFG_UNO_THROW_ALL() { - rtl::OUString component = aRequest.getPath().getModuleName().toString() ; + rtl::OUString component = aRequest.getComponentName().toString() ; SchemaBuilder *schemaBuilder = new backend::SchemaBuilder( component ) ; uno::Reference schemaHandler = schemaBuilder ; uno::Sequence > layers ; uno::Reference schema ; RTL_LOGFILE_CONTEXT_AUTHOR(aLog, "configmgr::backend::BackendAccess", "jb99855", "configmgr: BackendAccess::getNodeData()"); - RTL_LOGFILE_CONTEXT_TRACE1(aLog, "request path: %s", RTL_LOGFILE_OU2A(aRequest.getPath().toString()) ); + RTL_LOGFILE_CONTEXT_TRACE1(aLog, "request path: %s", RTL_LOGFILE_OU2A(aRequest.getComponentName().toString()) ); - getSchemaAndLayers(aRequest, schema, layers) ; + AbsolutePath aRequestPath = AbsolutePath::makeModulePath(aRequest.getComponentName(), AbsolutePath::NoValidate()); + NodeRequest aNodeRequest(aRequestPath, aRequest.getOptions()); + + getSchemaAndLayers(aNodeRequest, schema, layers) ; schema->readSchema(schemaHandler) ; - return merge(mFactory, schemaBuilder->result(), layers, layers.getLength(), - aRequest.getOptions().getLocale(), aRequest.getPath()) ; + + merge(mFactory, schemaBuilder->result(), layers, layers.getLength(), + aNodeRequest.getOptions().getLocale()); + + ComponentInstance retCode(schemaBuilder->result().extractSchemaTree(), + schemaBuilder->result().extractTemplatesTree(), + aRequest.getComponentName()) ; + + return ComponentResult(retCode) ; } //------------------------------------------------------------------------------ @@ -217,9 +223,12 @@ NodeResult BackendAccess::getDefaultData(const NodeRequest& aRequest) getSchemaAndLayers(aRequest, schema, layers) ; schema->readSchema(schemaHandler) ; - return merge(mFactory, schemaBuilder->result(), layers, - layers.getLength() - 1, aRequest.getOptions().getLocale(), - aRequest.getPath()) ; + + merge(mFactory, schemaBuilder->result(), layers,layers.getLength() - 1, + aRequest.getOptions().getLocale()); + + NodeInstance retCode(schemaBuilder->result().extractSchemaTree(), aRequest.getPath()) ; + return NodeResult(retCode) ; } //------------------------------------------------------------------------------ diff --git a/configmgr/source/backend/backendaccess.hxx b/configmgr/source/backend/backendaccess.hxx index c231cf241ffd..4f72f7492761 100644 --- a/configmgr/source/backend/backendaccess.hxx +++ b/configmgr/source/backend/backendaccess.hxx @@ -2,9 +2,9 @@ * * $RCSfile: backendaccess.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: cyrillem $ $Date: 2002-06-13 16:45:34 $ + * last change: $Author: ssmith $ $Date: 2002-12-13 10:14:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,8 +113,8 @@ class BackendAccess : public IMergedDataProvider { ~BackendAccess(void) ; // IMergedDataProvider - virtual NodeResult getNodeData(const NodeRequest& aRequest, - INodeDataListener *aListener = NULL) + virtual ComponentResult getNodeData(const ComponentRequest& aRequest, + INodeDataListener *aListener = NULL) CFG_UNO_THROW_ALL() ; virtual void removeRequestListener(INodeDataListener *aListener) CFG_NOTHROW() {} diff --git a/configmgr/source/backend/backendfactory.cxx b/configmgr/source/backend/backendfactory.cxx index 269b09037099..18bfc7eff32e 100644 --- a/configmgr/source/backend/backendfactory.cxx +++ b/configmgr/source/backend/backendfactory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: backendfactory.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jb $ $Date: 2002-10-24 15:33:05 $ + * last change: $Author: ssmith $ $Date: 2002-12-13 10:14:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,9 +70,7 @@ #ifndef CONFIGMGR_BACKEND_BACKENDACCESS_HXX_ #include "backendaccess.hxx" #endif -#ifndef CONFIGMGR_BACKENDWRAP_HXX -#include "backendwrap.hxx" -#endif + #ifndef _COM_SUN_STAR_CONFIGURATION_CANNOTLOADCONFIGURATIONEXCEPTION_HPP_ #include @@ -250,19 +248,6 @@ rtl::Reference } // ------------------------------------------------------------------------- -rtl::Reference - BackendFactory::createSessionBackend(IConfigSession * _pSession, - TypeConverterRef const & _xTCV) -{ - rtl::Reference< IMergedDataProvider > xBackend; - - if (_pSession) - xBackend = wrapSession(*_pSession,_xTCV); - - return xBackend; -} -// ------------------------------------------------------------------------- - BackendFactory & BackendFactory::instance() { static BackendFactory aStaticFactory; diff --git a/configmgr/source/backend/makefile.mk b/configmgr/source/backend/makefile.mk index 9c930af855c8..c34c7255da8e 100644 --- a/configmgr/source/backend/makefile.mk +++ b/configmgr/source/backend/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.9 $ +# $Revision: 1.10 $ # -# last change: $Author: jb $ $Date: 2002-11-28 09:05:12 $ +# last change: $Author: ssmith $ $Date: 2002-12-13 10:14:47 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -89,7 +89,6 @@ SLOFILES=\ $(SLO)$/updatedispatch.obj \ $(SLO)$/singlebackendadapter.obj \ $(SLO)$/backendaccess.obj \ - $(SLO)$/backendwrap.obj \ $(SLO)$/backendfactory.obj \ $(SLO)$/importsvc.obj \ $(SLO)$/basicimporthandler.obj \