1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
29 public class XLayerHandlerImpl
30 implements com
.sun
.star
.configuration
.backend
.XLayerHandler
{
31 protected String calls
= "";
32 protected String ls
= System
.getProperty("line.separator");
34 public void addOrReplaceNode(String str
, short param
)
35 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
36 com
.sun
.star
.lang
.WrappedTargetException
{
37 calls
+= ("addOrReplace(" + str
+ "," + param
+ ");" + ls
);
40 public void addOrReplaceNodeFromTemplate(String str
,
41 com
.sun
.star
.configuration
.backend
.TemplateIdentifier templateIdentifier
,
43 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
44 com
.sun
.star
.lang
.WrappedTargetException
{
45 calls
+= ("addOrReplaceNodeFromTemplate(" + str
+ "," + templateIdentifier
+ ");" + ls
);
48 public void addProperty(String str
, short param
,
49 com
.sun
.star
.uno
.Type type
)
50 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
51 com
.sun
.star
.lang
.WrappedTargetException
{
52 calls
+= ("addProperty(" + str
+ "," + param
+ "," + type
+ ");" + ls
);
55 public void addPropertyWithValue(String str
, short param
, Object obj
)
56 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
57 com
.sun
.star
.lang
.WrappedTargetException
{
58 calls
+= ("addPropertyWithValue(" + str
+ "," + param
+ "," + obj
+ ");" + ls
);
61 public void dropNode(String str
)
62 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
63 com
.sun
.star
.lang
.WrappedTargetException
{
64 calls
+= ("dropNode(" + str
+ ");" + ls
);
67 public void endLayer()
68 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
69 com
.sun
.star
.lang
.WrappedTargetException
{
70 calls
+= ("endLayer();" + ls
);
74 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
75 com
.sun
.star
.lang
.WrappedTargetException
{
76 calls
+= ("endNode();" + ls
);
79 public void endProperty()
80 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
81 com
.sun
.star
.lang
.WrappedTargetException
{
82 calls
+= ("endProperty();" + ls
);
85 public void overrideNode(String str
, short param
, boolean param2
)
86 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
87 com
.sun
.star
.lang
.WrappedTargetException
{
88 calls
+= ("overrideNode(" + str
+ "," + param
+ "," + param2
+ ");" + ls
);
91 public void overrideProperty(String str
, short param
,
92 com
.sun
.star
.uno
.Type type
, boolean param3
)
93 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
94 com
.sun
.star
.lang
.WrappedTargetException
{
95 calls
+= ("overrideProperty(" + str
+ "," + param
+ "," + type
+ "," + param3
+ ");" + ls
);
98 public void setPropertyValue(Object obj
)
99 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
100 com
.sun
.star
.lang
.WrappedTargetException
{
101 calls
+= ("setPropertyValue(" + obj
+ ");" + ls
);
104 public void setPropertyValueForLocale(Object obj
, String str
)
105 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
106 com
.sun
.star
.lang
.WrappedTargetException
{
107 calls
+= ("setPropertyValueForLocale(" + obj
+ "," + str
+ ");" + ls
);
110 public void startLayer()
111 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
112 com
.sun
.star
.lang
.WrappedTargetException
{
113 calls
= "startLayer();" + ls
;
116 public String
getCalls() {