Interface IRuleResource
-
public interface IRuleResource
Represents a file which is loaded into the rule base. Note that it will not be created in the file system. A concrete class needs to be implemented in order to define how the rule resources are loaded into the rule base.
IRuleResource interface provide a way to be able to load rule resources from different providers such as database, external file system, web service...
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getContent()
A byte array of the rule resource.String
getFileName()
Return the name of file which will be loaded into the rule base.String
getNamespace()
The namespace of rule resource in the rule base.
-
-
-
Method Detail
-
getFileName
String getFileName()
Return the name of file which will be loaded into the rule base. The file name extension must be defined explicitly, so that the rule base know how to read this resource.
Note: The combination of file name and namespace is the identifier of this resource in the rule base. This resource will override another resource which has the same identifier.
- Returns:
- Rule resource file name (e.g. "rule.drl", "decisiontable.xlsx")
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getContent
byte[] getContent()
A byte array of the rule resource.- Returns:
- Rule content as a byte array
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getNamespace
String getNamespace()
The namespace of rule resource in the rule base.Note: The combination of file name and namespace is the identifier of this resource in the rule base. This resource will override another resource which has the same identifier.
- Returns:
- Namespace of rule resource
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-