#105112# #105005# old backends not supported

This commit is contained in:
Sarah Smith 2002-12-13 09:14:47 +00:00
parent 5c6cc7dbfb
commit 5cdfd1815b
4 changed files with 36 additions and 43 deletions

View file

@ -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<lang::XMultiServiceFactory>& aFactory,
MergedComponentData& aData,
const uno::Sequence<uno::Reference<backenduno::XLayer> >& aLayers,
sal_Int32 aNbLayers,
const rtl::OUString& aLocale,
const AbsolutePath& aRootPath)
const rtl::OUString& aLocale)
{
LayerMergeHandler * pMerger = new LayerMergeHandler(aFactory, aData, OUString());
uno::Reference<backenduno::XLayerHandler> 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<backenduno::XSchemaHandler> schemaHandler = schemaBuilder ;
uno::Sequence<uno::Reference<backenduno::XLayer> > layers ;
uno::Reference<backenduno::XSchema> 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) ;
}
//------------------------------------------------------------------------------

View file

@ -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() {}

View file

@ -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 <com/sun/star/configuration/CannotLoadConfigurationException.hpp>
@ -250,19 +248,6 @@ rtl::Reference<IMergedDataProvider>
}
// -------------------------------------------------------------------------
rtl::Reference<IMergedDataProvider>
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;

View file

@ -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 \