亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ruleexecutionsetimpl.java

?? drools 一個開放源碼的規則引擎
?? JAVA
字號:
package org.drools.jsr94.rules.admin;

/*
 * $Id: RuleExecutionSetImpl.java,v 1.24 2005/11/29 01:21:53 michaelneale Exp $
 *
 * Copyright 2002-2004 (C) The Werken Company. All Rights Reserved.
 *
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided that the
 * following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright statements and
 * notices. Redistributions must also contain a copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name "drools" must not be used to endorse or promote products derived
 * from this Software without prior written permission of The Werken Company.
 * For written permission, please contact bob@werken.com.
 *
 * 4. Products derived from this Software may not be called "drools" nor may
 * "drools" appear in their names without prior written permission of The Werken
 * Company. "drools" is a registered trademark of The Werken Company.
 *
 * 5. Due credit should be given to The Werken Company.
 * (http://drools.werken.com/).
 *
 * THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE WERKEN COMPANY OR ITS CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.rules.ObjectFilter;
import javax.rules.admin.RuleExecutionSet;

import org.drools.IntegrationException;
import org.drools.RuleBase;
import org.drools.RuleBaseBuilder;
import org.drools.RuleIntegrationException;
import org.drools.RuleSetIntegrationException;
import org.drools.WorkingMemory;
import org.drools.jsr94.rules.Jsr94FactHandleFactory;
import org.drools.rule.Rule;
import org.drools.rule.RuleSet;
import org.drools.smf.RuleSetCompiler;

/**
 * The Drools implementation of the <code>RuleExecutionSet</code> interface
 * which defines a named set of executable <code>Rule</code> instances. A
 * <code>RuleExecutionSet</code> can be executed by a rules engine via the
 * <code>RuleSession</code> interface.
 *
 * @see RuleExecutionSet
 *
 * @author N. Alex Rupp (n_alex <at>codehaus.org)
 * @author <a href="mailto:thomas.diesler@softcon-itec.de">thomas diesler </a>
 */
public class RuleExecutionSetImpl implements RuleExecutionSet
{
    /**
     * A description of this rule execution set or null if no
     * description is specified.
     */
    private String description;

    /**
     * The default ObjectFilter class name
     * associated with this rule execution set.
     */
    private String defaultObjectFilterClassName;

    /** A <code>Map</code> of user-defined and Drools-defined properties. */
    private Map properties;

    /**
     * The <code>RuleBase</code> associated with this
     * <code>RuleExecutionSet</code>.
     */
    private RuleBase ruleBase;

    /**
     * The <code>RuleSet</code> associated with this
     * <code>RuleExecutionSet</code>.
     */
    private RuleSet ruleSet;

    /**
     * The default ObjectFilter class name
     * associated with this rule execution set.
     */
    private ObjectFilter objectFilter;

    /**
     * Instances of this class should be obtained from the
     * <code>LocalRuleExecutionSetProviderImpl</code>. Each
     * <code>RuleExecutionSetImpl</code> corresponds with an
     * <code>org.drools.RuleSet</code> object.
     *
     * @param ruleSet The <code>RuleSet</code> to associate with this
     *        <code>RuleExecutionSet</code>.
     * @param properties A <code>Map</code> of user-defined and
     *        Drools-defined properties. May be <code>null</code>.
     *
     * @throws RuleIntegrationException if an error occurs integrating
     *         a <code>Rule</code> or <code>RuleSet</code>
     *         into the <code>RuleBase</code>
     * @throws RuleSetIntegrationException if an error occurs integrating
     *         a <code>Rule</code> or <code>RuleSet</code>
     *         into the <code>RuleBase</code>
     */
    RuleExecutionSetImpl( RuleSet ruleSet, Map properties )
        throws IntegrationException
    {
        if ( null == properties )
        {
            this.properties = new HashMap( );
        }
        else
        {
            this.properties = properties;
        }
        this.ruleSet = ruleSet;
        this.description = ruleSet.getDocumentation( );

        RuleSetCompiler compiler = null;
        try
        {
            compiler = new RuleSetCompiler( ruleSet,
                                            "org.drools",
                                            "drools" );
        }
        catch ( IOException e )
        {
            throw new IntegrationException( e );
        }
        
        RuleBaseBuilder builder = new RuleBaseBuilder( );
        builder.setFactHandleFactory( new Jsr94FactHandleFactory( ) );

        builder.addRuleSet( ruleSet );
        this.ruleBase = builder.build( );
    }

