Interface RuleSource

All Known Implementing Classes:
AbstractRuleSource

public interface RuleSource
  • 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 the RuleSource.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

      @Nullable <T> T getContextAttribute(String name, Class<T> type)
    • addContextAttribute

      RuleSource addContextAttribute(String name, Object value)