01: package org.drools.rule;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
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: /**
20: * Indicates an error regarding the semantic validity of a rule.
21: *
22: * @author <a href="mailto:bob@werken.com">bob mcwhirter </a>
23: */
24: public class InvalidRuleException extends RuleConstructionException {
25: /**
26: *
27: */
28: private static final long serialVersionUID = 400L;
29: /** The invalid rule. */
30: private Rule rule;
31:
32: /**
33: * @see java.lang.Exception#Exception()
34: *
35: * @param rule
36: * The invalid <code>Rule</code>.
37: */
38: public InvalidRuleException(final Rule rule) {
39: super ();
40: this .rule = rule;
41: }
42:
43: /**
44: * @see java.lang.Exception#Exception(String message)
45: *
46: * @param message
47: * @param rule
48: */
49: public InvalidRuleException(final String message, final Rule rule) {
50: super (message);
51: this .rule = rule;
52: }
53:
54: /**
55: * @see java.lang.Exception#Exception(String message, Throwable cause)
56: *
57: * @param message
58: * @param rule
59: */
60: public InvalidRuleException(final String message, final Rule rule,
61: final Throwable cause) {
62: super (message, cause);
63: this .rule = rule;
64: }
65:
66: /**
67: * Retrieve the invalid <code>Rule</code>.
68: *
69: * @return The invalid <code>Rule</code>.
70: */
71: public Rule getRule() {
72: return this.rule;
73: }
74: }
|