Interface RuleSource
- All Known Implementing Classes:
AbstractRuleSource
public interface RuleSource
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
We make our own type enumeration because we don't support all types Drools supports. -
Method Summary
Modifier and TypeMethodDescriptionaddContextAttribute
(String name, Object value) <T> T
getContextAttribute
(String name, Class<T> type) getId()
Get an ID for the source.org.kie.api.io.Resource
Returns a Drools `Resource` used to build the rules.long
Get the timestamp when the source was last changed.getType()
Get theRuleSource.Type
of 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.Type
of the source.- Returns:
- The
RuleSource.Type
of 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
-