1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: groupaccess.hxx,v $
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>
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
65 virtual ~BasicGroupAccess() {}
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
83 throw(uno::RuntimeException
);
85 virtual sal_Bool SAL_CALL
87 throw(uno::RuntimeException
);
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
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
);
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
);
122 virtual ::rtl::OUString SAL_CALL
123 getExactName( const rtl::OUString
& aApproximateName
)
124 throw(uno::RuntimeException
);
127 virtual css::beans::Property SAL_CALL
129 throw(uno::RuntimeException
);
132 virtual configapi::NodeGroupInfoAccess
& getNode() = 0;
136 #endif // CONFIGMGR_API_GROUPACCESS_HXX_