Knowledge API Legacy5 Adapter 6.0.0.Beta3

org.drools.impl.adapters
Class KnowledgeBaseConfigurationAdapter

java.lang.Object
  extended by org.drools.impl.adapters.KnowledgeBaseConfigurationAdapter
All Implemented Interfaces:
KnowledgeBaseOptionsConfiguration, KnowledgeBaseConfiguration, PropertiesConfiguration

public class KnowledgeBaseConfigurationAdapter
extends Object
implements KnowledgeBaseConfiguration


Constructor Summary
KnowledgeBaseConfigurationAdapter(org.kie.api.KieBaseConfiguration delegate)
           
 
Method Summary
 org.kie.api.KieBaseConfiguration getDelegate()
           
<T extends SingleValueKnowledgeBaseOption>
T
getOption(Class<T> option)
          Gets an option value
<T extends MultiValueKnowledgeBaseOption>
T
getOption(Class<T> option, String key)
          Gets an option value for the given option + key.
 String getProperty(String name)
          Gets a property value
<T extends KnowledgeBaseOption>
void
setOption(T option)
          Sets an option
 void setProperty(String name, String value)
          Sets a property value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnowledgeBaseConfigurationAdapter

public KnowledgeBaseConfigurationAdapter(org.kie.api.KieBaseConfiguration delegate)
Method Detail

setOption

public <T extends KnowledgeBaseOption> void setOption(T option)
Description copied from interface: KnowledgeBaseOptionsConfiguration
Sets an option

Specified by:
setOption in interface KnowledgeBaseOptionsConfiguration
Parameters:
option - the option to be set. As options are type safe, the option itself contains the option key, and so a single parameter is enough.

getOption

public <T extends SingleValueKnowledgeBaseOption> T getOption(Class<T> option)
Description copied from interface: KnowledgeBaseOptionsConfiguration
Gets an option value

Specified by:
getOption in interface KnowledgeBaseOptionsConfiguration
Parameters:
option - the option class for the option being requested
Returns:
the Option value for the given option. Returns null if option is not configured.

getOption

public <T extends MultiValueKnowledgeBaseOption> T getOption(Class<T> option,
                                                             String key)
Description copied from interface: KnowledgeBaseOptionsConfiguration
Gets an option value for the given option + key. This method should be used for multi-value options, like accumulate functions configuration where one option has multiple values, distinguished by a sub-key.

Specified by:
getOption in interface KnowledgeBaseOptionsConfiguration
Parameters:
option - the option class for the option being requested
key - the key for the option being requested
Returns:
the Option value for the given option + key. Returns null if option is not configured.

setProperty

public void setProperty(String name,
                        String value)
Description copied from interface: PropertiesConfiguration
Sets a property value

Specified by:
setProperty in interface PropertiesConfiguration

getProperty

public String getProperty(String name)
Description copied from interface: PropertiesConfiguration
Gets a property value

Specified by:
getProperty in interface PropertiesConfiguration
Returns:

getDelegate

public org.kie.api.KieBaseConfiguration getDelegate()

Knowledge API Legacy5 Adapter 6.0.0.Beta3

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.