1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_util_XLocalizedAliases_idl__
28#define __com_sun_star_util_XLocalizedAliases_idl__
29
30#ifndef __com_sun_star_lang_Locale_idl__
31#include <com/sun/star/lang/Locale.idl>
32#endif
33
34#ifndef __com_sun_star_container_NoSuchElementException_idl__
35#include <com/sun/star/container/NoSuchElementException.idl>
36#endif
37
38#ifndef __com_sun_star_container_ElementExistException_idl__
39#include <com/sun/star/container/ElementExistException.idl>
40#endif
41
42#ifndef __com_sun_star_util_AliasProgrammaticPair_idl__
43#include <com/sun/star/util/AliasProgrammaticPair.idl>
44#endif
45
46//=============================================================================
47module com {  module sun {  module star {  module util {
48
49//=============================================================================
50
51/** is the interface for binding programmatic names to aliases. Aliases
52	can be provided in several locales for the same programmatic name.
53 */
54published interface XLocalizedAliases: com::sun::star::uno::XInterface
55{
56
57	/** registers an alias for a programmatic name.
58	 */
59	void bindAlias([in]string programmaticName,
60				   [in]com::sun::star::lang::Locale locale,
61	 			   [in]string alias)
62		raises (com::sun::star::container::ElementExistException);
63	//-------------------------------------------------------------------------
64	/** revokes an alias for a programmatic name.
65	 */
66	void unbindAlias([in]com::sun::star::lang::Locale locale,
67					 [in]string alias)
68		raises (com::sun::star::container::NoSuchElementException);
69	//-------------------------------------------------------------------------
70	/** retrieves a registered porgrammatic name identified by an alias.
71	 */
72	string lookupAlias([in]com::sun::star::lang::Locale locale,
73				  	   [in]string Alias)
74		raises (com::sun::star::container::NoSuchElementException);
75	//-------------------------------------------------------------------------
76	/** retrieves a given alias for a programmatic name.
77	 */
78	string lookupProgrammatic([in]com::sun::star::lang::Locale locale,
79				  			  [in]string programmatic)
80		raises (com::sun::star::container::NoSuchElementException);
81	//-------------------------------------------------------------------------
82	/** removes all aliases for a programmatic name.
83	 */
84	void unbindAliases([in]string programmaticName)
85		raises (com::sun::star::container::NoSuchElementException);
86	//-------------------------------------------------------------------------
87	/** rebinds all aliases registered to a given URL to a new one.
88	 */
89	void rebindAliases([in]string currentProgrammatic,
90		 			   [in]string newProgrammatic)
91		raises (com::sun::star::container::NoSuchElementException,
92				com::sun::star::container::ElementExistException);
93	//-------------------------------------------------------------------------
94	/** renames an alias for a programmatic name.
95	 */
96	void renameAlias([in]com::sun::star::lang::Locale locale,
97					 [in]string oldName,
98					 [in]string aNewName)
99		raises (com::sun::star::container::NoSuchElementException,
100				com::sun::star::container::ElementExistException);
101	//-------------------------------------------------------------------------
102	/** retrieves a list of all registered aliases for a certain language.
103
104		 @param locale
105			specifies the locale scope.
106
107		 @returns
108			a sequence of registered pair of alias and programmatic name.
109	 */
110	sequence<AliasProgrammaticPair> listAliases([in]com::sun::star::lang::Locale locale);
111};
112
113//=============================================================================
114
115}; }; }; };
116
117#endif
118