RuleSet for recognizing the users defined in the XML file processed by MemoryRealm .
| 27 | * </p> |
| 28 | */ |
| 29 | public class MemoryRuleSet implements RuleSet { |
| 30 | |
| 31 | |
| 32 | // ----------------------------------------------------- Instance Variables |
| 33 | |
| 34 | /** |
| 35 | * The matching pattern prefix to use for recognizing our elements. |
| 36 | */ |
| 37 | protected final String prefix; |
| 38 | |
| 39 | |
| 40 | // ------------------------------------------------------------ Constructor |
| 41 | |
| 42 | /** |
| 43 | * Construct an instance of this <code>RuleSet</code> with the default matching pattern prefix. |
| 44 | */ |
| 45 | public MemoryRuleSet() { |
| 46 | this("tomcat-users/"); |
| 47 | } |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * Construct an instance of this <code>RuleSet</code> with the specified matching pattern prefix. |
| 52 | * |
| 53 | * @param prefix Prefix for matching pattern rules (including the trailing slash character) |
| 54 | */ |
| 55 | public MemoryRuleSet(String prefix) { |
| 56 | this.prefix = prefix; |
| 57 | } |
| 58 | |
| 59 | |
| 60 | // --------------------------------------------------------- Public Methods |
| 61 | |
| 62 | |
| 63 | @Override |
| 64 | public void addRuleInstances(Digester digester) { |
| 65 | |
| 66 | digester.addRule(prefix + "user", new MemoryUserRule()); |
| 67 | |
| 68 | } |
| 69 | |
| 70 | |
| 71 | } |
| 72 | |
| 73 | |
| 74 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected