Class TargetPathDecorator
java.lang.Object
ch.tocco.nice2.optional.drools.api.util.TargetPathDecorator
- All Implemented Interfaces:
CustomRuleDecorator
set the target path of resources that have none. these are usually rules from the database that do not exist as
actual files, but this decorator would work on any resource, since it just uses the package name and id to construct
a proper path
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.kie.api.io.Resource
decorate
(org.kie.api.io.Resource resource, RuleSource source, String packageName) Decorate a custom rule.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.optional.drools.api.CustomRuleDecorator
priority
-
Constructor Details
-
TargetPathDecorator
public TargetPathDecorator()
-
-
Method Details
-
decorate
public org.kie.api.io.Resource decorate(org.kie.api.io.Resource resource, RuleSource source, String packageName) Description copied from interface:CustomRuleDecorator
Decorate a custom rule.- Specified by:
decorate
in interfaceCustomRuleDecorator
- Parameters:
resource
- The Drools `Resource` that is being loaded.source
- TheRuleSource
the rules are being loaded from.packageName
- A package name to be used for the rules.- Returns:
- A Drools `Resource` for the decorated custom rules.
-