summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/sdb/application
diff options
context:
space:
mode:
Diffstat (limited to 'offapi/com/sun/star/sdb/application')
-rw-r--r--offapi/com/sun/star/sdb/application/CopyTableContinuation.idl69
-rw-r--r--offapi/com/sun/star/sdb/application/CopyTableOperation.idl72
-rw-r--r--offapi/com/sun/star/sdb/application/CopyTableRowEvent.idl71
-rw-r--r--offapi/com/sun/star/sdb/application/CopyTableWizard.idl231
-rw-r--r--offapi/com/sun/star/sdb/application/DatabaseObject.idl77
-rw-r--r--offapi/com/sun/star/sdb/application/DatabaseObjectContainer.idl104
-rw-r--r--offapi/com/sun/star/sdb/application/DefaultViewController.idl101
-rw-r--r--offapi/com/sun/star/sdb/application/NamedDatabaseObject.idl87
-rw-r--r--offapi/com/sun/star/sdb/application/XCopyTableListener.idl98
-rw-r--r--offapi/com/sun/star/sdb/application/XCopyTableWizard.idl153
-rw-r--r--offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl330
-rw-r--r--offapi/com/sun/star/sdb/application/XTableUIProvider.idl123
-rw-r--r--offapi/com/sun/star/sdb/application/makefile.mk60
13 files changed, 1576 insertions, 0 deletions
diff --git a/offapi/com/sun/star/sdb/application/CopyTableContinuation.idl b/offapi/com/sun/star/sdb/application/CopyTableContinuation.idl
new file mode 100644
index 000000000000..7b8bad2cc841
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/CopyTableContinuation.idl
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_CopyTableContinuation_idl__
+#define __com_sun_star_sdb_application_CopyTableContinuation_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** specifies the possible continuations when copying a table row via a
+ <type>CopyTableWizard</type> failed.
+ */
+constants CopyTableContinuation
+{
+ /** indicates the error should be ignored, and copying should be continued.
+ */
+ const short Proceed = 0;
+
+ /** is used to indicate the next registered <type>XCopyTableListener</type> should be
+ called.
+ */
+ const short CallNextHandler = 1;
+
+ /** cancels the whole copying process
+ */
+ const short Cancel = 2;
+
+ /** asks the user how the handle the error.
+
+ <p>The user can choose between ignoring the error and cancelling the copy
+ operation.</p>
+ */
+ const short AskUser = 3;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/CopyTableOperation.idl b/offapi/com/sun/star/sdb/application/CopyTableOperation.idl
new file mode 100644
index 000000000000..d4c9f3870b4b
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/CopyTableOperation.idl
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_CopyTableOperation_idl__
+#define __com_sun_star_sdb_application_CopyTableOperation_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** specifies the different basic operations a <type>CopyTableWizard</type>
+ can do.
+
+ @since OOo 2.4
+*/
+constants CopyTableOperation
+{
+ /** specifies that the wizard should copy the source table to the target database,
+ by creating a new table and copying all data.
+ */
+ const short CopyDefinitionAndData = 0;
+
+ /** specifies that the wizard should copy the source table to the target database,
+ by only creating a new table with the same structure as the source table.
+ */
+ const short CopyDefinitionOnly = 1;
+
+ /** specifies the wizard should create the source table as view
+
+ <p>This option is not available if the target database does not support views.</p>
+ */
+ const short CreateAsView = 2;
+
+ /** specifies the wizard should append the source table's data to an existing
+ table in the target database.
+ */
+ const short AppendData = 3;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/CopyTableRowEvent.idl b/offapi/com/sun/star/sdb/application/CopyTableRowEvent.idl
new file mode 100644
index 000000000000..9a9fc8761d02
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/CopyTableRowEvent.idl
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_CopyTableRowEvent_idl__
+#define __com_sun_star_sdb_application_CopyTableRowEvent_idl__
+
+#ifndef __com_sun_star_lang_EventObject_idl__
+#include <com/sun/star/lang/EventObject.idl>
+#endif
+#ifndef __com_sun_star_sdbc_XResultSet_idl__
+#include <com/sun/star/sdbc/XResultSet.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** specifies an event happening while copying table data between databases.
+
+ <p>Whenever this event is fired to an <type>XCopyTableListener</type>,
+ <member scope="com::sun::star::lang">EventObject::Source</member> contains the
+ wizard instance which actually does the copying.</p>
+
+ @see CopyTableWizard
+ */
+struct CopyTableRowEvent : ::com::sun::star::lang::EventObject
+{
+ /** contains the result set which is being copied by the wizard currently.
+ */
+ ::com::sun::star::sdbc::XResultSet SourceData;
+
+ /** denotes the error which happened while copying the data.
+
+ <p>Usually, this contains an instance of <type scope="com::sun::star::sdbc">SQLException</type>.</p>
+ */
+ any Error;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/CopyTableWizard.idl b/offapi/com/sun/star/sdb/application/CopyTableWizard.idl
new file mode 100644
index 000000000000..f294c9f69d2c
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/CopyTableWizard.idl
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_CopyTableWizard_idl__
+#define __com_sun_star_sdb_application_CopyTableWizard_idl__
+
+#ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__
+#include <com/sun/star/sdb/application/XCopyTableWizard.idl>
+#endif
+#ifndef __com_sun_star_beans_XPropertySet_idl__
+#include <com/sun/star/beans/XPropertySet.idl>
+#endif
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+#ifndef __com_sun_star_lang_WrappedTargetException_idl__
+#include <com/sun/star/lang/WrappedTargetException.idl>
+#endif
+#ifndef __com_sun_star_task_XInteractionHandler_idl__
+#include <com/sun/star/task/XInteractionHandler.idl>
+#endif
+#ifndef __com_sun_star_sdbc_SQLException_idl__
+#include <com/sun/star/sdbc/SQLException.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** describes a wizard which can be used to copy table like data from one
+ database to another.
+
+ <dt><b><a name="interaction"></a>Interactions</b></dt>
+ <dd>
+ <p>There are various cases where the wizard needs to interact with the user (except of
+ course the obvious case to display and operate the wizard dialog itself). For those cases,
+ an interaction handler is needed, which is used for
+ <ul>
+ <li>fulfilling parameter requests. This might become necessary if the copy source
+ describes a parametrized query.</li>
+ <li>user interaction in case copying a row fails. If no copy table listener is
+ registered at the wizard, or none of the registered listener handles an error during
+ copying a row, or a registered listeners explicitly tells the wizard to ask the user
+ how to handle the error, then the interaction handler is used together with the
+ error (an <code>SQLException</code>, usually) that happened.</li>
+ <li>displaying other errors which happen during copying, in particular errors in
+ creating the target table or view.</li>
+ </ul></p>
+
+ <p>When you do not specify an interaction handler by using the
+ <member>createWithInteractionHandler</member> constructor, the wizard will use the interaction
+ handler associated with the copy target, i.e. the interaction handler specified when loading
+ the document which the copy target refers to. If the copy target cannot be associated with
+ a database document (e.g. because it is a mere <code>ConnectionResource</code>, or a connection
+ not obtained from a data source), or if the copy target's database document cannot provide
+ an interaction handler, a newly-created instance of an interaction handler is used.</p>
+
+ <p>There's one exception to the above, however: Upon creating the copy table wizard,
+ the copy source and the copy target descriptors are used to create a Connection. For any
+ interaction during this phase - including, for instance, necessary authentication -, the
+ interaction handler of the respective data source is used, no matter what you specified
+ in <member>createWithInteractionHandler</member>. Only if there is no such interaction
+ handler, the processing described above, to find another handler, is applied.</p>
+ </dd>
+
+ @see ::com::sun::star::sdb::ParametersRequest
+ @see XCopyTableWizard::addCopyTableListener
+ @see CopyTableContinuation
+ @see ::com::sun::star::document::MediaDescriptor::InteractionHandler
+ @see ::com::sun::star::sdb::DatabaseDocument
+ @see ::com::sun::star::sdb::DataSource
+ @see ::com::sun::star::sdb::DataAccessDescriptor::ConnectionResource
+ @see ::com::sun::star::sdb::InteractionHandler
+
+ @since OOo 2.4
+ */
+service CopyTableWizard : XCopyTableWizard
+{
+ /** creates an executable wizard dialog, which is to guide the user through copying
+ a table from one database to another.
+
+ <p>At creation time, an attempt will be made to obtain the connections described
+ by <arg>Source</arg> resp. <arg>Dest</arg>. Failing to do so will result in an
+ exception.</p>
+
+ <p>If the connection has been newly created by the wizard (e.g. because the
+ data access descriptor specified a <code>DataSource</code> instead of an <code>ActiveConnection</code>),
+ then this connection will be disposed upon disposal of the wizard.</p>
+
+ @param Source
+ the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> describing the
+ data to copy.
+
+ <p>The following members of the <code>DataAccessDescriptor</code> are supported, and evaluated
+ in the given order:
+ <ol><li><code>ActiveConnection</code></li>
+ <li><code>DataSourceName</code></li>
+ <li><code>DatabaseLocation</code></li>
+ <li><code>ConnectionResource</code></li>
+ <li><code>ConnectionInfo</code></li>
+ <li><code>Command</code></li>
+ <li><code>CommandType</code></li>
+ </ol>
+ The first 5 items are used to obtain the connection, the last two to determine which
+ of the connection's objects is to be copied. Note that <code>Command</code> and <code>CommandType</code>
+ are required.</p>
+
+ <p>Additionally to the obvious restrictions (such as that creating a view is not possible
+ if the copy source and the copy destination denote different databases), the following restrictions
+ apply to the settings, and possible combinations:
+ <ul><li>Only <member scope="com::sun::star::sdb">CommandType::TABLE</member> and
+ <member scope="com::sun::star::sdb">CommandType::QUERY</member> are supported.</li>
+
+ <li>If you specify a <code>ConnectionResource</code>, or an
+ <code>ActiveConnection</code> which implements an <type scope="com::sun::star::sdbc">Connection</type> only
+ (as opposed to a <type scope="com::sun::star::sdb">Connection</type>), then the resulting connection is
+ not able to provide queries, thus a command type <code>QUERY</code> will be rejected.</li>
+
+ <li><code>Filter</code>, <code>Order</code>, <code>HavingClause</code> and <code>GroupBy</code>
+ are unsupported at the moment.</li>
+ </ul>
+ Violating any of the above restrictions will result in an error at creation time.</p>
+
+ @param Destination
+ the <type scope="com::sun::star::sdb">DataAccessDescriptor</type> describing the
+ target for the copy operation.
+
+ <p>Only <code>DataSourceName</code>, <code>DatabaseLocation</code>, <code>ActiveConnection</code>
+ are supported, effectively describing the target connection to copy the data to. They're evaluated
+ in the order mentioned here, so if multiple of the are present, only the first one is evaluated.</p>
+
+ <p>Also, at the moment the connection which is implied by either of the settings above
+ must support the <type scope="com::sun::star::sdb">Connection</type> service. In particular,
+ it is not sufficient to pass an SDBC-level connection.</p>
+
+ <p>Note that creating a view (see <member>CopyTableOperation::CreateAsView</member>) is
+ not supported if the target connection is an SDBC-level connection only.</p>
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if
+ <ul><li>either <code>Source</code> or <code>Destination</code> is <NULL/></li>
+ <li>either <code>Source</code> or <code>Destination</code> are not sufficient
+ to describe a database connection.</li>
+ <li><code>Source</code> is not sufficient to describe the to-be-copied data</li>
+ <li>either <code>Source</code> or <code>Destination</code> contain unsupported settings.</li>
+ </ul>
+
+ @throws ::com::sun::star::sdbc::SQLException
+ if an error occurs during obtaining the source or destination connection. Those errors
+ are passed unchanged to the creator of the wizard.
+
+ @throws ::com::sun::star::lang::WrappedTargetException
+ if an error other than the ones mentioned above occurs while extracting the necessary
+ information from any of the data access descriptors. For instance, this might
+ be an <type scope="com::sun::star::sdbc">SQLException</type> thrown upon connecting
+ to a data source described by the descriptor's <code>DataSourceName</code> member.
+
+ @see ::com::sun::star::sdb::DataAccessDescriptor
+ */
+ create(
+ [in] ::com::sun::star::beans::XPropertySet Source,
+ [in] ::com::sun::star::beans::XPropertySet Destination
+ )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::sdbc::SQLException
+ , ::com::sun::star::lang::WrappedTargetException
+ );
+
+ /** creates an executable wizard dialog, which is to guide the user through copying
+ a table from one database to another.
+
+ <p>The only difference to the <member>create</member> constructor is that
+ <code>createWithInteractionHandler</code> takes an additional argument, which
+ can be used to intercept interactions (such as error messages) during the wizard
+ run.</p>
+
+ @param InteractionHandler
+ specifies an interaction handler to use when user input is required.
+
+ <p>When specifying this parameter, you should use an implementation
+ supporting the <type scope="com::sun::star::sdb">InteractionHandler</type>, since
+ the general-purpose <type scope="com::sun::star::task">InteractionHandler</type> cannot
+ handle all requests described <a href="#interaction">above</a>.</p>
+
+ @see ::com::sun::star::sdb::InteractionHandler
+ */
+ createWithInteractionHandler(
+ [in] ::com::sun::star::beans::XPropertySet Source,
+ [in] ::com::sun::star::beans::XPropertySet Destination,
+ [in] ::com::sun::star::task::XInteractionHandler InteractionHandler
+ )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ , ::com::sun::star::sdbc::SQLException
+ , ::com::sun::star::lang::WrappedTargetException
+ );
+
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/DatabaseObject.idl b/offapi/com/sun/star/sdb/application/DatabaseObject.idl
new file mode 100644
index 000000000000..3239d69a58f4
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/DatabaseObject.idl
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_DatabaseObject_idl__
+#define __com_sun_star_sdb_application_DatabaseObject_idl__
+
+#ifndef __com_sun_star_sdb_CommandType_idl__
+#include <com/sun/star/sdb/CommandType.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** denotes different objects within a database document
+
+ @since OOo 2.2.0
+
+ @see DatabaseObjectContainer
+ */
+constants DatabaseObject
+{
+ /** denotes a table in a database
+
+ <p>Note that <em>table</em> here is a more general term. In OpenOffice.org Base,
+ views are also represented as tables, since to the user, the behave pretty much
+ as tables do.</p>
+ */
+ const long TABLE = com::sun::star::sdb::CommandType::TABLE;
+
+ /** denotes a query in a database document
+ */
+ const long QUERY = com::sun::star::sdb::CommandType::QUERY;
+
+ /** denotes a form in a database document
+ */
+ const long FORM = 2;
+
+ /** denotes a report in a database document
+ */
+ const long REPORT = 3;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
+
diff --git a/offapi/com/sun/star/sdb/application/DatabaseObjectContainer.idl b/offapi/com/sun/star/sdb/application/DatabaseObjectContainer.idl
new file mode 100644
index 000000000000..b773054a8943
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/DatabaseObjectContainer.idl
@@ -0,0 +1,104 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_DatabaseObjectContainer_idl__
+#define __com_sun_star_sdb_application_DatabaseObjectContainer_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** denotes different types of (maybe virtual) containers of database objects
+
+ <p>In the database application of OpenOffice.org, database objects (such as
+ tables, queries, forms, reports) can be organized in folders. This hierarchy can
+ be imposed externally, or internally.
+
+ <p>For example, when you connect to a database which supports catalogs and/or schemas,
+ then those impose a natural order on the tables, in that a catalog or a schema
+ is a folder of tables.</p>
+
+ <p>On the other hand, for forms and reports, OpenOffice.org Base itself allows the
+ user to create folders to organize the documents - in this case, the hierarchy is
+ defined in the database document itself.</p>
+
+ @see DatabaseObject
+
+ @since OOo 3.0
+ */
+constants DatabaseObjectContainer
+{
+ /** denotes the virtual folder containing all tables of a database, in a context where such a
+ folder is displayed to the user.
+ */
+ const long TABLES = 1000;
+
+ /** denotes the virtual folder containing all queries of a database, in a context where such a
+ folder is displayed to the user.
+ */
+ const long QUERIES = 1001;
+
+ /** denotes the virtual folder containing all forms of a database document, in a context where such a
+ folder is displayed to the user.
+ */
+ const long FORMS = 1002;
+
+ /** denotes the virtual folder containing all reports of a database database, in a context where such a
+ folder is displayed to the user.
+ */
+ const long REPORTS = 1003;
+
+ /** denotes the data source itself, which effectively is the root container for all other
+ kind of database objects, including other container types.
+ */
+ const long DATA_SOURCE = 1004;
+
+ /** denotes a catalog in a database which supports catalogs
+ */
+ const long CATALOG = 1005;
+
+ /** denotes a schema in a database which supports catalogs
+ */
+ const long SCHEMA = 1006;
+
+ /** denotes a folder which is used to organize forms in a database document
+ */
+ const long FORMS_FOLDER = 1007;
+
+ /** denotes a folder which is used to organize reports in a database document
+ */
+ const long REPORTS_FOLDER = 1008;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/DefaultViewController.idl b/offapi/com/sun/star/sdb/application/DefaultViewController.idl
new file mode 100644
index 000000000000..f46c74467dc3
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/DefaultViewController.idl
@@ -0,0 +1,101 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_ApplicationController_idl__
+#define __com_sun_star_sdb_application_ApplicationController_idl__
+
+#include <com/sun/star/frame/Controller.idl>
+#include <com/sun/star/ui/XContextMenuInterception.idl>
+#include <com/sun/star/awt/XUserInputInterception.idl>
+#include <com/sun/star/view/XSelectionSupplier.idl>
+#include <com/sun/star/frame/XTitle.idl>
+#include <com/sun/star/frame/XTitleChangeBroadcaster.idl>
+#include <com/sun/star/sdb/application/XDatabaseDocumentUI.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** is the default controller implementation for OpenOffice.org's database application.
+ */
+service DefaultViewController
+{
+ /** defines basic controller functionality
+ */
+ service ::com::sun::star::frame::Controller;
+
+ /** allows intercepting context menu requests done by the user
+
+ <p>The <member scope="::com::sun::star::ui">ContextMenuExecuteEvent::Selection</member> member
+ of the event passed to an interceptor will <em>not</em> be the controller itself
+ (though the controller also supports the <a href="#XSelectionSupplier"><code>XSelectionSupplier</code></a>
+ interface), but a component which descrbes the current selection of the very window where the context
+ menu was requested.</p>
+
+ <p>In OpenOffice.org's database application, database objects such as tables, queries, forms,
+ reports are displayed in a tree-like fashion. Currently, only context menu requests on this tree view
+ can be intercepted using the <code>XContextMenuInterception</code> interface. Context menu requests
+ in other places cannot be intercepted.</p>
+
+ <p>For the aforementioned tree view, the selection supplied by the <code>ContextMenuEvent::Selection</code>
+ component is an array of <type>NamedDatabaseObject</type> instances.</p>
+ */
+ interface ::com::sun::star::ui::XContextMenuInterception;
+
+ /** allows intercepting user input done by the user
+ */
+ interface ::com::sun::star::awt::XUserInputInterception;
+
+ /** <a name="XSelectionSupplier"></a>
+ provides access to the current selection inside the application window, and allows to change it
+ programmatically
+
+ <p>The selection is an array of <type>NamedDatabaseObject</type> instances.</p>
+ */
+ interface ::com::sun::star::view::XSelectionSupplier;
+
+ /** allows to retrieve and set the title which of the component
+ */
+ interface ::com::sun::star::frame::XTitle;
+
+ /** allows being notified about changes in the component's title
+ */
+ interface ::com::sun::star::frame::XTitleChangeBroadcaster;
+
+ /** allows programmatic access to aspects of the application's user interface.
+ */
+ interface XDatabaseDocumentUI;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/NamedDatabaseObject.idl b/offapi/com/sun/star/sdb/application/NamedDatabaseObject.idl
new file mode 100644
index 000000000000..f61fe3022a97
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/NamedDatabaseObject.idl
@@ -0,0 +1,87 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_NamedDatabaseObject_idl__
+#define __com_sun_star_sdb_application_NamedDatabaseObject_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** denotes a named database object, or a named folder of database objects
+
+ @since OOo 3.0
+*/
+struct NamedDatabaseObject
+{
+ /** denotes the type of the object.
+
+ <p>This member is one of the <type>DatabaseObject</type> or <type>DatabaseObjectContainer</type> constants.</p>
+ */
+ long Type;
+
+ /** denotes the name of the object
+
+ <p>In case of forms, reports, form folders and report folders, this is the hierarchical
+ path to the object, where the path elements are separated by a slash (<code>/</code>).</p>
+
+ <p>In case of tables, this is the fully qualified name of the table, as required
+ by the database's table name composition rules.</p>
+
+ <p>In case of queries, this is the name of the query.</p>
+
+ <p>In case of virtual folders denoted by <member>DatabaseObjectContainer::CATALOG</member> and
+ <member>DatabaseObjectContainer::SCHEMA</member>, it is
+ <ul><li><code>&lt;schema&gt;</code>, if the database supports schemas only</li>
+ <li><code>&lt;catalog&gt;</code>, if the database supports catalogs only</li>
+ <li><code>&lt;catalog&gt;.&lt;schema&gt;</code>, if the database supports both
+ catalogs and schemas, and catalogs are to appear at the beginning of an identifier.</li>
+ <li><code>&lt;schema&gt;.&lt;catalog&gt;</code>, if the database supports both
+ catalogs and schemas, and catalogs are to appear at the end of an identifier.</li>
+ </ul>
+ </p>
+
+ <p>In case of the virtual folders denoted by <member>DatabaseObjectContainer::TABLES</member>,
+ <member>DatabaseObjectContainer::QUERIES</member>, <member>DatabaseObjectContainer::DATA_SOURCE</member>,
+ <member>DatabaseObjectContainer::FORMS</member> or <member>DatabaseObjectContainer::REPORTS</member>,
+ this denotes the name of the data source (as denoted by
+ <member scope="com::sun::star::sdb">DataSource::Name</member>)</p>
+
+ @see XDatabaseMetaData::isCatalogAtStart
+ @see DatabaseObjectContainer
+ */
+ string Name;
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/XCopyTableListener.idl b/offapi/com/sun/star/sdb/application/XCopyTableListener.idl
new file mode 100644
index 000000000000..d53f399b281c
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/XCopyTableListener.idl
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_XCopyTableListener_idl__
+#define __com_sun_star_sdb_application_XCopyTableListener_idl__
+
+#ifndef __com_sun_star_lang_XEventListener_idl__
+#include <com/sun/star/lang/XEventListener.idl>
+#endif
+#ifndef __com_sun_star_sdb_application_CopyTableRowEvent_idl__
+#include <com/sun/star/sdb/application/CopyTableRowEvent.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** specifies the interface required to listen for progress in copying
+ table rows via a <code>CopyTableWizard</code>.
+
+ @see CopyTableRowEvent
+ @see CopyTableWizard
+ */
+interface XCopyTableListener : ::com::sun::star::lang::XEventListener
+{
+ /** is called when a row is about to be copied.
+
+ <p>This method is called immediately before a row is copied. It might be used, for instance,
+ to update a progress indicator.</p>
+
+ @param Event
+ describes the current state of the copy operation.
+ <member>CopyTableRowEvent::SourceData</member> is positioned at the row
+ which is about to be copied.
+ */
+ void copyingRow( [in] CopyTableRowEvent Event );
+
+ /** is called when a row was successfully copied.
+
+ <p>This method is called right after a row has been successfully copied. It might be used,
+ for instance, to update a progress indicator.</p>
+
+ @param Event
+ describes the current state of the copy operation.
+ <member>CopyTableRowEvent::SourceData</member> is positioned at the row
+ which was just copied to the target database.
+ */
+ void copiedRow( [in] CopyTableRowEvent Event );
+
+ /** is called when copying a row failed.
+
+ @param Event
+ describes the current state of the copy operation.
+ <member>CopyTableRowEvent::SourceData</member> is positioned at the row
+ which was attempted to be copied to the target database.
+ <member>CopyTableRowEvent::Error</member> will contain the actual error which
+ happened.
+
+ @return
+ how to continue with copying. Must be one of the <type>CopyTableContinuation</type>
+ constants.
+ */
+ short copyRowError( [in] CopyTableRowEvent Event );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl b/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl
new file mode 100644
index 000000000000..216c9fb45023
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__
+#define __com_sun_star_sdb_application_XCopyTableWizard_idl__
+
+#ifndef __com_sun_star_ui_dialogs_XExecutableDialog_idl__
+#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
+#endif
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+#ifndef __com_sun_star_beans_Optional_idl__
+#include <com/sun/star/beans/Optional.idl>
+#endif
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+interface XCopyTableListener;
+
+//=============================================================================
+
+/** describes a wizard which can be used to copy table like data from one
+ database to another.
+
+ <p>Copying table data between databases can be a complex task. Especially when
+ it comes to matching field types in the source and in the target database,
+ some heuristics, and sometimes support from the user doing the operation,
+ are required.</p>
+
+ <p>The <code>copy table wizard</code> described by this interfaces cares for those,
+ and other, settings.</p>
+
+ @since OOo 2.4
+ */
+interface XCopyTableWizard : ::com::sun::star::ui::dialogs::XExecutableDialog
+{
+ /** specifies the basic operation for the wizard to execute.
+
+ <p>This must be one of the <type>CopyTableOperation</type> constants.</p>
+
+ <p>At initialization time, you can use this attribute to control the
+ initial operation in the wizard.</p>
+
+ <p>After the wizard has finished, you can use this attribute to determine
+ what operation was actually executed.</p>
+
+ <p>Changing this attribute while the dialog is running is not supported, the
+ result of such an attempt is undefined.</p>
+
+ @throws IllegalArgumentException
+ if you attempt to set an invalid operation, or if the given operation is
+ not supported by the target database type, e.g. if you specified
+ <member>CopyTableOperation::CreateAsView</member> where the database
+ does not support views.
+ */
+ [attribute] short Operation
+ {
+ set raises ( ::com::sun::star::lang::IllegalArgumentException );
+ };
+
+ /** specfies the name of the table in the destination database.
+
+ <p>At initialization time, you can use this attribute to control the
+ initial table name as suggested to the user.</p>
+
+ <p>After the wizard has finished, you can use this attribute to determine
+ what table was actually created resp. to which existing table the source
+ table's data was appended.</p>
+
+ <p>Changing this attribute while the dialog is running is not supported, the
+ result of such an attempt is undefined.</p>
+ */
+ [attribute] string DestinationTableName;
+
+ /** specifies that a new primary key is to be created in the target database
+
+ <p>At initialization time, you can specify the initial settings for the primary
+ key in the UI.</p>
+
+ <p>You cannot use this attribute to determine the primary key, possibly created
+ by the wizard, after it finished. The reason is that during the wizard run, the
+ user can define an arbitrarily complex primary key, e.g. including multiple columns,
+ which cannot be represented in this simple attribute anymore.</p>
+
+ <p>This attribute is ignored if <member>Operation</member> is
+ <member>CopyTableOperation::AppendData</member>.</p>
+
+ <p>Changing this attribute while the dialog is running is not supported, the
+ result of such an attempt is undefined.</p>
+
+ <p>When a primary key is to be created by the wizard, it will be be an auto-increment
+ column, if possible.</p>
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the target database does not support primary keys
+ */
+ [attribute] ::com::sun::star::beans::Optional< string >
+ CreatePrimaryKey
+ {
+ set raises ( ::com::sun::star::lang::IllegalArgumentException );
+ };
+
+ /** specifies that the first row should be used to identify column names.
+
+ <p>This attribute is ignored when the source defines the column names which isn't the case when only a part of a table should be copied
+ e.g. in the RTF format or in the HTML format.
+ </p>
+ */
+ [attribute] boolean UseHeaderLineAsColumnNames;
+
+ /** adds a listener which is to be notified of progress in the copy operation
+ */
+ void addCopyTableListener( [in] XCopyTableListener Listener );
+
+ /** removes a listener
+ */
+ void removeCopyTableListener( [in] XCopyTableListener Listener );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl
new file mode 100644
index 000000000000..7c14255045e1
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl
@@ -0,0 +1,330 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_application_XDatabaseDocumentUI_idl__
+#define __com_sun_star_sdb_application_XDatabaseDocumentUI_idl__
+
+#include <com/sun/star/sdbc/XDataSource.idl>
+#include <com/sun/star/sdbc/SQLException.idl>
+#include <com/sun/star/sdbc/XConnection.idl>
+#include <com/sun/star/awt/XWindow.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/container/NoSuchElementException.idl>
+#include <com/sun/star/lang/XComponent.idl>
+#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/beans/Pair.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+//=============================================================================
+
+/** provides access to the user interface of a database document
+
+ <p>This interface is available when a database document has been loaded into
+ a frame, at the controller of this frame.</p>
+
+ @see com::sun::star::frame::Controller
+ @see com::sun::star::sdb::DatabaseDocument
+
+ @since OOo 2.2.0
+ */
+interface XDatabaseDocumentUI
+{
+ /** provides access to the data source belong to the database document
+ */
+ [attribute, readonly] com::sun::star::sdbc::XDataSource DataSource;
+
+ /** provides access to the applicatio's main window
+
+ <p>Note that reading this atttribute is equivalent to querying the component
+ for the <type scope="com::sun::star::frame">XController</type> interface,
+ asking the controller for its frame, and asking this frame for its
+ container window.</p>
+
+ @see ::com::sun::star::frame::XController
+ @see ::com::sun::star::frame::XFrame
+ */
+ [attribute, readonly] com::sun::star::awt::XWindow ApplicationMainWindow;
+
+ /** provides access to the current connection of the application
+
+ <p>Note that the connection returned here is really the working connection
+ of the application. Clients should not misuse it, in particular, closing
+ the connection can yield unexpected results and should definately be
+ avoided. If you need a separate connection to the data source, use
+ <member scope="com::sun::star::sdbc">XDataSource::getConnection</member>.</p>
+ */
+ [attribute, readonly] com::sun::star::sdbc::XConnection ActiveConnection;
+
+ /** determines whether the application is currently connected to the database
+ */
+ boolean isConnected();
+
+ /** lets the application connect to the database
+
+ <p>If the application is already connected, nothing happens. If it is not
+ connected, the application will try to establish a connection by using
+ <member scope="com::sun::star::sdbc">XDataSource::getConnection</member>
+ with the current settings, as specified in the
+ <member scope="com::sun::star::sdb">DataSource::Settings</member> member.</p>
+
+ <p>If the connection cannot be established, the respective error message is shown
+ in the application window.</p>
+
+ @throws ::com::sun::star::sdbc::SQLException
+ if the connection cannot be established
+ */
+ void connect()
+ raises ( ::com::sun::star::sdbc::SQLException );
+
+ /** contains all sub components of the database document
+
+ <p>During working with the database, the user might open different sub components:
+ forms, reports, tables, queries. Those components are tracked by the application,
+ and provided in this attribute.</p>
+
+ <p>The components here might either be documents (<type scope="com::sun::star::frame">XModel</type>),
+ controllers (<type scope="com::sun::star::frame">XController</type>), or frames
+ (<type scope="com::sun::star::frame">XFrame</type>).
+
+ @since OOo 3.0
+ */
+ [attribute, readonly] sequence< ::com::sun::star::lang::XComponent >
+ SubComponents;
+
+ /** identifies the given sub component
+
+ @param SubComponent
+ the component to identify. Must be one of the components in <member>SubComponents</member>.
+
+ @return
+ a record describing the sub component. The first element of the returned pair is the type
+ of the component, denoted by one of the <type>DatabaseObject</type> constants. The second
+ element is the name of the component. For object types which support nested structures (forms
+ and reports, actually), this might be a hierachical name. If the sub component has been newly created,
+ and not yet saved, this name is empty.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given component is not one of the controller's sub components
+ */
+ ::com::sun::star::beans::Pair< long, string >
+ identifySubComponent(
+ [in] ::com::sun::star::lang::XComponent SubComponent
+ )
+ raises (
+ ::com::sun::star::lang::IllegalArgumentException
+ );
+
+ /** closes all sub components of the database document.
+
+ <p>During working with the database, the user might open different sub components:
+ forms, reports, tables, queries. If you need to close all those documents, use
+ <code>closeSubComponents</code>, which will gracefully do this.</p>
+
+ <p>In a first step, the sub components will be suspended
+ (<member scope="com::sun::star::frame">XController::suspend</member>). There
+ are basically two reasons why suspending a single sub component can fail: The
+ user might veto it (she's asked if the document is currently modified), and
+ the component might be uncloseable currently, e.g. due to an open modal
+ dialog, or a long-lasting operation running currently (e.g. printing).</p>
+
+ <p>Once all sub components have been suspended, they will, in a second step,
+ be closed. Again, closing might be vetoed by other instances, e.g. by a close
+ listener registered at the component.</p>
+
+ @return
+ <TRUE/> if and only if both suspending and closing all sub components succeeds.
+
+ @since OOo 3.0
+ */
+ boolean closeSubComponents();
+
+ /** loads the given sub component of the database document
+
+ <p>This method allows programmatic access to the functionality which is present in the UI:
+ it allows opening a table, query, form, or report for either editing or viewing.</p>
+
+ <p>This method is a convenience wrapper for API which is also available otherwise. For instance,
+ for loading forms and reports, you could use the <type scope="com::sun::star::frame">XComponentLoader</type>
+ interface of the <type scope="::com::sun::star::sdb">Forms</type> resp. <type scope="::com::sun::star::sdb">Reports</type>
+ collections.</p>
+
+ <p>Note there must exist a connection to the database before you can call this method.</p>
+
+ <p>If an error occurs opening the given object, then this is reported to the user via an error dialog.</p>
+
+ @see isConnected
+ @see connect
+
+ @param ObjectType
+ specifies the type of the object, must be one of the <type>DatabaseObject</type>
+ constants.
+
+ @param ObjectName
+ specifies the name of the object. In case hierachical objects are supported
+ (as is the case form forms and reports), hierarchical names are supported here, too.
+
+ @param ForEditing
+ specifies whether the object should be opened for editing (<TRUE/>) or viewing (<FALSE/>).
+
+ <p>For the different object types, this means the following
+ <a name="component_types"></a>
+ <table style="width:100%;" border="1 solid black" cellpadding="2" cellspacing="2"><tbody>
+ <tr style="vertical-align: top;">
+ <td></td>
+ <td><code>ForEditing</code> = <TRUE/></td>
+ <td><code>ForEditing</code> = <FALSE/></td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>Tables</em></td>
+ <td>A table designer is opened, and allows to edit the structure of the table.
+ See also <type scope="::com::sun::star::sdb">TableDesign</type></td>
+ <td>A table data view is opened, and allows to view and edit the data contained in the table.
+ See also <type scope="::com::sun::star::sdb">DataSourceBrowser</type></td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>Queries</em></td>
+ <td>A query designer is opened, and allows to edit the statement constituting the query.
+ See also <type scope="::com::sun::star::sdb">QueryDesign</type></td>
+ <td>A table data view is opened, and allows to view and edit the data contained in the query.
+ See also <type scope="::com::sun::star::sdb">DataSourceBrowser</type></td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>Forms</em></td>
+ <td>The form document is opened in design mode, that is, you can modify it.</td>
+ <td>The form document is opened in read-only mode, allowing you to view and enter the data
+ which the form is based on, but not the form design.</td>
+ </tr>
+
+ <tr style="vertical-align: top;">
+ <td><em>Reports</em></td>
+ <td>The report document is opened in design mode, that is, you can modify it.</td>
+ <td>The report is executed, and the results will be displayed.</td>
+ </tr>
+
+ </tbody></table>
+ </p>
+
+ @return
+ the component which has been loaded. This is either an <type scope="com::sun::star::frame">XModel</type>,
+ or an <type scope="com::sun::star::frame">XController</type> if the component does is model-less.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if <arg>ObjectType</arg> denotes an invalid object type
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if an object with the given name and of the given type does not exist
+
+ @throws ::com::sun::star::sdbc::SQLException
+ if there is no connection to the database at the time the method is called.
+ */
+ ::com::sun::star::lang::XComponent loadComponent(
+ [in] long ObjectType,
+ [in] string ObjectName,
+ [in] boolean ForEditing )
+ raises ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::sdbc::SQLException );
+
+ /** loads the given sub component of the database document
+
+ <p>In opposite to <member>loadComponent</member>, this method allows you to specify
+ additional arguments which are passed to the to-be-loaded component.</p>
+
+ <p>The meaning of the the arguments is defined at the service which is effectively
+ created. See the <a href="#component_types">above table</a> for a list of those
+ services.</p>
+ */
+ ::com::sun::star::lang::XComponent loadComponentWithArguments(
+ [in] long ObjectType,
+ [in] string ObjectName,
+ [in] boolean ForEditing,
+ [in] sequence< ::com::sun::star::beans::PropertyValue > Arguments )
+ raises ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::sdbc::SQLException );
+
+ /** creates a new sub component of the given type
+
+ @param ObjectType
+ specifies the type of the object, must be one of the <type>DatabaseObject</type>
+ constants.
+
+ @param DocumentDefinition
+ Upon successful return, and if and only if <arg>ObjectType</arg> equals <member>DatabaseObject::FORM</member>
+ or <member>DatabaseObject::REPORT</member>, this will contain the <type scope="com::sun::star::sdb">DocumentDefinition</type>
+ object which controls the sub component.
+ */
+ ::com::sun::star::lang::XComponent createComponent(
+ [in] long ObjectType,
+ [out] ::com::sun::star::lang::XComponent DocumentDefinition )
+ raises ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::sdbc::SQLException );
+
+ /** creates a new sub component of the given type
+
+ <p>In opposite to <member>createComponent</member>, this method allows you to specify
+ additional arguments which are passed to the to-be-loaded component.</p>
+
+ <p>The meaning of the the arguments is defined at the service which is effectively
+ created. See the <a href="#component_types">above table</a> for a list of those
+ services.</p>
+
+ @param ObjectType
+ specifies the type of the object, must be one of the <type>DatabaseObject</type>
+ constants.
+
+ @param DocumentDefinition
+ Upon successful return, and if and only if <arg>ObjectType</arg> equals <member>DatabaseObject::FORM</member>
+ or <member>DatabaseObject::REPORT</member>, this will contain the <type scope="com::sun::star::sdb">DocumentDefinition</type>
+ object which controls the sub component.<br/>
+ You can use this object to control various aspects of the sub component. For instance, you could decide
+ to create the component hidden, by passing a <code>Hidden</code> flag (set to <TRUE/>) in <arg>Arguments</arg>,
+ manipulate the component, and then finally show it by invoking the <code>show</code> command at the
+ definition object.
+ */
+ ::com::sun::star::lang::XComponent createComponentWithArguments(
+ [in] long ObjectType,
+ [in] sequence< ::com::sun::star::beans::PropertyValue > Arguments,
+ [out] ::com::sun::star::lang::XComponent DocumentDefinition )
+ raises ( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::sdbc::SQLException );
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
+
diff --git a/offapi/com/sun/star/sdb/application/XTableUIProvider.idl b/offapi/com/sun/star/sdb/application/XTableUIProvider.idl
new file mode 100644
index 000000000000..ec31ace643aa
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/XTableUIProvider.idl
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__
+#define __com_sun_star_sdb_ui_XTableUIProvider_idl__
+
+#include <com/sun/star/graphic/XGraphic.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#include <com/sun/star/lang/WrappedTargetException.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module sdb { module application {
+
+interface XDatabaseDocumentUI;
+
+//=============================================================================
+
+/** is used by the database application to obtain non-default user
+ interface information and/or components for database tables.
+
+ @see com::sun::star::sdb::Connection
+
+ @since OOo 2.2.0
+ */
+interface XTableUIProvider
+{
+ /** provides the icon which should be used to represent the table in the
+ database application window.
+
+ <p>The icon will usually be requested once per table, and cached. It
+ might be requested again if the application settings change, for instance,
+ if another desktop theme has been activated.</p>
+
+ @param TableName
+ denotes the fully qualified name of the database table.
+
+ @param ColorMode
+ denotes the color mode of the graphic to retrieve, being one of the
+ <type scope="com::sun::star::graphic">GraphicColorMode</type> constants.
+ @return
+ the icon which should be used to represent the table in the
+ database application window, or <NULL/> if the default icon
+ should be used.
+ */
+ com::sun::star::graphic::XGraphic getTableIcon(
+ [in] string TableName, [in] long ColorMode );
+
+ /** returns a component which can be used to edit the definition of an
+ existing table.
+
+ @param DocumentUI
+ provides access to the UI in which the database document is
+ currently displayed.<br/>
+ In particular, this paramter provides access to the application's main
+ window, which is needed in case the table editor should be a dialog.
+
+ @param TableName
+ denotes the fully qualified name of an existing table.
+
+ @return
+ a component which can be used to edit the definition of an
+ existing table, or <NULL/> if the default component should
+ be used.<br/>
+ Two component types are supported so far
+ <ul><li>modal dialogs<br/>
+ If the returned component supports the
+ <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type>
+ interface, the dialog will be executed modally.</li>
+ <li>modeless frames<br/>
+ If the returned component supports the
+ <type scope="com::sun::star::frame">XController</type>
+ interface, it is assumed that it represents a controller,
+ loaded into a new frame, which is a modeless and, in its lifetime,
+ depends on the application main window.</li>
+ </ul>
+ If the returned component does not support any of the above-mentioned
+ interfaces, it's discarded.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given <arg>TableName</arg> does not denote an existing table
+
+ @throws ::com::sun::star::lang::WrappedTargetException
+ if an error occures while creating the table editor component.
+ */
+ com::sun::star::uno::XInterface getTableEditor(
+ [in] XDatabaseDocumentUI DocumentUI,
+ [in] string TableName )
+ raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException);
+};
+
+//=============================================================================
+
+}; }; }; }; };
+
+//=============================================================================
+
+#endif
+
diff --git a/offapi/com/sun/star/sdb/application/makefile.mk b/offapi/com/sun/star/sdb/application/makefile.mk
new file mode 100644
index 000000000000..7eb972b28b85
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/makefile.mk
@@ -0,0 +1,60 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..$/..
+
+PRJNAME=offapi
+
+TARGET=csssdbapp
+PACKAGE=com$/sun$/star$/sdb$/application
+
+# --- Settings -----------------------------------------------------
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+
+UNOIDLDEFS += -w
+
+# ------------------------------------------------------------------------
+IDLFILES=\
+ DefaultViewController.idl \
+ CopyTableContinuation.idl \
+ CopyTableOperation.idl \
+ CopyTableRowEvent.idl \
+ CopyTableWizard.idl \
+ DatabaseObject.idl \
+ DatabaseObjectContainer.idl \
+ NamedDatabaseObject.idl \
+ XCopyTableWizard.idl \
+ XCopyTableListener.idl \
+ XDatabaseDocumentUI.idl \
+ XTableUIProvider.idl
+
+# ------------------------------------------------------------------
+.INCLUDE : target.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+