1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_util_XLocalizedAliases_idl__
24#define __com_sun_star_util_XLocalizedAliases_idl__
25
26#ifndef __com_sun_star_lang_Locale_idl__
27#include <com/sun/star/lang/Locale.idl>
28#endif
29
30#ifndef __com_sun_star_container_NoSuchElementException_idl__
31#include <com/sun/star/container/NoSuchElementException.idl>
32#endif
33
34#ifndef __com_sun_star_container_ElementExistException_idl__
35#include <com/sun/star/container/ElementExistException.idl>
36#endif
37
38#ifndef __com_sun_star_util_AliasProgrammaticPair_idl__
39#include <com/sun/star/util/AliasProgrammaticPair.idl>
40#endif
41
42//=============================================================================
43module com {  module sun {  module star {  module util {
44
45//=============================================================================
46
47/** is the interface for binding programmatic names to aliases. Aliases
48	can be provided in several locales for the same programmatic name.
49 */
50published interface XLocalizedAliases: com::sun::star::uno::XInterface
51{
52
53	/** registers an alias for a programmatic name.
54	 */
55	void bindAlias([in]string programmaticName,
56				   [in]com::sun::star::lang::Locale locale,
57	 			   [in]string alias)
58		raises (com::sun::star::container::ElementExistException);
59	//-------------------------------------------------------------------------
60	/** revokes an alias for a programmatic name.
61	 */
62	void unbindAlias([in]com::sun::star::lang::Locale locale,
63					 [in]string alias)
64		raises (com::sun::star::container::NoSuchElementException);
65	//-------------------------------------------------------------------------
66	/** retrieves a registered programmatic name identified by an alias.
67	 */
68	string lookupAlias([in]com::sun::star::lang::Locale locale,
69				  	   [in]string Alias)
70		raises (com::sun::star::container::NoSuchElementException);
71	//-------------------------------------------------------------------------
72	/** retrieves a given alias for a programmatic name.
73	 */
74	string lookupProgrammatic([in]com::sun::star::lang::Locale locale,
75				  			  [in]string programmatic)
76		raises (com::sun::star::container::NoSuchElementException);
77	//-------------------------------------------------------------------------
78	/** removes all aliases for a programmatic name.
79	 */
80	void unbindAliases([in]string programmaticName)
81		raises (com::sun::star::container::NoSuchElementException);
82	//-------------------------------------------------------------------------
83	/** rebinds all aliases registered to a given URL to a new one.
84	 */
85	void rebindAliases([in]string currentProgrammatic,
86		 			   [in]string newProgrammatic)
87		raises (com::sun::star::container::NoSuchElementException,
88				com::sun::star::container::ElementExistException);
89	//-------------------------------------------------------------------------
90	/** renames an alias for a programmatic name.
91	 */
92	void renameAlias([in]com::sun::star::lang::Locale locale,
93					 [in]string oldName,
94					 [in]string aNewName)
95		raises (com::sun::star::container::NoSuchElementException,
96				com::sun::star::container::ElementExistException);
97	//-------------------------------------------------------------------------
98	/** retrieves a list of all registered aliases for a certain language.
99
100		 @param locale
101			specifies the locale scope.
102
103		 @returns
104			a sequence of registered pair of alias and programmatic name.
105	 */
106	sequence<AliasProgrammaticPair> listAliases([in]com::sun::star::lang::Locale locale);
107};
108
109//=============================================================================
110
111}; }; }; };
112
113#endif
114