|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
BaseImportEntryFactory.java | - | 66.7% | 100% | 75% |
|
1 | package org.drools.semantics.base; | |
2 | ||
3 | import org.drools.rule.RuleSet; | |
4 | import org.drools.smf.Configuration; | |
5 | import org.drools.smf.FactoryException; | |
6 | import org.drools.smf.ImportEntryFactory; | |
7 | import org.drools.spi.ImportEntry; | |
8 | import org.drools.spi.RuleBaseContext; | |
9 | ||
10 | /* | |
11 | * $Id: BaseImportEntryFactory.java,v 1.1.2.1 2005/05/03 23:45:24 mproctor Exp $ | |
12 | * | |
13 | * Copyright 2001-2003 (C) The Werken Company. All Rights Reserved. | |
14 | * | |
15 | * Redistribution and use of this software and associated documentation | |
16 | * ("Software"), with or without modification, are permitted provided that the | |
17 | * following conditions are met: | |
18 | * | |
19 | * 1. Redistributions of source code must retain copyright statements and | |
20 | * notices. Redistributions must also contain a copy of this document. | |
21 | * | |
22 | * 2. Redistributions in binary form must reproduce the above copyright notice, | |
23 | * this list of conditions and the following disclaimer in the documentation | |
24 | * and/or other materials provided with the distribution. | |
25 | * | |
26 | * 3. The name "drools" must not be used to endorse or promote products derived | |
27 | * from this Software without prior written permission of The Werken Company. | |
28 | * For written permission, please contact bob@werken.com. | |
29 | * | |
30 | * 4. Products derived from this Software may not be called "drools" nor may | |
31 | * "drools" appear in their names without prior written permission of The Werken | |
32 | * Company. "drools" is a trademark of The Werken Company. | |
33 | * | |
34 | * 5. Due credit should be given to The Werken Company. (http://werken.com/) | |
35 | * | |
36 | * THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS ``AS IS'' | |
37 | * AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
39 | * ARE DISCLAIMED. IN NO EVENT SHALL THE WERKEN COMPANY OR ITS CONTRIBUTORS BE | |
40 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
41 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
42 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
43 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
44 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
46 | * POSSIBILITY OF SUCH DAMAGE. | |
47 | * | |
48 | */ | |
49 | ||
50 | public class BaseImportEntryFactory implements ImportEntryFactory | |
51 | { | |
52 | 30 | public ImportEntry newImportEntry(RuleSet ruleSet, |
53 | RuleBaseContext context, | |
54 | Configuration config) throws FactoryException | |
55 | { | |
56 | 30 | try |
57 | { | |
58 | 30 | return new BaseImportEntry( config.getText() ); |
59 | } | |
60 | catch ( Exception e ) | |
61 | { | |
62 | 0 | throw new FactoryException( e ); |
63 | } | |
64 | } | |
65 | } |
|