View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.rewriter.rules;
18  
19  import java.util.Collection;
20  
21  /***
22   * Ruleset
23   *
24   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
25   * @version $Id: Ruleset.java 516448 2007-03-09 16:25:47Z ate $
26   */
27  public interface Ruleset extends Identified
28  {                
29      /***
30       * Get the remove comments flag for removing comments from the markup source.
31       * 
32       * @return true True if comments should be removed.
33       */
34      public boolean getRemoveComments();
35  
36      /***
37       * Set the remove comments flag for removing comments from the markup source.
38       * 
39       * @param flag True if comments should be removed.
40       */    
41      public void setRemoveComments(boolean flag);
42  
43      /***
44       * Given a tag identifier, lookup and return a tag object.
45       * 
46       * @param tagId the unique tag identifier
47       * @return the tag object for the given identifier
48       */
49      Tag getTag(String tagId);
50          
51      /***
52       * Given a rule identifier, lookup and return a rule object.
53       * 
54       * @param ruleId the unique rule identifier
55       * @return the rule object for the given identifier
56       */        
57      Rule getRule(String ruleId);        
58  
59  
60      /***
61       * Get a collection of rules for this rule set.
62       * 
63       * @return A collection of rules.
64       */
65      Collection getRules();    
66  
67      /***
68       * Get a collection of markup tags for this rule set.
69       * 
70       * @return A collection of markup tags.
71       */
72      public Collection getTags();
73  
74      /***
75       * Synchronize the Ruleset
76       * 
77       */
78      void sync();
79      
80  }