1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 package util;
28 
29 public class XLayerHandlerImpl
30     implements com.sun.star.configuration.backend.XLayerHandler {
31     protected String calls = "";
32     protected String ls = System.getProperty("line.separator");
33 
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);
38     }
39 
40     public void addOrReplaceNodeFromTemplate(String str,
41                                              com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
42                                              short param)
43         throws com.sun.star.configuration.backend.MalformedDataException,
44                com.sun.star.lang.WrappedTargetException {
45         calls += ("addOrReplaceNodeFromTemplate(" + str + "," + templateIdentifier + ");" + ls);
46     }
47 
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);
53     }
54 
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);
59     }
60 
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);
65     }
66 
67     public void endLayer()
68         throws com.sun.star.configuration.backend.MalformedDataException,
69                com.sun.star.lang.WrappedTargetException {
70         calls += ("endLayer();" + ls);
71     }
72 
73     public void endNode()
74         throws com.sun.star.configuration.backend.MalformedDataException,
75                com.sun.star.lang.WrappedTargetException {
76         calls += ("endNode();" + ls);
77     }
78 
79     public void endProperty()
80         throws com.sun.star.configuration.backend.MalformedDataException,
81                com.sun.star.lang.WrappedTargetException {
82         calls += ("endProperty();" + ls);
83     }
84 
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);
89     }
90 
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);
96     }
97 
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);
102     }
103 
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);
108     }
109 
110     public void startLayer()
111         throws com.sun.star.configuration.backend.MalformedDataException,
112                com.sun.star.lang.WrappedTargetException {
113         calls = "startLayer();" + ls;
114     }
115 
116     public String getCalls() {
117         return calls;
118     }
119 }