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: XLayerHandlerImpl.java,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 ************************************************************************/
32 public class XLayerHandlerImpl
33 implements com
.sun
.star
.configuration
.backend
.XLayerHandler
{
34 protected String calls
= "";
35 protected String ls
= System
.getProperty("line.separator");
37 public void addOrReplaceNode(String str
, short param
)
38 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
39 com
.sun
.star
.lang
.WrappedTargetException
{
40 calls
+= ("addOrReplace(" + str
+ "," + param
+ ");" + ls
);
43 public void addOrReplaceNodeFromTemplate(String str
,
44 com
.sun
.star
.configuration
.backend
.TemplateIdentifier templateIdentifier
,
46 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
47 com
.sun
.star
.lang
.WrappedTargetException
{
48 calls
+= ("addOrReplaceNodeFromTemplate(" + str
+ "," + templateIdentifier
+ ");" + ls
);
51 public void addProperty(String str
, short param
,
52 com
.sun
.star
.uno
.Type type
)
53 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
54 com
.sun
.star
.lang
.WrappedTargetException
{
55 calls
+= ("addProperty(" + str
+ "," + param
+ "," + type
+ ");" + ls
);
58 public void addPropertyWithValue(String str
, short param
, Object obj
)
59 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
60 com
.sun
.star
.lang
.WrappedTargetException
{
61 calls
+= ("addPropertyWithValue(" + str
+ "," + param
+ "," + obj
+ ");" + ls
);
64 public void dropNode(String str
)
65 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
66 com
.sun
.star
.lang
.WrappedTargetException
{
67 calls
+= ("dropNode(" + str
+ ");" + ls
);
70 public void endLayer()
71 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
72 com
.sun
.star
.lang
.WrappedTargetException
{
73 calls
+= ("endLayer();" + ls
);
77 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
78 com
.sun
.star
.lang
.WrappedTargetException
{
79 calls
+= ("endNode();" + ls
);
82 public void endProperty()
83 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
84 com
.sun
.star
.lang
.WrappedTargetException
{
85 calls
+= ("endProperty();" + ls
);
88 public void overrideNode(String str
, short param
, boolean param2
)
89 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
90 com
.sun
.star
.lang
.WrappedTargetException
{
91 calls
+= ("overrideNode(" + str
+ "," + param
+ "," + param2
+ ");" + ls
);
94 public void overrideProperty(String str
, short param
,
95 com
.sun
.star
.uno
.Type type
, boolean param3
)
96 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
97 com
.sun
.star
.lang
.WrappedTargetException
{
98 calls
+= ("overrideProperty(" + str
+ "," + param
+ "," + type
+ "," + param3
+ ");" + ls
);
101 public void setPropertyValue(Object obj
)
102 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
103 com
.sun
.star
.lang
.WrappedTargetException
{
104 calls
+= ("setPropertyValue(" + obj
+ ");" + ls
);
107 public void setPropertyValueForLocale(Object obj
, String str
)
108 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
109 com
.sun
.star
.lang
.WrappedTargetException
{
110 calls
+= ("setPropertyValueForLocale(" + obj
+ "," + str
+ ");" + ls
);
113 public void startLayer()
114 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
115 com
.sun
.star
.lang
.WrappedTargetException
{
116 calls
= "startLayer();" + ls
;
119 public String
getCalls() {