01: /*
02: * @(#)RuleSet.java 1.2 04/12/06
03: *
04: * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.xml;
10:
11: import java.util.*;
12:
13: interface RuleSet {
14:
15: /**
16: * Add a rule to this rule set
17: *
18: * @param pattern a path pattern
19: * @param target the corresponding structure that consists of the action and the keyword.
20: */
21: public void add(String pattern, DigestAction action, String keyword);
22:
23: /**
24: * Searches paths that match the registed patterns and executes the action with the key.
25: *
26: * @param path the path to search
27: * @param paths a List of path elements.
28: * @param handler an object that defines how to handle the matched rule.
29: */
30: public void scan(String path, List paths, TargetHandler handler)
31: throws Exception;
32: }
|