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: propsetaccessimpl.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_PROPERTYSETIMPL_HXX_
32 #define CONFIGMGR_API_PROPERTYSETIMPL_HXX_
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/beans/XHierarchicalPropertySet.hpp>
36 #include <com/sun/star/beans/XMultiPropertySet.hpp>
37 #include <com/sun/star/beans/XMultiHierarchicalPropertySet.hpp>
39 #ifndef CONFIGMGR_NO_PROPERTYSTATE
40 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
41 #include <com/sun/star/beans/XPropertyState.hpp>
47 namespace css
= ::com::sun::star
;
48 namespace uno
= ::com::sun::star::uno
;
49 namespace lang
= ::com::sun::star::lang
;
50 namespace beans
= ::com::sun::star::beans
;
52 /* implementations of the interfaces supported by a (parent) node
53 within the configuration tree.
59 class NodeGroupInfoAccess
;
60 class NodeGroupAccess
;
62 // getting Property Metadata
63 // XPropertySet & XMultiPropertySet
64 uno::Reference
< beans::XPropertySetInfo
> implGetPropertySetInfo( NodeGroupInfoAccess
& rNode
, sal_Bool _bWriteable
)
65 throw(uno::RuntimeException
);
67 // XHierarchicalPropertySet & XHierarchicalMultiPropertySet
68 uno::Reference
< beans::XHierarchicalPropertySetInfo
> implGetHierarchicalPropertySetInfo( NodeGroupInfoAccess
& rNode
)
69 throw(uno::RuntimeException
);
71 // setting values - may all throw (PropertyVeto)Exceptions on read-only property sets
73 void implSetPropertyValue( NodeGroupAccess
& rNode
, const rtl::OUString
& aPropertyName
, const uno::Any
& aValue
)
74 throw(beans::UnknownPropertyException
, beans::PropertyVetoException
, lang::IllegalArgumentException
,
75 lang::WrappedTargetException
, uno::RuntimeException
);
78 void implSetPropertyValues( NodeGroupAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& PropertyNames
, const uno::Sequence
< uno::Any
>& Values
)
79 throw(beans::PropertyVetoException
, lang::IllegalArgumentException
,
80 lang::WrappedTargetException
, uno::RuntimeException
);
82 // XHierarchicalPropertySet
83 void implSetHierarchicalPropertyValue( NodeGroupAccess
& rNode
, const rtl::OUString
& aPropertyName
, const uno::Any
& aValue
)
84 throw(beans::UnknownPropertyException
, beans::PropertyVetoException
, lang::IllegalArgumentException
,
85 lang::WrappedTargetException
, uno::RuntimeException
);
87 // XMultiHierarchicalPropertySet
88 void implSetHierarchicalPropertyValues( NodeGroupAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& PropertyNames
, const uno::Sequence
< uno::Any
>& Values
)
89 throw(beans::PropertyVetoException
, lang::IllegalArgumentException
,
90 lang::WrappedTargetException
, uno::RuntimeException
);
94 uno::Any
implGetPropertyValue( NodeGroupInfoAccess
& rNode
,const rtl::OUString
& PropertyName
)
95 throw(beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
);
98 uno::Sequence
< uno::Any
> implGetPropertyValues( NodeGroupInfoAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyNames
)
99 throw(uno::RuntimeException
);
101 // XHierarchicalPropertySet
102 uno::Any
implGetHierarchicalPropertyValue( NodeGroupInfoAccess
& rNode
, const rtl::OUString
& PropertyName
)
103 throw(beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
);
105 // XMultiHierarchicalPropertySet
106 uno::Sequence
< uno::Any
> implGetHierarchicalPropertyValues( NodeGroupInfoAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyNames
)
107 throw(uno::RuntimeException
);
109 // SPECIAL: firePropertiesChangeEvent
111 void implFirePropertiesChangeEvent( NodeGroupInfoAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyNames
, const uno::Reference
< beans::XPropertiesChangeListener
>& xListener
)
112 throw(uno::RuntimeException
);
115 beans::PropertyState
implGetPropertyState( NodeAccess
& rNode
, const rtl::OUString
& sPropertyName
)
116 throw(beans::UnknownPropertyException
, uno::RuntimeException
);
118 void implSetPropertyToDefault( NodeGroupAccess
& rNode
, const rtl::OUString
& sPropertyName
)
119 throw(beans::UnknownPropertyException
, uno::RuntimeException
);
121 uno::Any
implGetPropertyDefault( NodeGroupInfoAccess
& rNode
, const rtl::OUString
& sPropertyName
)
122 throw(beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
);
124 // XMultiPropertyState
125 uno::Sequence
< beans::PropertyState
> implGetPropertyStates( NodeAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyName
)
126 throw(beans::UnknownPropertyException
, uno::RuntimeException
);
128 void implSetPropertiesToDefault( NodeGroupAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyNames
)
129 throw(beans::UnknownPropertyException
, uno::RuntimeException
);
131 void implSetAllPropertiesToDefault( NodeGroupAccess
& rNode
)
132 throw(uno::RuntimeException
);
134 uno::Sequence
< uno::Any
> implGetPropertyDefaults( NodeGroupInfoAccess
& rNode
, const uno::Sequence
< rtl::OUString
>& aPropertyNames
)
135 throw(beans::UnknownPropertyException
, lang::WrappedTargetException
, uno::RuntimeException
);
139 #endif // CONFIGMGR_API_PROPERTYSETIMPL_HXX_