2002-05-27 04:35:01 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* $RCSfile: layerupdatehandler.hxx,v $
|
|
|
|
* $Revision: 1.8 $
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
2008-04-11 06:28:49 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2002-05-27 04:35:01 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CONFIGMGR_BACKEND_LAYERUPDATEHANDLER_HXX
|
|
|
|
#define CONFIGMGR_BACKEND_LAYERUPDATEHANDLER_HXX
|
|
|
|
|
|
|
|
#include "updatesvc.hxx"
|
|
|
|
#include "layerupdatebuilder.hxx"
|
|
|
|
#include "utility.hxx"
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
namespace configmgr
|
|
|
|
{
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
namespace backend
|
|
|
|
{
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
using rtl::OUString;
|
|
|
|
namespace uno = ::com::sun::star::uno;
|
|
|
|
namespace lang = ::com::sun::star::lang;
|
2003-04-17 07:17:13 -05:00
|
|
|
namespace backenduno = ::com::sun::star::configuration::backend;
|
2002-05-31 07:59:15 -05:00
|
|
|
|
|
|
|
using backenduno::TemplateIdentifier;
|
|
|
|
using backenduno::MalformedDataException;
|
2002-05-27 04:35:01 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
class LayerUpdateBuilder;
|
|
|
|
|
|
|
|
class LayerUpdateHandler : public UpdateService , Noncopyable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit
|
2003-03-19 09:20:19 -06:00
|
|
|
LayerUpdateHandler(CreationArg _xContext);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
~LayerUpdateHandler();
|
|
|
|
|
|
|
|
// XUpdateHandler
|
|
|
|
virtual void SAL_CALL
|
2003-04-17 07:17:13 -05:00
|
|
|
startUpdate( )
|
|
|
|
throw ( MalformedDataException, lang::IllegalAccessException,
|
|
|
|
lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
|
|
|
endUpdate( )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw ( MalformedDataException, lang::IllegalAccessException,
|
|
|
|
lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
modifyNode( const OUString& aName, sal_Int16 aAttributes, sal_Int16 aAttributeMask, sal_Bool bReset )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
addOrReplaceNode( const OUString& aName, sal_Int16 aAttributes )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2003-04-17 07:17:13 -05:00
|
|
|
addOrReplaceNodeFromTemplate( const OUString& aName, sal_Int16 aAttributes, const TemplateIdentifier& aTemplate )
|
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
endNode( )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
removeNode( const OUString& aName )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2003-04-17 07:17:13 -05:00
|
|
|
modifyProperty( const OUString& aName, sal_Int16 aAttributes, sal_Int16 aAttributeMask, const uno::Type& aType )
|
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
setPropertyValue( const uno::Any& aValue )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
setPropertyValueForLocale( const uno::Any& aValue, const OUString& aLocale )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-06-07 06:01:22 -05:00
|
|
|
resetPropertyValue( )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-06-07 06:01:22 -05:00
|
|
|
resetPropertyValueForLocale( const OUString& aLocale )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
endProperty( )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
2002-05-31 07:59:15 -05:00
|
|
|
resetProperty( const OUString& aName )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
|
|
|
addOrReplaceProperty( const OUString& aName, sal_Int16 aAttributes, const uno::Type& aType )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
|
|
|
addOrReplacePropertyWithValue( const OUString& aName, sal_Int16 aAttributes, const uno::Any& aValue )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
virtual void SAL_CALL
|
|
|
|
removeProperty( const OUString& aName )
|
2003-04-17 07:17:13 -05:00
|
|
|
throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
LayerUpdateBuilder & getUpdateBuilder();
|
|
|
|
|
2002-05-31 07:59:15 -05:00
|
|
|
void checkBuilder(bool _bForProperty = false);
|
2002-05-27 04:35:01 -05:00
|
|
|
|
|
|
|
void raiseMalformedDataException(sal_Char const * pMsg);
|
|
|
|
void raiseNodeChangedBeforeException(sal_Char const * pMsg);
|
|
|
|
void raisePropChangedBeforeException(sal_Char const * pMsg);
|
|
|
|
void raisePropExistsException(sal_Char const * pMsg);
|
|
|
|
|
|
|
|
private:
|
|
|
|
LayerUpdateBuilder m_aBuilder;
|
|
|
|
};
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
} // namespace xml
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
} // namespace configmgr
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|