1 /**************************************************************** 2 * Licensed to the Apache Software Foundation (ASF) under one * 3 * or more contributor license agreements. See the NOTICE file * 4 * distributed with this work for additional information * 5 * regarding copyright ownership. The ASF licenses this file * 6 * to you under the Apache License, Version 2.0 (the * 7 * "License"); you may not use this file except in compliance * 8 * with the License. You may obtain a copy of the License at * 9 * * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, * 13 * software distributed under the License is distributed on an * 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 15 * KIND, either express or implied. See the License for the * 16 * specific language governing permissions and limitations * 17 * under the License. * 18 ****************************************************************/ 19 20 package org.apache.jsieve; 21 22 import org.apache.commons.logging.Log; 23 24 /** 25 * Context for sieve operations. 26 * 27 */ 28 public abstract class SieveContext { 29 30 /** 31 * Gets the script position of the current operation. 32 * 33 * @return <code>ScriptCoordinate</code>, not null 34 */ 35 public abstract ScriptCoordinate getCoordinate(); 36 37 /** 38 * Sets the script position of the current operation. 39 * 40 * @param coordinate 41 * <code>ScriptCoordinate</code>, not null 42 */ 43 public abstract void setCoordinate(ScriptCoordinate coordinate); 44 45 /** 46 * Gets the command state manager. 47 * @return command state manage, not null 48 */ 49 public abstract CommandStateManager getCommandStateManager(); 50 51 /** 52 * Gets the condition manager. 53 * @return condition manager, not null 54 */ 55 public abstract ConditionManager getConditionManager(); 56 57 /** 58 * Sets the condition manager. 59 * @param manager not null 60 */ 61 public abstract void setConditionManager(final ConditionManager manager); 62 63 /** 64 * Gets the command manager. 65 * @return command manager, not null 66 */ 67 public abstract CommandManager getCommandManager(); 68 69 /** 70 * Gets the comparator manager. 71 * @return not null 72 */ 73 public abstract ComparatorManager getComparatorManager(); 74 75 /** 76 * Gets the test manager. 77 * @return test manager, not null 78 */ 79 public abstract TestManager getTestManager(); 80 81 /** 82 * Gets the log. 83 * @return log, not null 84 */ 85 public abstract Log getLog(); 86 }