Interface RuleSource
- All Known Implementing Classes:
AbstractRuleSource
public interface RuleSource
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumWe make our own type enumeration because we don't support all types Drools supports. -
Method Summary
Modifier and TypeMethodDescriptionaddContextAttribute(String name, Object value) <T> TgetContextAttribute(String name, Class<T> type) getId()Get an ID for the source.org.kie.api.io.ResourceReturns a Drools `Resource` used to build the rules.longGet the timestamp when the source was last changed.getType()Get theRuleSource.Typeof the source.getUri()Get a URI for the source.
-
Method Details
-
getId
String getId()Get an ID for the source.- Returns:
- An ID.
-
getUri
URI getUri()Get a URI for the source. This may be the URL it has been loaded from, the URI of an entity/field, or whatever identifies the source.- Returns:
- A URI for the source.
-
getType
RuleSource.Type getType()Get theRuleSource.Typeof the source.- Returns:
- The
RuleSource.Typeof the source.
-
getTimestamp
long getTimestamp()Get the timestamp when the source was last changed. Used for caching.- Returns:
- The timestamp of the last change.
-
getResource
org.kie.api.io.Resource getResource()Returns a Drools `Resource` used to build the rules.- Returns:
- A Drools `Resource`.
-
getContextAttribute
-
addContextAttribute
-