LibreOffice Module dbaccess (master) 1
|
#include <databasecontext.hxx>
Public Member Functions | |
ODatabaseContext (const css::uno::Reference< css::uno::XComponentContext > &) | |
virtual | ~ODatabaseContext () override |
virtual void SAL_CALL | disposing () override |
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL | createInstance () override |
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL | createInstanceWithArguments (const css::uno::Sequence< css::uno::Any > &_rArguments) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual css::uno::Type SAL_CALL | getElementType () override |
virtual sal_Bool SAL_CALL | hasElements () override |
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL | createEnumeration () override |
virtual css::uno::Any SAL_CALL | getByName (const OUString &aName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getElementNames () override |
virtual sal_Bool SAL_CALL | hasByName (const OUString &aName) override |
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL | getRegisteredObject (const OUString &Name) override |
virtual void SAL_CALL | registerObject (const OUString &Name, const css::uno::Reference< css::uno::XInterface > &Object) override |
virtual void SAL_CALL | revokeObject (const OUString &Name) override |
virtual sal_Bool SAL_CALL | hasRegisteredDatabase (const OUString &Name) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getRegistrationNames () override |
virtual OUString SAL_CALL | getDatabaseLocation (const OUString &Name) override |
virtual void SAL_CALL | registerDatabaseLocation (const OUString &Name, const OUString &Location) override |
virtual void SAL_CALL | revokeDatabaseLocation (const OUString &Name) override |
virtual void SAL_CALL | changeDatabaseLocation (const OUString &Name, const OUString &NewLocation) override |
virtual sal_Bool SAL_CALL | isDatabaseRegistrationReadOnly (const OUString &Name) override |
virtual void SAL_CALL | addDatabaseRegistrationsListener (const css::uno::Reference< css::sdb::XDatabaseRegistrationsListener > &Listener) override |
virtual void SAL_CALL | removeDatabaseRegistrationsListener (const css::uno::Reference< css::sdb::XDatabaseRegistrationsListener > &Listener) override |
virtual void SAL_CALL | addContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override |
virtual void SAL_CALL | removeContainerListener (const css::uno::Reference< css::container::XContainerListener > &xListener) override |
void | registerDatabaseDocument (ODatabaseModelImpl &_rModelImpl) |
void | revokeDatabaseDocument (const ODatabaseModelImpl &_rModelImpl) |
void | databaseDocumentURLChange (const OUString &_sOldName, const OUString &_sNewName) |
void | storeTransientProperties (ODatabaseModelImpl &_rModelImpl) |
void | appendAtTerminateListener (const ODatabaseModelImpl &_rDataSourceModel) |
void | removeFromTerminateListener (const ODatabaseModelImpl &_rDataSourceModel) |
virtual void | onBasicManagerCreated (const css::uno::Reference< css::frame::XModel > &_rxForDocument, BasicManager &_rBasicManager)=0 |
Private Types | |
typedef std::map< OUString, ODatabaseModelImpl * > | ObjectCache |
typedef std::map< OUString, css::uno::Sequence< css::beans::PropertyValue > > | PropertyCache |
Private Member Functions | |
css::uno::Reference< css::uno::XInterface > | loadObjectFromURL (const OUString &_rName, const OUString &_sURL) |
loads the given object from the given URL More... | |
css::uno::Reference< css::uno::XInterface > | getObject (const OUString &_rURL) |
void | setTransientProperties (const OUString &_sURL, ODatabaseModelImpl &_rDataSourceModel) |
sets all properties which were transient at the data source. More... | |
css::uno::Reference< css::uno::XInterface > | impl_createNewDataSource () |
creates a new data source More... | |
virtual void | onBasicManagerCreated (const css::uno::Reference< css::frame::XModel > &_rxForDocument, BasicManager &_rBasicManager) override |
Private Attributes | |
::osl::Mutex | m_aMutex |
css::uno::Reference< css::uno::XComponentContext > | m_aContext |
css::uno::Reference< css::uno::XAggregation > | m_xDBRegistrationAggregate |
css::uno::Reference< css::sdb::XDatabaseRegistrations > | m_xDatabaseRegistrations |
ObjectCache | m_aDatabaseObjects |
PropertyCache | m_aDatasourceProperties |
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > | m_aContainerListeners |
rtl::Reference< DatabaseDocumentLoader > | m_xDatabaseDocumentLoader |
Additional Inherited Members | |
Protected Member Functions inherited from basic::BasicManagerCreationListener | |
~BasicManagerCreationListener () | |
Definition at line 59 of file databasecontext.hxx.
|
private |
Definition at line 94 of file databasecontext.hxx.
|
private |
Definition at line 97 of file databasecontext.hxx.
|
explicit |
Definition at line 168 of file databasecontext.cxx.
References dbaccess::createDataSourceRegistrations(), m_aContext, m_aMutex, m_refCount, m_xDatabaseDocumentLoader, m_xDatabaseRegistrations, m_xDBRegistrationAggregate, and basic::BasicManagerRepository::registerCreationListener().
|
overridevirtual |
Definition at line 189 of file databasecontext.cxx.
References m_xDatabaseDocumentLoader, m_xDatabaseRegistrations, m_xDBRegistrationAggregate, and basic::BasicManagerRepository::revokeCreationListener().
|
overridevirtual |
Definition at line 500 of file databasecontext.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), and m_aContainerListeners.
|
overridevirtual |
Definition at line 571 of file databasecontext.cxx.
References m_xDatabaseRegistrations.
void dbaccess::ODatabaseContext::appendAtTerminateListener | ( | const ODatabaseModelImpl & | _rDataSourceModel | ) |
Definition at line 380 of file databasecontext.cxx.
References m_xDatabaseDocumentLoader.
Referenced by dbaccess::ODatabaseModelImpl::impl_construct_nothrow().
|
overridevirtual |
Definition at line 561 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
|
overridevirtual |
Definition at line 596 of file databasecontext.cxx.
References m_aMutex.
|
overridevirtual |
Definition at line 225 of file databasecontext.cxx.
References impl_createNewDataSource().
|
overridevirtual |
Definition at line 232 of file databasecontext.cxx.
References getObject(), comphelper::NamedValueCollection::getOrDefault(), impl_createNewDataSource(), and INFO_POOLURL.
void dbaccess::ODatabaseContext::databaseDocumentURLChange | ( | const OUString & | _sOldName, |
const OUString & | _sNewName | ||
) |
Definition at line 697 of file databasecontext.cxx.
References ENSURE_OR_THROW, m_aDatabaseObjects, and SAL_INFO.
Referenced by dbaccess::ODatabaseModelImpl::impl_switchToLogicalURL().
|
overridevirtual |
Definition at line 248 of file databasecontext.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), m_aContainerListeners, and m_aDatabaseObjects.
|
overridevirtual |
Definition at line 603 of file databasecontext.cxx.
References Any, Exception, getDatabaseLocation(), getObject(), hasRegisteredDatabase(), loadObjectFromURL(), and m_aMutex.
|
overridevirtual |
Definition at line 546 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
Referenced by getByName(), getRegisteredObject(), and revokeObject().
|
overridevirtual |
Definition at line 652 of file databasecontext.cxx.
References getRegistrationNames(), and m_aMutex.
Referenced by hasElements().
|
overridevirtual |
Definition at line 582 of file databasecontext.cxx.
References cppu::UnoType< typename T >::get().
|
overridevirtual |
Definition at line 202 of file databasecontext.cxx.
|
private |
Definition at line 668 of file databasecontext.cxx.
References m_aDatabaseObjects.
Referenced by createInstanceWithArguments(), getByName(), and getRegisteredObject().
|
overridevirtual |
Definition at line 268 of file databasecontext.cxx.
References getDatabaseLocation(), getObject(), loadObjectFromURL(), and m_aMutex.
|
overridevirtual |
Definition at line 541 of file databasecontext.cxx.
References m_xDatabaseRegistrations.
Referenced by getElementNames().
|
overridevirtual |
Definition at line 212 of file databasecontext.cxx.
|
overridevirtual |
Definition at line 660 of file databasecontext.cxx.
References hasRegisteredDatabase(), and m_aMutex.
|
overridevirtual |
Definition at line 587 of file databasecontext.cxx.
References getElementNames(), and m_aMutex.
|
overridevirtual |
Definition at line 536 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
Referenced by getByName(), and hasByName().
|
private |
creates a new data source
Definition at line 217 of file databasecontext.cxx.
References m_aContext.
Referenced by createInstance(), and createInstanceWithArguments().
|
overridevirtual |
Definition at line 566 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
|
private |
loads the given object from the given URL
WrappedTargetException | if an error occurs accessing the URL via the UCB |
Definition at line 287 of file databasecontext.cxx.
References Any, aURL, DBA_RES, Exception, svt::OFileNotation::get(), comphelper::getProcessComponentContext(), comphelper::NamedValueCollection::getPropertyValues(), ucbhelper::Content::isDocument(), m_aContext, m_aDatabaseObjects, svt::OFileNotation::N_SYSTEM, comphelper::NamedValueCollection::put(), SAL_WARN, setTransientProperties(), and xModel.
Referenced by getByName(), and getRegisteredObject().
|
overrideprivatevirtual |
Implements basic::BasicManagerCreationListener.
Definition at line 710 of file databasecontext.cxx.
References Any, and BasicManager::SetGlobalUNOConstant().
void dbaccess::ODatabaseContext::registerDatabaseDocument | ( | ODatabaseModelImpl & | _rModelImpl | ) |
Definition at line 677 of file databasecontext.cxx.
References dbaccess::ODatabaseModelImpl::getURL(), m_aDatabaseObjects, SAL_INFO, and setTransientProperties().
Referenced by dbaccess::ODatabaseModelImpl::impl_switchToLogicalURL().
|
overridevirtual |
Definition at line 551 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
Referenced by registerObject().
|
overridevirtual |
Definition at line 419 of file databasecontext.cxx.
References aEvent, Any, DBA_RES, m_aContainerListeners, m_aMutex, comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), registerDatabaseLocation(), dbaccess::ODatabaseSource::setName(), and xModel.
|
overridevirtual |
Definition at line 505 of file databasecontext.cxx.
References m_aContainerListeners, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
|
overridevirtual |
Definition at line 576 of file databasecontext.cxx.
References m_xDatabaseRegistrations.
void dbaccess::ODatabaseContext::removeFromTerminateListener | ( | const ODatabaseModelImpl & | _rDataSourceModel | ) |
Definition at line 385 of file databasecontext.cxx.
References m_xDatabaseDocumentLoader.
Referenced by dbaccess::ODatabaseModelImpl::release().
void dbaccess::ODatabaseContext::revokeDatabaseDocument | ( | const ODatabaseModelImpl & | _rModelImpl | ) |
Definition at line 690 of file databasecontext.cxx.
References dbaccess::ODatabaseModelImpl::getURL(), m_aDatabaseObjects, and SAL_INFO.
Referenced by dbaccess::ODatabaseModelImpl::release().
|
overridevirtual |
Definition at line 556 of file databasecontext.cxx.
References m_xDatabaseRegistrations, and Name.
Referenced by revokeObject().
|
overridevirtual |
Definition at line 510 of file databasecontext.cxx.
References aEvent, Any, getDatabaseLocation(), m_aContainerListeners, m_aDatabaseObjects, m_aDatasourceProperties, m_aMutex, comphelper::OInterfaceContainerHelper3< class ListenerT >::notifyEach(), and revokeDatabaseLocation().
|
private |
sets all properties which were transient at the data source.
e.g. password
_sURL | The file URL of the data source |
_xObject | The data source itself. |
Definition at line 390 of file databasecontext.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, dbaccess::ODatabaseModelImpl::getOrCreateDataSource(), m_aDatasourceProperties, and dbaccess::ODatabaseModelImpl::m_sFailedPassword.
Referenced by loadObjectFromURL(), and registerDatabaseDocument().
void dbaccess::ODatabaseContext::storeTransientProperties | ( | ODatabaseModelImpl & | _rModelImpl | ) |
Definition at line 447 of file databasecontext.cxx.
References aProperties, DBG_UNHANDLED_EXCEPTION, Exception, dbaccess::ODatabaseModelImpl::getOrCreateDataSource(), comphelper::NamedValueCollection::getPropertyValues(), dbaccess::ODatabaseModelImpl::getURL(), m_aDatabaseObjects, m_aDatasourceProperties, dbaccess::ODatabaseModelImpl::m_sFailedPassword, dbaccess::ODatabaseModelImpl::m_sName, Property, and comphelper::NamedValueCollection::put().
Referenced by dbaccess::ODatabaseModelImpl::release().
|
overridevirtual |
Definition at line 207 of file databasecontext.cxx.
References cppu::supportsService().
|
private |
Definition at line 105 of file databasecontext.hxx.
Referenced by addContainerListener(), disposing(), registerObject(), removeContainerListener(), and revokeObject().
|
private |
Definition at line 87 of file databasecontext.hxx.
Referenced by impl_createNewDataSource(), loadObjectFromURL(), and ODatabaseContext().
|
private |
Definition at line 95 of file databasecontext.hxx.
Referenced by databaseDocumentURLChange(), disposing(), getObject(), loadObjectFromURL(), registerDatabaseDocument(), revokeDatabaseDocument(), revokeObject(), and storeTransientProperties().
|
private |
Definition at line 98 of file databasecontext.hxx.
Referenced by revokeObject(), setTransientProperties(), and storeTransientProperties().
|
private |
Definition at line 85 of file databasecontext.hxx.
Referenced by createEnumeration(), getByName(), getElementNames(), getRegisteredObject(), hasByName(), hasElements(), registerObject(), and revokeObject().
|
private |
Definition at line 106 of file databasecontext.hxx.
Referenced by appendAtTerminateListener(), ODatabaseContext(), removeFromTerminateListener(), and ~ODatabaseContext().
|
private |
Definition at line 92 of file databasecontext.hxx.
Referenced by addDatabaseRegistrationsListener(), changeDatabaseLocation(), getDatabaseLocation(), getRegistrationNames(), hasRegisteredDatabase(), isDatabaseRegistrationReadOnly(), ODatabaseContext(), registerDatabaseLocation(), removeDatabaseRegistrationsListener(), revokeDatabaseLocation(), and ~ODatabaseContext().
|
private |
Definition at line 90 of file databasecontext.hxx.
Referenced by ODatabaseContext(), and ~ODatabaseContext().