java.lang.Object
org.evrete.dsl.DSLJarProvider
- All Implemented Interfaces:
DSLKnowledgeProvider,Constants
The DSLClassProvider class provides the implementation of the DSLKnowledgeProvider
interface for 'JAVA-JAR' DSL knowledge.
-
Field Summary
Fields inherited from interface org.evrete.dsl.Constants
PROP_EXTEND_RULE_CLASSES, PROP_RULE_CLASSES, PROP_RULESETS, PROP_SOURCES_CHARSET, PROP_SOURCES_CHARSET_DEFAULT, PROVIDER_JAVA_CLASS, PROVIDER_JAVA_JAR, PROVIDER_JAVA_SOURCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <C extends RuntimeContext<C>>
voidappendTo(RuntimeContext<C> context, Object source) Appends the provided rule source to the specifiedRuleSetBuilderinstance.getName()Returns the name of the DSL knowledge provider.
-
Constructor Details
-
DSLJarProvider
public DSLJarProvider()Default public constructor
-
-
Method Details
-
sourceTypes
-
getName
Description copied from interface:DSLKnowledgeProviderReturns the name of the DSL knowledge provider.- Returns:
- the name of the provider
-
appendTo
public final <C extends RuntimeContext<C>> void appendTo(RuntimeContext<C> context, Object source) throws IOException Description copied from interface:DSLKnowledgeProviderAppends the provided rule source to the specifiedRuleSetBuilderinstance.If the implementation requires or relies on specific configuration entries, they should be set via the
FluentEnvironment.set(String, Object)method.This method is the preferred approach for integrating external rule sources. Unlike the deprecated
DSLKnowledgeProvider.create(KnowledgeService, TypeResolver, URL...)method and its variants, this method enables appending sources directly to bothKnowledgeandRuleSessionrule set instances.- Specified by:
appendToin interfaceDSLKnowledgeProvider- Type Parameters:
C- The type of the context for the builder.- Parameters:
context- TheRuntimeContextinstance to which the rule source(s) will be appended.source- The rule source to be appended to the target builder. The source can be in various formats, depending on the implementation (e.g., a String representing rule definitions, a File with rule definitions, a URL, etc.).- Throws:
IOException- If an I/O error occurs while processing the source.
-