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 XLayerHandlerImpl 26 implements com.sun.star.configuration.backend.XLayerHandler { 27 protected String calls = ""; 28 protected String ls = System.getProperty("line.separator"); 29 addOrReplaceNode(String str, short param)30 public void addOrReplaceNode(String str, short param) 31 throws com.sun.star.configuration.backend.MalformedDataException, 32 com.sun.star.lang.WrappedTargetException { 33 calls += ("addOrReplace(" + str + "," + param + ");" + ls); 34 } 35 addOrReplaceNodeFromTemplate(String str, com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier, short param)36 public void addOrReplaceNodeFromTemplate(String str, 37 com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier, 38 short param) 39 throws com.sun.star.configuration.backend.MalformedDataException, 40 com.sun.star.lang.WrappedTargetException { 41 calls += ("addOrReplaceNodeFromTemplate(" + str + "," + templateIdentifier + ");" + ls); 42 } 43 addProperty(String str, short param, com.sun.star.uno.Type type)44 public void addProperty(String str, short param, 45 com.sun.star.uno.Type type) 46 throws com.sun.star.configuration.backend.MalformedDataException, 47 com.sun.star.lang.WrappedTargetException { 48 calls += ("addProperty(" + str + "," + param + "," + type + ");" + ls); 49 } 50 addPropertyWithValue(String str, short param, Object obj)51 public void addPropertyWithValue(String str, short param, Object obj) 52 throws com.sun.star.configuration.backend.MalformedDataException, 53 com.sun.star.lang.WrappedTargetException { 54 calls += ("addPropertyWithValue(" + str + "," + param + "," + obj + ");" + ls); 55 } 56 dropNode(String str)57 public void dropNode(String str) 58 throws com.sun.star.configuration.backend.MalformedDataException, 59 com.sun.star.lang.WrappedTargetException { 60 calls += ("dropNode(" + str + ");" + ls); 61 } 62 endLayer()63 public void endLayer() 64 throws com.sun.star.configuration.backend.MalformedDataException, 65 com.sun.star.lang.WrappedTargetException { 66 calls += ("endLayer();" + ls); 67 } 68 endNode()69 public void endNode() 70 throws com.sun.star.configuration.backend.MalformedDataException, 71 com.sun.star.lang.WrappedTargetException { 72 calls += ("endNode();" + ls); 73 } 74 endProperty()75 public void endProperty() 76 throws com.sun.star.configuration.backend.MalformedDataException, 77 com.sun.star.lang.WrappedTargetException { 78 calls += ("endProperty();" + ls); 79 } 80 overrideNode(String str, short param, boolean param2)81 public void overrideNode(String str, short param, boolean param2) 82 throws com.sun.star.configuration.backend.MalformedDataException, 83 com.sun.star.lang.WrappedTargetException { 84 calls += ("overrideNode(" + str + "," + param + "," + param2 + ");" + ls); 85 } 86 overrideProperty(String str, short param, com.sun.star.uno.Type type, boolean param3)87 public void overrideProperty(String str, short param, 88 com.sun.star.uno.Type type, boolean param3) 89 throws com.sun.star.configuration.backend.MalformedDataException, 90 com.sun.star.lang.WrappedTargetException { 91 calls += ("overrideProperty(" + str + "," + param + "," + type + "," + param3 + ");" + ls); 92 } 93 setPropertyValue(Object obj)94 public void setPropertyValue(Object obj) 95 throws com.sun.star.configuration.backend.MalformedDataException, 96 com.sun.star.lang.WrappedTargetException { 97 calls += ("setPropertyValue(" + obj + ");" + ls); 98 } 99 setPropertyValueForLocale(Object obj, String str)100 public void setPropertyValueForLocale(Object obj, String str) 101 throws com.sun.star.configuration.backend.MalformedDataException, 102 com.sun.star.lang.WrappedTargetException { 103 calls += ("setPropertyValueForLocale(" + obj + "," + str + ");" + ls); 104 } 105 startLayer()106 public void startLayer() 107 throws com.sun.star.configuration.backend.MalformedDataException, 108 com.sun.star.lang.WrappedTargetException { 109 calls = "startLayer();" + ls; 110 } 111 getCalls()112 public String getCalls() { 113 return calls; 114 } 115 }