/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ module com { module sun { module star { module sdb { /** implements a component which allows browsing the data sources registered on the system.

This service implements a user interface for browsing data sources registered on the com::sun::star::sdb::DatabaseContext instance of the system.

It is possible to navigate through all the data sources, it's queries and it's tables. The queries/tables can be displayed in a grid-like view, where functionality for searching, sorting, filtering, and such is provided.

Usually, you won't instantiate this service directly, instead you use the dispatch mechanisms of the application framework to load the URL .component:DB/DataSourceBrowser into an arbitrary frame. This should involve a com::sun::star::sdb::ContentLoader service, which creates and initializes the browser.

Some aspects of the browser can be controlled from outside, e.g., it is possible to dispatch a sort or filter request, if a table or query is being displayed.

The communication between the browser and external instances works in two ways.
The way in is provided by the com::sun::star::frame::XDispatchProvider interface the service exports (Please see below for more details on this).
The way out works in another way. There are several URLs which an external instance can provide dispatches for (usually by implementing a com::sun::star::frame::XDispatchProviderInterceptor for the parent frame of the browser), thus indicating that the browser should provide special functionality.
In this case, the browser displays and maintains some additional slots (to be more concrete: toolbox items), which, upon triggering, call the com::sun::star::frame::XDispatch::dispatch() method of the object provided by the external instance.

In particular, the supported URLs for communicating to an external instance are:

For all kinds of URLs, the parameters supplied during dispatching build up a DataAccessDescriptor, where the following properties are present:

The default for DataAccessDescriptor::Selection is to contain bookmarks, if not specified otherwise by DataAccessDescriptor::BookmarkSelection.

@see com::sun::star::sdb::ContentLoader @see com::sun::star::sdb::DatabaseContext @see com::sun::star::sdb::DataSource @see com::sun::star::frame::XDispatch @see com::sun::star::frame::XDispatchProvider @see com::sun::star::frame::XDispatchProviderInterceptor */ published service DataSourceBrowser { /** implements basic form controller functionality.

With a data source browser implementing this interface, external components have access to

*/ [optional] service com::sun::star::form::FormController; /** allows the component to be plugged into frames. */ interface com::sun::star::frame::XController; /** is used to initialize the browser.

Parameters (passed to the method com::sun::star::lang::XInitialization::initialize()) have to be instances of com::sun::star::beans::PropertyValue, or instances of com::sun::star::beans::NamedValue, where the Name member specifies what the parameter controls, with the Value member containing the value to be used.
Recognized parameters are:

*/ interface com::sun::star::lang::XInitialization; /** is used to control the browser from outside.

You may use the com::sun::star::frame::XDispatchProvider::queryDispatch() method to query for objects which implement the com::sun::star::frame::XDispatch interface, and which allow you to be notified on status changes and to dispatch special requests.

The recognized URLs are:

*/ interface com::sun::star::frame::XDispatchProvider; /** allows to intercept user-triggered context menus in the data source browser

Context menu interception is currently supported only for the browser control where the registered data sources and all their tables and queries are displayed in a tree view.

The selection supplied by com::sun::star::ui::ContextMenuExecuteEvent::Selection, in the event structure passed to the context menu interceptors, actually is a value from the com::sun::star::sdb::application::NamedDatabaseObject group.

@since OOo 3.0 */ [optional] interface ::com::sun::star::ui::XContextMenuInterception; }; }; }; }; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */