merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / api2 / groupaccess.hxx
blob7a6903c0c775383ea4302f6dce059294a37ba7af
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: groupaccess.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CONFIGMGR_API_GROUPACCESS_HXX_
32 #define CONFIGMGR_API_GROUPACCESS_HXX_
34 #include <com/sun/star/container/XHierarchicalName.hpp>
35 #include <com/sun/star/container/XNameAccess.hpp>
36 #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
37 #include <com/sun/star/container/XContainer.hpp>
38 #include <com/sun/star/beans/XExactName.hpp>
39 #include <com/sun/star/beans/XProperty.hpp>
40 #include <cppuhelper/implbase6.hxx>
42 namespace configmgr
44 namespace css = ::com::sun::star;
45 namespace uno = ::com::sun::star::uno;
47 namespace configapi { class NodeGroupInfoAccess; }
49 /** implements the (read-only) interfaces supported by a group node
50 within the configuration tree.
51 <p> Is an interface adapter around <type scope='configmgr::configapi'>NodeAccess</type>.</p>
53 class BasicGroupAccess
54 : public ::cppu::ImplHelper6
55 < css::container::XNameAccess
56 , css::container::XHierarchicalName
57 , css::container::XHierarchicalNameAccess
58 , css::container::XContainer
59 , css::beans::XExactName
60 , css::beans::XProperty
63 protected:
64 // Destructors
65 virtual ~BasicGroupAccess() {}
67 public:
68 // Interface methods
70 // XHierarchicalName
71 virtual rtl::OUString SAL_CALL
72 getHierarchicalName( )
73 throw(uno::RuntimeException);
75 virtual rtl::OUString SAL_CALL
76 composeHierarchicalName( const rtl::OUString& aRelativeName )
77 throw(css::lang::IllegalArgumentException, css::lang::NoSupportException,
78 uno::RuntimeException);
80 // XElementAccess, base class of XNameAccess
81 virtual uno::Type SAL_CALL
82 getElementType( )
83 throw(uno::RuntimeException);
85 virtual sal_Bool SAL_CALL
86 hasElements( )
87 throw(uno::RuntimeException);
89 // XNameAccess
90 virtual uno::Any SAL_CALL
91 getByName( const rtl::OUString& aName )
92 throw(css::container::NoSuchElementException, css::lang::WrappedTargetException,
93 uno::RuntimeException);
95 virtual uno::Sequence< rtl::OUString > SAL_CALL
96 getElementNames( )
97 throw( uno::RuntimeException);
99 virtual sal_Bool SAL_CALL
100 hasByName( const rtl::OUString& aName )
101 throw(uno::RuntimeException);
103 // XHierarchicalNameAccess
104 virtual uno::Any SAL_CALL
105 getByHierarchicalName( const rtl::OUString& aName )
106 throw(css::container::NoSuchElementException, uno::RuntimeException);
108 virtual sal_Bool SAL_CALL
109 hasByHierarchicalName( const rtl::OUString& aName )
110 throw(uno::RuntimeException);
112 // XContainer
113 virtual void SAL_CALL
114 addContainerListener( const uno::Reference< css::container::XContainerListener >& xListener )
115 throw(uno::RuntimeException);
117 virtual void SAL_CALL
118 removeContainerListener( const uno::Reference< css::container::XContainerListener >& xListener )
119 throw(uno::RuntimeException);
121 // XExactName
122 virtual ::rtl::OUString SAL_CALL
123 getExactName( const rtl::OUString& aApproximateName )
124 throw(uno::RuntimeException);
126 // XProperty
127 virtual css::beans::Property SAL_CALL
128 getAsProperty( )
129 throw(uno::RuntimeException);
131 protected:
132 virtual configapi::NodeGroupInfoAccess& getNode() = 0;
136 #endif // CONFIGMGR_API_GROUPACCESS_HXX_