    /**
     * Get an instance of the default filter, or null.
     *
     * @return An instance of the default filter, or null.
     */
    public synchronized ObjectFilter getObjectFilter( )
    {
        if ( this.objectFilter != null )
        {
            return this.objectFilter;
        }

        if ( this.defaultObjectFilterClassName != null )
        {
            ClassLoader cl = Thread.currentThread( ).getContextClassLoader( );

            if ( cl == null )
            {
                cl = RuleExecutionSetImpl.class.getClassLoader( );
            }

            try
            {
                Class filterClass =
                    cl.loadClass( this.defaultObjectFilterClassName );
                this.objectFilter = ( ObjectFilter ) filterClass.newInstance( );
            }
            catch ( ClassNotFoundException e )
            {
                throw new RuntimeException( e.toString( ) );
            }
            catch ( InstantiationException e )
            {
                throw new RuntimeException( e.toString( ) );
            }
            catch ( IllegalAccessException e )
            {
                throw new RuntimeException( e.toString( ) );
            }
        }

        return this.objectFilter;
    }

    /**
     * Returns a new WorkingMemory object.
     *
     * @return A new WorkingMemory object.
     */
    public WorkingMemory newWorkingMemory( )
    {
        return this.ruleBase.newWorkingMemory( );
    }

    // JSR94 interface methods start here -------------------------------------

    /**
     * Get the name of this rule execution set.
     *
     * @return The name of this rule execution set.
     */
    public String getName( )
    {
        return this.ruleSet.getName( );
    }

    /**
     * Get a description of this rule execution set.
     *
     * @return A description of this rule execution set or null of no
     *         description is specified.
     */
    public String getDescription( )
    {
        return this.description;
    }

    /**
     * Get a user-defined or Drools-defined property.
     *
     * @param key the key to use to retrieve the property
     *
     * @return the value bound to the key or null
     */
    public Object getProperty( Object key )
    {
        return this.properties.get( key );
    }

    /**
     * Set a user-defined or Drools-defined property.
     *
     * @param key the key for the property value
     * @param value the value to associate with the key
     */
    public void setProperty( Object key, Object value )
    {
        this.properties.put( key, value );
    }

    /**
     * Set the default <code>ObjectFilter</code> class. This class is
     * instantiated at runtime and used to filter result objects unless
     * another filter is specified using the available APIs in the runtime
     * view of a rule engine.
     * <p/>
     * Setting the class name to null removes the default
     * <code>ObjectFilter</code>.
     *
     * @param objectFilterClassname the default <code>ObjectFilter</code> class
     */
    public void setDefaultObjectFilter( String objectFilterClassname )
    {
        this.defaultObjectFilterClassName = objectFilterClassname;
    }

    /**
     * Returns the default ObjectFilter class name
     * associated with this rule execution set.
     *
     * @return the default ObjectFilter class name
     */
    public String getDefaultObjectFilter( )
    {
        return this.defaultObjectFilterClassName;
    }

