1*ef39d40dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ef39d40dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ef39d40dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ef39d40dSAndrew Rist  * distributed with this work for additional information
6*ef39d40dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ef39d40dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ef39d40dSAndrew Rist  * "License"); you may not use this file except in compliance
9*ef39d40dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ef39d40dSAndrew Rist  *
11*ef39d40dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ef39d40dSAndrew Rist  *
13*ef39d40dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ef39d40dSAndrew Rist  * software distributed under the License is distributed on an
15*ef39d40dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ef39d40dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*ef39d40dSAndrew Rist  * specific language governing permissions and limitations
18*ef39d40dSAndrew Rist  * under the License.
19*ef39d40dSAndrew Rist  *
20*ef39d40dSAndrew Rist  *************************************************************/
21*ef39d40dSAndrew Rist 
22*ef39d40dSAndrew Rist 
23cdf0e10cSrcweir package util;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir public class XLayerHandlerImpl
26cdf0e10cSrcweir     implements com.sun.star.configuration.backend.XLayerHandler {
27cdf0e10cSrcweir     protected String calls = "";
28cdf0e10cSrcweir     protected String ls = System.getProperty("line.separator");
29cdf0e10cSrcweir 
addOrReplaceNode(String str, short param)30cdf0e10cSrcweir     public void addOrReplaceNode(String str, short param)
31cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
32cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
33cdf0e10cSrcweir         calls += ("addOrReplace(" + str + "," + param + ");" + ls);
34cdf0e10cSrcweir     }
35cdf0e10cSrcweir 
addOrReplaceNodeFromTemplate(String str, com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier, short param)36cdf0e10cSrcweir     public void addOrReplaceNodeFromTemplate(String str,
37cdf0e10cSrcweir                                              com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
38cdf0e10cSrcweir                                              short param)
39cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
40cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
41cdf0e10cSrcweir         calls += ("addOrReplaceNodeFromTemplate(" + str + "," + templateIdentifier + ");" + ls);
42cdf0e10cSrcweir     }
43cdf0e10cSrcweir 
addProperty(String str, short param, com.sun.star.uno.Type type)44cdf0e10cSrcweir     public void addProperty(String str, short param,
45cdf0e10cSrcweir                             com.sun.star.uno.Type type)
46cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
47cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
48cdf0e10cSrcweir         calls += ("addProperty(" + str + "," + param + "," + type + ");" + ls);
49cdf0e10cSrcweir     }
50cdf0e10cSrcweir 
addPropertyWithValue(String str, short param, Object obj)51cdf0e10cSrcweir     public void addPropertyWithValue(String str, short param, Object obj)
52cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
53cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
54cdf0e10cSrcweir         calls += ("addPropertyWithValue(" + str + "," + param + "," + obj + ");" + ls);
55cdf0e10cSrcweir     }
56cdf0e10cSrcweir 
dropNode(String str)57cdf0e10cSrcweir     public void dropNode(String str)
58cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
59cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
60cdf0e10cSrcweir         calls += ("dropNode(" + str + ");" + ls);
61cdf0e10cSrcweir     }
62cdf0e10cSrcweir 
endLayer()63cdf0e10cSrcweir     public void endLayer()
64cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
65cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
66cdf0e10cSrcweir         calls += ("endLayer();" + ls);
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir 
endNode()69cdf0e10cSrcweir     public void endNode()
70cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
71cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
72cdf0e10cSrcweir         calls += ("endNode();" + ls);
73cdf0e10cSrcweir     }
74cdf0e10cSrcweir 
endProperty()75cdf0e10cSrcweir     public void endProperty()
76cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
77cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
78cdf0e10cSrcweir         calls += ("endProperty();" + ls);
79cdf0e10cSrcweir     }
80cdf0e10cSrcweir 
overrideNode(String str, short param, boolean param2)81cdf0e10cSrcweir     public void overrideNode(String str, short param, boolean param2)
82cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
83cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
84cdf0e10cSrcweir         calls += ("overrideNode(" + str + "," + param + "," + param2 + ");" + ls);
85cdf0e10cSrcweir     }
86cdf0e10cSrcweir 
overrideProperty(String str, short param, com.sun.star.uno.Type type, boolean param3)87cdf0e10cSrcweir     public void overrideProperty(String str, short param,
88cdf0e10cSrcweir                                  com.sun.star.uno.Type type, boolean param3)
89cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
90cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
91cdf0e10cSrcweir         calls += ("overrideProperty(" + str + "," + param + "," + type + "," + param3 + ");" + ls);
92cdf0e10cSrcweir     }
93cdf0e10cSrcweir 
setPropertyValue(Object obj)94cdf0e10cSrcweir     public void setPropertyValue(Object obj)
95cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
96cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
97cdf0e10cSrcweir         calls += ("setPropertyValue(" + obj + ");" + ls);
98cdf0e10cSrcweir     }
99cdf0e10cSrcweir 
setPropertyValueForLocale(Object obj, String str)100cdf0e10cSrcweir     public void setPropertyValueForLocale(Object obj, String str)
101cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
102cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
103cdf0e10cSrcweir         calls += ("setPropertyValueForLocale(" + obj + "," + str + ");" + ls);
104cdf0e10cSrcweir     }
105cdf0e10cSrcweir 
startLayer()106cdf0e10cSrcweir     public void startLayer()
107cdf0e10cSrcweir         throws com.sun.star.configuration.backend.MalformedDataException,
108cdf0e10cSrcweir                com.sun.star.lang.WrappedTargetException {
109cdf0e10cSrcweir         calls = "startLayer();" + ls;
110cdf0e10cSrcweir     }
111cdf0e10cSrcweir 
getCalls()112cdf0e10cSrcweir     public String getCalls() {
113cdf0e10cSrcweir         return calls;
114cdf0e10cSrcweir     }
115cdf0e10cSrcweir }