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: localsinglestratum.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_LOCALBE_LOCALSINGLESTRATUM_HXX_
32 #define CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_
34 #include "localstratumbase.hxx"
35 #include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
36 #include <cppuhelper/implbase1.hxx>
43 namespace css
= com::sun::star
;
44 namespace uno
= css::uno
;
45 namespace lang
= css::lang
;
46 namespace backend
= css::configuration::backend
;
49 Implements the SingleLayerStratum service for local file access.
51 class LocalSingleStratumBase
: public cppu::ImplInheritanceHelper1
< LocalStratumBase
, backend::XSingleLayerStratum
>
55 Service constructor from a service factory.
57 @param xContext component context
59 LocalSingleStratumBase(const uno::Reference
<uno::XComponentContext
>& xContext
) ;
62 ~LocalSingleStratumBase() ;
65 // XSingleLayerStratum
66 virtual uno::Reference
<backend::XLayer
> SAL_CALL
67 getLayer( const rtl::OUString
& aLayerId
, const rtl::OUString
& aTimestamp
)
68 throw (backend::BackendAccessException
,
69 lang::IllegalArgumentException
,
70 uno::RuntimeException
) ;
72 virtual uno::Reference
<backend::XUpdatableLayer
> SAL_CALL
73 getUpdatableLayer( const rtl::OUString
& aLayerId
)
74 throw (backend::BackendAccessException
,
75 lang::IllegalArgumentException
,
76 lang::NoSupportException
,
77 uno::RuntimeException
) ;
81 class LocalSingleStratum
: public LocalSingleStratumBase
84 LocalSingleStratum(const uno::Reference
<uno::XComponentContext
>& xContext
)
85 : LocalSingleStratumBase(xContext
)
89 virtual void getLayerDirectories(rtl::OUString
& aLayerUrl
, rtl::OUString
& aSubLayerUrl
) const;
90 virtual const ServiceImplementationInfo
* getServiceInfoData() const;
93 class LocalDataStratum
: public LocalSingleStratumBase
96 LocalDataStratum(const uno::Reference
<uno::XComponentContext
>& xContext
)
97 : LocalSingleStratumBase(xContext
)
101 virtual void getLayerDirectories(rtl::OUString
& aLayerUrl
, rtl::OUString
& aSubLayerUrl
) const;
102 virtual const ServiceImplementationInfo
* getServiceInfoData() const;
105 class LocalReadonlyStratum
: public LocalSingleStratumBase
108 LocalReadonlyStratum(const uno::Reference
<uno::XComponentContext
>& xContext
)
109 : LocalSingleStratumBase(xContext
)
112 // XSingleLayerStratum - readonly implementation
113 virtual uno::Reference
<backend::XUpdatableLayer
> SAL_CALL
114 getUpdatableLayer( const rtl::OUString
& aLayerId
)
115 throw (backend::BackendAccessException
,
116 lang::IllegalArgumentException
,
117 lang::NoSupportException
,
118 uno::RuntimeException
) ;
121 virtual void getLayerDirectories(rtl::OUString
& aLayerUrl
, rtl::OUString
& aSubLayerUrl
) const;
122 virtual const ServiceImplementationInfo
* getServiceInfoData() const;
125 class LocalResourceStratum
: public LocalSingleStratumBase
128 LocalResourceStratum(const uno::Reference
<uno::XComponentContext
>& xContext
)
129 : LocalSingleStratumBase(xContext
)
132 // XSingleLayerStratum - readonly implementation
133 virtual uno::Reference
<backend::XUpdatableLayer
> SAL_CALL
134 getUpdatableLayer( const rtl::OUString
& aLayerId
)
135 throw (backend::BackendAccessException
,
136 lang::IllegalArgumentException
,
137 lang::NoSupportException
,
138 uno::RuntimeException
) ;
141 virtual void adjustBaseURL(rtl::OUString
& aBaseURL
);
142 virtual void getLayerDirectories(rtl::OUString
& aLayerUrl
, rtl::OUString
& aSubLayerUrl
) const;
143 virtual const ServiceImplementationInfo
* getServiceInfoData() const;
148 } } // configmgr.localbe