    /**
     * Return a list of all <code>Rule</code>s that are part of the
     * <code>RuleExecutionSet</code>.
     *
     * @return a list of all <code>Rule</code>s that are part of the
     *         <code>RuleExecutionSet</code>.
     */
    public List getRules( )
    {
        List jsr94Rules = new ArrayList( );

        Rule[] rules = ( this.ruleSet.getRules( ) );
        for ( int i = 0; i < rules.length; ++i )
        {
            jsr94Rules.add( new RuleImpl( rules[i] ) );
        }

        return jsr94Rules;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看欧美黄色| 国产偷v国产偷v亚洲高清| 欧美mv和日韩mv的网站| 国产精品久久久久国产精品日日| 亚洲国产精品久久人人爱蜜臀| 久久精品久久综合| 在线观看免费一区| 国产欧美日韩另类视频免费观看| 偷偷要91色婷婷| 成人av在线网站| 久久婷婷久久一区二区三区| 国产99精品视频| 日韩一区二区影院| 性做久久久久久久久| 91在线精品一区二区| 国产农村妇女毛片精品久久麻豆| 麻豆精品一二三| 91精品国产综合久久国产大片| 亚洲精品国产无天堂网2021| 粉嫩蜜臀av国产精品网站| 精品国产麻豆免费人成网站| 日本系列欧美系列| 91精品国产综合久久精品麻豆| 一区二区三区免费在线观看| 91在线你懂得| 中文字幕一区二| av电影在线不卡| 国产精品的网站| 91免费在线看| 一区二区三区 在线观看视频| 成人免费电影视频| 国产精品美女久久久久久久久| 国产v日产∨综合v精品视频| 久久久99精品久久| 懂色中文一区二区在线播放| 国产日韩欧美高清在线| 国产999精品久久久久久| 国产日韩欧美制服另类| 国产91清纯白嫩初高中在线观看| 欧美激情艳妇裸体舞| 成人av电影在线| 一区二区三区av电影| 欧美日韩精品一区二区三区蜜桃| 亚洲成人av福利| 日韩欧美成人午夜| 国产寡妇亲子伦一区二区| 欧美国产成人在线| 色噜噜狠狠成人网p站| 亚洲成人高清在线| 日韩一区二区三| 国产成人欧美日韩在线电影| 亚洲视频一区在线观看| 欧美中文字幕亚洲一区二区va在线| 亚洲综合图片区| 日韩欧美一区二区三区在线| 国产宾馆实践打屁股91| 国产精品久久福利| 欧美色图激情小说| 黑人巨大精品欧美一区| 亚洲少妇屁股交4| 日韩一区二区三区在线| 成人av手机在线观看| 五月天久久比比资源色| 国产日产欧美一区| 欧美日韩在线电影| 国产精品77777| 亚洲国产日韩在线一区模特| 精品av久久707| 在线观看日韩电影| 国产精品一区2区| 亚洲高清视频中文字幕| 国产婷婷一区二区| 91精品在线观看入口| 成人久久久精品乱码一区二区三区 | 日本中文在线一区| 国产欧美日韩亚州综合 | 精品视频在线免费观看| 久久成人av少妇免费| 亚洲欧美另类综合偷拍| 欧美成人精品高清在线播放| 97精品国产露脸对白| 免费av成人在线| 一区二区久久久久| 国产日韩欧美制服另类| 日韩一区二区在线看片| 在线看国产一区| 不卡一卡二卡三乱码免费网站| 日韩精品亚洲专区| 一区二区三区在线观看视频| 国产精品素人一区二区| 欧美一区二区在线免费观看| 91国偷自产一区二区三区成为亚洲经典| 久久精品二区亚洲w码| 亚洲风情在线资源站| 亚洲色图制服丝袜| 国产精品久久久久影院色老大 | 欧美日韩一区二区欧美激情| 成人免费福利片| 国产精品资源在线看| 久久av老司机精品网站导航| 亚洲国产毛片aaaaa无费看| 亚洲日本在线视频观看| 国产精品福利一区| 国产女人18水真多18精品一级做| 欧美成人r级一区二区三区| 欧美精品在线一区二区三区| 色婷婷精品大在线视频| 91片在线免费观看| 色综合一区二区| 色综合久久综合| 91久久久免费一区二区| 色悠悠久久综合| 欧日韩精品视频| 色欧美片视频在线观看在线视频| 91亚洲精品一区二区乱码| 91在线无精精品入口| 91蝌蚪porny| 欧美曰成人黄网| 欧美日韩卡一卡二| 欧美一区二区在线不卡| 日韩美女主播在线视频一区二区三区| 欧美一级夜夜爽| 精品88久久久久88久久久| 久久天堂av综合合色蜜桃网| 国产欧美一区二区精品性| 中文字幕va一区二区三区| 欧美韩国一区二区| 亚洲私人黄色宅男| 婷婷久久综合九色综合绿巨人| 日韩国产欧美在线观看| 精品午夜久久福利影院| 成人性视频网站| 欧美性猛交xxxx黑人交| 91精品国产色综合久久不卡蜜臀| 欧美zozozo| 亚洲欧洲成人自拍| 亚洲国产成人va在线观看天堂| 日本在线不卡视频| 国产精品中文字幕日韩精品 | 亚洲欧美日韩在线不卡| 樱花草国产18久久久久| 天天色综合天天| 国产精品一二三四五| 91蜜桃免费观看视频| 欧美夫妻性生活| 国产欧美在线观看一区| 亚洲va欧美va人人爽午夜| 国产一区二区三区最好精华液| 在线成人免费观看| 国产亚洲一区二区三区在线观看| 中文字幕一区二区三区精华液 | 欧美日韩一区久久| 国产成人av一区二区| 成人app网站| 国产亚洲短视频| 国产精品丝袜一区| 午夜不卡av免费| 一区二区视频在线看| 懂色av一区二区在线播放| 精品成人一区二区| 精品午夜一区二区三区在线观看| 欧美一区二区三区在线观看视频 | 日韩精品电影一区亚洲| 欧美性生活一区| 亚洲午夜电影在线观看| 在线观看免费视频综合| 一区二区三区欧美日韩| 91久久精品日日躁夜夜躁欧美| 亚洲女子a中天字幕| 色综合久久88色综合天天免费| 亚洲天堂精品视频| 色婷婷综合久久久中文字幕| 亚洲精品少妇30p| 欧美天天综合网| 视频一区二区三区在线| 日韩一卡二卡三卡四卡| 久久国产精品99精品国产 | 久久久夜色精品亚洲| 国产美女视频91| 欧美国产一区视频在线观看| 成人动漫在线一区| 一区二区欧美视频| 在线综合+亚洲+欧美中文字幕| 美女视频免费一区| 久久精品亚洲精品国产欧美| 成人午夜精品一区二区三区| 亚洲欧美另类在线| 欧美高清精品3d| 国产麻豆91精品| 中文字幕一区在线观看视频| 91麻豆精品秘密| 日韩电影在线观看一区| 久久噜噜亚洲综合| 色综合色狠狠综合色| 水野朝阳av一区二区三区| 精品盗摄一区二区三区| 91丨九色丨黑人外教| 日韩电影免费一区| 国产欧美日韩精品a在线观看| 91亚洲精品久久久蜜桃|