diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/sdb | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/sdb')
132 files changed, 11114 insertions, 0 deletions
diff --git a/offapi/com/sun/star/sdb/BooleanComparisonMode.idl b/offapi/com/sun/star/sdb/BooleanComparisonMode.idl new file mode 100644 index 000000000..0234e736e --- /dev/null +++ b/offapi/com/sun/star/sdb/BooleanComparisonMode.idl @@ -0,0 +1,64 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_BooleanComparisonMode_idl__ +#define __com_sun_star_sdb_BooleanComparisonMode_idl__ + + +module com { module sun { module star { module sdb { + + +/** specifies different mode how boolean comparison predicates are to be generated + by a SingleSelectQueryComposer. + */ +constants BooleanComparisonMode +{ + /** denotes the default comparison + + <p>Most databases support comparing boolean expressions or column values directly with + integer values: <code><em>column</em> = 0</code> respectively <code><em>column</em> = 1</code>.</p> + */ + const long EQUAL_INTEGER = 0; + + /** requires to use <code>IS <em>boolean_literal</em></code> for boolean comparison. + + <p>That is, the generated comparison predicates will be <code><em>column</em> IS TRUE</code> resp. + <code><em>column</em> IS FALSE</code>.</p> + */ + const long IS_LITERAL = 1; + + /** requires to use <code>= <em>boolean_literal</em></code> for boolean comparison. + + <p>That is, the generated comparison predicates will be <code><em>column</em> = TRUE</code> resp. + <code><em>column</em> = FALSE</code>.</p> + */ + const long EQUAL_LITERAL = 2; + + /** requires to use an Microsoft Access compatible syntax for boolean comparison. + */ + const long ACCESS_COMPAT = 3; +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/CallableStatement.idl b/offapi/com/sun/star/sdb/CallableStatement.idl new file mode 100644 index 000000000..1769b61c3 --- /dev/null +++ b/offapi/com/sun/star/sdb/CallableStatement.idl @@ -0,0 +1,47 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_CallableStatement_idl__ +#define __com_sun_star_sdb_CallableStatement_idl__ + +#include <com/sun/star/sdbc/CallableStatement.idl> + +#include <com/sun/star/sdb/PreparedStatement.idl> + + module com { module sun { module star { module sdb { + + +/** represents a procedure call. The service differs only in the access + of the columns and parameters to the service + com::sun::star::sdbc::CallableStatement. +*/ +published service CallableStatement +{ + service com::sun::star::sdbc::CallableStatement; + + service com::sun::star::sdb::PreparedStatement; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Column.idl b/offapi/com/sun/star/sdb/Column.idl new file mode 100644 index 000000000..42fe706a9 --- /dev/null +++ b/offapi/com/sun/star/sdb/Column.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Column_idl__ +#define __com_sun_star_sdb_Column_idl__ + +#include <com/sun/star/sdbcx/Column.idl> + +#include <com/sun/star/sdb/ColumnSettings.idl> + + module com { module sun { module star { module sdb { + + +/** describes the common properties of a database column. + */ +published service Column +{ + service com::sun::star::sdbcx::Column; + + + /** is used for customization of data appearance. + */ + service com::sun::star::sdb::ColumnSettings; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ColumnDescriptorControl.idl b/offapi/com/sun/star/sdb/ColumnDescriptorControl.idl new file mode 100644 index 000000000..b12645563 --- /dev/null +++ b/offapi/com/sun/star/sdb/ColumnDescriptorControl.idl @@ -0,0 +1,40 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ColumnDescriptorControl_idl__ +#define __com_sun_star_sdb_ColumnDescriptorControl_idl__ + +#include <com/sun/star/awt/UnoControl.idl> + + + module com { module sun { module star { module sdb { + + +/** specifies a column descriptor control. + */ +service ColumnDescriptorControl +{ + service com::sun::star::awt::UnoControl; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ColumnDescriptorControlModel.idl b/offapi/com/sun/star/sdb/ColumnDescriptorControlModel.idl new file mode 100644 index 000000000..079646ab2 --- /dev/null +++ b/offapi/com/sun/star/sdb/ColumnDescriptorControlModel.idl @@ -0,0 +1,79 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ColumnDescriptorControlModel_idl__ +#define __com_sun_star_sdb_ColumnDescriptorControlModel_idl__ + +#include <com/sun/star/awt/UnoControlModel.idl> + + + module com { module sun { module star { + module sdbc { + interface XConnection; + }; + module beans { + interface XPropertySet; + };};};}; + + module com { module sun { module star { module sdb { + + +/** specifies the standard model of a ColumnDescriptorControl. + */ +service ColumnDescriptorControlModel +{ + service com::sun::star::awt::UnoControlModel; + + + /** specifies the border style of the control. + + <pre> + 0: No border + 1: 3D border + 2: simple border + </pre> + */ + [property] short Border; + + + /** determines whether the control is enabled or disabled. + */ + [property] boolean Enabled; + + + + /** specifies that the control can be reached with the TAB key. + */ + [property] boolean Tabstop; + + /** specifies the column descriptor where the values will be stored in. + */ + [property] ::com::sun::star::beans::XPropertySet Column; + + /** specifies the connection to a database. + */ + [property] ::com::sun::star::sdbc::XConnection ActiveConnection; + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ColumnSettings.idl b/offapi/com/sun/star/sdb/ColumnSettings.idl new file mode 100644 index 000000000..38d60e5c2 --- /dev/null +++ b/offapi/com/sun/star/sdb/ColumnSettings.idl @@ -0,0 +1,119 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ColumnSettings_idl__ +#define __com_sun_star_sdb_ColumnSettings_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + + module com { module sun { module star { module sdb { + + +/** describes the common properties of a database column. + */ +published service ColumnSettings +{ + interface com::sun::star::beans::XPropertySet; + + + /** contains the index of the number format that is used for the + column. + + <p>The proper value can be determined by using the + com::sun::star::util::XNumberFormatter + interface. + </p> + <p> + If the value is + `VOID` + , a default number format should be used according to the datatype of the column. + </p> + + */ + [property] long FormatKey; + + + /** specifies the alignment of columns text. + + <pre> + 0: left + 1: center + 2: right + </pre> + <p> + If the value is + `VOID` + , a default alignment should be used according + to the datatype of the column. + </p> + */ + [property] long Align; + + + /** specifies the width of the column displayed in a grid, the unit is 10THMM. + + <p> + If the value is + `VOID` + , a default width should be used according to the label of the column. + </p> + */ + [property] long Width; + + + /** Position of the column within a grid. + + <p> + If the value is + `VOID` + , the default position should be taken according. + </p> + */ + [property] long Position; + + + /** determines whether the column should be displayed or not. + */ + [property] boolean Hidden; + + + /** indicates a control model which defines the settings for layouting. + The default is `NULL`. + */ + [optional, property] com::sun::star::beans::XPropertySet ControlModel; + + /** describes an optional help text which can be used by UI components + when representing this column. + The default is `NULL`. + */ + [optional, property] string HelpText; + + /** describes the default value which should be displayed by a control when moving to a new row. + The default is `NULL`. + */ + [optional, property] string ControlDefault; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/CommandDefinition.idl b/offapi/com/sun/star/sdb/CommandDefinition.idl new file mode 100644 index 000000000..0a27a049d --- /dev/null +++ b/offapi/com/sun/star/sdb/CommandDefinition.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_CommandDefinition_idl__ +#define __com_sun_star_sdb_CommandDefinition_idl__ + +#include <com/sun/star/sdbcx/XRename.idl> + + module com { module sun { module star { module sdb { + +/** + @since LibreOffice 4.1 + */ +service CommandDefinition : com::sun::star::sdbcx::XRename; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/CommandType.idl b/offapi/com/sun/star/sdb/CommandType.idl new file mode 100644 index 000000000..60a32b584 --- /dev/null +++ b/offapi/com/sun/star/sdb/CommandType.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_CommandType_idl__ +#define __com_sun_star_sdb_CommandType_idl__ + + module com { module sun { module star { module sdb { + + +/** indicates the type of a command. + */ +published constants CommandType +{ + + /** indicates that a command contains a table name, which can be used to + process a command like "select * from tablename". + */ + const long TABLE = 0; + + /** indicates that a command contains a name of a query component, which + contains a certain statement. + */ + const long QUERY = 1; + + /** indicates that the command is an SQL-Statement. + */ + const long COMMAND = 2; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Connection.idl b/offapi/com/sun/star/sdb/Connection.idl new file mode 100644 index 000000000..e4232d28b --- /dev/null +++ b/offapi/com/sun/star/sdb/Connection.idl @@ -0,0 +1,85 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Connection_idl__ +#define __com_sun_star_sdb_Connection_idl__ + +#include <com/sun/star/container/XChild.idl> + +#include <com/sun/star/sdbc/Connection.idl> + +#include <com/sun/star/sdbcx/DatabaseDefinition.idl> + +module com { module sun { module star { module lang { + published interface XMultiServiceFactory; +};};};}; + + module com { module sun { module star { module sdb { + + published interface XSQLQueryComposerFactory; + published interface XQueriesSupplier; + published interface XCommandPreparation; + + module application { interface XTableUIProvider; }; + +/** extends the + com::sun::star::sdbc::Connection + of SDBC by providing the data definitions of a connected database. + */ +published service Connection +{ + service com::sun::star::sdbc::Connection; + + /** access to the owning data source. + */ + interface com::sun::star::container::XChild; + + /** interface for complex command execution. + */ + interface XCommandPreparation; + + /** access to the database definition information of the connection. + */ + service com::sun::star::sdbcx::DatabaseDefinition; + + /** returns a container of associated queries. + */ + interface XQueriesSupplier; + + /** returns a tool for composing queries. + */ + interface XSQLQueryComposerFactory; + + /** allows the creation of different services which can only exists with a connection. + */ + [optional] interface com::sun::star::lang::XMultiServiceFactory; + + /** allows the connection to overrule the database application's default + user interface for tables. + */ +// [optional] interface com::sun::star::sdb::application::XTableUIProvider; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ContentLoader.idl b/offapi/com/sun/star/sdb/ContentLoader.idl new file mode 100644 index 000000000..85cb69e66 --- /dev/null +++ b/offapi/com/sun/star/sdb/ContentLoader.idl @@ -0,0 +1,93 @@ +/* -*- 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 . + */ + + +#ifndef __com_sun_star_sdb_ContentLoader_idl__ +#define __com_sun_star_sdb_ContentLoader_idl__ + +#include <com/sun/star/frame/FrameLoader.idl> + +module com { module sun { module star { module sdb { + +/** implements a loader for various datasource-related user interface components. + + <p>Usually, you don't deal with this loader directly. Instead, use an instance with + the com::sun::star::frame::XComponentLoader interface, and pass + one of the below-mentioned URLs to it.</p> + + @see com::sun::star::frame::XComponentLoader + @see com::sun::star::frame::Desktop +*/ +published service ContentLoader +{ + /** ensures the basic functionality. + + <p> + Supporting this service ensures that you can plug any of the components + the loader can create into an arbitrary frame. + </p> + + The loader should be registered for the URL scheme + <b> + .component:DB/ * + </b> + , the concrete URLs supported are: + <ul> + <li><b>.component:DB/DataSourceBrowser</b><br/> + Using this URL creates an instance of the + com::sun::star::sdb::DataSourceBrowser + service and plugs it into the frame passed to the loader. + </li> + <li><b>.component:DB/FormGridView</b><br/> + Using this URL creates an instance of the + com::sun::star::sdb::ExternalSourceBrowser + service and plugs it into the frame passed to the loader. + </li> + <li><b>.component:DB/QueryDesign</b><br/> + Using this URL creates an instance of the + com::sun::star::sdb::QueryDesign + service and plugs it into the frame passed to the loader. + </li> + <li><b>.component:DB/TableDesign</b><br/> + Using this URL creates an instance of the + com::sun::star::sdb::TableDesign + service and plugs it into the frame passed to the loader. + </li> + <li><b>.component:DB/RelationDesign</b><br/> + Using this URL creates an instance of the + com::sun::star::sdb::RelationDesign + service and plugs it into the frame passed to the loader. + </li> + </ul> + + The parameters passed to the + com::sun::star::frame::XFrameLoader::load() + are forwarded to the object being created, + in particular to its + com::sun::star::lang::XInitialization + interface. + **/ + service com::sun::star::frame::FrameLoader; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataAccessDescriptor.idl b/offapi/com/sun/star/sdb/DataAccessDescriptor.idl new file mode 100644 index 000000000..d3734b764 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataAccessDescriptor.idl @@ -0,0 +1,253 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_DataAccessDescriptor_idl__ +#define __com_sun_star_sdb_DataAccessDescriptor_idl__ + +#include <com/sun/star/sdbc/Connection.idl> +#include <com/sun/star/sdbc/ResultSet.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/beans/PropertyValue.idl> + +module com { module sun { module star { module sdb { + +/** descriptor for accessing basic data access objects. + + <p>Various components interacting with the database access world require to specify (or provide themselves) an object + such as a query, a table, a result set, a connection to a data source, a column within a table, and so on.<br/> + All of these objects are usually not specified with a single property, but with a set of properties, and for + various objects, various (but not always different) properties are needed.<br/> + The <code>DataAccessDescriptor</code> describes the super set of the properties for the most common + data access objects.</p> + + <p>Every component providing or requiring a DataAccessDescriptor for some functionality + is urged to specify which properties are mandatory, and which ones optional. Additionally, + it's free to specify any additional requirements about the relations of properties.</p> + + @since OOo 1.1.2 +*/ +published service DataAccessDescriptor +{ + /** specifies the name of the datasource to access. + + <p>This data source is usually used to create a Connection. If no DataSourceName is given + and the #DatabaseLocation and the #ConnectionResource are empty, then an #ActiveConnection + is required.</p> + + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string DataSourceName; + + /** specifies the URL of the database file. + + <p>This database location is usually used to create a Connection. If no DatabaseLocation is given + and the #ConnectionResource is empty, then an #ActiveConnection is required.</p> + + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string DatabaseLocation; + + /** specifies the database URL which locates a database driver. + + <p>This database URL is usually used to create a Connection. If no ConnectionResource is given, + then an #ActiveConnection is required.</p> + + @see com::sun::star::sdb::DatabaseContext + @see ActiveConnection + */ + [optional, property] string ConnectionResource; + + /** specifies additional info to use when creating a connection from a <code>ConnectionResource</code> + + <p>This member is evaluated only when <code>ConnectionResource</code> is used: In this case, + com::sun::star::sdbc::XDriverManager::getConnectionWithInfo() is used + to create a connection for the given connection resource, instead of + com::sun::star::sdbc::XDriverManager::getConnection().</p> + + <p>If the sequence is empty, it is ignored.</p> + */ + [optional, property] sequence< ::com::sun::star::beans::PropertyValue > ConnectionInfo; + + /** is a connection to use. + + <p>This object is guaranteed to be a com::sun::star::sdbc::Connection, but usually + it will be a Connection from the module com::sun::star::sdb.<br/> + Especially in the case where no #DataSourceName is given, but + #CommandType is CommandType::QUERY, the ActiveConnection needs + to fully support the Connection service, to actually retrieve the query specified by + #Command</p> + + <p>If no ActiveConnection is given, then a #DataSourceName is required.</p> + + @see DataSourceName + */ + [optional, property] com::sun::star::sdbc::XConnection ActiveConnection; + + /** specifies the command to execute to retrieve a result set. + + <p>This property is only meaningful together with the #CommandType + property, thus either <em>both</em> or <em>none</em> of them are present.</p> + + @see CommandType + */ + [optional, property] string Command; + + + /** specifies the type of the command to be executed to retrieve a result set. + + <p>#Command needs to be interpreted depending on the value of this property.</p> + + <p>This property is only meaningful together with the #Command + property, thus either <em>both</em> or <em>none</em> of them are present.</p> + + @see com::sun::star::sdb::CommandType + */ + [optional, property] long CommandType; + + /** specifies an additional filter to optionally use. + + <p>The Filter string has to form a <code>WHERE</code>-clause, <em>without</em> the + <code>WHERE</code>-string itself.</p> + + <p>If a #DataSourceName, #Command and #CommandType + are specified, a RowSet can be created with this information. If the results provided by the + row set are to be additionally filtered, the Filter property can be used.</p> + + <p>Note that the Filter property does not make sense if a #ResultSet has been specified + in the DataAccessDescriptor.</p> + + @see com::sun::star::sdb::RowSet + @see ResultSet + */ + [optional, property] string Filter; + + /** specifies an additional <code>ORDER BY</code> clause which should be applied on top of + the given #Command. + + <p>The keyword <code>ORDER BY</code> itself is not part of this property.</p> + */ + [optional, property] string Order; + + /** specifies an additional <code>HAVING</code> clause which should be applied on top of + the given #Command. + + <p>The keyword <code>HAVING</code> itself is not part of this property.</p> + */ + [optional, property] string HavingClause; + + /** specifies an additional <code>GROUP BY</code> clause which should be applied on top of + the given #Command. + + <p>The keyword <code>GROUP BY</code> itself is not part of this property.</p> + */ + [optional, property] string GroupBy; + + /** specifies if the #Command should be analyzed on the client side before sending it + to the database server. + + <p>The default value of this property is `TRUE`. By switching it to `FALSE`, you can pass + backend-specific SQL statements, which are not standard SQL, to your database.</p> + + <p>This property is usually present together with the #Command and + #CommandType properties, and is evaluated if and only if #CommandType + equals CommandType::COMMAND.</p> + */ + [optional, property] boolean EscapeProcessing; + + /** specifies an already existent result set to use. + + <p>Usually, you use the properties #DataSourceName (alternatively + #ActiveConnection), #Command and #CommandType to specify + how to <em>obtain</em> a result set. However, in scenarios where the provider of a DataAccessDescriptor + has access to an already existent result set, it can pass it along for reusage. This is encouraged + to increase performance.</p> + + <p>The object will at least support the com::sun::star::sdbc::ResultSet service.</p> + + <p>Note that any superservices of com::sun::star::sdbc::ResultSet + are also allowed. Especially, this member can denote an instance of the + com::sun::star::sdb::RowSet, or an instance obtained + by calling com::sun::star::sdb::XResultSetAccess::createResultSet() + on such a com::sun::star::sdb::RowSet. This becomes important in + conjunction with the #Selection property.</p> + + @see com::sun::star::sdb::XResultSetAccess + */ + [optional, property] com::sun::star::sdbc::XResultSet ResultSet; + + /** specifies a selection to confine the records in a result set. + + <p>When you specify a result set either implicitly (#DataSourceName, #Command, + #CommandType) or explicitly (#ResultSet), the set of results can be + additionally refined with this property.</p> + + <p>The single elements of the #Selection are either record numbers (see + com::sun::star::sdbc::XResultSet::getRow()), or bookmarks (see + com::sun::star::sdbcx::XRowLocate::getBookmark()).<br/> + It is up to the component which provides or requires a DataAccessDescriptor to specify which of the + two alternatives it expects. If it does <em>not</em> specify this, then the property + #BookmarkSelection becomes mandatory.</p> + + <p>If the elements specify bookmarks, and a #ResultSet has been specified, then + this result set is required to support the com::sun::star::sdbcx::XRowLocate interface.</p> + */ + [optional, property] sequence< any > Selection; + + /** specifies how to interpret #Selection + + <p>If present, #BookmarkSelection specifies the semantics of #Selection. If + not present, it's up to the implementing component to specify this semantics.</p> + + <p>If `TRUE`, then the single elements of the array specified by #Selection are + bookmarks relative to the result set, if `FALSE`, they're record numbers.</p> + + @see com::sun::star::sdbcx::XRowLocate + @see com::sun::star::sdbc::XResultSet + @see com::sun::star::sdb::XResultSetAccess + */ + [optional, property] boolean BookmarkSelection; + + /** specifies a column name. + + <p>This property is usually used together with the #Command and + #CommandType properties.</p> + + @see Column + */ + [optional, property] string ColumnName; + + /** specifies a column object + + <p>For reasons of performance and saving resources, a supplier of an DataAccessDescriptor which is + used to describe a column object can pass this object directly, instead of specifying it only implicitly + with the #ColumnName property.</p> + + <p>The object will at least support the com::sun::star::sdbcx::Column service, but more + often it will even be a Column from the com::sun::star::sdb module.</p> + */ + [optional, property] com::sun::star::beans::XPropertySet Column; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataAccessDescriptorFactory.idl b/offapi/com/sun/star/sdb/DataAccessDescriptorFactory.idl new file mode 100644 index 000000000..61e01b2df --- /dev/null +++ b/offapi/com/sun/star/sdb/DataAccessDescriptorFactory.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_DataAccessDescriptorFactory_idl__ +#define __com_sun_star_sdb_DataAccessDescriptorFactory_idl__ + +#include <com/sun/star/sdb/XDataAccessDescriptorFactory.idl> + + +module com { module sun { module star { module sdb { + + +/** allows creating instances of the DataAccessDescriptor service. +*/ +singleton DataAccessDescriptorFactory : XDataAccessDescriptorFactory; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataColumn.idl b/offapi/com/sun/star/sdb/DataColumn.idl new file mode 100644 index 000000000..46d28e3b5 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataColumn.idl @@ -0,0 +1,67 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DataColumn_idl__ +#define __com_sun_star_sdb_DataColumn_idl__ + +#include <com/sun/star/sdb/ResultColumn.idl> + + module com { module sun { module star { module sdb { + + published interface XColumn; + published interface XColumnUpdate; + + +/** defines a column used for a result set which contains the data definition + and the data of the column of the current row of a result set. + */ +published service DataColumn +{ + service com::sun::star::sdb::ResultColumn; + + + /** is used to retrieve the columns value. + */ + interface XColumn; + + + /** is used to update the columns value. + */ + interface XColumnUpdate; + + + /** contains the column's value. This could be a constraint property, to + veto modifications, if a new value does not fit into rules + defined for the column. + */ + [optional, property] any Value; + + + /** contains the original value of the column. + */ + [optional, readonly, property] any OriginalValue; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataSettings.idl b/offapi/com/sun/star/sdb/DataSettings.idl new file mode 100644 index 000000000..6fd16d175 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataSettings.idl @@ -0,0 +1,84 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DataSettings_idl__ +#define __com_sun_star_sdb_DataSettings_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/util/Color.idl> +#include <com/sun/star/awt/FontDescriptor.idl> + + module com { module sun { module star { module sdb { + + +/** extends the + com::sun::star::sdbcx::Table + with additional display information, sorting and filtering criteria. + + */ +published service DataSettings +{ + + /** additional filter for the data object. + */ + [property] string Filter; + + + /** indicates whether the filter should be applied or not, + default is `FALSE`. + */ + [property] boolean ApplyFilter; + + + /** is an additional sort order definition. + */ + [property] string Order; + + + /** specifies the font attributes for data displaying. + */ + [property] com::sun::star::awt::FontDescriptor FontDescriptor; + + + /** specifies the height of a data row. + */ + [property] long RowHeight; + + + /** specifies the text color (RGB) for displaying text. + */ + [property] com::sun::star::util::Color TextColor; + + /** additional having clause for the data object. + */ + [optional,property] string HavingClause; + + /** additional group by for the data object. + */ + [optional,property] string GroupBy; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataSource.idl b/offapi/com/sun/star/sdb/DataSource.idl new file mode 100644 index 000000000..663595081 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataSource.idl @@ -0,0 +1,238 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DataSource_idl__ +#define __com_sun_star_sdb_DataSource_idl__ + +#include <com/sun/star/io/XPersistObject.idl> + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/beans/PropertyValue.idl> + +#include <com/sun/star/util/XFlushable.idl> + +#include <com/sun/star/util/XNumberFormatsSupplier.idl> + + + module com { module sun { module star { module sdbc { + published interface XIsolatedConnection; + published interface XDataSource; + };};};}; + + + module com { module sun { module star { module sdb { + + published interface XCompletedConnection; + published interface XQueryDefinitionsSupplier; + published interface XBookmarksSupplier; + + +/** is a factory to establish database connections. It should be registered at + a com::sun::star::uno::NamingService. + @see com::sun::star::sdb::DatabaseContext + */ +published service DataSource +{ + interface com::sun::star::beans::XPropertySet; + + + /** useful for establishing connections with the completion of connection parameters + provided during user interaction. + */ + interface XCompletedConnection; + + /** useful for establishing isolated connections which are not shared among others + as it is the case when using XCompletedConnection or com::sun::star::sdbc::XDataSource. + @see XCompletedConnection + @see com::sun::star::sdbc::XDataSource + @since OOo 1.1.2 + */ + interface com::sun::star::sdbc::XIsolatedConnection; + + + /** is provided to flush a DataSource within to a Database Context. + */ + interface com::sun::star::util::XFlushable; + + + /** provides the access to DataSource related queries. + <p> + The object returned by the + com::sun::star::sdb::XQueryDefinitionsSupplier::getQueryDefinitions() + supports the + com::sun::star::sdb::DefinitionContainer + service. + </p> + */ + interface XQueryDefinitionsSupplier; + + /* useful for establishing connections and to get and set the login timeout. + */ + interface com::sun::star::sdbc::XDataSource; + + /** provides access to bookmarks to documents associated with the data source + <p> + The object returned by the + com::sun::star::sdb::XBookmarksSupplier::getBookmarks() + supports the + com::sun::star::sdb::DefinitionContainer + service. + </p> + */ + [optional] interface XBookmarksSupplier; + + /** is the name of the data source. + + <p>If the data source is registered at the database context, then the <code>Name</code> property + denotes the registration name. Otherwise, the name property contains the URL of the file which the + database document associated with the data source is based on.</p> + + <p>If the same data source is registered under different names, the value of the <code>Name</code> + property is not defined.</p> + */ + [readonly, property] string Name; + + + /** indicates a database url of the form <br> + <code> jdbc:<em>subprotocol</em>:<em>subname</em></code> + or + <code>sdbc:<em>subprotocol</em>:<em>subname</em></code> + */ + [property] string URL; + + + /** is a list of arbitrary string tag/value pairs as connection arguments + + <p>The DataSource itself does not attempt to interpret any of those values.</p> + + <p>Instead, the values in this property have two use cases: + <ul><li>Upon creating a connection, for every value in this sequence it's checked + whether the com::sun::star::sdbc::XDriver which is to provide + the connection supports a setting with the respective name, using its + com::sun::star::sdbc::XDriver::getPropertyInfo() method.br/> + If so, the settings is passed to the driver's + com::sun::star::sdbc::XDriver::connect() method. If not, + the setting is ignored.</li> + <li>External components may use the settings to carry arbitrary information with + the data source. Usually, this is used to control the behavior of components + working with the data source.</li> + </ul> + */ + [property] sequence<com::sun::star::beans::PropertyValue> Info; + + /** is a convenience wrapper around the #Info property. + + <p>Since fiddling around with a sequence of property values is somewhat uncomfortable + in all known UNO language bindings (especially for tasks like simply changing the value + of an existing value), the #Settings property wraps the #Info + property for easier single-value access.</p> + + <p>You should use the #Settings property if you need to access a few properties only, + and the #Info property if you need access to all existent settings at once.</p> + + <p>The object represented by this property supports the com::sun::star::beans::PropertyBag + service. That is, you can at runtime add arbitrary new properties to the bag.</p> + + <p>Additionally, the property bag supports default values of properties, and thus the + com::sun::star::beans::XPropertyState interface. If you add an own property to + the bag using com::sun::star::beans::XPropertyContainer::addProperty(), you need + to specify an initial value, which is also used as default value (exceptions see below).</p> + + <p>Effectively, the property bag represented by <code>Settings</code> contains two classes of properties: + Pre-defined ones and user-defined ones.</p> + + <p><em>Pre-defined</em> properties are properties which are potentially used by the data source, the + application UI for the data source, or a particular backend driver employed by the data source. There's + a large set of such properties, no all of them are effectively used for a concrete data source, nonetheless, + they're all present in the <code>Settings</code>.<br/> + Such properties are not removable from the bag, that is, their + com::sun::star::beans::PropertyAttribute::REMOVABLE attribute is <em>not</em> set.<br/> + Usually, you'll find that all of this properties have the + com::sun::star::beans::PropertyState::PropertyState_DEFAULT_VALUE state.</p> + + <p><em>User-defined</em> properties are the ones which are added at runtime by any instance. They might or might + not be removable, this depends on whether or not the code adding them specifies the + com::sun::star::beans::PropertyAttribute::REMOVABLE attribute. Also, they might + or might not have a default value, determined by the + com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT attribute at the time they're added + to the bag.</p> + + <p>When a data source is made persistent, then properties which are not removable (which are assumed to be the + pre-defined properties) are ignored when they are in <code>DEFAULT</code> state. All other properties are + always made persistent, except when an explicit + com::sun::star::beans::PropertyAttribute::TRANSIENT attribute prohibits this.</p> + + <p>Similar, when you obtain the #Info property of a <code>DataSource</code>, the + <code>Settings</code> bag is asked for all its property values, and the ones which are removable and + in state default are stripped, and <em>not</em> returned in the <code>Info</code> sequence.</p> + */ + [property, readonly, optional] com::sun::star::beans::XPropertySet Settings; + + /** determines a users login name. + */ + [property] string User; + + + /** determines a users password. The password is not persistent. + */ + [property] string Password; + + + /** indicates that a password is always necessary. + */ + [property] boolean IsPasswordRequired; + + + /** indicates that components displaying data obtained from this + data source should suppress columns used for versioning. + */ + [property] boolean SuppressVersionColumns; + + + /** determines whether modifications on the data source are allowed or not. + */ + [readonly, property] boolean IsReadOnly; + + + /** provides an object for formatting numbers. + */ + [readonly, property] com::sun::star::util::XNumberFormatsSupplier + NumberFormatsSupplier; + + + /** defines a list of tables, on which the DataSource should have it's focus. + If empty, all tables are rejected. + + */ + [property] sequence<string> TableFilter; + + + /** defines a list of table types, on which the DataSource should have it's focus. + If empty, all table types are rejected. + + */ + [property] sequence<string> TableTypeFilter; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DataSourceBrowser.idl b/offapi/com/sun/star/sdb/DataSourceBrowser.idl new file mode 100644 index 000000000..615fc0639 --- /dev/null +++ b/offapi/com/sun/star/sdb/DataSourceBrowser.idl @@ -0,0 +1,268 @@ +/* -*- 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 . + */ + + +#ifndef __com_sun_star_sdb_DataSourceBrowser_idl__ +#define __com_sun_star_sdb_DataSourceBrowser_idl__ + +#include <com/sun/star/frame/XController.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/frame/XDispatchProvider.idl> +#include <com/sun/star/form/FormController.idl> +#include <com/sun/star/ui/XContextMenuInterception.idl> + +module com { module sun { module star { module sdb { + +/** implements a component which allows browsing the data sources registered on the system. + + <p> + This service implements a user interface for browsing data sources registered on the + com::sun::star::sdb::DatabaseContext + instance of the system. + </p> + + <p> + 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. + </p> + + <p> + Usually, you won't instantiate this service directly, instead you use the dispatch mechanisms + of the application framework to load the URL <b>.component:DB/DataSourceBrowser</b> into an arbitrary + frame. This should involve a + com::sun::star::sdb::ContentLoader + service, which creates and initializes + the browser. + </p> + + <p> + 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. + </p> + + <p + >The communication between the browser and external instances works in two ways. + <br/> + The way <em>in</em> is provided by the + com::sun::star::frame::XDispatchProvider + interface the service exports (Please see below for more details on this). + <br/> + The way <em>out</em> 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. + <br/> + 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. + </p> + + <p> + In particular, the supported URLs for communicating to an external instance are: + <ul> + <li><b>.uno:DataSourceBrowser/InsertColumns</b> + <br/> + Available whenever an external instance provides a dispatcher ( + com::sun::star::frame::XDispatch) + for this URL. + <br/> + Enabled, if at least one row in the grid view of a table or query is selected. + <br/> + It is the task of the external instance to provide functionality for this URL, but usually it is used + to implement some kind of "Data To Text" functionality. + <br/> + </li> + <li><b>.uno:DataSourceBrowser/InsertContent</b> + <br/> + Available whenever an external instance provides a dispatcher( + com::sun::star::frame::XDispatch + ) for this URL. + <br/> + Enabled, if at least one row in the grid view of a table or query is selected. + <br/> + It is the task of the external instance to provide functionality for this URL, but usually it is used + to implement some kind of "Data To Fields" functionality. + <br/> + </li> + <li><b>.uno:DataSourceBrowser/FormLetter</b> + <br/> + Available whenever an external instance provides a dispatcher ( + com::sun::star::frame::XDispatch) for this URL. + <br/> + It is the task of the external instance to provide functionality for this URL, but usually it is used + to implement some kind of "Form Letter" functionality. + <br/> + </li> + </ul> + </p> + <p>For all kinds of URLs, the parameters supplied during dispatching build up a DataAccessDescriptor, + where the following properties are present: + <ul> + <li>DataAccessDescriptor::DataSourceName</li> + <li>DataAccessDescriptor::Command</li> + <li>DataAccessDescriptor::CommandType</li> + <li><em>optional</em> DataAccessDescriptor::Selection</li> + <li><em>optional</em> DataAccessDescriptor::BookmarkSelection</li> + <li><em>optional</em> DataAccessDescriptor::ResultSet</li> + </ul> + </p> + <p>The default for DataAccessDescriptor::Selection is to contain bookmarks, if not specified + otherwise by DataAccessDescriptor::BookmarkSelection. + </p> + + @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. + <p> + With a data source browser implementing this interface, external components have access to + <ul><li>the grid control which is used to display the currently selected table/query + (see com::sun::star::awt::XTabController::getControls()) + </li> + <li>the data form used for displaying objects. As always for components implementing this service, + the object returned by + com::sun::star::awt::XTabController::getModel() is a dataform. + </li> + </ul> + </p> + */ + [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. + + <p> + 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 <code>Name</code> member + specifies what the parameter controls, with the <code>Value</code> member containing the value to be used. + <br/> + Recognized parameters are: + <ul> + <li><b>Frame</b><br/> + has to be an com::sun::star::frame::XFrame interface specifying the frame to + plug the browser component into.</li> + + <li><b>DataSourceName</b><br/> + The name of the globally registered DataSource to be used for initial display. It is only + meaningful together with the other parameters specifying the object to display.</li> + + <li><b>CommandType</b><br/> + This has to be a CommandType value, specifying the type of the object to display initially. + It is only meaningful together with the <em>DataSourceName</em> and the <em>Command</em> parameters.</li> + + <li><b>Command</b><br/> + This is a string giving the name of the object to display initially. Whether it is table name, a query + name or a SQL string is controller by the <em>CommandType</em> parameter.</li> + + <li><b>EnableBrowser</b><br/> + is a boolean value (defaulting to `TRUE`), which specifies whether to enable the data source browser + control. This is a tree control on the left hand side of the view, which allows to browse all registered + data sources, including their tables and queries.</li> + + <li><b>ShowBrowser</b><br/> + is a boolean value (defaulting to `TRUE`), which specifies whether to initially show the data source + browser control. If <code>EnableBrowser</code> is `FALSE`, then this parameter is ignored. If + <code>EnableBrowser</code> is `TRUE`, and <code>ShowBrowser</code> is `FALSE`, then the control + is initially hidden, but can be toggled by a toolbar button.</p> + + <li><b>ShowMenu</b><br/> + is a boolean value (defaulting to `TRUE`), specifying whether or not to show a menu in the frame + where the component is plugged.</li> + </ul> + </p> + */ + interface com::sun::star::lang::XInitialization; + + /** is used to control the browser from outside. + + <p> + 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. + </p> + <p> + The recognized URLs are: + <ul> + <li><b>.uno:Copy</b> + <br/> + implements the usual <em>Copy</em> command. Enabled if the grid view has the focus and text in any cell + is selected. + </li> + <li><b>.uno:Cut</b> + <br/> + implements the usual <em>Cut</em> command. Enabled if the grid view has the focus and text in any cell + is selected. + </li> + <li><b>.uno:Paste</b> + <br/> + implements the usual <em>Paste</em> command. Enabled if the grid view has the focus and a cell which + allows text input is being edited. + </li> + <li><b>.uno:EditDoc</b> + <br/> + allows switching the edit mode of the grid view. Enabled if editing the data is allowed in general. + </li> + <li><b>.uno:Undo</b> + <br/> + revokes any changes done in the current row. + </li> + <li><b>.uno:Save</b><br/> + saves the changes done in the current row. + </li> + </ul> + </p> + */ + interface com::sun::star::frame::XDispatchProvider; + + /** allows to intercept user-triggered context menus in the data source browser + + <p>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.</p> + + <p>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.</p> + + @since OOo 3.0 + */ + [optional] interface ::com::sun::star::ui::XContextMenuInterception; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseAccess.idl b/offapi/com/sun/star/sdb/DatabaseAccess.idl new file mode 100644 index 000000000..22ab69c96 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseAccess.idl @@ -0,0 +1,106 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseAccess_idl__ +#define __com_sun_star_sdb_DatabaseAccess_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/beans/PropertyValue.idl> + +#include <com/sun/star/util/XNumberFormatsSupplier.idl> + + + module com { module sun { module star { module sdb { + + published interface XDatabaseAccess; + published interface XCompletedConnection; + + +/** specifies a component, which controls DatabaseAccessConnections and acts like a + shared DataSource. + + @deprecated + */ +published service DatabaseAccess +{ + // gives access to the properties. + interface com::sun::star::beans::XPropertySet; + + /** controls the establishing of the connections. + */ + interface XDatabaseAccess; + + /** establishing a connection with user interaction, the implementation + is optional. + */ + [optional] interface XCompletedConnection; + + /** is the URL of the bean. + */ + [readonly, property] string URL; + + /** is the title of the bean. + */ + [property] string Title; + + /** indicates a database url of the form <br> + <code> jdbc:<em>subprotocol</em>:<em>subname</em></code> or + <code> sdbc:<em>subprotocol</em>:<em>subname</em></code> + */ + [property] string ConnectURL; + + /** is a list of arbitrary string tag/value pairs as + connection arguments; normally at least a "user" and + "password" property should be included. + */ + [property] sequence<com::sun::star::beans::PropertyValue> ConnectInfo; + + /** determines whether modifications on the data access bean are allowed + or not. + */ + [readonly, property] boolean IsReadOnly; + + /** provides an object for formatting numbers. + */ + [property] com::sun::star::util::XNumberFormatsSupplier + NumberFormatsSupplier; + + /** indicates that a password is always necessary. + */ + [optional, property] boolean IsPasswordRequired; + + /** defines a list of tables, on which the bean should have it's focus. + If empty, all tables are rejected. + */ + [optional, property] sequence<string> TableFilter; + + /** defines a list of table types, on which the bean should have it's focus. + If empty, all tables types are rejected. + */ + [optional, property] sequence<string> TableTypeFilter; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseAccessConnection.idl b/offapi/com/sun/star/sdb/DatabaseAccessConnection.idl new file mode 100644 index 000000000..a5af742fa --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseAccessConnection.idl @@ -0,0 +1,85 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseAccessConnection_idl__ +#define __com_sun_star_sdb_DatabaseAccessConnection_idl__ + +#include <com/sun/star/container/XChild.idl> + +#include <com/sun/star/sdbcx/DatabaseDefinition.idl> + +#include <com/sun/star/sdbc/Connection.idl> + + module com { module sun { module star { module sdb { + + published interface XQueriesSupplier; + published interface XFormDocumentsSupplier; + published interface XReportDocumentsSupplier; + published interface XSQLQueryComposerFactory; + + +/** specifies a component, which supplies and stores additional information related + to a certain database connection, such as, DatabaseQueries, FormDocuments, and ReportDocuments. + Objects for data definition are supplied as well, for instance, Tables, Views, etc. + + <p> + Implements the service com::sun::star::sdbc::Connection. + It is possible to open more than one connection at the same time, but the method + com::sun::star::sdb::DatabaseAccessConnection::dispose() + will close only one of these connections. You have to close all connections in order + to close the connection to the database. + </p> + + @deprecated +*/ +published service DatabaseAccessConnection +{ + /** supporting of the base connection service. + <p><B>Note:</B><br/> + Don't use the "dispose" method of the XComponent interface, as the DataAccess + uses a more sophisticated interface for closing a connection. + @see XDatabaseAccess + </p> + */ + service com::sun::star::sdbc::Connection; + + /** access to the DatabaseDefinition beans of the connection. + */ + service com::sun::star::sdbcx::DatabaseDefinition; + + /** access to the owning data access bean. + */ + interface com::sun::star::container::XChild; + + /** returns a tool for composing queries. + */ + interface XSQLQueryComposerFactory; + + /** provides access to the queries. + */ + interface XQueriesSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseAccessContext.idl b/offapi/com/sun/star/sdb/DatabaseAccessContext.idl new file mode 100644 index 000000000..af68e71ea --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseAccessContext.idl @@ -0,0 +1,77 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseAccessContext_idl__ +#define __com_sun_star_sdb_DatabaseAccessContext_idl__ + +#include <com/sun/star/container/XEnumerationAccess.idl> + +#include <com/sun/star/container/XNameAccess.idl> + +#include <com/sun/star/util/XLocalizedAliases.idl> + +#include <com/sun/star/lang/XLocalizable.idl> + + module com { module sun { module star { module sdb { + +/** is the context for data access beans. It allows to register aliases for database + access beans. It is possible to have different aliases for different locales. + + + <p> + A DatabaseContext stores an alias for the URL of a database access component + for a given locale. It is also allowed to work with a default locale. This is useful + in connection with Enumeration or NameAccess to the context. In common use, the + default language is set during the initialization of the component. + </p> + <p> + The service also provides a default handling for locales, where an alias isn't + set. The first time an alias is registered for a programmatic name, the alias + becomes the default for all other known locales. + + </p>@see com::sun::star::util::XLocalizedAliases + + @deprecated + */ +published service DatabaseAccessContext +{ + /** Enumeration on all registered data sources for a default locale. + */ + interface com::sun::star::container::XEnumerationAccess; + + /** NameAccess on all registered data sources for a default locale. + */ + interface com::sun::star::container::XNameAccess; + + /** Interface for registering aliases for data sources. + */ + interface com::sun::star::util::XLocalizedAliases; + + /** Interface for setting and retrieving the default language. + */ + interface com::sun::star::lang::XLocalizable; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseAccessDataSource.idl b/offapi/com/sun/star/sdb/DatabaseAccessDataSource.idl new file mode 100644 index 000000000..fec0bdc84 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseAccessDataSource.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseAccessDataSource_idl__ +#define __com_sun_star_sdb_DatabaseAccessDataSource_idl__ + +#include <com/sun/star/io/XPersistObject.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/ucb/RememberAuthentication.idl> +#include <com/sun/star/sdbc/XDataSource.idl> + +module com { module sun { module star { module sdb { + + published interface XCompletedConnection; + +/** is a factory to create data access beans. Data access beans are shared among + components, so if an already existing bean is requested, the existing one is returned. + + @deprecated + */ +published service DatabaseAccessDataSource +{ + interface com::sun::star::beans::XPropertySet; + interface com::sun::star::sdbc::XDataSource; + + /** is optional for implementation. + */ + [optional] interface XCompletedConnection; + + /** locates the database access bean. + */ + [property] string URL; + + /** determines the password handling. + */ + [optional, property] com::sun::star::ucb::RememberAuthentication PasswordMode; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseContext.idl b/offapi/com/sun/star/sdb/DatabaseContext.idl new file mode 100644 index 000000000..fee353634 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseContext.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseContext_idl__ +#define __com_sun_star_sdb_DatabaseContext_idl__ + +#include <com/sun/star/sdb/XDatabaseContext.idl> + +module com { module sun { module star { module sdb { + +/** is the context for accessing datasource. + + <p> + A datasource contains information how to create a connection to a database, such as, + which database driver should be used, for which user should a connection be established, etc. + <br/> + The context stores datasources under a given name. + + </p> + @see com::sun::star::sdb::DataSource + */ +published service DatabaseContext : XDatabaseContext; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseDocument.idl b/offapi/com/sun/star/sdb/DatabaseDocument.idl new file mode 100644 index 000000000..9f094684a --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseDocument.idl @@ -0,0 +1,65 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseDocument_idl__ +#define __com_sun_star_sdb_DatabaseDocument_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/util/XProtectable.idl> + + module com { module sun { module star { module sdbcx { + published interface XDataDescriptorFactory; + published interface XRename; +};};};}; + + module com { module sun { module star { module sdb { + +/** specifies a link to a document associated with a database document + @since OOo 2.0 + @deprecated + */ +published service DatabaseDocument +{ + // gives access to the properties. + interface com::sun::star::beans::XPropertySet; + + // allows to create new DatabaseDocument objects + interface com::sun::star::sdbcx::XDataDescriptorFactory; + + // allows to rename the object. + interface com::sun::star::sdbcx::XRename; + + /** is the name of the document. + */ + [readonly, property] string Name; + + + /** is the URL of the document. + */ + [readonly, property] string URL; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseEnvironment.idl b/offapi/com/sun/star/sdb/DatabaseEnvironment.idl new file mode 100644 index 000000000..3e1b48f33 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseEnvironment.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseEnvironment_idl__ +#define __com_sun_star_sdb_DatabaseEnvironment_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/util/XNumberFormatsSupplier.idl> + + + module com { module sun { module star { module sdb { + + published interface XDatabaseEnvironment; + + +/** @deprecated + is the top level service for accessing database components. + + + + <p>It enables the service user to establish connections to databases + or to use database access beans to gain access to database components. + This service takes control over all other database services.</p> + */ +published service DatabaseEnvironment +{ + interface XDatabaseEnvironment; + + interface com::sun::star::beans::XPropertySet; + + + /** provides an object for formatting numbers. + */ + [readonly, property] com::sun::star::util::XNumberFormatsSupplier + NumberFormatsSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseInteractionHandler.idl b/offapi/com/sun/star/sdb/DatabaseInteractionHandler.idl new file mode 100644 index 000000000..79f617452 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseInteractionHandler.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DatabaseInteractionHandler_idl__ +#define __com_sun_star_sdb_DatabaseInteractionHandler_idl__ + +module com { module sun { module star { module task { + interface XInteractionHandler2; +}; }; }; }; + +module com { module sun { module star { module sdb { + +/** describes a service which is able to handle database-related interactions. + + <p>Usually, you will not instantiate this service directly. Instead, you'll instantiate a generic + com::sun::star::task::InteractionHandler service, and pass it your request. Based on + configuration data, this implementation will decide where to forward the request to.</p> + + <p>By default, the <code>DatabaseInteractionHandler</code> feels responsible (as per configuration) for the + following interaction types: + <ul> + <li><b>database related errors</b><br/> + The general structure to transport such errors is the com::sun::star::sdbc::SQLException, + and if your interaction request supplies such a <code>SQLException</code> (or an instance of any derived class), + the handler will display a generic error dialog, which is able to travel the object chain which may be contained + in the exception. + </li> + <li><b>parameter requests</b><br/> + If your interaction request supplies a com::sun::star::sdb::ParametersRequest, + the handler will open a standard dialog asking the user to fill in parameter values. + <br/> + In the case you want to use this feature of the handler, you should supply a special continuation + (com::sun::star::sdb::XInteractionSupplyParameters) as well, so the + handler can return the entered information. + </li> + </ul> + </p> +*/ +service DatabaseInteractionHandler: com::sun::star::task::XInteractionHandler2; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl new file mode 100644 index 000000000..95e9f606e --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_DatabaseRegistrationEvent_idl__ +#define __com_sun_star_sdb_DatabaseRegistrationEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + +module com { module sun { module star { module sdb { + + +/** describes a change in a database registration + + @see XDatabaseRegistrations + @see XDatabaseRegistrationsListener + + @since LibreOffice 3.3 + */ +published struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject +{ + /// is the name of the database registration affected by the event + string Name; + /// is the old location of the database which is affected by the event + string OldLocation; + /// is the new location of the database which is affected by the event + string NewLocation; +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DatasourceAdministrationDialog.idl b/offapi/com/sun/star/sdb/DatasourceAdministrationDialog.idl new file mode 100644 index 000000000..c4e105be6 --- /dev/null +++ b/offapi/com/sun/star/sdb/DatasourceAdministrationDialog.idl @@ -0,0 +1,103 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_DatasourceAdministrationDialog_idl__ +#define __com_sun_star_sdb_DatasourceAdministrationDialog_idl__ + +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + + +module com { module sun { module star { module sdb { + + +/** provides a user interface for administrating the system wide registered data sources. + <p> + Here, <em>system wide registered</em> means registered on the (one and only) instance + of the + com::sun::star::sdb::DatabaseContext + service. + </p> +*/ +published service DatasourceAdministrationDialog +{ + /** the title of the (dialog) window + */ + [property] string Title; + + /** parent window to use for the administration dialog + <p> + This property can't be set while the dialog is being displayed. + </p> + */ + [property] com::sun::star::awt::XWindow ParentWindow; + + /** allows access to the properties of the object + */ + interface com::sun::star::beans::XPropertySet; + + /** allows starting execution of the administration dialog + */ + interface com::sun::star::ui::dialogs::XExecutableDialog; + + /** allows initializing the dialog + <p> + You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments + method of your com::sun::star::lang::XMultiServiceFactory. + </p> + + <p> + You specify a parameter by passing one (or more) + com::sun::star::beans::PropertyValue + object(s) to the initialize method, where the <em>Name</em> field contains a string describing which aspect + you want to affect, and the <em>Value</em> field containing a value. + <br/> + Imagine the initialization values as if you use setPropertyValue of the + com::sun::star::beans::XPropertySet + interface ... + <br/> + allowed parameters are + <ul> + <li><b>Title</b><br/> + String describing the initial title of the dialog. + If not specified, a default title is used. + </li> + <li><b>ParentWindow</b><br/> + com::sun::star::awt::XWindow + describing the parent window to use for the dialog. + </li> + <li><b>InitialSelection</b><br/> + String or XDataSource describing which data source should be selected initially. + This String name must be known to the + com::sun::star::sdb::DatabaseContext. + </li> + </ul> + </p> + */ + interface com::sun::star::lang::XInitialization; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DefinitionContainer.idl b/offapi/com/sun/star/sdb/DefinitionContainer.idl new file mode 100644 index 000000000..7ae204bf2 --- /dev/null +++ b/offapi/com/sun/star/sdb/DefinitionContainer.idl @@ -0,0 +1,90 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DefinitionContainer_idl__ +#define __com_sun_star_sdb_DefinitionContainer_idl__ + + module com { module sun { module star { module container { + published interface XNameAccess; + published interface XNameContainer; + published interface XIndexAccess; + published interface XEnumerationAccess; +};};};}; + + module com { module sun { module star { module util { + published interface XRefreshable; +};};};}; + module com { module sun { module star { module lang { + published interface XSingleServiceFactory; +};};};}; + + module com { module sun { module star { module sdb { + + +/** describes a container which provides access to database related definitions like + commands, forms, and reports. + + <p> + The container supports access to its elements by the elements name or + by the elements position. + </p> + <p> + Simple enumeration must be supported as well. + </p> + <p> + To reflect the changes with the underlying database, a refresh mechanism + needs to be supported. + </p> + */ +published service DefinitionContainer +{ + // gives access to the elements by name. + interface com::sun::star::container::XNameAccess; + + // allows to insert and remove by name. + interface com::sun::star::container::XNameContainer; + + // gives access to the elements by index. + interface com::sun::star::container::XIndexAccess; + + // allows to create an enumeration of the elements. + interface com::sun::star::container::XEnumerationAccess; + + + /** is used to refresh the container, to reflect changes in the underlying database. + */ + [optional] interface com::sun::star::util::XRefreshable; + + /** can be used to create container elements. + <p> + If this interface is supported, the object created using it (e.g., the object returned by + com.sun.star.lang::XSingleServiceFactory::createInstance() + ) can be used as container elements. + </p> + */ + [optional] interface com::sun::star::lang::XSingleServiceFactory; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DefinitionContent.idl b/offapi/com/sun/star/sdb/DefinitionContent.idl new file mode 100644 index 000000000..1cc7dfa32 --- /dev/null +++ b/offapi/com/sun/star/sdb/DefinitionContent.idl @@ -0,0 +1,65 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DefinitionContent_idl__ +#define __com_sun_star_sdb_DefinitionContent_idl__ + +#include <com/sun/star/ucb/Content.idl> +#include <com/sun/star/container/XHierarchicalName.idl> + + +module com { module sun { module star { module sdb { + + +/** defines the basic functionality for an object in the hierarchy of sub documents + of an OfficeDatabaseDocument. + + @see DocumentDefinition + @see DocumentContainer + */ +service DefinitionContent +{ + /** provides the functionality for treating the object as part of a hierarchy + of objects. + + <p>The following commands are commonly supported by the com::sun::star::ucb::XCommandProcessor + implementation of a <code>DefinitionContent</code>: + <ul> + <li><strong>getPropertyValues</strong></li> + <li><strong>setPropertyValues</strong></li> + <li><strong>getPropertySetInfo</strong></li> + </ul> + </p> + + <p>Additional commands might be supported by derived services.</p> + */ + service ::com::sun::star::ucb::Content; + + /** provides access to the complete name of the content within its hierarchy + @since OOo 3.3 + */ + interface ::com::sun::star::container::XHierarchicalName; +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Document.idl b/offapi/com/sun/star/sdb/Document.idl new file mode 100644 index 000000000..6e5720860 --- /dev/null +++ b/offapi/com/sun/star/sdb/Document.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Document_idl__ +#define __com_sun_star_sdb_Document_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { + +/** specifies documents which belong to a database source. + + <p> + These documents typically process information from a connected + data source. A Document could be a form or a report. + +@deprecated +*/ +published service Document +{ + interface com::sun::star::beans::XPropertySet; + + /** is the name of the document. If the document is part of the container, + it is not possible to alter the name.*/ + [readonly, property] string Name; + + /** is the URL of the document. */ + [property] string DocumentLocation; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DocumentContainer.idl b/offapi/com/sun/star/sdb/DocumentContainer.idl new file mode 100644 index 000000000..911cb0b3c --- /dev/null +++ b/offapi/com/sun/star/sdb/DocumentContainer.idl @@ -0,0 +1,118 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DocumentContainer_idl__ +#define __com_sun_star_sdb_DocumentContainer_idl__ + +#include <com/sun/star/sdb/DefinitionContainer.idl> +#include <com/sun/star/sdb/DefinitionContent.idl> + + + module com { module sun { module star { module lang { + published interface XMultiServiceFactory; +};};};}; + + module com { module sun { module star { module frame { + published interface XComponentLoader; +};};};}; + + module com { module sun { module star { module container { + published interface XHierarchicalNameContainer; +};};};}; + + + module com { module sun { module star { module sdb { + + +/** describes a container which provides access to documents embedded into a database document, + usually forms and reports. + + <p>The com::sun::star::lang::XMultiServiceFactory::createInstanceWithArguments() + should be used to create sub document container or form, or report objects.</p> + + <p>The embedded documents do not support any particular database related service, instead, they're + usual com::sun::star::document::OfficeDocuments.<br/> + The only thing worth mentioning here is that they support the + com::sun::star::container::XChild interface, whose + com::sun::star::container::XChild::getParent() method can be used to + obtain the database document which the embedded document belongs to. + </p> + + @see DocumentDefinition + @see OfficeDatabaseDocument + */ +service DocumentContainer +{ + service DefinitionContainer; + + /** provides functionality for treating the container as part of a hierarchy + of a database document's sub documents. + + <p>The com::sun::star::ucb::XCommandProcessor::execute() method + of a <code>DocumentDefinition</code> supports at least the following commands, additionally to + the ones already supported by the DefinitionContent: + <ul> + <li><strong>open</strong>: provides a com::sun::star::ucb::XDynamicResultSet + to enumerate the content of the document container.</li> + <li><strong>delete</strong>: deletes the document container, including all contained documents.</li> + </ul> + */ + service DefinitionContent; + + /** can be used to load the document inside. + <p> + URL: describes the name of the document definition to load, + TargetFrameName: isn't used. + SearchFlags: isn't used. + Arguments: + <ol> + <li>PropertyValue</li> + Name = ActiveConnection + Value = The connection which should be used when opening the text document. + <li>PropertyValue</li> + Name = OpenMode + Value = string, "open" if the document should be opened in live mode (editing is not possible), + "openDesign" if the document should be open in design mode (editing is possible) + </ol> + @see com::sun::star::sdbc::XConnection + </p> + */ + interface com::sun::star::frame::XComponentLoader; + + /** can be used to create container elements. + <p> + If this interface is supported, the object created using it (e.g., the object returned by + com.sun.star.lang::XMultiServiceFactory::createInstanceWithArguments() + ) can be used as container elements. + </p> + */ + interface com::sun::star::lang::XMultiServiceFactory; + + /** can be used to create folder hierarchies and to organize forms or reports in different sub folders. + */ + interface com::sun::star::container::XHierarchicalNameContainer; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DocumentDataSource.idl b/offapi/com/sun/star/sdb/DocumentDataSource.idl new file mode 100644 index 000000000..c8de0f0f4 --- /dev/null +++ b/offapi/com/sun/star/sdb/DocumentDataSource.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DocumentDataSource_idl__ +#define __com_sun_star_sdb_DocumentDataSource_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/XDocumentDataSource.idl> +#include <com/sun/star/sdb/DataSource.idl> + + module com { module sun { module star { module sdb { + + +/** simplifies the accessing of data sources and it's corresponding database document. + + @see DataSource + @see XDocumentDataSource + */ + +service DocumentDataSource +{ + service DataSource; + interface XDocumentDataSource; +}; + +}; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DocumentDefinition.idl b/offapi/com/sun/star/sdb/DocumentDefinition.idl new file mode 100644 index 000000000..e2b266e89 --- /dev/null +++ b/offapi/com/sun/star/sdb/DocumentDefinition.idl @@ -0,0 +1,90 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DocumentDefinition_idl__ +#define __com_sun_star_sdb_DocumentDefinition_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/sdb/DefinitionContent.idl> + +module com { module sun { module star { module sdb { + + interface XSubDocument; + +/** specifies a sub document of an OfficeDatabaseDocument. + + <p>Usual instances of a <code>DocumentDefinition</code> are forms and reports.</p> + + <p>Note that the <code>DocumentDefinition</code> does not denote the actual document + (i.e. an object supporting the com::sun::star::frame::XModel interface), + but only a shortcut to access and load those actual documents.</p> +*/ +service DocumentDefinition +{ + /** provides functionality for treating the object as part of a hierarchy + of a database document's sub documents. + + <p>The com::sun::star::ucb::XCommandProcessor::execute() method + of a <code>DocumentDefinition</code> supports at least the following commands, additionally to + the ones already supported by the DefinitionContent: + <ul> + <li><strong>open</strong>: loads the sub document in an own frame. The return value of + the <code>execute</code> method is the model of the loaded document.</li> + <li><strong>store</strong>: stores the document.</li> + <li><strong>openDesign</strong>: opens the sub document in an own frame, in design mode. + The user can make changes to the document, and save those changes. The return value of + the <code>execute</code> method is the model of the loaded document.</li> + <li><strong>preview</strong>: retrieves an image showing a preview of the sub document.</li> + <li><strong>getDocumentInfo</strong>: retrieves the document information, as + com::sun::star::document::XDocumentProperties + instance, of the sub document.</li> + <li><strong>delete</strong>: deletes the sub document from the database document.</li> + <li><strong>close</strong>: closes the sub document, if it had previously been opened + using either the <code>open</code> or <code>openDesign</code> command. The return value + of the <code>execute</code> command is a <code>boolean</code> value indicating whether + the sub document could be closed. Reasons for not closing the document include vetoes by + third parties, for instance, because the user opened a dialog modal to the sub document, + or a long-running task such as printing is currently running.</li> + <li><strong>show</strong>: shows the sub document. This is useful if you previously opened the + document hidden, or if you previously hide it using the <em>hide</em> command.<br/> + The <em>open</em> command is not available if the sub document has not been loaded, yet.</li> + <li><strong>hide</strong>: hides the sub document. In opposite to the <em>close</em> command, + only the document window is hidden, but the document is kept loaded. A subsequent execution + of the <em>show</em> command will show the window, again.</li> + </ul> + */ + service DefinitionContent; + + interface ::com::sun::star::beans::XPropertySet; + + interface ::com::sun::star::sdb::XSubDocument; + + /** is the name of the document. If the document is part of the container, + it is not possible to alter the name.*/ + [readonly, property] string Name; + + /** Indicates if the document is to be used as template, for example, if a report is to be filled with data. */ + [readonly, property] boolean AsTemplate; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/DocumentSaveRequest.idl b/offapi/com/sun/star/sdb/DocumentSaveRequest.idl new file mode 100644 index 000000000..1fef69912 --- /dev/null +++ b/offapi/com/sun/star/sdb/DocumentSaveRequest.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_DocumentSaveRequest_idl__ +#define __com_sun_star_sdb_DocumentSaveRequest_idl__ + +#include <com/sun/star/task/ClassifiedInteractionRequest.idl> +#include <com/sun/star/ucb/XContent.idl> + + + module com { module sun { module star { module sdb { + + +/** an error specifying the lack of a document name + <p> + Usually thrown if someone tries to save a document which hasn't a name yet. + </p> + @since OOo 2.0 +*/ +exception DocumentSaveRequest: com::sun::star::task::ClassifiedInteractionRequest +{ + /** specifies the content where the document should save inside. + Somebody handling the request could, e.g., use the content as root content + to display the hierarchy of the sub contents. + */ + com::sun::star::ucb::XContent Content; + + /** The default name of the document, may be empty. + */ + string Name; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ErrorCondition.idl b/offapi/com/sun/star/sdb/ErrorCondition.idl new file mode 100644 index 000000000..d70aed387 --- /dev/null +++ b/offapi/com/sun/star/sdb/ErrorCondition.idl @@ -0,0 +1,161 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_ErrorCondition_idl__ +#define __com_sun_star_sdb_ErrorCondition_idl__ + + +module com { module sun { module star { module sdb { + + +/** defines error conditions for OpenOffice.org Base core components + + <p>Core components of OpenOffice.org will use those error conditions + as error codes (com::sun::star::sdbc::SQLException::ErrorCode) + wherever possible.<br/> + That is, if an <code>SQLException</code> is raised by + such a component, caused by an error condition which is included in the + ErrorCondition group, then the respective <em>negative</em> value + will be used as <code>ErrorCode</code>.</p> + + <p>This allows to determine specific error conditions in your client code, and + to handle it appropriately.</p> + + <p>Note that before you examine the <code>ErrorCode</code> member of a caught + <code>SQLException</code>, you need to make sure that the exception + is really thrown by an OpenOffice.org Base core component. To do so, check + whether the error message (<code>Exception::Message</code>) starts with the + vendor string <code>[OOoBase]</code>.</p> + + <p>The list of defined error conditions, by nature, is expected to permanently grow, + so never assume it being finalized.</p> + + @code{.java} + catch ( SQLException e ) + { + if (e.Message.startsWith( "[OOoBase]" )) + if (e.ErrorCode + ErrorCondition.SOME_ERROR_CONDITION == 0) + handleSomeErrorCondition(); + } + @endcode + */ +constants ErrorCondition +{ + // = section ROW_SET - css.sdb.RowSet related error conditions + + /** is used by and RowSet to indicate that an operation has been vetoed + by one of its approval listeners + + <p>This error condition results in raising a RowSetVetoException.</p> + @see RowSet + @see XRowSetApproveBroadcaster + @see XRowSetApproveListener + */ + const long ROW_SET_OPERATION_VETOED = 100; + + // = section PARSER - parsing related error conditions + + /** indicates that while parsing an SQL statement, cyclic sub queries have been detected. + + <p>Imagine you have a client-side query <code>SELECT * FROM table</code>, which is + saved as "query1". Additionally, there is a query "query2" defined + as <code>SELECT * FROM query1</code>. Now if you try to change the statement of + query1 to <code>SELECT * FROM query2</code>, this is prohibited, because + it would lead to a cyclic sub query. + */ + const long PARSER_CYCLIC_SUB_QUERIES = 200; + + // = section DB - application-level error conditions + // = next section should start with 500 + + /** indicates that the name of a client side database object - a query, a form, + or a report - contains one or more slashes, which is forbidden. + */ + const long DB_OBJECT_NAME_WITH_SLASHES = 300; + + /** indicates that an identifier is not SQL conform. + */ + const long DB_INVALID_SQL_NAME = 301; + + /** indicates that the name of a query contains quote characters. + + <p>This error condition is met when the user attempts to save a query + with a name which contains one of the possible database quote characters. + This is an error since query names can potentially be used in + <code>SELECT</code> statements, where quote identifiers would render the statement invalid.</p> + + @see com::sun::star::sdb::tools::XDataSourceMetaData::supportsQueriesInFrom + */ + const long DB_QUERY_NAME_WITH_QUOTES = 302; + + /** indicates that an attempt was made to save a database object under a name + which is already used in the database. + + <p>In databases which support query names to appear in <code>SELECT</code> + statements, this could mean that a table was attempted to be saved with the + name of an existing query, or vice versa.</p> + + <p>Otherwise, it means an object was attempted to be saved with the + name of an already existing object of the same type.</p> + + @see com::sun::star::sdb::application::DatabaseObject + @see com::sun::star::sdb::tools::XDataSourceMetaData::supportsQueriesInFrom + */ + const long DB_OBJECT_NAME_IS_USED = 303; + + /** indicates an operation was attempted which needs a connection to the + database, which did not exist at that time. + */ + const long DB_NOT_CONNECTED = 304; + + // = section AB - address book access related error conditions + // = next section should start with 550 + + /** used by the component implementing address book access to indicate that a requested address book could + not be accessed. + + <p>For instance, this error code is used when you try to access the address book + in a Thunderbird profile named <i>MyProfile</i>, but there does not exist a profile + with this name.</p> + */ + const long AB_ADDRESSBOOK_NOT_FOUND = 500; + + // = section DATA - data retrieval related error conditions + // = next section should start with 600 + + /** used to indicate that a <code>SELECT</code> operation on a table needs a filter. + + <p>Some database drivers are not able to <code>SELECT</code> from a table if the + statement does not contain a <code>WHERE</code> clause. In this case, a statement + like <code>SELECT * FROM "table"</code> will fail with the error code + <code>DATA_CANNOT_SELECT_UNFILTERED</code>.</p> + + <p>It is also legitimate for the driver to report this error condition as warning, and provide + an empty result set, instead of ungraceful failing.</p> + */ + const long DATA_CANNOT_SELECT_UNFILTERED = 550; +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ErrorMessageDialog.idl b/offapi/com/sun/star/sdb/ErrorMessageDialog.idl new file mode 100644 index 000000000..158017b87 --- /dev/null +++ b/offapi/com/sun/star/sdb/ErrorMessageDialog.idl @@ -0,0 +1,94 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_ErrorMessageDialog_idl__ +#define __com_sun_star_sdb_ErrorMessageDialog_idl__ + +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> + +module com { module sun { module star { module sdb { + +/** provides a dialog for displaying database related exceptions. + <p> + If applications use any of the functionality provided in the modules + com.sun.star::sdbc, com.sun.star::sdbcx and com.sun.star::sdb, + they will - sooner or later - encounter + com::sun::star::sdbc::SQLException + 's. + <br/> + These exceptions can be chained, so the information wrapped in one single + com::sun::star::sdbc::SQLException + can be rather complex (e.g., every instance where such an exception is passing before it is finally caught, could + append a + com::sun::star::sdb::SQLContext + to explain what it was doing), and they should be + presented to the user in a consistent way. + <br/> + This can be reached by using this service. + @see com::sun::star::sdb::InteractionHandler + </p> +*/ +published service ErrorMessageDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + /** allows initializing the dialog + <p> + You do not need to call the initialize method directly, instead you may use the createInstanceWithArguments + method of your com::sun::star::lang::XMultiServiceFactory. + </p> + <p> + You specify a parameter by passing one (or more) + com::sun::star::beans::PropertyValue + object(s) to the initialize method, where the <em>Name</em> field contains a string describing which aspect + you want to affect, and the <em>Value</em> field containing a value. + <br/> + Imagine the initialization values, as if you use + com::sun::star::beans">XPropertySet::setPropertyValue() + of the + com::sun::star::beans::XPropertySet + interface ... + <br/> + allowed parameters are + <ul> + <li><b>title</b><br/> + String describing the initial title of the dialog. If not specified, a default title is used. + </li> + <li><b>parentWindow</b><br/> + com::sun::star::awt::XWindow + describing the parent window to use for the dialog. + </li> + <li><b>sqlException</b><br/> + com::sun::star::sdbc::SQLException + describing the error which is being displayed.<br/> + When initializing this value, you may use any derivative of + com::sun::star::sdbc::SQLException. + </li> + </ul> + </p> + */ + create([in] string initialTitle, [in] com::sun::star::awt::XWindow parentWindow, [in] any sqlException); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/FilterDialog.idl b/offapi/com/sun/star/sdb/FilterDialog.idl new file mode 100644 index 000000000..a9c031ad6 --- /dev/null +++ b/offapi/com/sun/star/sdb/FilterDialog.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_FilterDialog_idl__ +#define __com_sun_star_sdb_FilterDialog_idl__ + +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/sdb/XSingleSelectQueryComposer.idl> +#include <com/sun/star/sdbc/XRowSet.idl> +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> + + +module com { module sun { module star { module sdb { + +/** + This interface could be incomplete since I derived it from its places of use. + + @since LibreOffice 4.1 +*/ +service FilterDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createDefault(); + + createWithQuery([in] com::sun::star::sdb::XSingleSelectQueryComposer QueryComposer, + [in] com::sun::star::sdbc::XRowSet RowSet, + [in] com::sun::star::awt::XWindow ParentWindow); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Forms.idl b/offapi/com/sun/star/sdb/Forms.idl new file mode 100644 index 000000000..bd1f98da7 --- /dev/null +++ b/offapi/com/sun/star/sdb/Forms.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Forms_idl__ +#define __com_sun_star_sdb_Forms_idl__ + +#include <com/sun/star/sdb/DocumentContainer.idl> + + + + module com { module sun { module star { module sdb { + + +/** describes a container which provides access to database forms. + + + @see com::sun::star::sdb::DocumentDefinition + */ +service Forms +{ + service DocumentContainer; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/InteractionHandler.idl b/offapi/com/sun/star/sdb/InteractionHandler.idl new file mode 100644 index 000000000..4b93b778a --- /dev/null +++ b/offapi/com/sun/star/sdb/InteractionHandler.idl @@ -0,0 +1,42 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_InteractionHandler_idl__ +#define __com_sun_star_sdb_InteractionHandler_idl__ + +module com { module sun { module star { module task { + published interface XInteractionHandler; +}; }; }; }; + +module com { module sun { module star { module sdb { + +/** is a service for user interaction for databases. + @deprecated + Do not use this service anymore. Instead, create a generic com::sun::star::task::InteractionHandler + instance, and pass it your request. It will determine, based on configuration data, which concrete interaction + handler implementation to use for a specific request. In particular, requests formerly server by this service here + are by default passed to a DatabaseInteractionHandler. +*/ +published service InteractionHandler: com::sun::star::task::XInteractionHandler; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/OfficeDatabaseDocument.idl b/offapi/com/sun/star/sdb/OfficeDatabaseDocument.idl new file mode 100644 index 000000000..90f1edc0f --- /dev/null +++ b/offapi/com/sun/star/sdb/OfficeDatabaseDocument.idl @@ -0,0 +1,226 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_OfficeDatabaseDocument_idl__ +#define __com_sun_star_sdb_OfficeDatabaseDocument_idl__ + +#include <com/sun/star/document/OfficeDocument.idl> +#include <com/sun/star/sdb/XOfficeDatabaseDocument.idl> +#include <com/sun/star/document/XDocumentEventBroadcaster.idl> +#include <com/sun/star/script/provider/XScriptProviderSupplier.idl> +#include <com/sun/star/frame/XLoadable.idl> +#include <com/sun/star/util/XCloseable.idl> + +module com { module sun { module star { module sdb { + +/** specifies an office database document which is a storable document. + + <p>These documents contain information about forms, and reports, and the properties of a data source.</p> + + <p>The database document contains no data per default. The following is stored inside the document: + <ul> + <li>forms</li> + <li>reports</li> + <li>The table settings defined in DataSettings</li> + <li>The query settings defined in DataSettings</li> + <li>All properties of the service DataSource</li> + </ul></p> + + @see com::sun::star::sdb::XOfficeDatabaseDocument + @see com::sun::star::document::OfficeDocument + @since OOo 2.0 + */ +service OfficeDatabaseDocument +{ + /** specifies basic functionality of a document in OpenOffice.org + + <p>Note that a database document actually does not support the com::sun::star::view::XPrintable interface. + The non-optional requirement of this interface in the com::sun::star::document::OfficeDocument + service is considered a documentation error.</p> + */ + service com::sun::star::document::OfficeDocument; + + interface XOfficeDatabaseDocument; + + /** allows access to the Basic macros and dialogs possibly embedded in the document + @since OOo 3.1 + */ + interface ::com::sun::star::document::XEmbeddedScripts; + + /** supplies a script provider which can be used to execute macros and scripts + embedded in the document + @since OOo 3.1 + */ + interface ::com::sun::star::script::provider::XScriptProviderSupplier; + + /** allows to initialize the document, either from scratch, or from a stored + database document. + + <p>A newly instantiated database document cannot be operated until it is fully + initialized. There are three possible means to do this initialization: + <ul><li>calling <code>XLoadable::initNew</code></li> + <li>calling <code>XLoadable::load</code></li> + <li>calling <code>XStorable::storeAsURL</code></li> + </ul> + The third option was added for compatibility reasons, since a DatabaseDocument + in earlier versions of OpenOffice.org did not support the <code>XLoadable</code> interface, + so the usual way of creating a document from scratch was to create it, set properties as + needed, and store it.</p> + + @since OOo 3.1 + */ + interface ::com::sun::star::frame::XLoadable; + + /** allows to register for notifications happening in the document + + <p>The following events are broadcasted by a database document + <table border="1" frame="all"> + <tr><td><strong>Event Name</strong></td> + <td><strong>broadcasted when</strong></td> + <td align="center"><strong>broadcasted synchronously</strong></td> + </tr> + <tr><td valign="top"><em>OnCreate</em></td> + <td>the document has been newly created. This does not imply that the document has + been loaded into a frame, it just means the initialization has been finished.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnLoadFinished</em></td> + <td>the document has been completely loaded. This does not imply that the document + has been loaded into a frame, it just means the load process has been finished.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnNew</em></td> + <td>the document has been initialized from scratch, including plugging it into a frame.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnLoad</em></td> + <td>the document has been completely loaded, including plugging it into a frame.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSave</em></td> + <td>the document is about to be saved.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnSaveDone</em></td> + <td>saving the document succeeded.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSaveFailed</em></td> + <td>saving the document failed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSaveAs</em></td> + <td>the document is about to be saved under a new name.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnSaveAsDone</em></td> + <td>saving the document under a new name succeeded.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSaveAsFailed</em></td> + <td>saving the document under a new name failed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSaveTo</em></td> + <td>the document is about to be saved to a location different from its + current location, but without adjusting the current location.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnSaveToDone</em></td> + <td>saving the document to a different location succeeded.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSaveToFailed</em></td> + <td>saving the document to a different location failed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnPrepareUnload</em></td> + <td>the document is about to be closed.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnUnload</em></td> + <td>the document is being closed.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnFocus</em></td> + <td>a view to the document obtained the focus.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnUnfocus</em></td> + <td>a view to the document lost the focus.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnModifyChanged</em></td> + <td>the <em>modified</em> state of the document changed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnViewCreated</em></td> + <td>a view to the document has been created, and attached to the document.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnPrepareViewClosing</em></td> + <td>a view to the document is about to be closed.</td> + <td align="center">yes</td> + </tr> + <tr><td valign="top"><em>OnViewClosed</em></td> + <td>a view to the document has been closed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnTitleChanged</em></td> + <td>the title of the document changed.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSubComponentOpened</em></td> + <td>From with a view to the document, a view to a sub component (e.g. a table or a report) has been opened.</td> + <td align="center">no</td> + </tr> + <tr><td valign="top"><em>OnSubComponentClosed</em></td> + <td>From with a view to the document, a view to a sub component (e.g. a table or a report) has been closed.</td> + <td align="center">no</td> + </tr> + </table> + </p> + + @since OOo 3.1 + */ + interface ::com::sun::star::document::XDocumentEventBroadcaster; + + /** implements life time control + + <p>Whoever retrieves an OfficeDatabaseDocument should be aware of + life time issues, since a document needs to be closed when nobody needs it anymore.</p> + + <p>This implies that clients of a document need to ensure that as soon as they don't + need, they invoke com::sun::star::util::XCloseable::close().</p> + + <p>Since this can be done by multiple clients, every client is additionally required + to register itself as com::sun::star::util::XCloseListener at + the document, to prevent some other client closing the model while it's still needed + by the first client.</p> + */ + interface com::sun::star::util::XCloseable; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/OrderColumn.idl b/offapi/com/sun/star/sdb/OrderColumn.idl new file mode 100644 index 000000000..6d264c031 --- /dev/null +++ b/offapi/com/sun/star/sdb/OrderColumn.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_OrderColumn_idl__ +#define __com_sun_star_sdb_OrderColumn_idl__ + +#include <com/sun/star/sdbcx/Column.idl> + +module com { module sun { module star { module sdb { + +/** describes a column which is part of the ORDER clause. + + @see com::sun::star::sdb::XSingleSelectQueryComposer +*/ +service OrderColumn +{ + service com::sun::star::sdbcx::Column; + + /** describes which sort order this column has. + The default is `TRUE`. + */ + [property] boolean IsAscending; +}; + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/OrderDialog.idl b/offapi/com/sun/star/sdb/OrderDialog.idl new file mode 100644 index 000000000..456e70f69 --- /dev/null +++ b/offapi/com/sun/star/sdb/OrderDialog.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_OrderDialog_idl__ +#define __com_sun_star_sdb_OrderDialog_idl__ + +#include <com/sun/star/awt/XWindow.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/sdb/XSingleSelectQueryComposer.idl> +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> + + +module com { module sun { module star { module sdb { + +/** + This interface could be incomplete since I derived it from its places of use. + + @since LibreOffice 4.1 +*/ +service OrderDialog : com::sun::star::ui::dialogs::XExecutableDialog +{ + createDefault(); + + createWithQuery([in] com::sun::star::sdb::XSingleSelectQueryComposer QueryComposer, + [in] com::sun::star::beans::XPropertySet RowSet, + [in] com::sun::star::awt::XWindow ParentWindow); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ParametersRequest.idl b/offapi/com/sun/star/sdb/ParametersRequest.idl new file mode 100644 index 000000000..9e44f9c50 --- /dev/null +++ b/offapi/com/sun/star/sdb/ParametersRequest.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ParametersRequest_idl__ +#define __com_sun_star_sdb_ParametersRequest_idl__ + +#include <com/sun/star/task/ClassifiedInteractionRequest.idl> + +#include <com/sun/star/container/XIndexAccess.idl> +#include <com/sun/star/sdbc/XConnection.idl> + + + module com { module sun { module star { module sdb { + + +/** an error specifying the lack of parameters values + <p> + Usually thrown if someone tries to execute an SQL statement containing + parameters which can't be filled by the executing instance. + </p> +*/ +published exception ParametersRequest: com::sun::star::task::ClassifiedInteractionRequest +{ + /** is the list of parameters requested. + The objects returned by the + com::sun::star::container::XIndexAccess + have to + be property sets describing the respective parameter. For this, the objects have to support the + service com::sun::star::sdbcx::Column. + */ + com::sun::star::container::XIndexAccess Parameters; + + /** specifies the connection on which the statement is to be executed. + Somebody handling the request could, e.g., use the connection for determining + the identifier quote string, etc. + */ + com::sun::star::sdbc::XConnection Connection; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/PreparedStatement.idl b/offapi/com/sun/star/sdb/PreparedStatement.idl new file mode 100644 index 000000000..89c36d297 --- /dev/null +++ b/offapi/com/sun/star/sdb/PreparedStatement.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_PreparedStatement_idl__ +#define __com_sun_star_sdb_PreparedStatement_idl__ + +#include <com/sun/star/sdbc/PreparedStatement.idl> + + module com { module sun { module star { module sdbcx { + published interface XColumnsSupplier; +};};};}; + + module com { module sun { module star { module sdb { + + +/** represents a precompiled SQL statement. The service differs only in the access + of the columns and parameters to the service + com::sun::star::sdbc::PreparedStatement. + */ +published service PreparedStatement +{ + service com::sun::star::sdbc::PreparedStatement; + + + /** access to the resulting columns of the statement. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Query.idl b/offapi/com/sun/star/sdb/Query.idl new file mode 100644 index 000000000..13cc93592 --- /dev/null +++ b/offapi/com/sun/star/sdb/Query.idl @@ -0,0 +1,78 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Query_idl__ +#define __com_sun_star_sdb_Query_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + + module com { module sun { module star { module sdbcx { + published interface XDataDescriptorFactory; + published interface XColumnsSupplier; + published interface XRename; +};};};}; + +#include <com/sun/star/sdb/DataSettings.idl> + +#include <com/sun/star/sdb/XQueryDefinition.idl> + + module com { module sun { module star { module sdb { + + +/** is a stored definition of a SQL query. + + <p> + It can be used if there is a need to execute SQL statements more than once, or + if you want to format the query result fields differently from the + underlying table definitions. + </p> + */ +published service Query +{ + + /** defines the command of the query. + */ + interface com::sun::star::sdb::XQueryDefinition; + + + /** is used for customization of data appearance. + */ + service com::sun::star::sdb::DataSettings; + + + /** is provided for creation of a new query descriptor based on the current information. + */ + interface com::sun::star::sdbcx::XDataDescriptorFactory; + + // allows to rename the object. + interface com::sun::star::sdbcx::XRename; + + + /** access to the columns of the results sets query. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/QueryDefinition.idl b/offapi/com/sun/star/sdb/QueryDefinition.idl new file mode 100644 index 000000000..2f0f7fe35 --- /dev/null +++ b/offapi/com/sun/star/sdb/QueryDefinition.idl @@ -0,0 +1,42 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_QueryDefinition_idl__ +#define __com_sun_star_sdb_QueryDefinition_idl__ + +#include <com/sun/star/sdb/XQueryDefinition.idl> + + module com { module sun { module star { module sdb { + + +/** is a stored definition of a SQL "Select statement". + + <p> + It can be used, if there is a need to execute SQL statement more than once. + </p> + */ +published service QueryDefinition : XQueryDefinition; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/QueryDescriptor.idl b/offapi/com/sun/star/sdb/QueryDescriptor.idl new file mode 100644 index 000000000..00ce6cd50 --- /dev/null +++ b/offapi/com/sun/star/sdb/QueryDescriptor.idl @@ -0,0 +1,95 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_QueryDescriptor_idl__ +#define __com_sun_star_sdb_QueryDescriptor_idl__ + +#include <com/sun/star/sdbcx/Descriptor.idl> + + module com { module sun { module star { module sdbcx { + published interface XDataDescriptorFactory; + published interface XColumnsSupplier; +};};};}; + +#include <com/sun/star/sdb/DataSettings.idl> + + module com { module sun { module star { module sdb { + + +/** is a stored definition of a SQL "Select statement". + + <p> + It can be used, if there is a need to execute SQL statement more than once or + if you want to format the query result fields different from the + underlying table definitions. + </p> + */ +published service QueryDescriptor +{ + service com::sun::star::sdbcx::Descriptor; + + + /** is provided for creation of a new query descriptor based on the current information. + */ + interface com::sun::star::sdbcx::XDataDescriptorFactory; + + + /** is used for customization of data appearance. + */ + service com::sun::star::sdb::DataSettings; + + + /** access to the columns of the results sets query. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; + + + /** is the command of the query, this is typically a select statement. + */ + [property] string Command; + + + /** should we use escape processing for the query. + */ + [property] boolean EscapeProcessing; + + + /** is the name of the table which should be updated. This is usually used + for queries which relate on more than one table. + */ + [property] string UpdateTableName; + + + /** is the name of the update table catalog. + */ + [property] string UpdateCatalogName; + + + /** is the name of the update table schema. + */ + [property] string UpdateSchemaName; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/QueryDesign.idl b/offapi/com/sun/star/sdb/QueryDesign.idl new file mode 100644 index 000000000..2dd2fd6eb --- /dev/null +++ b/offapi/com/sun/star/sdb/QueryDesign.idl @@ -0,0 +1,185 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_QueryDesign_idl__ +#define __com_sun_star_sdb_QueryDesign_idl__ + +#include <com/sun/star/frame/XController.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/frame/XDispatchProvider.idl> +#include <com/sun/star/form/FormController.idl> + +module com { module sun { module star { module sdb { + +/** implements a component which allows the creation of SQL statements. + + <p>This service implements a user interface for creating SQL statements either through a graphical design + interface or simply to enter the SQL statement directly.</p> + + <p>The design view of the QueryDesign is divided into two parts. The first part contains the table windows + where columns can be selected for the SQL statement. The second part contains the columns which should appear + in the selection of the SQL statement or criteria which narrow the query.</p> + + <h3>Operation Modes</h3> + + <p>A <code>QueryDesign</code> component has 3 operation modes, which control what kind of object is edited: + <ul><li><a name="query_mode"></a><b>Query Mode</b> + <p>In <code>Query Mode</code>, the designer is used to modify an existing or create a new client-side + query.</p></li> + + <li><a name="view_mode"</a><b>View Mode</b> + <p>In <code>View Mode</code>, the designer is used to modify an existing or create a new server-side + view.</p> + <p>The view which is being designed must support the com::sun::star::sdbcx::XAlterView + interface, except when a new view is being designed. In the latter case, the designer closes itself + automatically when <code>XAlterView</code> is not supported, and the view has been saved.</p></li> + + <li><a name="command_mode"</a><b>Command Mode</b> + <p>In <code>Command Mode</code>, the designer is used to design an standalone SQL command.</p> + <p>The client of the designer is then responsible to listen at changes in the + #ActiveCommand and #EscapeProcessing members, which are updated + every time the user saves the command.</p></li> + </ul></p> + + <h3><a name="initialization"></a>Initialization</h3> + + <p>Initialization is done using the com::sun::star::lang::XInitialization interface, + which expects a sequence of objects being either com::sun::star::beans::NamedValues or + com::sun::star::beans::PropertyValues. The following parameters are supported at + initialization time: + <ul> + <li><b>Frame</b><br/> + has to be a com::sun::star::frame::XFrame interface specifying the frame to plug the + QueryDesign component into.<br/> + This parameter is mandatory. + </li> + + <li><a name="data_source"></a><b>DataSourceName</b><br/> + specifies the name of the globally registered DataSource for which a query, view, or SQL + command is to be designed.<br/> + The DataSourceName may be omitted if and only if a valid <a href="#active_connection">ActiveConnection</a> + parameter is present.<br/> + If both <code>DataSourceName</code> and <code>ActiveConnection</code> are present, the former + is ignored. + </li> + + <li><a name="active_connection"></a><b>ActiveConnection</b><br/> + specifies the connection to work with.<br/> + May be omitted if and only if a valid <a href="#data_source">DataSourceName</a> parameter is supplied. + </li> + + <li><a name="command"></a><b>Command</b><br/> + specifies the name of the query or view to design, or, in case of the <a href="#command_type">CommandType</a> + being CommandType::COMMAND, the initial SQL command.<br/> + If this parameter is not present, a new query/view will be designed, respectively the initial + command will be empty. + </li> + + <li><a name="command_type"></a><b>CommandType</b><br/> + specifies the type of object which should be designed. The following options are + supported: + <ul><li>CommandType::QUERY specifies the designer should operate in + <a href="#query_mode">query mode</a>, that is, an existing client-side query should be + designed, or a new query should be created, depending on the presence of the + <a href="#command">Command</a> parameter.<br/> + If the <a href="#data_source">DataSourceName</a> parameter is present, the query is + looked up in the specified data source. Otherwise, the designer tries to determine + the data source which the <a href="#active_connection">ActiveConnection</a> belongs + to, and looks up the query there.</li> + + <li>CommandType::COMMAND specifies the designer should operate in + <a href="#command_mode">command mode</a>, that is, a standalone SQL command + should be designed. When the user attempts to save the designed SQL statement, + the #ActiveCommand and #EscapeProcessing properties + of the designer are updated.</li> + + <li>CommandType::TABLE specifies the designer should operate in + <a href="#view_mode">view mode</a>, that is, an existing or a new + server-side view should be designed, depending on the presence of the + <a href="#command">Command</a> parameter.<br/> + If the <a href="#data_source">DataSourceName</a> parameter is present, the view is + looked up in a newly created connection for the specified data source. Otherwise, + it is looked up in the connection given as <a href="#active_connection">ActiveConnection</a>.</li> + </ul> + If not present, this parameter defaults to CommandType::QUERY. + </li> + + <li><b>EscapeProcessing</b><br/> + Specifies whether or not escape processing should be initially enabled in the query designer. If set + to `FALSE`, then the designer can operate in text view only (as opposed to the graphical view). The + <a href="#graphical_design">GraphicalDesign</a> parameter will be ignored then, and assumed to be `FALSE`.<br/> + If not present, `TRUE` is assumed for this parameter.</li> + + <li><a name="graphical_design"></a><b>GraphicalDesign</b><br/> + This value indicates whether the designer should be opened in the graphical design view + (`TRUE`) or in the text view (`FALSE`).<br/> + If not present, `FALSE` is assumed for this parameter. + </li> + </ul> + </p> + + <p>There's a number of legacy settings which are recognized for compatibility reasons, though + you're discouraged from using them: + <ul> + <li><b>CurrentQuery</b><br/> + is the same as Command, and implies a <a href="#command_type">CommandType</a> of + CommandType::QUERY</li> + + <li><b>QueryDesignView</b><br/> + is the same as <a href="#graphical_design">GraphicalDesign</a>.</li> + + <li><b>IndependentSQLCommand</b><br/> + is the same as Command, and implies a <a href="#command_type">CommandType</a> of + CommandType::COMMAND</li> + + <li><b>CreateView</b><br/> + implies a <a href="#command_type">CommandType</a> of CommandType::TABLE</li> + </ul> + + @see com::sun::star::sdb::ContentLoader +*/ + +published service QueryDesign +{ + /** allows the component to be plugged into frames. + */ + interface com::sun::star::frame::XController; + + /** is used to initialize the QueryDesign. + + <p>See chapter <a href="#initialization">Initialization</a> for details.</p> + */ + interface com::sun::star::lang::XInitialization; + + /** reflects the designed SQL command at the moment it was last saved by the user. + */ + [readonly, property] string ActiveCommand; + + /** specifies whether the user enabled escape processing for the statement being designed. + + @see DataAccessDescriptor::EscapeProcessing + @since OOo 2.4 + */ + [readonly, property, optional] boolean EscapeProcessing; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RelationDesign.idl b/offapi/com/sun/star/sdb/RelationDesign.idl new file mode 100644 index 000000000..e394917d4 --- /dev/null +++ b/offapi/com/sun/star/sdb/RelationDesign.idl @@ -0,0 +1,77 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RelationDesign_idl__ +#define __com_sun_star_sdb_RelationDesign_idl__ + +#include <com/sun/star/frame/XController.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/frame/XDispatchProvider.idl> +#include <com/sun/star/form/FormController.idl> + +module com { module sun { module star { module sdb { + +/** implements a component which allows the creation of relation. + + <p>This service implements a user interface for relations through a graphical design interface.</p> + + <p>The design view of the RelationDesign is identical to the first part of @see QueryDesign. It contains all tables + which are already connected through a relation.</p> + + @see com::sun::star::sdb::ContentLoader + @see com::sun::star::frame::XDispatch + @see com::sun::star::frame::XDispatchProviderInterceptor + + @since OOo 1.1.2 +*/ + +published service RelationDesign +{ + /** allows the component to be plugged into frames. + */ + interface com::sun::star::frame::XController; + + /** is used to initialize the RelationDesign. + + <p>Parameters (passed to the method + com::sun::star::lang::XInitialization::initialize()) + have to be instances of com::sun::star::beans::PropertyValue, where the + com::sun::star::beans::PropertyValue::Name member specifies what the parameter controls, + with the com::sun::star::beans::PropertyValue::Value member containing the value + to be used.<br> + Recognized parameters are: + <ul> + <li><b>Frame</b><br> + has to be a com::sun::star::frame::XFrame interface specifying the frame to plug the + RelationDesign component into. + </li> + <li><b>DataSourceName</b><br> + The name of the globally registered DataSource to be used for initial display. It is only + meaningful together with the other parameters specifying the object to display. + </li> + </ul> + </p> + */ + interface com::sun::star::lang::XInitialization; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ReportDesign.idl b/offapi/com/sun/star/sdb/ReportDesign.idl new file mode 100644 index 000000000..bf7426cf5 --- /dev/null +++ b/offapi/com/sun/star/sdb/ReportDesign.idl @@ -0,0 +1,39 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ReportDesign_idl__ +#define __com_sun_star_sdb_ReportDesign_idl__ + +#include <com/sun/star/frame/XController2.idl> + + +module com { module sun { module star { module sdb { + + +/** + This interface could be incomplete since I derived it from its sole place of use. + + @since LibreOffice 4.1 +*/ +service ReportDesign : com::sun::star::frame::XController2; + + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Reports.idl b/offapi/com/sun/star/sdb/Reports.idl new file mode 100644 index 000000000..27dbbf093 --- /dev/null +++ b/offapi/com/sun/star/sdb/Reports.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Reports_idl__ +#define __com_sun_star_sdb_Reports_idl__ + +#include <com/sun/star/sdb/DocumentContainer.idl> + + + + module com { module sun { module star { module sdb { + + +/** describes a container which provides access to database reports. + + + @see com::sun::star::sdb::DocumentDefinition + */ +service Reports +{ + service DocumentContainer; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ResultColumn.idl b/offapi/com/sun/star/sdb/ResultColumn.idl new file mode 100644 index 000000000..f3a8c2c8e --- /dev/null +++ b/offapi/com/sun/star/sdb/ResultColumn.idl @@ -0,0 +1,112 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ResultColumn_idl__ +#define __com_sun_star_sdb_ResultColumn_idl__ + +#include <com/sun/star/sdbcx/Column.idl> + +#include <com/sun/star/sdb/ColumnSettings.idl> + + module com { module sun { module star { module sdb { + + +/** describes a column of a result set. + */ +published service ResultColumn +{ + service com::sun::star::sdbcx::Column; + + + /** [optional], access to layout settings for a column. + */ + service com::sun::star::sdb::ColumnSettings; + + + /** indicates whether the column can be used in a Where clause. + */ + [readonly, property] boolean IsSearchable; + + + /** indicates whether values in the column are signed numbers. + */ + [readonly, property] boolean IsSigned; + + + /** indicates that a column is case sensitive. + */ + [readonly, property] boolean IsCaseSensitive; + + + /** indicates the column's normal max width in chars. + */ + [readonly, property] long DisplaySize; + + + /** gets the suggested column title for use in printouts and + displays. + */ + [readonly, property] string Label; + + + /** indicates whether a column is definitely, not writable. + */ + [readonly, property] boolean IsReadOnly; + + + /** indicates whether it is possible for a write on the column to succeed. + */ + [readonly, property] boolean IsWritable; + + + /** indicates whether a write on the column will definitely succeed. + */ + [readonly, property] boolean IsDefinitelyWritable; + + + /** returns the fully-qualified name of the service whose instances + are manufactured if the method + com::sun::star::sdbc::XRow::getObject)= + is called to retrieve a value from the column. + */ + [readonly, property] string ServiceName; + + + /** gets a column's table name. + */ + [readonly, property] string TableName; + + + /** gets a column's schema name. + */ + [readonly, property] string SchemaName; + + + /** gets a column's table's catalog name. + */ + [readonly, property] string CatalogName; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/ResultSet.idl b/offapi/com/sun/star/sdb/ResultSet.idl new file mode 100644 index 000000000..07b9318b4 --- /dev/null +++ b/offapi/com/sun/star/sdb/ResultSet.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_ResultSet_idl__ +#define __com_sun_star_sdb_ResultSet_idl__ + +#include <com/sun/star/sdbcx/ResultSet.idl> + + module com { module sun { module star { module sdbcx { + published interface XColumnsSupplier; +};};};}; + + module com { module sun { module star { module sdb { + + +/** extends the + com::sun::star::sdbcx::ResultSet + by a more sophisticated access to the result sets + data. + */ +published service ResultSet +{ + service com::sun::star::sdbcx::ResultSet; + + + /** access to the description and data. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RowChangeAction.idl b/offapi/com/sun/star/sdb/RowChangeAction.idl new file mode 100644 index 000000000..c38da1d92 --- /dev/null +++ b/offapi/com/sun/star/sdb/RowChangeAction.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RowChangeAction_idl__ +#define __com_sun_star_sdb_RowChangeAction_idl__ + + module com { module sun { module star { module sdb { + + +/** determines the type of change which is going to be performed. + */ +published constants RowChangeAction +{ + + /** indicates that an insert will be performed. + */ + const long INSERT = 1; + + /** indicates that an update will be performed. + */ + const long UPDATE = 2; + + /** indicates that a delete will be performed. + */ + const long DELETE = 3; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RowChangeEvent.idl b/offapi/com/sun/star/sdb/RowChangeEvent.idl new file mode 100644 index 000000000..d6e6a292b --- /dev/null +++ b/offapi/com/sun/star/sdb/RowChangeEvent.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RowChangeEvent_idl__ +#define __com_sun_star_sdb_RowChangeEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + module com { module sun { module star { module sdb { + + +/** indicates the type of change action on the data source. + */ +published struct RowChangeEvent: com::sun::star::lang::EventObject +{ + + /** indicates the type of change. + @see com::sun::star::sdb::RowChangeAction + */ + long Action; + + + /** indicates the number of rows affected by the change. + */ + long Rows; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RowSet.idl b/offapi/com/sun/star/sdb/RowSet.idl new file mode 100644 index 000000000..69ecef300 --- /dev/null +++ b/offapi/com/sun/star/sdb/RowSet.idl @@ -0,0 +1,385 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RowSet_idl__ +#define __com_sun_star_sdb_RowSet_idl__ + +#include <com/sun/star/sdbc/RowSet.idl> + +module com { module sun { module star { module sdbc { +published interface XConnection; +};};};}; +#include <com/sun/star/sdb/ResultSet.idl> +#include <com/sun/star/sdb/XCompletedExecution.idl> + + module com { module sun { module star { module sdbcx { +published interface XDeleteRows; +};};};}; + + module com { module sun { module star { module sdb { + +published interface XRowSetApproveBroadcaster; +published interface XResultSetAccess; +published interface XParametersSupplier; + + +/** is a client side RowSet, which use retrieves is data based on a database table, + a query or a SQL command or by a row set reader, who mustn't support SQL. + The connection of the row set is typically a named DataSource or a DataAccess component + or a previous instantiated connection. + <p> + Depending on the + com::sun::star::sdbc::ResultSetConcurrency + , the RowSet caches all data or uses + an optimized way for retrieving the data, such as, refetching rows by their keys or + if provided, by their bookmarks. + </p> + <p> + In addition, it provides events for RowSet navigation and RowSet modifications + to approve the actions and to react on them. + @see com::sun::star::sdb::RowChangeAction + @see com::sun::star::sdb::RowChangeEvent + @see com::sun::star::sdb::RowsChangeEvent + </p> + + <h3>Notifications</h3> + <p>A row set is able to be operated in various ways, and additionally it notifies various changes in its + state. Clients of this service can rely on a fixed order of notifications, depending on how they operate + on the component.<br> + The following describes the general order of all possible notifications which you can encounter when + working with a row set: + <table> + <tr><td valign="top"><em>approving</em></td> + <td valign="top">Before anything really happens, any veto listeners are called to approve the operation + which is just being done. This may be either a + XRowSetApproveListener::approveCursorMove() or + XRowSetApproveListener::approveRowChange() call. + @see XRowSetApproveListener + </td> + </tr> + <tr><td valign="top"><em>column values</em></td> + <td valign="top">If the operation includes changes in the values of the columns of the row set, then these are + notified before anything else (except requests for approval). + @see ResultSet + @see com::sun::star::sdbcx::XColumnsSupplier + </td> + </tr> + <tr><td valign="top"><em>operation done</em></td> + <td valign="top">When the operation is done, you get a notification about this. It may be a + com::sun::star::sdbc::XRowSetListener::cursorMoved() or a + com::sun::star::sdbc::XRowSetListener::rowChanged() call or a + XRowsChangeListener::rowsChanged() call. + </td> + </tr> + <tr><td valign="top"><em>row state</em></td> + <td valign="top">If the operation leads to a change in the state of the #IsModified + and/or #IsNew property, this is notified next (in this order). + </td> + </tr> + <tr><td valign="top"><em>row count</em></td> + <td valign="top">If the operation leads to new knowledge about the number of rows in the result set, + the respective changes in the #RowCount and #IsRowCountFinal + are notified last (in this order). + </td> + </tr> + </table> + </p> + + <br> + + <p>The following matrix shows the notifications which apply to the different operations: + <table border="1" frame="all"> + <tr><td></td><td><strong>approveCursorMove</strong></td><td><strong>approveRowChange</strong></td> + <td><strong>column values</strong></td> + <td><strong>cursorMoved</strong></td><td><strong>rowChanged</strong></td> + <td><strong>rowsChanged</strong></td> + <td><strong>IsModified</strong></td><td><strong>IsNew</strong></td> + <td><strong>RowCount</strong></td><td><strong>IsRowCountFinal</strong></td> + </tr> + + <tr><td>com::sun::star::sdbc::XResultSet</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> + + <tr><td align="right"><em>next</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td> + <tr><td align="right"><em>beforeFirst</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td></tr> + <tr><td align="right"><em>afterLast</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>first</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>last</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>absolute</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>relative</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>previous</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>refreshRow</em></td><td></td><td></td><td align="center">X</td><td></td><td></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td></tr> + <tr><td align="right"><em>cancelRowUpdates</em></td><td></td><td></td><td align="center">X</td><td></td><td></td><td></td><td align="center">X</td><td></td><td></td><td></td></tr> + + <tr><td>com::sun::star::sdbc::XResultSetUpdate</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> + + <tr><td align="right"><em>insertRow</em></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>updateRow</em></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td></td><td></td><td></td></tr> + <tr><td align="right"><em>deleteRow</em></td><td></td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>moveToInsertRow</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td></td><td align="center">X</td><td align="center">X</td></tr> + <tr><td align="right"><em>moveToCurrentRow</em></td><td align="center">X</td><td></td><td></td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td></tr> + + <tr><td>com::sun::star::sdbcx::XDeleteRows</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> + + <tr><td align="right"><em>deleteRows</em></td><td></td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + + <tr><td>com::sun::star::sdbcx::XRowLocate</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> + + <tr><td align="right"><em>moveToBookmark</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td></tr> + <tr><td align="right"><em>moveRelativeToBookmark</em></td><td align="center">X</td><td></td><td align="center">X</td><td align="center">X</td><td></td><td></td><td align="center">X</td><td align="center">X</td><td align="center">X</td><td align="center">X</td></tr> + + </tr> + </table> + </p> + + <h3>Deletions</h3> + <p>Via com::sun::star::sdbc::XResultSetUpdate::deleteRow(), you can delete the current row of a + RowSet. This deleted row then doesn't vanish immediately, but is still present, and subsequent calls to + com::sun::star::sdbc::XResultSet::rowDeleted() will return `TRUE`. The deleted row "vanishes" from + the RowSet as soon as the cursor is moved away from it.<br> + As a consequence, the behavior of several other methods is affected:<br> + <dl> + <dt>com::sun::star::sdbc::XResultSet::getRow()</dt> + <dd>returns the position of the cursor, which has not been changed by the deletion.</dd> + + <dt>com::sun::star::sdbc::XResultSet: <code>next</code>, <code>first</code>, <code>last</code>, <code>absolute</code>, + <code>relative</code>, <code>previous</code>, <code>beforeFirst</code>, <code>afterLast</code></dt> + <dd>will let the deleted row vanish from the result set. As a consequence, the #RowCount + will decrease when you do such a move operation after deleting a row.<br> + A special case to note is the <code>next</code> call: When you delete row, say, + <code>15</code>, followed by <code>next</code>, then your RowSet afterwards + still is on row 15, since the deleted row vanished with the move operation.</dd> + + <dt>com::sun::star::sdbc::XResultSet::refreshRow()</dt> + <dd>will throw an exception when the cursor is on a deleted row.</dd> + + <dt>com::sun::star::sdbc::XRow: <code>getFoo</code></dt> + <dd>will return an empty value when the cursor is on a deleted row.</dd> + + <dt>com::sun::star::sdbcx::XRowLocate::getBookmark()</dt> + <dd>will throw an exception when the cursor is on a deleted row.</dd> + + <dt>com::sun::star::sdbc::XRowUpdate: <code>updateFoo</code></dt> + <dd>will throw an exception when the cursor is on a deleted row.</dd> + + <dt>com::sun::star::sdbc::XResultSetUpdate::deleteRow()</dt> + <dd>will throw an exception when the cursor is on a deleted row.</dd> + + <dt>com::sun::star::sdbc::XResultSetUpdate::moveToInsertRow()</dt> + <dd>will let the deleted row vanish from the result set. As a consequence, the #RowCount + will decrease. Also, subsequent calls to + com::sun::star::sdbc::XResultSetUpdate::moveToCurrentRow() will not + be able to move back to the deleted row (since it vanished), but only to the + row after the deleted row.</dd> + </dl> + </p> + */ +published service RowSet +{ + service com::sun::star::sdbc::RowSet; + + service com::sun::star::sdb::ResultSet; + + /** can be used to allow an interaction handler to supply missing data during an execute process. + + <p>If you want a row set to be based on a parametrized query, you will usually use + the com::sun::star::sdbc::XParameters interface.<br> + However, you can also choose to let an interaction handler supply such data. For this, you may + for instance instantiate an InteractionHandler, which asks the user for the + data, or you may write your own one, which supplies the data from somewhere else. + The default implementation will only ask for parameters which aren't set before through the com::sun::star::sdbc::XParameters interface.</p> + + @see com::sun::star::sdb::InteractionHandler + */ + interface com::sun::star::sdb::XCompletedExecution; + + /** approving of actions performed on the row set. + + <p>The support of this interface implies a semantical extension to the com::sun::star::sdbc::XResultSetUpdate + interface which is supported via the com::sun::star::sdbc::ResultSet.</p> + + @see XResultSetUpdate + */ + interface XRowSetApproveBroadcaster; + + /** is the interface for updating row data to the database. + + <p>The optional support of this interface is already implied with the support of the com::sun::star::sdbc::ResultSet service.</p> + + <p>However, note that the additional support of the XRowSetApproveBroadcaster interface results + in a semantical extension: the methods com::sun::star::sdbc::XResultSetUpdate::insertRow(), + com::sun::star::sdbc::XResultSetUpdate::updateRow() and com::sun::star::sdbc::XResultSetUpdate::deleteRow() + will now throw the RowSetVetoException if the action which is to be performed was vetoed + by one of the XRowSetApproveListener's.</p> + */ + [optional] interface com::sun::star::sdbc::XResultSetUpdate; + + /** is the interface for deleting more than one row, identified by its bookmark. + + <p>The optional support of this interface is already implied with the support of the com::sun::star::sdbcx::ResultSet service.</p> + + <p>However, note that the additional support of the XRowSetApproveBroadcaster interface results + in a semantical extension: the method com::sun::star::sdbcx::XDeleteRows::deleteRows() + will now throw the RowSetVetoException if the deletion was vetoed + by one of the XRowSetApproveListener's.</p> + */ + [optional] interface com::sun::star::sdbcx::XDeleteRows; + + /** creates a second result set which is based on the same data. + <p> + The new result set is interoperable with the row set which created it, + e.g., you can exchange bookmarks between both sets. + </p> + <p> + If the row set is not alive (i.e., it was not executed before), + `NULL` + is returned. + </p> + */ + interface XResultSetAccess; + + /** gives access to the parameters contained in the SQL statement represented by the component. + + <p>If your <code>RowSet</code> is bound to an SQL command or query which contains parameters, or has + a #Filter or #Order which contains parameters, then those can be accessed + using the <code>XParametersSupplier</code> interface.</p> + + <p>The returned container contains parameter objects which do allow write access to the parameters (which + is equivalent to using the com::sun::star::sdbc::XParameters interface inherited from + com::sun::star::sdbc::RowSet). Additionally, they provide information about the parameters, + such as their name (if they have one), their type, and the like.</p> + */ + [optional] interface XParametersSupplier; + + /** is the connection generated by a DataSource or by a URL. It could + also be set from outside. When set from outside the RowSet is not responsible for the closing of the connection. + */ + [property] com::sun::star::sdbc::XConnection ActiveConnection; + + + /** is the name of the datasource to use, this could be a named datasource + or the URL of a data access component. + */ + [property] string DataSourceName; + + + /** is the command which should be executed, the type of command depends + on the CommandType. + + <p>In case of a #CommandType of CommandType::COMMAND, + means in case the #Command specifies an SQL statement, the inherited + com::sun::star::sdbc::RowSet::EscapeProcessing + becomes relevant:<br> + It then can be to used to specify whether the SQL statement should be analyzed on the + client side before sending it to the database server.<br> + The default value for com::sun::star::sdbc::RowSet::EscapeProcessing + is `TRUE`. By switching it to `FALSE`, you can pass backend-specific SQL statements, + which are not standard SQL, to your database.</p> + + @see com::sun::star::sdb::CommandType + @see com::sun::star::sdbc::RowSet::EscapeProcessing + */ + [property] string Command; + + /** is the type of the command. + @see com::sun::star::sdb::CommandType + */ + [property] long CommandType; + + /** is the command which is currently used. + @see com::sun::star::sdb::CommandType + */ + [readonly, property] string ActiveCommand; + + + /** indicates whether all results should be discarded or not. + */ + [property] boolean IgnoreResult; + + + /** additional filter for a row set. + */ + [property] string Filter; + + + /** indicates whether the filter should be applied or not, + default is `FALSE`. + */ + [property] boolean ApplyFilter; + + /** additional having clause for the row set + */ + [optional,property] string HavingClause; + + /** additional group by for the row set + */ + [optional,property] string GroupBy; + + /** is an additional sort order definition for a row set. + */ + [property] string Order; + + + /** indicates the privileges for insert, update, and delete. + @see com::sun::star::sdbcx::Privilege + */ + [readonly, property] long Privileges; + + + /** indicates that the current row is modified. + */ + [readonly, property] boolean IsModified; + + + /** indicates that the current row is going to be inserted to the database. + */ + [readonly, property] boolean IsNew; + + + /** contains the number of rows accessed in the data source. + */ + [readonly, property] long RowCount; + + + /** indicates that all rows of the row set have been counted. + */ + [readonly, property] boolean IsRowCountFinal; + + + /** is the name of the table which should be updated, this is usually used + for queries which relate to more than one table. + */ + [optional, property] string UpdateTableName; + + /** is the name of the table catalog + */ + [optional, property] string UpdateCatalogName; + + + /** is the name of the table schema. + */ + [optional, property] string UpdateSchemaName; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RowSetVetoException.idl b/offapi/com/sun/star/sdb/RowSetVetoException.idl new file mode 100644 index 000000000..0ee35ba89 --- /dev/null +++ b/offapi/com/sun/star/sdb/RowSetVetoException.idl @@ -0,0 +1,42 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RowSetVetoException_idl__ +#define __com_sun_star_sdb_RowSetVetoException_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdb { + + +/** is an exception fired whenever a row set operation was cancelled because of + of a veto of an approved listener. + @see com::sun::star::sdb::XRowSetApproveListener + */ +published exception RowSetVetoException: com::sun::star::sdbc::SQLException +{ +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/RowsChangeEvent.idl b/offapi/com/sun/star/sdb/RowsChangeEvent.idl new file mode 100644 index 000000000..7757ce410 --- /dev/null +++ b/offapi/com/sun/star/sdb/RowsChangeEvent.idl @@ -0,0 +1,42 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_RowsChangeEvent_idl__ +#define __com_sun_star_sdb_RowsChangeEvent_idl__ + +#include <com/sun/star/sdb/RowChangeEvent.idl> + + module com { module sun { module star { module sdb { + + +/** indicates which rows have changed and the type of change action on the row set. + */ +struct RowsChangeEvent: com::sun::star::sdb::RowChangeEvent +{ + + sequence< any > Bookmarks; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SQLContext.idl b/offapi/com/sun/star/sdb/SQLContext.idl new file mode 100644 index 000000000..02f868a14 --- /dev/null +++ b/offapi/com/sun/star/sdb/SQLContext.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SQLContext_idl__ +#define __com_sun_star_sdb_SQLContext_idl__ + +#include <com/sun/star/sdbc/SQLWarning.idl> + + module com { module sun { module star { module sdb { + + +/** provides special information about the context where a + com::sun::star::sdbc::SQLException + occurred. As usual + for SQLExceptions, several SQLContext-objects may be chained, then the + most recent context is appended to the list's tail. + + @see com::sun::star::sdbc::XConnection::getWarnings + @see com::sun::star::sdbc::XResultSet::getWarnings + @see com::sun::star::sdbc::XStatement::getWarnings + */ +published exception SQLContext: com::sun::star::sdbc::SQLWarning +{ + /** provides special info about the details where a + com::sun::star::sdbc::SQLException + occurred. + As usual for SQLExceptions, several SQLContext-objects may be chained, then the + most recent context is appended to the list's tail + */ + string Details; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SQLErrorEvent.idl b/offapi/com/sun/star/sdb/SQLErrorEvent.idl new file mode 100644 index 000000000..ae00ab16a --- /dev/null +++ b/offapi/com/sun/star/sdb/SQLErrorEvent.idl @@ -0,0 +1,46 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SQLErrorEvent_idl__ +#define __com_sun_star_sdb_SQLErrorEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> + + + module com { module sun { module star { module sdb { + + +/** is invoked in case of fired database exception triggered by + a database object. + */ +published struct SQLErrorEvent: com::sun::star::lang::EventObject +{ + + /** contains the exception that is going to be fired. + */ + any Reason; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SQLFilterOperator.idl b/offapi/com/sun/star/sdb/SQLFilterOperator.idl new file mode 100644 index 000000000..af1a93e39 --- /dev/null +++ b/offapi/com/sun/star/sdb/SQLFilterOperator.idl @@ -0,0 +1,71 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SQLFilterOperator_idl__ +#define __com_sun_star_sdb_SQLFilterOperator_idl__ + +module com { module sun { module star { module sdb { + + +/** These constants are used to specify the filter operator + which should be applied when creating a filter + with the method XSingleSelectQueryComposer::setStructuredFilter(). + + @see com::sun::star::sdb::SingleSelectQueryComposer + @see com::sun::star::sdb::XSingleSelectQueryComposer +*/ +constants SQLFilterOperator +{ + /// equal to + const long EQUAL = 1; + + /// not equal to + const long NOT_EQUAL = 2; + + /// less than + const long LESS = 3; + + /// greater than + const long GREATER = 4; + + /// less or equal than + const long LESS_EQUAL = 5; + + /// greater or equal than + const long GREATER_EQUAL = 6; + + /// like + const long LIKE = 7; + + /// not like + const long NOT_LIKE = 8; + + /// is null + const long SQLNULL = 9; + + /// is not null + const long NOT_SQLNULL = 10; +}; + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SQLQueryComposer.idl b/offapi/com/sun/star/sdb/SQLQueryComposer.idl new file mode 100644 index 000000000..a3346c532 --- /dev/null +++ b/offapi/com/sun/star/sdb/SQLQueryComposer.idl @@ -0,0 +1,66 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SQLQueryComposer_idl__ +#define __com_sun_star_sdb_SQLQueryComposer_idl__ + +#include <com/sun/star/sdb/XSQLQueryComposer.idl> + + module com { module sun { module star { module sdbcx { + published interface XTablesSupplier; + published interface XColumnsSupplier; +};};};}; + + module com { module sun { module star { module sdb { + + +/** represents a tool for composing SQL select statements. + + + <p> + It hides the complexity of parsing and evaluating SQL Statements and provides + sophisticated methods for expanding a SQL-Statement with filter and order + criteria. + </p> + */ +published service SQLQueryComposer +{ + + /** access to the composer interface. + */ + interface XSQLQueryComposer; + + + /** access to the selected tables. + */ + interface com::sun::star::sdbcx::XTablesSupplier; + + + /** access the selected columns. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SingleSelectQueryAnalyzer.idl b/offapi/com/sun/star/sdb/SingleSelectQueryAnalyzer.idl new file mode 100644 index 000000000..4b701c9ff --- /dev/null +++ b/offapi/com/sun/star/sdb/SingleSelectQueryAnalyzer.idl @@ -0,0 +1,81 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SingleSelectQueryAnalyzer_idl__ +#define __com_sun_star_sdb_SingleSelectQueryAnalyzer_idl__ + +#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl> + + module com { module sun { module star { module sdbcx { +interface XTablesSupplier; +interface XColumnsSupplier; +};};};}; + + module com { module sun { module star { module sdb { + + interface XParametersSupplier; +/** represents a service for analyzing a single select statement. + + <p> + It hides the complexity of parsing and evaluating a single select statement and provides + sophisticated methods for accessing a statements filter, group by, having and order + criteria, as well as the corresponding select columns and tables. + If supported, it even gives access to the parameters. + </p> + + @see com::sun::star::sdb::SingleSelectQueryComposer + */ +service SingleSelectQueryAnalyzer +{ + interface XSingleSelectQueryAnalyzer; + + /** access to the selected tables. + + <p>The selected tables are those present in the <code>FROM</code> part + of a <code>SELECT</code> statement.</p> + + <p>Note that OpenOffice.org since version 2.0.4 also supports queries which are + based on other queries. For example, given that you have a database containing + a query named <code>All Orders</code>, the SQL statement <code>SELECT * FROM "All Orders"</code> + is perfectly valid when used with a SingleSelectQueryAnalyzer.</p> + + <p>In this case, the name container returned by com::sun::star::sdbcx::XTablesSupplier::getTables() + will in fact not return a Table, but a Query object. Semantically, however, + this object still acts as a table in the SQL statement.</p> + + @see XSingleSelectQueryAnalyzer::getQueryWithSubstitution + */ + interface com::sun::star::sdbcx::XTablesSupplier; + + /** access the selected columns. + */ + interface com::sun::star::sdbcx::XColumnsSupplier; + + /** access to the parameters which are used in the where clause. + */ + [optional] interface com::sun::star::sdb::XParametersSupplier; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/SingleSelectQueryComposer.idl b/offapi/com/sun/star/sdb/SingleSelectQueryComposer.idl new file mode 100644 index 000000000..bfea134fb --- /dev/null +++ b/offapi/com/sun/star/sdb/SingleSelectQueryComposer.idl @@ -0,0 +1,62 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_SingleSelectQueryComposer_idl__ +#define __com_sun_star_sdb_SingleSelectQueryComposer_idl__ + +#include <com/sun/star/sdb/SingleSelectQueryAnalyzer.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { + +interface XSingleSelectQueryComposer; +/** represents a service for composing a single select statement. + + <p> + It hides the complexity of parsing and evaluating a single select statement and provides + sophisticated methods for expanding a statement with filter, group by, having and order + criteria. To get the new extended statement use the methods from com::sun::star::sdb::SingleSelectQueryAnalyzer. + </p> + + <p>A SingleSelectQueryComposer is usually obtained from a Connection + using the com::sun::star::lang::XMultiServiceFactory interface.</p> + */ +service SingleSelectQueryComposer +{ + // gives access to the properties. + interface com::sun::star::beans::XPropertySet; + + /** access to the analyzer service. + */ + service SingleSelectQueryAnalyzer; + + interface XSingleSelectQueryComposer; + + /** is the original SQL statement set with the interface com::sun::star::sdb::XSingleSelectQueryAnalyzer. + */ + [readonly, property] string Original; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/Table.idl b/offapi/com/sun/star/sdb/Table.idl new file mode 100644 index 000000000..c65702fdd --- /dev/null +++ b/offapi/com/sun/star/sdb/Table.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_Table_idl__ +#define __com_sun_star_sdb_Table_idl__ + +#include <com/sun/star/sdbcx/Table.idl> + +#include <com/sun/star/sdb/DataSettings.idl> + + module com { module sun { module star { module sdb { + + +/** extends the service + com::sun::star::sdbcx::Table + with additional display information, sorting, and filtering criteria. + */ +published service Table +{ + service com::sun::star::sdbcx::Table; + + + /** is used for customization of data appearance. + */ + service com::sun::star::sdb::DataSettings; + + + /** indicates the privileges for the table. + @see com::sun::star::sdbcx::Privilege + */ + [readonly, property] long Privileges; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/TableDefinition.idl b/offapi/com/sun/star/sdb/TableDefinition.idl new file mode 100644 index 000000000..e1ee4f44d --- /dev/null +++ b/offapi/com/sun/star/sdb/TableDefinition.idl @@ -0,0 +1,45 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_TableDefinition_idl__ +#define __com_sun_star_sdb_TableDefinition_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { + +/** + This IDL was created from the service's places of use, so it is probably incomplete. + + @since LibreOffice 4.1 + */ +service TableDefinition : com::sun::star::beans::XPropertySet +{ + createDefault(); + + createWithName([in] string Name); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/TableDescriptor.idl b/offapi/com/sun/star/sdb/TableDescriptor.idl new file mode 100644 index 000000000..03f6a1fde --- /dev/null +++ b/offapi/com/sun/star/sdb/TableDescriptor.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_TableDescriptor_idl__ +#define __com_sun_star_sdb_TableDescriptor_idl__ + +#include <com/sun/star/sdbcx/TableDescriptor.idl> + +#include <com/sun/star/sdb/DataSettings.idl> + + module com { module sun { module star { module sdb { + + +/** extends the service + com::sun::star::sdbcx::TableDescriptor + with additional display information, sorting, and filtering criteria. + */ +published service TableDescriptor +{ + service com::sun::star::sdbcx::TableDescriptor; + + + /** is used for customization of data appearance. + */ + service com::sun::star::sdb::DataSettings; +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/TableDesign.idl b/offapi/com/sun/star/sdb/TableDesign.idl new file mode 100644 index 000000000..c084e6ee2 --- /dev/null +++ b/offapi/com/sun/star/sdb/TableDesign.idl @@ -0,0 +1,80 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_TableDesign_idl__ +#define __com_sun_star_sdb_TableDesign_idl__ + +#include <com/sun/star/frame/XController.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/frame/XDispatchProvider.idl> +#include <com/sun/star/form/FormController.idl> + +module com { module sun { module star { module sdb { + +/** implements a component which allows the creation of tables. + + <p>This service implements a user interface for creating tables through a graphical design interface.</p> + + <p>The design view of the TableDesign is divided into two parts. The first part contains the rows + where columns can be defined for the table. The second part contains the properties of the selected column.</p> + + @see com::sun::star::sdb::ContentLoader + @see com::sun::star::frame::XDispatch + @see com::sun::star::frame::XDispatchProviderInterceptor + + @since OOo 1.1.2 +*/ + +published service TableDesign +{ + /** allows the component to be plugged into frames. + */ + interface com::sun::star::frame::XController; + + /** is used to initialize the TableDesign. + + <p>Parameters (passed to the method + com::sun::star::lang::XInitialization::initialize()) + have to be instances of com::sun::star::beans::PropertyValue, where the + com::sun::star::beans::PropertyValue::Name member specifies what the parameter controls, + with the com::sun::star::beans::PropertyValue::Value member containing the value + to be used.<br> + Recognized parameters are: + <ul> + <li><b>Frame</b><br> + has to be a com::sun::star::frame::XFrame interface specifying the frame to plug the + TableDesign component into. + </li> + <li><b>DataSourceName</b><br> + The name of the globally registered DataSource to be used for initial display. It is only + meaningful together with the other parameters specifying the object to display. + </li> + <li><b>CurrentTable</b><br> + This is a string giving the name of the object to display initially. + </li> + </ul> + </p> + */ + interface com::sun::star::lang::XInitialization; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/TextConnectionSettings.idl b/offapi/com/sun/star/sdb/TextConnectionSettings.idl new file mode 100644 index 000000000..fecb15005 --- /dev/null +++ b/offapi/com/sun/star/sdb/TextConnectionSettings.idl @@ -0,0 +1,38 @@ +/* -*- 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 . + */ + + +#ifndef __com_sun_star_sdb_TextConnectionSettings_idl__ +#define __com_sun_star_sdb_TextConnectionSettings_idl__ + +#include <com/sun/star/sdb/XTextConnectionSettings.idl> + +module com { module sun { module star { module sdb { + +/** + @since LibreOffice 4.1 +*/ +service TextConnectionSettings : XTextConnectionSettings; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XAlterQuery.idl b/offapi/com/sun/star/sdb/XAlterQuery.idl new file mode 100644 index 000000000..924ddd7fe --- /dev/null +++ b/offapi/com/sun/star/sdb/XAlterQuery.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XAlterQuery_idl__ +#define __com_sun_star_sdb_XAlterQuery_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdb { + +/** is used to alter the command of a query. + */ +published interface XAlterQuery: com::sun::star::uno::XInterface +{ + + /** is intended to alter the command of a query object. + @param command + the SQL statement + @param useEscapeProcessing + `TRUE` when escape processing should be used + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void alterCommand([in]string command, [in]boolean useEscapeProcessing) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XBookmarksSupplier.idl b/offapi/com/sun/star/sdb/XBookmarksSupplier.idl new file mode 100644 index 000000000..a91fd9abf --- /dev/null +++ b/offapi/com/sun/star/sdb/XBookmarksSupplier.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XBookmarksSupplier_idl__ +#define __com_sun_star_sdb_XBookmarksSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameAccess.idl> + + + + module com { module sun { module star { module sdb { + + +/** provides access to the collection of all bookmarks associated with a data source. + */ +published interface XBookmarksSupplier: com::sun::star::uno::XInterface +{ + + /** @returns the collection of all bookmarks associated with a data source + <p> + A bookmark is simply a string specifying the location of the + bookmarked document. + </p> + */ + com::sun::star::container::XNameAccess getBookmarks(); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XColumn.idl b/offapi/com/sun/star/sdb/XColumn.idl new file mode 100644 index 000000000..1ac46d827 --- /dev/null +++ b/offapi/com/sun/star/sdb/XColumn.idl @@ -0,0 +1,267 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XColumn_idl__ +#define __com_sun_star_sdb_XColumn_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + +#include <com/sun/star/util/Date.idl> + +#include <com/sun/star/util/DateTime.idl> + +#include <com/sun/star/util/Time.idl> + + module com { module sun { module star { module io { + published interface XInputStream; +};};};}; + + module com { module sun { module star { module container { + published interface XNameAccess; +};};};}; + + module com { module sun { module star { module sdbc { + published interface XRef; + published interface XArray; + published interface XBlob; + published interface XClob; +};};};}; + + module com { module sun { module star { module sdb { + + +/** is used to access data which is collected in a row. + */ +published interface XColumn: com::sun::star::uno::XInterface +{ + + /** reports whether the last column read had a value of SQL NULL. + Note that you must first call getXXX on a column to try to read + its value and then call + <code>wasNull()</code> + to see if the value read was SQL NULL. + @returns + `TRUE` if so + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + boolean wasNull() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a String. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + string getString() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as boolean. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + boolean getBoolean() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a byte. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + byte getByte() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a short. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + short getShort() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a long. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + long getInt() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a hyper. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + hyper getLong() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a float. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + float getFloat() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a double. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + double getDouble() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a byte array. + The bytes represent the raw values returned by the driver. + @returns the column value; + if the value is SQL NULL, the result is empty. + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + sequence<byte> getBytes() raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a date object. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::util::Date getDate() + raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a time object. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::util::Time getTime() + raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a datetime object. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::util::DateTime getTimestamp() + raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a stream of + uninterpreted bytes. The value can then be read in chunks from the + stream. This method is particularly suitable for retrieving large + LONGVARBINARY or LONGVARCHAR values. + + + <p> + <b>Note:</b> All the data in the returned stream must be + read prior to getting the value of any other column. The next + call to a get method implicitly closes the stream. Also, a + stream may return 0 when the method + com::sun::star::io::XInputStream::available() + is called whether there is data available or not. + </p> + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::io::XInputStream getBinaryStream() + raises (com::sun::star::sdbc::SQLException); + + /** gets the value of a column in the current row as a stream of + uninterpreted bytes. The value can then be read in chunks from the + stream. This method is particularly suitable for retrieving large + LONGVARCHAR values. + + <p> + <b>Note:</b> All the data in the returned stream must be + read prior to getting the value of any other column. The next + call to a get method implicitly closes the stream. Also, a + stream may return 0 when the method + com::sun::star::io::XInputStream::available() + is called whether there is data available or not. + </p> + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::io::XInputStream getCharacterStream() + raises (com::sun::star::sdbc::SQLException); + + /** @returns the value of a column in the current row as an object. + This method uses the given + <code>Map</code> + object + for the custom mapping of the SQL structure or distinct type + that is being retrieved. + @param typeMap + the type map is used to fetch the correct type + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + any getObject([in]com::sun::star::container::XNameAccess typeMap) + raises (com::sun::star::sdbc::SQLException); + + /** gets a REF(<structured-type>) column value from the current row. + + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XRef getRef() raises (com::sun::star::sdbc::SQLException); + + /** gets a BLOB (Binary Large OBject) value in the current row. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XBlob getBlob() raises (com::sun::star::sdbc::SQLException); + + /** gets a CLOB value in the current row of this <code>ResultSet</code> object. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XClob getClob() raises (com::sun::star::sdbc::SQLException); + + /** gets a SQL ARRAY value from the current row. + @returns + the column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XArray getArray() raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XColumnUpdate.idl b/offapi/com/sun/star/sdb/XColumnUpdate.idl new file mode 100644 index 000000000..784f6c75c --- /dev/null +++ b/offapi/com/sun/star/sdb/XColumnUpdate.idl @@ -0,0 +1,199 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XColumnUpdate_idl__ +#define __com_sun_star_sdb_XColumnUpdate_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + +#include <com/sun/star/util/Date.idl> + +#include <com/sun/star/util/DateTime.idl> + +#include <com/sun/star/util/Time.idl> + + module com { module sun { module star { module io { + published interface XInputStream; +};};};}; + + module com { module sun { module star { module sdb { + + +/** is used to update data which is collected in a row. + */ +published interface XColumnUpdate: com::sun::star::uno::XInterface +{ + + /** gives a nullable column a null value. + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateNull() raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a boolean value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateBoolean([in]boolean x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a byte value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateByte([in]byte x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a short value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateShort([in]short x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a long value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateInt([in]long x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a hyper value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateLong([in]hyper x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a float value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateFloat([in]float x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a double value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateDouble([in]double x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a string value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateString([in]string x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a byte array value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateBytes([in]sequence<byte> x) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a Date value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateDate([in]com::sun::star::util::Date x) + raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a Time value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateTime([in]com::sun::star::util::Time x) + raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a Timestamp value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateTimestamp([in]com::sun::star::util::DateTime x) + raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a stream value. + @param x + the new column value + @param length + the length of the stream + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateBinaryStream([in]com::sun::star::io::XInputStream x, + [in]long length) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with a stream value. + @param x + the new column value + @param length + the length of the stream + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateCharacterStream([in]com::sun::star::io::XInputStream x, + [in]long length) raises (com::sun::star::sdbc::SQLException); + + /** updates a column with an Object value. + @param x + the new column value + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateObject([in]any x) + raises (com::sun::star::sdbc::SQLException); + + /** updates a column with an Object value. + @param x + the new column value + @param scale + the scale + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void updateNumericObject([in]any x, [in]long scale) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XCommandPreparation.idl b/offapi/com/sun/star/sdb/XCommandPreparation.idl new file mode 100644 index 000000000..918e5aae7 --- /dev/null +++ b/offapi/com/sun/star/sdb/XCommandPreparation.idl @@ -0,0 +1,72 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XCommandPreparation_idl__ +#define __com_sun_star_sdb_XCommandPreparation_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdbc { + published interface XPreparedStatement; +};};};}; + + module com { module sun { module star { module sdb { + + +/** is used for preparation of commands. + + <p> + A command could be a table, query, or any kind of SQL statement + prepared by the user. + </p> + */ +published interface XCommandPreparation: com::sun::star::uno::XInterface +{ + + /** creates a + com::sun::star::sdbc::PreparedStatement + object for sending parameterized SQL statements to the database. + + <p> + A SQL statement with or without IN parameters can be + pre-compiled and stored in a PreparedStatement object. This + object can then be used to efficiently execute this statement + multiple times. + </p> + @param command + the command to be prepared. Any SQL statement. + @param commandType + kind of the command + com::sun::star::sdb::CommandType + @returns + the PreparedStatement object + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XPreparedStatement prepareCommand([in]string command, [in] long commandType) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XCompletedConnection.idl b/offapi/com/sun/star/sdb/XCompletedConnection.idl new file mode 100644 index 000000000..1e29db206 --- /dev/null +++ b/offapi/com/sun/star/sdb/XCompletedConnection.idl @@ -0,0 +1,61 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XCompletedConnection_idl__ +#define __com_sun_star_sdb_XCompletedConnection_idl__ + +#include <com/sun/star/task/XInteractionHandler.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdbc { + published interface XConnection; +};};};}; + + module com { module sun { module star { module sdb { + + +/** is used for establishing connections via a factory which is identified + by its name. To complete the information needed for establishing a connection + an interaction handler is used. + */ +published interface XCompletedConnection: com::sun::star::uno::XInterface +{ + + /** attempts to establish a database connection. If information is missing, such as + a user's password, they are completed by user interaction. + @param handler + will be asked when more information is needed + @returns + the Connection object + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + com::sun::star::sdbc::XConnection + connectWithCompletion([in]com::sun::star::task::XInteractionHandler handler) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XCompletedExecution.idl b/offapi/com/sun/star/sdb/XCompletedExecution.idl new file mode 100644 index 000000000..7a7553a38 --- /dev/null +++ b/offapi/com/sun/star/sdb/XCompletedExecution.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XCompletedExecution_idl__ +#define __com_sun_star_sdb_XCompletedExecution_idl__ + +#include <com/sun/star/task/XInteractionHandler.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdb { + + +/** is used for execution where information for execution may be required from + the user. + */ +published interface XCompletedExecution: com::sun::star::uno::XInterface +{ + + /** completes necessary information before execution, for example parameter values. + @param handler + will be asked when more information is needed + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void executeWithCompletion([in]com::sun::star::task::XInteractionHandler handler) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDataAccessDescriptorFactory.idl b/offapi/com/sun/star/sdb/XDataAccessDescriptorFactory.idl new file mode 100644 index 000000000..8c43f8fb0 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDataAccessDescriptorFactory.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XDataAccessDescriptorFactory_idl__ +#define __com_sun_star_sdb_XDataAccessDescriptorFactory_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + + +module com { module sun { module star { module sdb { + + +/** allows creating instances of the DataAccessDescriptor service. + + <p>Data access descriptors are finally only bags of properties with a defined + semantics. Depending on the context in which you use them, certain of their + properties are needed or unneeded.<br/> + The descriptor factory allows you to create instances which offer + all properties potentially needed at a descriptor.</p> + */ +interface XDataAccessDescriptorFactory +{ + /** creates a DataAccessDescriptor which supports all properties + defined for this service, even if they're normally optional only. + */ + ::com::sun::star::beans::XPropertySet + createDataAccessDescriptor(); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseAccess.idl b/offapi/com/sun/star/sdb/XDatabaseAccess.idl new file mode 100644 index 000000000..65bff201d --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseAccess.idl @@ -0,0 +1,56 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XDatabaseAccess_idl__ +#define __com_sun_star_sdb_XDatabaseAccess_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/XDataSource.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module task { + published interface XInteractionHandler; +};};};}; + + + module com { module sun { module star { module sdb { + + published interface XDatabaseAccessListener; + + +/** is not to be used anymore + @deprecated + */ +published interface XDatabaseAccess: com::sun::star::sdbc::XDataSource +{ + boolean hasConnections(); + com::sun::star::sdbc::XConnection getIsolatedConnection([in]string user, [in]string password) + raises (com::sun::star::sdbc::SQLException); + boolean suspendConnections() raises (com::sun::star::sdbc::SQLException); + void addDatabaseAccessListener([in]XDatabaseAccessListener listener); + void removeDatabaseAccessListener([in]XDatabaseAccessListener listener); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl new file mode 100644 index 000000000..604ec2174 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XDatabaseAccessListener_idl__ +#define __com_sun_star_sdb_XDatabaseAccessListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + + module com { module sun { module star { module sdb { + + +/** is not to be used anymore + @deprecated + */ +published interface XDatabaseAccessListener: com::sun::star::lang::XEventListener +{ + void connectionChanged([in]com::sun::star::lang::EventObject event); + boolean approveConnectionClosing([in]com::sun::star::lang::EventObject event); + void connectionClosing([in]com::sun::star::lang::EventObject event); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseContext.idl b/offapi/com/sun/star/sdb/XDatabaseContext.idl new file mode 100644 index 000000000..b16334275 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseContext.idl @@ -0,0 +1,81 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XDatabaseContext_idl__ +#define __com_sun_star_sdb_XDatabaseContext_idl__ + +#include <com/sun/star/container/XEnumerationAccess.idl> +#include <com/sun/star/container/XContainer.idl> +#include <com/sun/star/lang/XSingleServiceFactory.idl> +#include <com/sun/star/container/XNameAccess.idl> +#include <com/sun/star/uno/XNamingService.idl> +#include <com/sun/star/sdb/XDatabaseRegistrations.idl> + +module com { module sun { module star { module sdb { + +/** + Provides an interface for the new-style DatabaseContext service to implement. + + @since LibreOffice 4.0 + */ +published interface XDatabaseContext +{ + /** Enumeration on all registered data sources. + */ + interface com::sun::star::container::XEnumerationAccess; + + /** NameAccess on all registered data sources. + <p>One exception is the com.sun.star.container.XNameAccess::getByName(). + This method also allows to ask + for a DataAccessDescriptor::DatabaseLocation. + </p> + */ + interface com::sun::star::container::XNameAccess; + + /** Interface for registering new datasources. + */ + interface com::sun::star::uno::XNamingService; + + /** Interface for registering listener to get notified when new datasources are created or removed. + */ + interface com::sun::star::container::XContainer; + + /** Interface for creation of new datasources. + */ + interface com::sun::star::lang::XSingleServiceFactory; + + /** allows to access and modify the configuration data for registered data source. + + <p>The main purpose of this interface is to allow you to register data sources which you know + by URL only, and have not yet loaded.</p> + + <p>Also, it hides the details of the configuration data where the data source registrations + are maintained, so if possible at all, you should use this interface, instead of modifying or + querying the configuration data directly.</p> + + @since OOo 3.3 + */ + interface XDatabaseRegistrations; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl new file mode 100644 index 000000000..29d9bc187 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl @@ -0,0 +1,53 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XDatabaseEnvironment_idl__ +#define __com_sun_star_sdb_XDatabaseEnvironment_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + +#include <com/sun/star/sdbc/XDriverManager.idl> + +#include <com/sun/star/beans/PropertyValue.idl> + + + module com { module sun { module star { module sdb { + + published interface XDatabaseAccess; + + +/** is not to be used anymore. + + @deprecated + */ +published interface XDatabaseEnvironment: com::sun::star::sdbc::XDriverManager +{ + XDatabaseAccess getDatabaseAccess([in]string URL) + raises (com::sun::star::sdbc::SQLException); + XDatabaseAccess createDatabaseAccess([in]string URL, [in]string title) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl new file mode 100644 index 000000000..105264277 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl @@ -0,0 +1,150 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XDatabaseRegistrations_idl__ +#define __com_sun_star_sdb_XDatabaseRegistrations_idl__ + +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/container/ElementExistException.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/IllegalAccessException.idl> + + +module com { module sun { module star { module sdb { + +published interface XDatabaseRegistrationsListener; + + +/** provides access to the application-wide registered databases. + + <p>This interface provides a mere wrapper around the respective configuration data, + this way hiding the concrete configuration structure from its clients. You should, + if possible at all, use this interface, instead of modifying or querying the configuration + data directly.</p> + + @since OOo 3.3 + */ +published interface XDatabaseRegistrations +{ + /** determines whether a database is registered under the given name. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + */ + boolean hasRegisteredDatabase( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + ); + + /** returns the names of all registered databases + */ + sequence< string > + getRegistrationNames(); + + /** returns the location of the database registered under the given name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + */ + string getDatabaseLocation( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + ); + + /** registers a database, given by location, under a given name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty, or the given location is invalid. + + @throws ::com::sun::star::container::ElementExistException + if there already is a databases registered under the given name. + */ + void registerDatabaseLocation( [in] string Name, [in] string Location ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::ElementExistException + ); + + /** revokes the registration of a database, given by name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + + @throws ::com::sun::star::lang::IllegalAccessException + if the registration data for this database is read-only + */ + void revokeDatabaseLocation( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::lang::IllegalAccessException + ); + + /** changes the location of a given database registration + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty, or the given location is invalid. + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + + @throws ::com::sun::star::lang::IllegalAccessException + if the registration data for this database is read-only + */ + void changeDatabaseLocation( [in] string Name, [in] string NewLocation ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::lang::IllegalAccessException + ); + + /** determines whether the registration data for a database given by name is + read-only. + + <p>In this case, attempts to revoke this registration will fail.</p> + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + */ + boolean isDatabaseRegistrationReadOnly( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + ); + + /** registers a listener which is notified of changes in the registered databases + */ + void addDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener ); + + /** revokes a previously registered listener + */ + void removeDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl new file mode 100644 index 000000000..80c9b9307 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl @@ -0,0 +1,62 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__ +#define __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/sdb/DatabaseRegistrationEvent.idl> + + +module com { module sun { module star { module sdb { + + +/** implemented by components which want to be notified of changes in the application-wide registered + databases. + + @see XDatabaseRegistrations + + @since OOo 3.3 + */ +published interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener +{ + /** called when a database has been registered + */ + void registeredDatabaseLocation( [in] DatabaseRegistrationEvent Event ); + + /** called when a database registration has been revoked + */ + void revokedDatabaseLocation( [in] DatabaseRegistrationEvent Event ); + + /** called when the location of a registered database changed + + <p>Note that this talks about registration data only. That is, if the actual file denoted by the database + registration is moved, this is in no way monitored or reported. Only (successful) calls to + XDatabaseRegistrations::changeDatabaseLocation() are reported here.</p> + */ + void changedDatabaseLocation( [in] DatabaseRegistrationEvent Event ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XDocumentDataSource.idl b/offapi/com/sun/star/sdb/XDocumentDataSource.idl new file mode 100644 index 000000000..33dbcdb4c --- /dev/null +++ b/offapi/com/sun/star/sdb/XDocumentDataSource.idl @@ -0,0 +1,60 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XDocumentDataSource_idl__ +#define __com_sun_star_sdb_XDocumentDataSource_idl__ + +#include <com/sun/star/sdb/XOfficeDatabaseDocument.idl> + + + module com { module sun { module star { module sdb { + +/** simplifies the accessing of data sources and their corresponding database document. + + <p> + The interface can be used to access the data source of the database document. + </p> + @see OfficeDatabaseDocument + */ +interface XDocumentDataSource +{ + /** provides access to the one and only OfficeDatabaseDocument + which the data source is based on. + + <p>The component returned by this attribute is an OfficeDatabaseDocument.</p> + + <p>Though there is a 1-to-1 relationship between database documents and data sources, + each of the two can exist without its counterpart, but create this counterpart on request + only. As a consequence, the document obtained via this attribute might be newly created, + which implies that the caller is now responsible for it. In particular, the caller is + responsible for calling com::sun::star::util::XCloseable::close() + on the document as soon as it's not needed anymore.</p> + + <p>Additionally, if the caller does long-lasting processing on the document, it's advised + to add itself as com::sun::star::util::XCloseListener to the document, + to prevent closing as long as the processing lasts.</p> + */ + [readonly, attribute] XOfficeDatabaseDocument DatabaseDocument; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl b/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl new file mode 100644 index 000000000..4ce5cb266 --- /dev/null +++ b/offapi/com/sun/star/sdb/XFormDocumentsSupplier.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XFormDocumentsSupplier_idl__ +#define __com_sun_star_sdb_XFormDocumentsSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameAccess.idl> + + module com { module sun { module star { module sdb { + + +/** provides the access to a container of database forms. + @see Forms + */ +interface XFormDocumentsSupplier: com::sun::star::uno::XInterface +{ + + /** returns the container of forms. + @returns + the form documents + @see Forms + */ + com::sun::star::container::XNameAccess getFormDocuments(); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XInteractionDocumentSave.idl b/offapi/com/sun/star/sdb/XInteractionDocumentSave.idl new file mode 100644 index 000000000..0d9b7a20d --- /dev/null +++ b/offapi/com/sun/star/sdb/XInteractionDocumentSave.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XInteractionDocumentSave_idl__ +#define __com_sun_star_sdb_XInteractionDocumentSave_idl__ + +#include <com/sun/star/task/XInteractionContinuation.idl> +#include <com/sun/star/ucb/XContent.idl> + +module com { module sun { module star { module sdb { + + +/** An interaction continuation handing back a document name. + + <p> + This continuation is typically used in conjunction with a + com::sun::star::sdb::DocumentSaveRequest. + </p> + @since OOo 2.0 +*/ +interface XInteractionDocumentSave: com::sun::star::task::XInteractionContinuation +{ + /** set the document name chosen by the interaction handler + @param Name + the name of the document + @param Content + the content where the document should store itself + */ + void setName( [in] string Name, [in] com::sun::star::ucb::XContent Content); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XInteractionSupplyParameters.idl b/offapi/com/sun/star/sdb/XInteractionSupplyParameters.idl new file mode 100644 index 000000000..1d28ea2d7 --- /dev/null +++ b/offapi/com/sun/star/sdb/XInteractionSupplyParameters.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XInteractionSupplyParameters_idl__ +#define __com_sun_star_sdb_XInteractionSupplyParameters_idl__ + +#include <com/sun/star/task/XInteractionContinuation.idl> +#include <com/sun/star/beans/PropertyValue.idl> + +module com { module sun { module star { module sdb { + + +/** An interaction continuation handing back parameter data. + + <p> + This continuation is typically used in conjunction with a + com::sun::star::sdb::ParametersRequest. + </p> +*/ +published interface XInteractionSupplyParameters: com::sun::star::task::XInteractionContinuation +{ + /** set the parameters chosen by the interaction handler + @param Values + the parameters to set + */ + void setParameters( [in] sequence< com::sun::star::beans::PropertyValue > Values); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl b/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl new file mode 100644 index 000000000..3f94aeaed --- /dev/null +++ b/offapi/com/sun/star/sdb/XOfficeDatabaseDocument.idl @@ -0,0 +1,58 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XOfficeDatabaseDocument_idl__ +#define __com_sun_star_sdb_XOfficeDatabaseDocument_idl__ + +#include <com/sun/star/sdb/XFormDocumentsSupplier.idl> +#include <com/sun/star/sdb/XReportDocumentsSupplier.idl> +#include <com/sun/star/sdbc/XDataSource.idl> +#include <com/sun/star/document/XDocumentSubStorageSupplier.idl> + + +module com { module sun { module star { module sdb { + +/** simplifies the accessing of data sources, and it's corresponding database document and forms, and reports. +*/ +interface XOfficeDatabaseDocument +{ + /** allows to access the supplier for forms. + @see com::sun::star::sdb::Forms + */ + interface com::sun::star::sdb::XFormDocumentsSupplier; + + /** allows to access the supplier for reports. + @see com::sun::star::sdb::Reports + */ + interface com::sun::star::sdb::XReportDocumentsSupplier; + + /** allows the access to all sub storages in the office database document. + */ + interface com::sun::star::document::XDocumentSubStorageSupplier; + + /** provides access to the one and only DataSource + associated with this document + */ + [readonly, attribute] com::sun::star::sdbc::XDataSource DataSource; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XParametersSupplier.idl b/offapi/com/sun/star/sdb/XParametersSupplier.idl new file mode 100644 index 000000000..acaf1428e --- /dev/null +++ b/offapi/com/sun/star/sdb/XParametersSupplier.idl @@ -0,0 +1,49 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XParametersSupplier_idl__ +#define __com_sun_star_sdb_XParametersSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XIndexAccess.idl> + + module com { module sun { module star { module sdb { + + +/** provides the access to a container of parameters, typically used for a prepared + statement. + */ +published interface XParametersSupplier: com::sun::star::uno::XInterface +{ + + /** returns the container of parameters. + @returns + the parameters + */ + com::sun::star::container::XIndexAccess getParameters(); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XQueriesSupplier.idl b/offapi/com/sun/star/sdb/XQueriesSupplier.idl new file mode 100644 index 000000000..509a5e924 --- /dev/null +++ b/offapi/com/sun/star/sdb/XQueriesSupplier.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XQueriesSupplier_idl__ +#define __com_sun_star_sdb_XQueriesSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameAccess.idl> + + module com { module sun { module star { module sdb { + + +/** provides the access to a container of database queries. + */ +published interface XQueriesSupplier: com::sun::star::uno::XInterface +{ + + /** returns the container of queries. + + <p>The single elements of the container support the Query service.</p> + + @return + the queries belonging to database connection at which the XQueriesSupplier interface + is exposed. + */ + com::sun::star::container::XNameAccess getQueries(); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XQueryDefinition.idl b/offapi/com/sun/star/sdb/XQueryDefinition.idl new file mode 100644 index 000000000..064a7bba8 --- /dev/null +++ b/offapi/com/sun/star/sdb/XQueryDefinition.idl @@ -0,0 +1,52 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XQueryDefinition_idl__ +#define __com_sun_star_sdb_XQueryDefinition_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/ucb/XContent.idl> +#include <com/sun/star/lang/XComponent.idl> + + module com { module sun { module star { module sdb { + + +/** + @since LibreOffice 4.1 + */ +published interface XQueryDefinition +{ + + /** access to the owning database definition object. + */ + interface com::sun::star::beans::XPropertySet; + + interface com::sun::star::ucb::XContent; + + interface com::sun::star::lang::XComponent; + +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XQueryDefinitionsSupplier.idl b/offapi/com/sun/star/sdb/XQueryDefinitionsSupplier.idl new file mode 100644 index 000000000..1a838ad68 --- /dev/null +++ b/offapi/com/sun/star/sdb/XQueryDefinitionsSupplier.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XQueryDefinitionsSupplier_idl__ +#define __com_sun_star_sdb_XQueryDefinitionsSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameAccess.idl> + + module com { module sun { module star { module sdb { + + +/** provides the access to a container of database command definitions. + */ +published interface XQueryDefinitionsSupplier: com::sun::star::uno::XInterface +{ + + /** returns the container of commands. + @returns + the query definitions + */ + com::sun::star::container::XNameAccess getQueryDefinitions(); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl b/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl new file mode 100644 index 000000000..550f18c7d --- /dev/null +++ b/offapi/com/sun/star/sdb/XReportDocumentsSupplier.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XReportDocumentsSupplier_idl__ +#define __com_sun_star_sdb_XReportDocumentsSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/container/XNameAccess.idl> + + module com { module sun { module star { module sdb { + + +/** provides the access to a container of database reports. + @see Reports + */ +interface XReportDocumentsSupplier: com::sun::star::uno::XInterface +{ + + /** returns the container of reports. + @returns + the report documents + @see Reports + */ + com::sun::star::container::XNameAccess getReportDocuments(); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XResultSetAccess.idl b/offapi/com/sun/star/sdb/XResultSetAccess.idl new file mode 100644 index 000000000..825b904e9 --- /dev/null +++ b/offapi/com/sun/star/sdb/XResultSetAccess.idl @@ -0,0 +1,59 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XResultSetAccess_idl__ +#define __com_sun_star_sdb_XResultSetAccess_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + module com { module sun { module star { module sdbc { + + published interface XResultSet; +}; }; }; }; + + + + module com { module sun { module star { module sdb { + + +/** is the interface to create a + com::sun::star::sdbc::ResultSet + based on the object providing the interface. + */ +published interface XResultSetAccess: com::sun::star::uno::XInterface +{ + + /** returns a new + com::sun::star::sdbc::ResultSet + based on the object. + @returns + the new created ResultSet object + */ + com::sun::star::sdbc::XResultSet createResultSet() raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowSetApproveBroadcaster.idl b/offapi/com/sun/star/sdb/XRowSetApproveBroadcaster.idl new file mode 100644 index 000000000..39da40083 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowSetApproveBroadcaster.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XRowSetApproveBroadcaster_idl__ +#define __com_sun_star_sdb_XRowSetApproveBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + module com { module sun { module star { module sdb { + + published interface XRowSetApproveListener; + + +/** provides the possibility of reviving an event before changing the content + of a row set. + */ +published interface XRowSetApproveBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the events "approveCursorMove", + "approveRowChange", and "approveRowSetChange". + */ + void addRowSetApproveListener( + [in]XRowSetApproveListener listener ); + + /** removes the specified listener. + */ + void removeRowSetApproveListener( + [in]XRowSetApproveListener listener ); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowSetApproveListener.idl b/offapi/com/sun/star/sdb/XRowSetApproveListener.idl new file mode 100644 index 000000000..70955901e --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowSetApproveListener.idl @@ -0,0 +1,62 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XRowSetApproveListener_idl__ +#define __com_sun_star_sdb_XRowSetApproveListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/sdb/RowChangeEvent.idl> + + module com { module sun { module star { module sdb { + + +/** is used for approving the moving and changing of row set actions. + */ +published interface XRowSetApproveListener: com::sun::star::lang::XEventListener +{ + + /** is called before a row set's cursor is moved. + @param event + the event which happened + @returns `TRUE` when moving is allowed, otherwise `FALSE` + */ + boolean approveCursorMove([in]com::sun::star::lang::EventObject event); + + /** is called before a row is inserted, updated, or deleted. + @param event + the event which happened + @returns `TRUE` when changing is allowed, otherwise `FALSE` + */ + boolean approveRowChange([in]RowChangeEvent event); + + /** is called before a row set is changed, or in other words + before a row set is reexecuted. + @param event + the event which happened + @returns `TRUE` when changing is allowed, otherwise `FALSE` + */ + boolean approveRowSetChange([in]com::sun::star::lang::EventObject event); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowSetChangeBroadcaster.idl b/offapi/com/sun/star/sdb/XRowSetChangeBroadcaster.idl new file mode 100644 index 000000000..632c4ce48 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowSetChangeBroadcaster.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XRowSetChangeBroadcaster_idl__ +#define __com_sun_star_sdb_XRowSetChangeBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module sdb { + +interface XRowSetChangeListener; + + +/** broadcasts changes in the <code>RowSet</code> supplied by a component + + @see XRowSetSupplier + @see XRowSetChangeListener + @since OOo 3.2 + */ +interface XRowSetChangeBroadcaster +{ + /** adds a listener to be notified when the <code>RowSet</code> supplied by the component changes. + */ + void addRowSetChangeListener( [in] XRowSetChangeListener iListener ); + + /** removes a previously added listener. + */ + void removeRowSetChangeListener( [in] XRowSetChangeListener iListener ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowSetChangeListener.idl b/offapi/com/sun/star/sdb/XRowSetChangeListener.idl new file mode 100644 index 000000000..8e178b962 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowSetChangeListener.idl @@ -0,0 +1,50 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XRowSetChangeListener_idl__ +#define __com_sun_star_sdb_XRowSetChangeListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + + +module com { module sun { module star { module sdb { + + +/** is implemented by components which want to be notified when the <code>RowSet</code> supplied + by a XRowSetSupplier changes. + + @see XRowSetChangeBroadcaster + @see XRowSetSupplier + @since OOo 3.2 + */ + interface XRowSetChangeListener : ::com::sun::star::lang::XEventListener +{ + /** notifies the listener that the <code>RowSet</code> associated with a XRowSetSupplier + has changed. + */ + void onRowSetChanged( [in] ::com::sun::star::lang::EventObject iEvent ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowSetSupplier.idl b/offapi/com/sun/star/sdb/XRowSetSupplier.idl new file mode 100644 index 000000000..8b3950420 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowSetSupplier.idl @@ -0,0 +1,59 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XRowSetSupplier_idl__ +#define __com_sun_star_sdb_XRowSetSupplier_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdbc/XRowSet.idl> + + module com { module sun { module star { module sdb { + + +/** uses a row set as datasource. + + @see XRowSetChangeBroadcaster + */ +published interface XRowSetSupplier: com::sun::star::uno::XInterface +{ + + /** provides access to the data source. + @returns + the RowSet object + */ + com::sun::star::sdbc::XRowSet getRowSet(); + + + /** sets the data source. + @param xDataSource + the RowSet object to set + */ + void setRowSet( [in] com::sun::star::sdbc::XRowSet xDataSource ); + +}; + + +}; }; }; }; + +#endif + +/*=========================================================================== +===========================================================================*/ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowsChangeBroadcaster.idl b/offapi/com/sun/star/sdb/XRowsChangeBroadcaster.idl new file mode 100644 index 000000000..06ab89cd3 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowsChangeBroadcaster.idl @@ -0,0 +1,54 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XRowsChangeBroadcaster_idl__ +#define __com_sun_star_sdb_XRowsChangeBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + + +module com { module sun { module star { module sdb { + +interface XRowsChangeListener; + + +/** broadcasts changes in the <code>RowSet</code> supplied by a component + + @see XRowSetSupplier + @see XRowsChangeListener + @since OOo 3.3 + */ +interface XRowsChangeBroadcaster +{ + /** adds a listener to be notified when the <code>RowSet</code> supplied by the component changes. + */ + void addRowsChangeListener( [in] XRowsChangeListener listener ); + + /** removes a previously added listener. + */ + void removeRowsChangeListener( [in] XRowsChangeListener listener ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XRowsChangeListener.idl b/offapi/com/sun/star/sdb/XRowsChangeListener.idl new file mode 100644 index 000000000..fe25ec431 --- /dev/null +++ b/offapi/com/sun/star/sdb/XRowsChangeListener.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XRowsChangeListener_idl__ +#define __com_sun_star_sdb_XRowsChangeListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/sdb/RowsChangeEvent.idl> + + module com { module sun { module star { module sdb { + + +/** is used for receiving "rowsChanged" events + posted by, for example, a row set. + */ +interface XRowsChangeListener: com::sun::star::lang::XEventListener +{ + + /** is called when rows are inserted, updated, or deleted. + @param event + contains information about the event + */ + void rowsChanged([in]com::sun::star::sdb::RowsChangeEvent event); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSQLErrorBroadcaster.idl b/offapi/com/sun/star/sdb/XSQLErrorBroadcaster.idl new file mode 100644 index 000000000..e820eb805 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSQLErrorBroadcaster.idl @@ -0,0 +1,56 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSQLErrorBroadcaster_idl__ +#define __com_sun_star_sdb_XSQLErrorBroadcaster_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +#include <com/sun/star/sdb/XSQLErrorListener.idl> + + module com { module sun { module star { module sdb { + + +/** interface for notifying potential listeners + of + com::sun::star::sdbc::SQLException + s posted by any database object. + */ +published interface XSQLErrorBroadcaster: com::sun::star::uno::XInterface +{ + + /** adds the specified listener to receive the event "errorOccurred" + */ + void addSQLErrorListener( + [in]XSQLErrorListener Listener ); + + /** removes the specified listener. + */ + void removeSQLErrorListener( + [in]XSQLErrorListener Listener ); +}; + + +}; }; }; }; + + +#endif +/*=========================================================================== +===========================================================================*/ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSQLErrorListener.idl b/offapi/com/sun/star/sdb/XSQLErrorListener.idl new file mode 100644 index 000000000..542c8f23a --- /dev/null +++ b/offapi/com/sun/star/sdb/XSQLErrorListener.idl @@ -0,0 +1,51 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSQLErrorListener_idl__ +#define __com_sun_star_sdb_XSQLErrorListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> + +#include <com/sun/star/sdb/SQLErrorEvent.idl> + + module com { module sun { module star { module sdb { + + +/** the listener interface for receiving "errorOccured" events + posted by any database object. + */ +published interface XSQLErrorListener: com::sun::star::lang::XEventListener +{ + + /** invoked when a database error occurs, just before a + com::sun::star::sdbc::SQLException + is thrown to the application. + @param aEvent + the event which occurred + */ + void errorOccured([in]com::sun::star::sdb::SQLErrorEvent aEvent); +}; + + +}; }; }; }; + +/*=========================================================================== +===========================================================================*/ +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSQLQueryComposer.idl b/offapi/com/sun/star/sdb/XSQLQueryComposer.idl new file mode 100644 index 000000000..630e947a2 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSQLQueryComposer.idl @@ -0,0 +1,148 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSQLQueryComposer_idl__ +#define __com_sun_star_sdb_XSQLQueryComposer_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> + +#include <com/sun/star/beans/PropertyValue.idl> + +#include <com/sun/star/sdbc/SQLException.idl> + + + module com { module sun { module star { module sdb { + + +/** should be provided by a tool which simplifies the handling with SQL select statements. + + <p> + The interface can be used for composing SELECT statements without knowing the + structure of the used query. + </p> + */ +published interface XSQLQueryComposer: com::sun::star::uno::XInterface +{ + + /** returns the query used for composing. + @returns + the query + */ + string getQuery(); + + /** sets a new query for the composer, which may be expanded by filters + and sort criteria. + @param command + the command to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void setQuery([in] string command ) + raises (com::sun::star::sdbc::SQLException); + + /** returns the query composed with filters and sort criteria. + @returns + the composed query + */ + string getComposedQuery(); + + /** returns the currently used filter. + + <p> + The filter criteria returned is part of the where condition of the + select command, but it does not contain the where token. + </p> + @returns + the filter + */ + string getFilter(); + + /** returns the currently used filter. + <p> + The filter criteria is split into levels. Each level represents the + OR criteria. Within each level, the filters are provided as an AND criteria + with the name of the column and the filter condition. The filter condition + is of type string. + </p> + @returns + the structured filter + */ + sequence< sequence<com::sun::star::beans::PropertyValue> > + getStructuredFilter(); + + /** returns the currently used sort order. + + + <p> + The order criteria returned is part of the ORDER BY clause of the + select command, but it does not contain the ORDER BY keyword . + </p> + @returns + the order + */ + string getOrder(); + + /** appends a new filter condition by a + com::sun::star::sdb::DataColumn + providing the name and the value for the filter. + @param column + the column which is used to create a filter + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendFilterByColumn([in] com::sun::star::beans::XPropertySet column) + raises (com::sun::star::sdbc::SQLException); + + /** appends an additional part to the sort order criteria of the select + statement. + @param column + the column which is used to create an order part + @param ascending + `TRUE` when the order should be ascending, otherwise `FALSE` + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendOrderByColumn([in] com::sun::star::beans::XPropertySet column, + [in] boolean ascending) + raises (com::sun::star::sdbc::SQLException); + + /** makes it possible to set a filter condition for the query. + @param filter + the filter to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void setFilter([in] string filter) + raises (com::sun::star::sdbc::SQLException); + + /** makes it possible to set a sort condition for the query. + @param order + the order part to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void setOrder([in] string order) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSQLQueryComposerFactory.idl b/offapi/com/sun/star/sdb/XSQLQueryComposerFactory.idl new file mode 100644 index 000000000..67332fcb1 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSQLQueryComposerFactory.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSQLQueryComposerFactory_idl__ +#define __com_sun_star_sdb_XSQLQueryComposerFactory_idl__ + +#include <com/sun/star/sdb/XSQLQueryComposer.idl> + + module com { module sun { module star { module sdb { + + +/** is a factory for instances of service com::sun::star::sdb::SQLQueryComposer. + */ +published interface XSQLQueryComposerFactory: com::sun::star::uno::XInterface +{ + + /** creates a new query composer. + @returns + the SQLQueryComposer object + */ + com::sun::star::sdb::XSQLQueryComposer createQueryComposer(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl new file mode 100644 index 000000000..df6e33d73 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl @@ -0,0 +1,227 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSingleSelectQueryAnalyzer_idl__ +#define __com_sun_star_sdb_XSingleSelectQueryAnalyzer_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/sdbc/SQLException.idl> + +module com { module sun { module star { module container { +published interface XIndexAccess; +};};};}; + + module com { module sun { module star { module sdb { + + +/** simplifies the analyzing of single select statements. + + <p> + The interface can be used for analyzing single SELECT statements without knowing the + structure of the used query. + </p> + */ +interface XSingleSelectQueryAnalyzer : com::sun::star::uno::XInterface +{ + + /** returns the query. + @returns + the query + */ + string getQuery(); + + /** sets a new query for the composer, which may be expanded by filters, group by, having + and sort criteria. + @param command + the single select statement to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the statement isn't a single select statement + or the statement isn't valid + or the statement can not be parsed. + */ + void setQuery([in] string command ) + raises (com::sun::star::sdbc::SQLException); + // FILTER + + /** returns the used filter. + <p> + The filter criteria returned is part of the where condition of the + select command, but it does not contain the where token. + </p> + @returns + the filter + */ + string getFilter(); + + /** returns the currently used filter. + <p> + The filter criteria is split into levels. Each level represents the + OR criteria. Within each level, the filters are provided as an AND criteria + with the name of the column and the filter condition. The filter condition + is of type string. The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + </p> + @returns + the structured filter + */ + sequence< sequence<com::sun::star::beans::PropertyValue> > + getStructuredFilter(); + + // GROUP BY + + /** returns the currently used GROUP BY. + <p> + The group criteria returned is part of the GROUP BY clause of the + select command, but it does not contain the GROUP BY keyword . + </p> + @returns + the group + */ + string getGroup(); + + /** returns the currently used group. + <p> + The columns returned from the GROUP BY clause. + </p> + @returns + a collection of com::sun::star::sdb::GroupColumn which form the GROUP BY. + */ + com::sun::star::container::XIndexAccess getGroupColumns(); + + // HAVING + + /** returns the used HAVING filter. + <p> + The HAVING filter criteria returned is part of the HAVING condition of the + select command, but it does not contain the HAVING token. + </p> + @returns + the filter + */ + string getHavingClause(); + + /** returns the currently used HAVING filter. + <p> + The HAVING filter criteria is split into levels. Each level represents the + OR criteria. Within each level, the filters are provided as an AND criteria + with the name of the column and the filter condition. The filter condition + is of type string. The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + </p> + @returns + the structured HAVING filter + */ + sequence< sequence<com::sun::star::beans::PropertyValue> > + getStructuredHavingClause(); + + // ORDER BY + /** returns the currently used sort order. + <p> + The order criteria returned is part of the ORDER BY clause of the + select command, but it does not contain the ORDER BY keyword . + </p> + @returns + the order + */ + string getOrder(); + + /** returns the currently used sort order. + <p> + The order criteria returned is part of the ORDER BY clause of the + select command, but it does not contain the ORDER BY keyword . + </p> + @returns + a collection of com::sun::star::sdb::OrderColumn which form the ORDER BY. + */ + com::sun::star::container::XIndexAccess getOrderColumns(); + + /** returns the query previously set at the analyzer, with all application-level + features being substituted by their database-level counterparts. + + <p>The XSingleSelectQueryAnalyzer is an application-level component, + which in some respect understands SQL features usually not present at the database + level. As a prominent example, you might pass a <code>SELECT</code> statement to the analyzer + which is based on another query.</p> + + <p>While all other methods will handle those additional features transparently - e.g. + the query in the <code>FROM</code> part of a <code>SELECT</code> statement will be handled + as if it really is a table -, <code>getQueryWithSubstitution</code> gives you the SQL statement + where all those features have been stripped, and replaced with appropriate standard SQL.</p> + + <p>For example, consider a database document which contains a client-side query named <code>All Orders</code>. + This query is not known to the underlying database, so an SQL statement like + <code>SELECT * from "All Orders"</code> would be rejected by the database. However, instantiating + a SingleSelectQueryAnalyzer at the Connection object, and passing it the above query, + you can then use <code>getQueryWithSubstitution</code> to retrieve a statement where <code>"All Orders"</code> + has been replaced with the <code>SELECT</code> statement which actually constitutes the <code>"All Orders"</code> + query.</p> + + @throws com::sun::star::sdbc::SQLException + if the query represented cannot be completely substituted. A usual case for this is a recursion in + the sub queries: Consider a query named <code>foo</code>, which is defined as <code>SELECT * FROM "bar"</code>. + Now assume that <code>bar</code> is a query defined as <code>SELECT * FROM "foo"</code>. Passing either + of those statements to an analyzer, and calling getQueryWithSubstitution(), would result + in an exception being thrown, since it's impossible to substitute the sub queries with their + constituting statements. + + @see Connection + @see XQueriesSupplier + @see DatabaseDocument + + @since OOo 2.0.4 + */ + string getQueryWithSubstitution() + raises (com::sun::star::sdbc::SQLException); + + /** sets a new query for the composer, which may be expanded by filters, group by, having + and sort criteria. + @param Command + is the command which should be executed, the type of command depends + on the CommandType. + + <p>In case of a \p CommandType of com::sun::star::sdb::CommandType::COMMAND, + means in case the \p Command specifies an SQL statement, the inherited + com::sun::star::sdbc::RowSet::EscapeProcessing + becomes relevant:<br/> + It then can be to used to specify whether the SQL statement should be analyzed on the + client side before sending it to the database server.<br/> + The default value for com::sun::star::sdbc::RowSet::EscapeProcessing + is `TRUE`. By switching it to `FALSE`, you can pass backend-specific SQL statements, + which are not standard SQL, to your database.</p> + + @see com::sun::star::sdb::CommandType + @see com::sun::star::sdbc::RowSet::EscapeProcessing + @param CommandType + is the type of the command. + @see com::sun::star::sdb::CommandType + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the statement isn't a single select statement + or the statement isn't valid + or the statement can not be parsed. + */ + void setCommand([in] string Command ,[in] long CommandType) + raises (com::sun::star::sdbc::SQLException); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl new file mode 100644 index 000000000..2a5369602 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSingleSelectQueryComposer.idl @@ -0,0 +1,235 @@ +/* -*- 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 . + */ +#ifndef __com_sun_star_sdb_XSingleSelectQueryComposer_idl__ +#define __com_sun_star_sdb_XSingleSelectQueryComposer_idl__ + +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/beans/PropertyValue.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.idl> + + + module com { module sun { module star { module sdb { + + +/** simplifies the composing of single select statements. + + <p> + The interface can be used for composing single SELECT statements without knowing the + structure of the used query. + </p> + + @see com::sun::star::sdb::SingleSelectQueryComposer + */ +interface XSingleSelectQueryComposer: XSingleSelectQueryAnalyzer +{ + // FILTER + + /** makes it possible to set a filter condition for the query. + @param filter + the filter to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the statement isn't valid + or the statement isn't parsable. + */ + void setFilter([in] string filter) + raises (com::sun::star::sdbc::SQLException); + + /** appends a new set of filter criteria which is split into levels. + @param filter + The filter criteria is split into levels. Each level represents the + OR criteria. Within each level, the filters are provided as an AND criteria + with the name of the column and the filter condition. The filter condition + is of type string. The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void setStructuredFilter([in] sequence< sequence<com::sun::star::beans::PropertyValue> > filter) + raises (com::sun::star::sdbc::SQLException,com::sun::star::lang::IllegalArgumentException); + + /** appends a new filter condition by a + com::sun::star::sdb::DataColumn + providing the name and the value for the filter. + The value property must be supported by the com::sun::star::sdb::DataColumn. + @param column + the column which is used to create a filter + @param andCriteria + If `TRUE` the filter condition will be appended as an AND condition, otherwise + the new filter condition will be appended as OR criteria. + E.g. (xx AND bb AND cc) OR newCriteria + @param filterOperator + The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendFilterByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); + + // GROUP BY + + + /** makes it possible to set a group for the query. + @param group + the group part to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the statement isn't valid + or the statement isn't parsable. + */ + void setGroup([in] string group) + raises (com::sun::star::sdbc::SQLException); + + + /** appends an additional part to the group criteria of the select + statement. The column must be a com::sun::star::sdbcx::Column. + @param column + the column which is used to create a group part + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendGroupByColumn([in] com::sun::star::beans::XPropertySet column) + raises (com::sun::star::sdbc::SQLException); + + // HAVING + + /** makes it possible to set a HAVING filter condition for the query. + @param filter + the filter to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the statement isn't valid + or the statement isn't parsable. + */ + void setHavingClause([in] string filter) + raises (com::sun::star::sdbc::SQLException); + + + /** appends a new set of HAVING filter criteria which is split into levels. + @param filter + The HAVING filter criteria is split into levels. Each level represents the + OR criteria. Within each level, the filters are provided as an AND criteria + with the name of the column and the filter condition. The filter condition + is of type string. The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void setStructuredHavingClause([in] sequence< sequence<com::sun::star::beans::PropertyValue> > filter) + raises (com::sun::star::sdbc::SQLException); + + /** appends a new HAVING filter condition by a + com::sun::star::sdb::DataColumn + providing the name and the value for the filter. + @param column + the column which is used to create a filter + @param andCriteria + If `TRUE` the filter condition will be appended as an AND condition, otherwise + the new filter condition will be appended as OR criteria. + E.g. (xx AND bb AND cc) OR newCriteria + @param filterOperator + The operator used, is defined by com::sun::star::sdb::SQLFilterOperator. + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendHavingClauseByColumn([in] com::sun::star::beans::XPropertySet column,[in] boolean andCriteria,[in] long filterOperator) + raises (com::sun::star::sdbc::SQLException, com::sun::star::lang::WrappedTargetException); + + // ORDER BY + + /** makes it possible to set a sort condition for the query. + @param order + the order part to set + @throws com::sun::star::sdbc::SQLException + if a database access error occurs + or the order isn't valid + or the statement isn't parsable. + */ + void setOrder([in] string order) + raises (com::sun::star::sdbc::SQLException); + + + /** appends an additional part to the sort order criteria of the select + statement. The column must be a com::sun::star::sdbcx::Column. + @param column + the column which is used to create an order part + @param ascending + `TRUE` when the order should be ascending, otherwise if `FALSE` descending. + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void appendOrderByColumn([in] com::sun::star::beans::XPropertySet column, + [in] boolean ascending) + raises (com::sun::star::sdbc::SQLException); + + // cumulative composing + + /** sets a new elementary query for the composer + + <p>An elementary query or statement is a (single select) statement whose parts are + not covered by the various set and get methods of the composer. That is, if the + elementary statement contains a filter clause, a call to + XSingleSelectQueryAnalyzer::getFilter() will not return you this + filter. Instead, only filters which have been set using for instance setFilter() + are covered by the get methods.</p> + + <p>The only methods which take all parts of the elementary statement into account are + XSingleSelectQueryAnalyzer::getQuery() and + XSingleSelectQueryAnalyzer::getQueryWithSubstitution(), which always returns + the complete composed query.</p> + + <p>As a result, you can use the composer to build cumulative filter expressions. That + is, you can set #ElementaryQuery to a statement already containing + filters, and then use setFilter() to append additional filters.</p> + + <p>The very same holds for sort orders, <code>HAVING</code> and <code>GROUP BY</code> + clauses.</p> + + <p>There are various use cases for this. For instance, you might want to use the + statement represented by a QueryDefinition, and extend it with additional + filters or sort orders, while not touching the respective parts already present + in QueryDefinition::Command. This can be achieved by setting the + QueryDefinition::Command as #ElementaryQuery of a + SingleSelectQueryComposer.</p> + + <p>If, in such a scenario, you would be interested in the filter part of the + QueryDefinition::Command, you would set it via + XSingleSelectQueryAnalyzer::setQuery(), and retrieve the filter + part via XSingleSelectQueryAnalyzer::getFilter().</p> + + <p>If you'd be interested in the composed filter, you would set the + QueryDefinition::Command as #ElementaryQuery, add your + filter, and propagate the resulting query (XSingleSelectQueryAnalyzer::getQuery()) + to an SingleSelectQueryAnalyzer instance via + XSingleSelectQueryAnalyzer::setQuery().</p> + */ + [attribute] string ElementaryQuery + { + set raises (com::sun::star::sdbc::SQLException); + }; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XSubDocument.idl b/offapi/com/sun/star/sdb/XSubDocument.idl new file mode 100644 index 000000000..89c072140 --- /dev/null +++ b/offapi/com/sun/star/sdb/XSubDocument.idl @@ -0,0 +1,93 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_XSubDocument_idl__ +#define __com_sun_star_sdb_XSubDocument_idl__ + +#include <com/sun/star/lang/WrappedTargetException.idl> +#include <com/sun/star/lang/XComponent.idl> + + +module com { module sun { module star { module sdb { + + +/** allows operating on a sub document of an OfficeDatabaseDocument + + @since OOo 3.1 + */ +interface XSubDocument +{ + /** opens the sub document + + <p>Note that opening the document means it is displayed in an own top-level frame + on the desktop.</p> + + @return + the sub document, usually a com::sun::star::frame::XModel, + or a com::sun::star::frame::XController if the sub document + does not have an own model. + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs during opening the document + */ + ::com::sun::star::lang::XComponent + open() + raises( ::com::sun::star::lang::WrappedTargetException ); + + /** opens the sub document in design mode + + @return + the sub document, usually a com::sun::star::frame::XModel, + or a com::sun::star::frame::XController if the sub document + does not have an own model. + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs during opening the document + */ + ::com::sun::star::lang::XComponent + openDesign() + raises( ::com::sun::star::lang::WrappedTargetException ); + + /** stores the sub document, if it had previously been opened in either mode + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs during storing the document + */ + void store() + raises( ::com::sun::star::lang::WrappedTargetException ); + + /** closes the sub document, if it had previously been opened in either mode + + @return `TRUE` if and only if the document could be closed, `FALSE` otherwise, + e.g. if the closing has been vetoed by the user. + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs during closing the document + */ + boolean close() + raises( ::com::sun::star::lang::WrappedTargetException ); +}; + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/XTextConnectionSettings.idl b/offapi/com/sun/star/sdb/XTextConnectionSettings.idl new file mode 100644 index 000000000..89645ec0f --- /dev/null +++ b/offapi/com/sun/star/sdb/XTextConnectionSettings.idl @@ -0,0 +1,44 @@ +/* -*- 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 . + */ + + +#ifndef __com_sun_star_sdb_XTextConnectionSettings_idl__ +#define __com_sun_star_sdb_XTextConnectionSettings_idl__ + +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { + +/** + @since LibreOffice 4.1 +*/ +interface XTextConnectionSettings { + + interface com::sun::star::ui::dialogs::XExecutableDialog; + + interface com::sun::star::beans::XPropertySet; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..dfc3423c0 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/CopyTableContinuation.idl @@ -0,0 +1,59 @@ +/* -*- 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 . + */ + +#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 + CopyTableWizard 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 XCopyTableListener 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 canceling the copy + operation.</p> + */ + const short AskUser = 3; +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..0a5587439 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/CopyTableOperation.idl @@ -0,0 +1,62 @@ +/* -*- 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 . + */ + +#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 CopyTableWizard + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..b0935ea66 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/CopyTableRowEvent.idl @@ -0,0 +1,57 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_CopyTableRowEvent_idl__ +#define __com_sun_star_sdb_application_CopyTableRowEvent_idl__ + +#include <com/sun/star/lang/EventObject.idl> +#include <com/sun/star/sdbc/XResultSet.idl> + + +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 XCopyTableListener, + com::sun::star::lang::EventObject::Source 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 com::sun::star::sdbc::SQLException.</p> + */ + any Error; +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..eb7e4b689 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/CopyTableWizard.idl @@ -0,0 +1,219 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_CopyTableWizard_idl__ +#define __com_sun_star_sdb_application_CopyTableWizard_idl__ + +#include <com/sun/star/sdb/application/XCopyTableWizard.idl> +#include <com/sun/star/beans/XPropertySet.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/WrappedTargetException.idl> +#include <com/sun/star/task/XInteractionHandler.idl> +#include <com/sun/star/sdbc/SQLException.idl> + + +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. + + <dl> + <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 + createWithInteractionHandler() 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 createWithInteractionHandler(). Only if there is no such interaction + handler, the processing described above, to find another handler, is applied.</p> + </dd> + </dl> + + @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 Source resp. Dest. 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 com::sun::star::sdb::DataAccessDescriptor 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 com::sun::star::sdb::CommandType::TABLE and + com::sun::star::sdb::CommandType::QUERY are supported.</li> + + <li>If you specify a <code>ConnectionResource</code>, or an + <code>ActiveConnection</code> which implements a com::sun::star::sdbc::Connection only + (as opposed to a com::sun::star::sdb::Connection), 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 com::sun::star::sdb::DataAccessDescriptor 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 com::sun::star::sdb::Connection service. In particular, + it is not sufficient to pass an SDBC-level connection.</p> + + <p>Note that creating a view (see CopyTableOperation::CreateAsView) 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 a com::sun::star::sdbc::SQLException 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 create() 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 Source + the com::sun::star::sdb::DataAccessDescriptor describing the + source for the copy operation. + + @param Destination + the com::sun::star::sdb::DataAccessDescriptor describing the + target for the copy operation. + + @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 com::sun::star::sdb::InteractionHandler, since + the general-purpose com::sun::star::task::InteractionHandler 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..366be5002 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/DatabaseObject.idl @@ -0,0 +1,64 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_DatabaseObject_idl__ +#define __com_sun_star_sdb_application_DatabaseObject_idl__ + +#include <com/sun/star/sdb/CommandType.idl> + + +module com { module sun { module star { module sdb { module application { + + +/** denotes different objects within a database document + + @since OOo 2.2 + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..a4e714cdc --- /dev/null +++ b/offapi/com/sun/star/sdb/application/DatabaseObjectContainer.idl @@ -0,0 +1,95 @@ +/* -*- 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 . + */ + +#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, 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 schemas + */ + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..c41879e57 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/DefaultViewController.idl @@ -0,0 +1,92 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_DefaultViewController_idl__ +#define __com_sun_star_sdb_application_DefaultViewController_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 ::com::sun::star::ui::ContextMenuExecuteEvent::Selection 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 describes 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 NamedDatabaseObject 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 NamedDatabaseObject 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..99f239596 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/NamedDatabaseObject.idl @@ -0,0 +1,78 @@ +/* -*- 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 . + */ + +#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 DatabaseObject or DatabaseObjectContainer 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 DatabaseObjectContainer::CATALOG and + DatabaseObjectContainer::SCHEMA, it is + <ul><li><code><schema></code>, if the database supports schemas only</li> + <li><code><catalog></code>, if the database supports catalogs only</li> + <li><code><catalog>.<schema></code>, if the database supports both + catalogs and schemas, and catalogs are to appear at the beginning of an identifier.</li> + <li><code><schema>.<catalog></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 DatabaseObjectContainer::TABLES, + DatabaseObjectContainer::QUERIES, DatabaseObjectContainer::DATA_SOURCE, + DatabaseObjectContainer::FORMS or DatabaseObjectContainer::REPORTS, + this denotes the name of the data source (as denoted by + com::sun::star::sdb::DataSource::Name)</p> + + @see XDatabaseMetaData::isCatalogAtStart + @see DatabaseObjectContainer + */ + string Name; +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..72613157e --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XCopyTableListener.idl @@ -0,0 +1,84 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_XCopyTableListener_idl__ +#define __com_sun_star_sdb_application_XCopyTableListener_idl__ + +#include <com/sun/star/lang/XEventListener.idl> +#include <com/sun/star/sdb/application/CopyTableRowEvent.idl> + + +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. + CopyTableRowEvent::SourceData 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. + CopyTableRowEvent::SourceData 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. + CopyTableRowEvent::SourceData is positioned at the row + which was attempted to be copied to the target database. + CopyTableRowEvent::Error will contain the actual error which + happened. + + @return + how to continue with copying. Must be one of the CopyTableContinuation + constants. + */ + short copyRowError( [in] CopyTableRowEvent Event ); +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..18b312f4f --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XCopyTableWizard.idl @@ -0,0 +1,138 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_XCopyTableWizard_idl__ +#define __com_sun_star_sdb_application_XCopyTableWizard_idl__ + +#include <com/sun/star/ui/dialogs/XExecutableDialog.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/beans/Optional.idl> + +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 CopyTableOperation 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 + CopyTableOperation::CreateAsView where the database + does not support views. + */ + [attribute] short Operation + { + set raises ( ::com::sun::star::lang::IllegalArgumentException ); + }; + + /** specifies 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 #Operation is + CopyTableOperation::AppendData.</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 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, + ::com::sun::star::sdbc::SQLException ); + }; + + /** 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..a8f54d4f7 --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XDatabaseDocumentUI.idl @@ -0,0 +1,322 @@ +/* -*- 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 . + */ + +#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 + */ +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 application's main window + + <p>Note that reading this attribute is equivalent to querying the component + for the com::sun::star::frame::XController 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 definitely be + avoided. If you need a separate connection to the data source, use + com::sun::star::sdbc::XDataSource::getConnection().</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 + com::sun::star::sdbc::XDataSource::getConnection() + with the current settings, as specified in the + com::sun::star::sdb::DataSource::Settings 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 (com::sun::star::frame::XModel), + controllers (com::sun::star::frame::XController), or frames + (com::sun::star::frame::XFrame). + + @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 #SubComponents. + + @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 DatabaseObject 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 hierarchical 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 + (com::sun::star::frame::XController::suspend()). 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 com::sun::star::frame::XComponentLoader + interface of the ::com::sun::star::sdb::Forms resp. ::com::sun::star::sdb::Reports + 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 DatabaseObject + constants. + + @param ObjectName + specifies the name of the object. In case hierarchical 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"> + <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 ::com::sun::star::sdb::TableDesign</td> + <td>A table data view is opened, and allows to view and edit the data contained in the table. + See also ::com::sun::star::sdb::DataSourceBrowser</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 ::com::sun::star::sdb::QueryDesign</td> + <td>A table data view is opened, and allows to view and edit the data contained in the query. + See also ::com::sun::star::sdb::DataSourceBrowser</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> + + </table> + </p> + + @return + the component which has been loaded. This is either a com::sun::star::frame::XModel, + or a com::sun::star::frame::XController if the component does is model-less. + + @throws ::com::sun::star::lang::IllegalArgumentException + if ObjectType 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 loadComponent(), this method allows you to specify + additional arguments which are passed to the to-be-loaded component.</p> + + <p>The meaning of 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 DatabaseObject + constants. + + @param DocumentDefinition + Upon successful return, and if and only if ObjectType equals DatabaseObject::FORM + or DatabaseObject::REPORT, this will contain the com::sun::star::sdb::DocumentDefinition + 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 createComponent(), this method allows you to specify + additional arguments which are passed to the to-be-loaded component.</p> + + + @param ObjectType + specifies the type of the object, must be one of the DatabaseObject + constants. + + @param Arguments + The meaning of 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. + + @param DocumentDefinition + Upon successful return, and if and only if ObjectType equals DatabaseObject::FORM + or DatabaseObject::REPORT, this will contain the com::sun::star::sdb::DocumentDefinition + 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 Arguments, + 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::container::NoSuchElementException, + ::com::sun::star::sdbc::SQLException ); +}; + + +}; }; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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 000000000..e9bb5b53e --- /dev/null +++ b/offapi/com/sun/star/sdb/application/XTableUIProvider.idl @@ -0,0 +1,112 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_application_XTableUIProvider_idl__ +#define __com_sun_star_sdb_application_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 + */ +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 + com::sun::star::graphic::GraphicColorMode 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 parameter 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 + com::sun::star::ui::dialogs::XExecutableDialog + interface, the dialog will be executed modally.</li> + <li>modeless frames<br/> + If the returned component supports the + com::sun::star::frame::XController + 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 TableName does not denote an existing table + + @throws ::com::sun::star::lang::WrappedTargetException + if an error occurs 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/CompositionType.idl b/offapi/com/sun/star/sdb/tools/CompositionType.idl new file mode 100644 index 000000000..868bfd064 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/CompositionType.idl @@ -0,0 +1,79 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_CompositionType_idl__ +#define __com_sun_star_sdb_tools_CompositionType_idl__ + +module com { module sun { module star { module sdb { module tools { + +/** specifies which composition should be used when composing a table + name. + + @see XTableName + + @since OOo 2.0.4 +*/ +constants CompositionType +{ + /** specifies composition of a name to be used in table definitions + + @see XDatabaseMetaData::supportsCatalogsInTableDefinitions + @see XDatabaseMetaData::supportsSchemasInTableDefinitions + */ + const long ForTableDefinitions = 0; + + /** specifies composition of a name to be used in index definitions + + @see XDatabaseMetaData::supportsCatalogsInIndexDefinitions + @see XDatabaseMetaData::supportsSchemasInIndexDefinitions + */ + const long ForIndexDefinitions = 1; + + /** specifies composition of a name to be used in data manipulation + + @see XDatabaseMetaData::supportsCatalogsInDataManipulation + @see XDatabaseMetaData::supportsSchemasInDataManipulation + */ + const long ForDataManipulation = 2; + + /** specifies composition of a name to be used in procedure calls + + @see XDatabaseMetaData::supportsCatalogsInProcedureCalls + @see XDatabaseMetaData::supportsSchemasInProcedureCalls + */ + const long ForProcedureCalls = 3; + + /** specifies composition of a name to be used in privilege definitions + + @see XDatabaseMetaData::supportsCatalogsInPrivilegeDefinitions + @see XDatabaseMetaData::supportsSchemasInPrivilegeDefinitions + */ + const long ForPrivilegeDefinitions = 4; + + /** specifies complete composition of a table name, including catalog and schema (if present), + disregarding any database support for catalog and schema in any particular statements + */ + const long Complete = 5; +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/ConnectionTools.idl b/offapi/com/sun/star/sdb/tools/ConnectionTools.idl new file mode 100644 index 000000000..3fc03a133 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/ConnectionTools.idl @@ -0,0 +1,43 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_ConnectionTools_idl__ +#define __com_sun_star_sdb_tools_ConnectionTools_idl__ + +#include <com/sun/star/sdb/tools/XConnectionTools.idl> + +module com { module sun { module star { module sdbc { + published interface XConnection; +};};};}; + +module com { module sun { module star { module sdb { module tools { + +/** + @since LibreOffice 4.1 +*/ +service ConnectionTools : XConnectionTools +{ + createWithConnection([in] com::sun::star::sdbc::XConnection Connection); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XConnectionSupplier.idl b/offapi/com/sun/star/sdb/tools/XConnectionSupplier.idl new file mode 100644 index 000000000..8e54488d9 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XConnectionSupplier.idl @@ -0,0 +1,48 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XConnectionSupplier_idl__ +#define __com_sun_star_sdb_tools_XConnectionSupplier_idl__ + +#include <com/sun/star/sdbc/XConnection.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to access the active connection + + @see com::sun::star::sdbcx::XConnection + + @since OOo 3.3 +*/ +interface XConnectionSupplier +{ + /** returns the source connection. + */ + [attribute, readonly] com::sun::star::sdbc::XConnection ActiveConnection; + + interface com::sun::star::lang::XInitialization; + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XConnectionTools.idl b/offapi/com/sun/star/sdb/tools/XConnectionTools.idl new file mode 100644 index 000000000..feb085e6a --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XConnectionTools.idl @@ -0,0 +1,129 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XConnectionTools_idl__ +#define __com_sun_star_sdb_tools_XConnectionTools_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/sdbc/SQLException.idl> + +module com { module sun { module star { + module container { + interface XNameAccess; + }; + module lang { + interface XComponent; + }; +};};}; +module com { module sun { module star { module sdb { + interface XSingleSelectQueryComposer; + module tools { + +interface XTableName; +interface XObjectNames; +interface XDataSourceMetaData; + +/** encapsulates various useful functionality around a + com::sun::star::sdb::Connection + + <p>Most of the functionality provided here is meaningful only relative to + a given database connection. For instance, for quoting table names, you need + the meta data instance of the connection. Thus, the entry point for obtaining + a XConnectionTools instance is the + com::sun::star::sdb::Connection service.</p> + + <p>Note that nearly all functionality provided by this interface is also + available by other means, it's only provided here for convenience purposes.</p> + + @since OOo 2.0.4 +*/ +interface XConnectionTools +{ + /** creates an instance supporting the XTableName interface, + which can be used to manipulate table names for various purposes. + + <p>The returned object is guaranteed to not be `NULL`.</p> + */ + XTableName createTableName(); + + /** returns an instance supporting the XObjectNames interface, + which provides access to functionality around table and query names. + + <p>The returned object is guaranteed to not be `NULL`.</p> + */ + XObjectNames getObjectNames(); + + /** provides access to the application-level data source meta data + */ + XDataSourceMetaData + getDataSourceMetaData(); + + /** get fields for a result set given by a "command descriptor" + + <p>A command descriptor here means: + <ul><li>a SDB-level connection (com.sun.star.sdb::Connection</li> + <li>a string specifying the name of an object relative to the connection</li> + <li>a com.sun.star.sdb::CommandType value specifying the type + of the object</li> + </ul> + </p> + + @param commandType + the type of the object + + @param command + the object. This may be a table name, a query name, or an SQL statement, depending on the value + of _nCommandType + + @param keepFieldsAlive + If (and only if) CommandType is CommandType.COMMAND, the fields collection which is returned + by this function here is a temporary object. It is kept alive by another object, which is to be + created temporarily, too. To ensure that the fields you get are valid as long as you need them, + the owner which controls their life time is transferred to this parameter upon return.<br/> + Your fields live as long as this component lives.<br/> + Additionally, you are encouraged to dispose this component as soon as you don't need the fields anymore. + It depends on the connection's implementation if this is necessary, but the is no guarantee, so to + be on the safe side with respect to resource leaks, you should dispose the component. + + @return + the container of the columns (aka fields) of the object + */ + ::com::sun::star::container::XNameAccess getFieldsByCommandDescriptor( [in] long commandType, + [in] string command, + [out] ::com::sun::star::lang::XComponent keepFieldsAlive + ) raises( com::sun::star::sdbc::SQLException ); + + /** get the composer initialized with a command and command type. + @param commandType + the type of the object + + @param command + the object. This may be a table name, a query name, or an SQL statement, depending on the value + of _nCommandType + @return + the composer filled with command and command type. + */ + ::com::sun::star::sdb::XSingleSelectQueryComposer getComposer([in] long commandType,[in] string command); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl new file mode 100644 index 000000000..eb7f48159 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XDataSourceMetaData.idl @@ -0,0 +1,41 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XDataSourceMetaData_idl__ +#define __com_sun_star_sdb_tools_XDataSourceMetaData_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/sdbc/SQLException.idl> + +module com { module sun { module star { module sdb { module tools { + +interface XDataSourceMetaData +{ + /** determines whether the data source supports queries in the <code>FROM</code> + part of a <code>SELECT</code> statement. + */ + boolean supportsQueriesInFrom() raises ( com::sun::star::sdbc::SQLException ); +}; + +}; }; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XIndexAlteration.idl b/offapi/com/sun/star/sdb/tools/XIndexAlteration.idl new file mode 100644 index 000000000..7cd7b240f --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XIndexAlteration.idl @@ -0,0 +1,75 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XIndexAlteration_idl__ +#define __com_sun_star_sdb_tools_XIndexAlteration_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to alter the indexes of a table. + + @see com::sun::star::sdb::DataSource::Settings + @see com::sun::star::sdbcx::XAppend + @see com::sun::star::sdbcx::XDrop + + @since OOo 3.3 +*/ +interface XIndexAlteration +{ + interface XConnectionSupplier; + + /** drops an object of the related container identified by its name. + @param table + the table to be altered + @param index + the name of the column to be dropped + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void dropIndex([in] com::sun::star::beans::XPropertySet table,[in] string index) + raises ( com::sun::star::sdbc::SQLException); + + /** creates a new object using the given descriptor and appends it + to the related container. + <b> + Note: + </b> + The descriptor will not be changed and can be used again to append another object. + @param table + the table to be altered + @param descriptor + the descriptor which should be serve to append a new object + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void addIndex([in] com::sun::star::beans::XPropertySet table,[in]com::sun::star::beans::XPropertySet descriptor) + raises (com::sun::star::sdbc::SQLException); + + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XKeyAlteration.idl b/offapi/com/sun/star/sdb/tools/XKeyAlteration.idl new file mode 100644 index 000000000..961ec8c94 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XKeyAlteration.idl @@ -0,0 +1,75 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XKeyAlteration_idl__ +#define __com_sun_star_sdb_tools_XKeyAlteration_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to alter the keys of a table. + + @see com::sun::star::sdb::DataSource::Settings + @see com::sun::star::sdbcx::XAppend + @see com::sun::star::sdbcx::XDrop + + @since OOo 3.3 +*/ +interface XKeyAlteration +{ + interface XConnectionSupplier; + + /** drops an object of the related container identified by its name. + @param table + the table to be altered + @param key + the key to be dropped + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void dropKey([in] com::sun::star::beans::XPropertySet table,[in] com::sun::star::beans::XPropertySet key) + raises ( com::sun::star::sdbc::SQLException); + + /** creates a new object using the given descriptor and appends it + to the related container. + <b> + Note: + </b> + The descriptor will not be changed and can be used again to append another object. + @param table + the table to be altered + @param descriptor + the descriptor which should be serve to append a new object + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + */ + void addKey([in] com::sun::star::beans::XPropertySet table,[in]com::sun::star::beans::XPropertySet descriptor) + raises (com::sun::star::sdbc::SQLException); + + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XObjectNames.idl b/offapi/com/sun/star/sdb/tools/XObjectNames.idl new file mode 100644 index 000000000..a82bd59a8 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XObjectNames.idl @@ -0,0 +1,164 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XObjectNames_idl__ +#define __com_sun_star_sdb_tools_XObjectNames_idl__ + +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/sdbc/SQLException.idl> + +module com { module sun { module star { module sdb { module tools { + +/** encapsulates functionality which you might find useful when writing a + database application which deals with query and table names. + + <p>The most important task fulfilled by this instance is that it hides + different naming restrictions from you, which are caused by server-side + or client side specialties.</p> + + <p>For instance, it can validate names against + the characters allowed in the object names of a connection. Also, it + relieves you from caring whether a database supports queries in a <code>SELECT</code> + statement's <code>FROM</code> part (known as "queries in queries"). In such + databases, query and table names share a common namespace, thus they must be + unique. Using this interface, you can easily ensure this uniqueness.</p> + + <p>All of the functionality present in this interface depends on a connection, + thus it entry point for obtaining it is a com::sun::star::sdb::Connection + service.</p> + + <p>The component itself does not have life-time control mechanisms, i.e. you + cannot explicitly dispose it (com::sun::star::lang::XComponent::dispose()), + and you cannot be notified when it dies.<br/> + However, if your try to access any of its methods or attributes, after the + connection which was used to create it was closed, a com::sun::star::lang::DisposedException + will be thrown.</p> + + @see XConnectionTools + + @since OOo 2.0.4 +*/ +interface XObjectNames +{ + /** suggests a (unique) table or query name + + <p>If in the database, tables and queries share a common namespace, this will be respected + by this function.</p> + + <p>Note that in an multi-threaded environment, the name you obtain here is not absolutely + guaranteed to be unique. It is unique at the very moment the function returns to you. + But already when you evaluate the returned value, it might not be unique anymore, if + another process or thread created a query or table with this name.</p> + + <p>This implies that you cannot rely on the name's uniqueness, but you can use it as + first guess to present to the user. In most cases, it will still be sufficient when + you are actually creating the table respectively query.</p> + + @param CommandType + specifies the com::sun::star::sdb::CommandType of the object for which + a unique name is to be generated. Must be either com::sun::star::sdb::CommandType::TABLE + or com::sun::star::sdb::CommandType::QUERY. + + @param BaseName + specifies the base of the to-be-created object name. If empty, a default + base name will be used. + + @throws com::sun::star::lang::IllegalArgumentException + if CommandType specifies an invalid command type. + */ + string suggestName( [in] long CommandType, [in] string BaseName ) + raises ( com::sun::star::lang::IllegalArgumentException, + com::sun::star::sdbc::SQLException ); + + /** converts the given object name to a name which is valid in the database. + + <p>The conversion takes place by converting every character which is neither + allowed by the SQL-92 standard, nor part of the special characters supported + by the database, with an underscore character (_).</p> + + @see com::sun::star::sdbc::XDatabaseMetaData::getExtraNameCharacters + */ + string convertToSQLName( [in] string Name ); + + /** checks whether a given name is used as table respectively query name in the database. + + <p>If in the database, tables and queries share a common namespace, this will be respected + by this function.</p> + + <p>As before, the information you obtain by calling this method might be obsolete + in the very moment you evaluate this, in case another process or thread interferes. + However, it's usually sufficiently up-to-date for purpose of using it in a database + application driven by user interactions.</p> + + @param CommandType + specifies the com::sun::star::sdb::CommandType of the object whose + name should be checked. Must be either com::sun::star::sdb::CommandType::TABLE + or com::sun::star::sdb::CommandType::QUERY. + + @param Name + specifies the to-be-checked name of the object. + + @return + `TRUE` if and only if the given name is legitimate as table respectively query name + to be used in the database. + + @throws com::sun::star::lang::IllegalArgumentException + if CommandType specifies an invalid command type. + + @see checkNameIsUsed + */ + boolean isNameUsed( [in] long CommandType, [in] string Name ) + raises ( com::sun::star::lang::IllegalArgumentException, + com::sun::star::sdbc::SQLException ); + + /** checks whether a given name is valid as table or query name + + <p>For tables, the name must consist of characters allowed by the SQL-92 standard, + plus characters allowed by the connection as extra name characters.</p> + + <p>For queries, names are nearly arbitrary, except that usual quoting characters + must not be part of the name.</p> + + @see com::sun::star::sdbc::XDatabaseMetaData::getExtraNameCharacters + */ + boolean isNameValid( [in] long CommandType, [in] string Name ) + raises ( com::sun::star::lang::IllegalArgumentException ); + + /** checks whether a given name is allowed for a to-be-created table or query in the + database. + + <p>This method basically does the same checks as isNameUsed() and + isNameValid(). In case the given name is not allowed, it throws an + exception. This error can be presented to the user, to give it a common experience + in all cases where he's required to enter an object name.</p> + + @see isNameUsed + @see isNameValid + @see com::sun::star::sdb::ErrorMessageDialog + @see com::sun::star::sdb::InteractionHandler + */ + void checkNameForCreate( [in] long CommandType, [in] string Name ) + raises ( com::sun::star::sdbc::SQLException ); +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XTableAlteration.idl b/offapi/com/sun/star/sdb/tools/XTableAlteration.idl new file mode 100644 index 000000000..76ea4d5cf --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XTableAlteration.idl @@ -0,0 +1,94 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XTableAlteration_idl__ +#define __com_sun_star_sdb_tools_XTableAlteration_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to alter a table. + + @see com::sun::star::sdb::DataSource::Settings + @see com::sun::star::sdbcx::ColumnDescriptor + @see com::sun::star::sdbcx::XAlterTable + @see com::sun::star::sdbcx::XAppend + @see com::sun::star::sdbcx::XDrop + + @since OOo 3.3 +*/ +interface XTableAlteration +{ + interface XConnectionSupplier; + + /** alter the column defined by name + + @param table + the table to be altered + + @param columnName + the name of the column to be changed + + @param columnDescriptor + the column descriptor with the information of the new column definition + + @throws com::sun::star::sdbc::SQLException + @see com::sun::star::sdbcx::XAlterTable + */ + void alterColumnByName( [in] com::sun::star::beans::XPropertySet table, [in] string columnName, [in] com::sun::star::beans::XPropertySet columnDescriptor) + raises ( com::sun::star::sdbc::SQLException ); + + /** creates a new object using the given descriptor and appends it + to the related container. + <b> + Note: + </b> + The descriptor will not be changed and can be used again to append another object. + @param table + the table to be altered + @param descriptor + the descriptor which should be serve to append a new object + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + @see com::sun::star::sdbcx::XAppend + */ + void addColumn([in] com::sun::star::beans::XPropertySet table,[in]com::sun::star::beans::XPropertySet descriptor) + raises (com::sun::star::sdbc::SQLException); + + /** drops an object of the related container identified by its name. + @param table + the table to be altered + @param columnName + the name of the column to be dropped + @throws com::sun::star::sdbc::SQLException + if a database access error occurs. + @see com::sun::star::sdbcx::XDrop + */ + void dropColumn([in] com::sun::star::beans::XPropertySet table,[in]string columnName) + raises ( com::sun::star::sdbc::SQLException); +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XTableName.idl b/offapi/com/sun/star/sdb/tools/XTableName.idl new file mode 100644 index 000000000..4a196c429 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XTableName.idl @@ -0,0 +1,134 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XTableName_idl__ +#define __com_sun_star_sdb_tools_XTableName_idl__ + +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/container/NoSuchElementException.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to manipulate table names. + + <p>When, in a database application, dealing with table names, there's many degrees + of freedom to deal with. For instance, suppose you want to have the full name of a + table object, as it should be used in a <code>SELECT</code> statement's <code>FROM</code> + part. This requires you to evaluate whether or not the table has a catalog and/or schema + name, to combine the catalog, the schema, and the basic table name into one name, respecting + the database's quoting character, and the order in which all those parts should be combined. + Additionally, you have to respect the client-side settings which tell OpenOffice.org + to use or not use catalogs and schemas in <code>SELECT</code> at all.</p> + + <p>The XTableName interface eases this and other, similar tasks around table + names.</p> + + <p>The component itself does not have life-time control mechanisms, i.e. you + cannot explicitly dispose it (com::sun::star::lang::XComponent::dispose()), + and you cannot be notified when it dies.<br/> + However, if your try to access any of its methods or attributes, after the + connection which was used to create it was closed, a com::sun::star::lang::DisposedException + will be thrown.</p> + + @see XConnectionTools + @see com::sun::star::sdbc::XDatabaseMetaData + @see com::sun::star::sdb::DataSource::Settings + + @since OOo 2.0.4 +*/ +interface XTableName +{ + /** denotes the name of the catalog which the table is a part of + */ + [attribute] string CatalogName; + + /** denotes the name of the schema which the table is a part of + */ + [attribute] string SchemaName; + + /** denotes the mere, unqualified table name, excluding any catalog and + schema. + */ + [attribute] string TableName; + + /** returns the composed table name, including the catalog and schema name, + respecting the database's quoting requirements, plus + + @param Type + the type of name composition to be used. + + @param Quote + specifies whether the single parts of the table name should be quoted + + @see CompositionType + + @throws com::sun::star::IllegalArgumentException + if the given Type does not denote a valid CompositionType + */ + string getComposedName( [in] long Type, [in] boolean Quote ) + raises ( com::sun::star::lang::IllegalArgumentException ); + + + /** sets a new composed table name + @param ComposedName + specifies the composed table name + @param Type + specifies the composition type which was used to create the composed table name + */ + void setComposedName( [in] string ComposedName, [in] long Type ); + + /** represents the table name in a form to be used in a <code>SELECT</code> statement. + + <p>On a per-data-source basis, OpenOffice.org allows to override database meta + data information in that you can specify to not use catalog and or schema names + in <code>SELECT</code> statements. Using this attribute, you can generate a table + name which respects those settings.</p> + + @see com::sun::star::sdb::DataSource::Settings + */ + [attribute, readonly] string NameForSelect; + + /** is the com::sun::star::sdb::Table object specified + by the current name. + + <p>Retrieving this attribute is equivalent to obtaining the tables + container from the connection (via com::sun::star::sdbcx::XTablesSupplier), + and calling its com::sun::star::container::XNameAccess::getByName() + method with the ComposedName.</p> + + @throws com::sun::star::container::NoSuchElementException + if, upon getting the attribute value, the current composed table name + represented by this instance does not denote an existing table in the database. + @throws com::sun::star::lang::IllegalArgumentException + if you try to set an object which does not denote a table from the underlying + database. + */ + [attribute] ::com::sun::star::beans::XPropertySet Table + { + get raises ( com::sun::star::container::NoSuchElementException ); + set raises ( com::sun::star::lang::IllegalArgumentException ); + }; +}; + +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XTableRename.idl b/offapi/com/sun/star/sdb/tools/XTableRename.idl new file mode 100644 index 000000000..d6e955581 --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XTableRename.idl @@ -0,0 +1,57 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XTableRename_idl__ +#define __com_sun_star_sdb_tools_XTableRename_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to rename table. + + @see com::sun::star::sdb::DataSource::Settings + + @since OOo 3.3 +*/ +interface XTableRename +{ + interface XConnectionSupplier; + + /** rename the given table to the new name + + @param table + the table to be renamed + @param newName + the new name of the table + @throws com::sun::star::sdbc::SQLException + */ + void rename( [in] com::sun::star::beans::XPropertySet table, [in] string newName) + raises ( com::sun::star::sdbc::SQLException ); + + +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/sdb/tools/XViewAccess.idl b/offapi/com/sun/star/sdb/tools/XViewAccess.idl new file mode 100644 index 000000000..5a7b4fb9a --- /dev/null +++ b/offapi/com/sun/star/sdb/tools/XViewAccess.idl @@ -0,0 +1,67 @@ +/* -*- 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 . + */ + +#ifndef __com_sun_star_sdb_tools_XViewAccess_idl__ +#define __com_sun_star_sdb_tools_XViewAccess_idl__ + +#include <com/sun/star/sdbc/SQLException.idl> +#include <com/sun/star/sdb/tools/XConnectionSupplier.idl> +#include <com/sun/star/lang/XInitialization.idl> +#include <com/sun/star/beans/XPropertySet.idl> + +module com { module sun { module star { module sdb { module tools { + +/** allows to fetch and to change the sql statements of views + + @see com::sun::star::sdb::DataSource::Settings + @see com::sun::star::sdbcx::View + + @since OOo 3.3 +*/ +interface XViewAccess +{ + interface XConnectionSupplier; + + /** returns the SQL statement of the view + + @param view + the table to be renamed + @throws com::sun::star::sdbc::SQLException + */ + string getCommand( [in] com::sun::star::beans::XPropertySet view) + raises ( com::sun::star::sdbc::SQLException ); + + /** allows to alter the SQL statement of a view + + @param view + the view to be altered + + @param command + the new SQL statement + + @throws com::sun::star::sdbc::SQLException + */ + void alterCommand( [in] com::sun::star::beans::XPropertySet view, [in] string command) + raises ( com::sun::star::sdbc::SQLException ); +}; +}; }; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |