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 XSchemaHandlerImpl
30     implements com.sun.star.configuration.backend.XSchemaHandler {
31     protected String calls = "";
32     protected String ls = System.getProperty("line.separator");
33 
34     public void addInstance(String str,
35                             com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
36         throws com.sun.star.configuration.backend.MalformedDataException,
37                com.sun.star.lang.WrappedTargetException {
38         calls += ("addInstance();" + ls);
39     }
40 
41     public void addItemType(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
42         throws com.sun.star.configuration.backend.MalformedDataException,
43                com.sun.star.lang.WrappedTargetException {
44         calls += ("addItemType();" + ls);
45     }
46 
47     public void addProperty(String str, short param,
48                             com.sun.star.uno.Type type)
49         throws com.sun.star.configuration.backend.MalformedDataException,
50                com.sun.star.lang.WrappedTargetException {
51         calls += ("addProperty();" + ls);
52     }
53 
54     public void addPropertyWithDefault(String str, short param, Object obj)
55         throws com.sun.star.configuration.backend.MalformedDataException,
56                com.sun.star.lang.WrappedTargetException {
57         calls += ("addPropertyWithDefault();" + ls);
58     }
59 
60     public void endComponent()
61         throws com.sun.star.configuration.backend.MalformedDataException,
62                com.sun.star.lang.WrappedTargetException {
63         calls += ("endComponent();" + ls);
64     }
65 
66     public void endNode()
67         throws com.sun.star.configuration.backend.MalformedDataException,
68                com.sun.star.lang.WrappedTargetException {
69         calls += ("endNode();" + ls);
70     }
71 
72     public void endSchema()
73         throws com.sun.star.configuration.backend.MalformedDataException,
74                com.sun.star.lang.WrappedTargetException {
75         calls += ("endSchema();" + ls);
76     }
77 
78     public void endTemplate()
79         throws com.sun.star.configuration.backend.MalformedDataException,
80                com.sun.star.lang.WrappedTargetException {
81         calls += ("endTemplate();" + ls);
82     }
83 
84     public void importComponent(String str)
85         throws com.sun.star.configuration.backend.MalformedDataException,
86                com.sun.star.lang.WrappedTargetException {
87         calls += ("importComponent();" + ls);
88     }
89 
90     public void startComponent(String str)
91         throws com.sun.star.configuration.backend.MalformedDataException,
92                com.sun.star.lang.WrappedTargetException {
93         calls += ("startComponent();" + ls);
94     }
95 
96     public void startGroup(String str, short param)
97         throws com.sun.star.configuration.backend.MalformedDataException,
98                com.sun.star.lang.WrappedTargetException {
99         calls += ("startGroup();" + ls);
100     }
101 
102     public void startGroupTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
103                                    short param)
104         throws com.sun.star.configuration.backend.MalformedDataException,
105                com.sun.star.lang.WrappedTargetException {
106         calls += ("startGroupTemplate();" + ls);
107     }
108 
109     public void startSchema()
110         throws com.sun.star.configuration.backend.MalformedDataException,
111                com.sun.star.lang.WrappedTargetException {
112         calls += ("startSchema();" + ls);
113     }
114 
115     public void startSet(String str, short param,
116                          com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier)
117         throws com.sun.star.configuration.backend.MalformedDataException,
118                com.sun.star.lang.WrappedTargetException {
119         calls += ("startSet();" + ls);
120     }
121 
122     public void startSetTemplate(com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier,
123                                  short param,
124                                  com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier2)
125         throws com.sun.star.configuration.backend.MalformedDataException,
126                com.sun.star.lang.WrappedTargetException {
127         calls += ("startSetTemplate();" + ls);
128     }
129 
130     public String getCalls() {
131         return calls;
132     }
133 
134     public void cleanCalls() {
135         calls = "";
136     }
137 }