Package org.kie.api.builder
Interface KieRepository
public interface KieRepository
KieRepository is a singleton acting as a repository for all the available KieModules
regardless if they are stored in the maven repository or programmatically built by the user
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddKieModule(KieModule kModule) Adds a new KieModule to this KieRepositoryaddKieModule(Resource resource, Resource... dependencies) Creates a new KieModule using the provided resource and dependencies and automatically adds it to this KieRepositoryReturns the default ReleaseId used to identify a KieModule in this KieRepository if the user didn't explicitly provide onegetKieModule(ReleaseId releaseId) Retrieve a KieModule with the given ReleaseId in this KieRepository.removeKieModule(ReleaseId releaseId) Remove a no longer useful KieModule, identified by the given ReleaseId, from this KieRepository
-
Method Details
-
getDefaultReleaseId
ReleaseId getDefaultReleaseId()Returns the default ReleaseId used to identify a KieModule in this KieRepository if the user didn't explicitly provide one- Returns:
- The default ReleaseId
-
addKieModule
Adds a new KieModule to this KieRepository -
addKieModule
Creates a new KieModule using the provided resource and dependencies and automatically adds it to this KieRepository- Parameters:
resource-dependencies-- Returns:
- The newly created KieModule
-
getKieModule
Retrieve a KieModule with the given ReleaseId in this KieRepository. It is possible to use maven's conventions and version ranges like inKieModule kieModule = kieRepository.getKieModule( KieServices.Factory.get().newReleaseId("group", "artifact", "LATEST") );orKieModule kieModule = kieRepository.getKieModule( KieServices.Factory.get().newReleaseId("group", "artifact", "[1.0,1.2)") );- Parameters:
releaseId- The releaseId identifying the KieModule to be returned- Returns:
- The KieModule identified by the given releaseId or null if such KieModule doesn't exist
-
removeKieModule
Remove a no longer useful KieModule, identified by the given ReleaseId, from this KieRepository- Parameters:
releaseId- The releaseId identifying the KieModule to be removed- Returns:
- The removed KieModule or null if such KieModule didn't exist
-