2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 public class XLayerHandlerImpl
21 implements com
.sun
.star
.configuration
.backend
.XLayerHandler
{
22 private String calls
= "";
23 private final String ls
= System
.getProperty("line.separator");
25 public void addOrReplaceNode(String str
, short param
)
26 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
27 com
.sun
.star
.lang
.WrappedTargetException
{
28 calls
+= ("addOrReplace(" + str
+ "," + param
+ ");" + ls
);
31 public void addOrReplaceNodeFromTemplate(String str
,
32 com
.sun
.star
.configuration
.backend
.TemplateIdentifier templateIdentifier
,
34 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
35 com
.sun
.star
.lang
.WrappedTargetException
{
36 calls
+= ("addOrReplaceNodeFromTemplate(" + str
+ "," + templateIdentifier
+ ");" + ls
);
39 public void addProperty(String str
, short param
,
40 com
.sun
.star
.uno
.Type type
)
41 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
42 com
.sun
.star
.lang
.WrappedTargetException
{
43 calls
+= ("addProperty(" + str
+ "," + param
+ "," + type
+ ");" + ls
);
46 public void addPropertyWithValue(String str
, short param
, Object obj
)
47 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
48 com
.sun
.star
.lang
.WrappedTargetException
{
49 calls
+= ("addPropertyWithValue(" + str
+ "," + param
+ "," + obj
+ ");" + ls
);
52 public void dropNode(String str
)
53 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
54 com
.sun
.star
.lang
.WrappedTargetException
{
55 calls
+= ("dropNode(" + str
+ ");" + ls
);
58 public void endLayer()
59 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
60 com
.sun
.star
.lang
.WrappedTargetException
{
61 calls
+= ("endLayer();" + ls
);
65 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
66 com
.sun
.star
.lang
.WrappedTargetException
{
67 calls
+= ("endNode();" + ls
);
70 public void endProperty()
71 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
72 com
.sun
.star
.lang
.WrappedTargetException
{
73 calls
+= ("endProperty();" + ls
);
76 public void overrideNode(String str
, short param
, boolean param2
)
77 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
78 com
.sun
.star
.lang
.WrappedTargetException
{
79 calls
+= ("overrideNode(" + str
+ "," + param
+ "," + param2
+ ");" + ls
);
82 public void overrideProperty(String str
, short param
,
83 com
.sun
.star
.uno
.Type type
, boolean param3
)
84 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
85 com
.sun
.star
.lang
.WrappedTargetException
{
86 calls
+= ("overrideProperty(" + str
+ "," + param
+ "," + type
+ "," + param3
+ ");" + ls
);
89 public void setPropertyValue(Object obj
)
90 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
91 com
.sun
.star
.lang
.WrappedTargetException
{
92 calls
+= ("setPropertyValue(" + obj
+ ");" + ls
);
95 public void setPropertyValueForLocale(Object obj
, String str
)
96 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
97 com
.sun
.star
.lang
.WrappedTargetException
{
98 calls
+= ("setPropertyValueForLocale(" + obj
+ "," + str
+ ");" + ls
);
101 public void startLayer()
102 throws com
.sun
.star
.configuration
.backend
.MalformedDataException
,
103 com
.sun
.star
.lang
.WrappedTargetException
{
104 calls
= "startLayer();" + ls
;
107 public String
getCalls() {