1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com
{ module sun
{ module star
{ module sdb
{
23 published
interface XDatabaseRegistrationsListener
;
26 /** provides access to the application-wide registered databases.
28 <p>This interface provides a mere wrapper around the respective configuration data,
29 this way hiding the concrete configuration structure from its clients. You should,
30 if possible at all, use this interface, instead of modifying or querying the configuration
35 published
interface XDatabaseRegistrations
37 /** determines whether a database is registered under the given name.
39 @throws ::com::sun::star::lang::IllegalArgumentException
40 if the given name is empty
42 boolean hasRegisteredDatabase
( [in] string Name
)
43 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
46 /** returns the names of all registered databases
49 getRegistrationNames
();
51 /** returns the location of the database registered under the given name
53 @throws ::com::sun::star::lang::IllegalArgumentException
54 if the given name is empty
56 @throws ::com::sun::star::container::NoSuchElementException
57 if there is no database registered under this name
59 string getDatabaseLocation
( [in] string Name
)
60 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
61 , ::com
::sun
::star
::container
::NoSuchElementException
64 /** registers a database, given by location, under a given name
66 @throws ::com::sun::star::lang::IllegalArgumentException
67 if the given name is empty, or the given location is invalid.
69 @throws ::com::sun::star::container::ElementExistException
70 if there already is a databases registered under the given name.
72 void registerDatabaseLocation
( [in] string Name
, [in] string Location
)
73 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
74 , ::com
::sun
::star
::container
::ElementExistException
77 /** revokes the registration of a database, given by name
79 @throws ::com::sun::star::lang::IllegalArgumentException
80 if the given name is empty
82 @throws ::com::sun::star::container::NoSuchElementException
83 if there is no database registered under this name
85 @throws ::com::sun::star::lang::IllegalAccessException
86 if the registration data for this database is read-only
88 void revokeDatabaseLocation
( [in] string Name
)
89 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
90 , ::com
::sun
::star
::container
::NoSuchElementException
91 , ::com
::sun
::star
::lang
::IllegalAccessException
94 /** changes the location of a given database registration
96 @throws ::com::sun::star::lang::IllegalArgumentException
97 if the given name is empty, or the given location is invalid.
99 @throws ::com::sun::star::container::NoSuchElementException
100 if there is no database registered under this name
102 @throws ::com::sun::star::lang::IllegalAccessException
103 if the registration data for this database is read-only
105 void changeDatabaseLocation
( [in] string Name
, [in] string NewLocation
)
106 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
107 , ::com
::sun
::star
::container
::NoSuchElementException
108 , ::com
::sun
::star
::lang
::IllegalAccessException
111 /** determines whether the registration data for a database given by name is
114 <p>In this case, attempts to revoke this registration will fail.</p>
116 @throws ::com::sun::star::lang::IllegalArgumentException
117 if the given name is empty
119 @throws ::com::sun::star::container::NoSuchElementException
120 if there is no database registered under this name
122 boolean isDatabaseRegistrationReadOnly
( [in] string Name
)
123 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
124 , ::com
::sun
::star
::container
::NoSuchElementException
127 /** registers a listener which is notified of changes in the registered databases
129 void addDatabaseRegistrationsListener
( [in] XDatabaseRegistrationsListener Listener
);
131 /** revokes a previously registered listener
133 void removeDatabaseRegistrationsListener
( [in] XDatabaseRegistrationsListener Listener
);
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */