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