1 /* $Id: RuleSet.java 467222 2006-10-24 03:17:11Z markt $ 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one or more 4 * contributor license agreements. See the NOTICE file distributed with 5 * this work for additional information regarding copyright ownership. 6 * The ASF licenses this file to You under the Apache License, Version 2.0 7 * (the "License"); you may not use this file except in compliance with 8 * 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, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.tomcat.util.digester; 20 21 22 /** 23 * <p>Public interface defining a shorthand means of configuring a complete 24 * set of related <code>Rule</code> definitions, possibly associated with 25 * a particular namespace URI, in one operation. To use an instance of a 26 * class that imlements this interface:</p> 27 * <ul> 28 * <li>Create a concrete implementation of this interface.</li> 29 * <li>Optionally, you can configure a <code>RuleSet</code> to be relevant 30 * only for a particular namespace URI by configuring the value to be 31 * returned by <code>getNamespaceURI()</code>.</li> 32 * <li>As you are configuring your Digester instance, call 33 * <code>digester.addRuleSet()</code> and pass the RuleSet instance.</li> 34 * <li>Digester will call the <code>addRuleInstances()</code> method of 35 * your RuleSet to configure the necessary rules.</li> 36 * </ul> 37 */ 38 39 public interface RuleSet { 40 41 42 // ------------------------------------------------------------- Properties 43 44 45 /** 46 * Return the namespace URI that will be applied to all Rule instances 47 * created from this RuleSet. 48 */ 49 public String getNamespaceURI(); 50 51 52 // --------------------------------------------------------- Public Methods 53 54 55 /** 56 * Add the set of Rule instances defined in this RuleSet to the 57 * specified <code>Digester</code> instance, associating them with 58 * our namespace URI (if any). This method should only be called 59 * by a Digester instance. 60 * 61 * @param digester Digester instance to which the new Rule instances 62 * should be added. 63 */ 64 public void addRuleInstances(Digester digester); 65 66 67 } 68