Class OsgiKieModule

  • All Implemented Interfaces:
    Serializable, org.drools.compiler.kie.builder.impl.InternalKieModule, org.kie.api.builder.KieModule

    public class OsgiKieModule
    extends org.drools.compiler.kie.builder.impl.AbstractKieModule
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.drools.compiler.kie.builder.impl.InternalKieModule

        org.drools.compiler.kie.builder.impl.InternalKieModule.CompilationCache, org.drools.compiler.kie.builder.impl.InternalKieModule.CompilationCacheEntry, org.drools.compiler.kie.builder.impl.InternalKieModule.LocalLogger, org.drools.compiler.kie.builder.impl.InternalKieModule.MalformedKieModuleException
    • Field Summary

      • Fields inherited from class org.drools.compiler.kie.builder.impl.AbstractKieModule

        compilationCache, pomModel, releaseId
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static OsgiKieModule create​(URL url)  
      static OsgiKieModule create​(URL url, org.kie.api.builder.ReleaseId releaseId, org.kie.api.builder.model.KieModuleModel kieProject)  
      static OsgiKieModule create​(org.kie.api.builder.ReleaseId releaseId, org.kie.api.builder.model.KieModuleModel kieProject, org.osgi.framework.Bundle bundle)  
      byte[] getBytes()  
      byte[] getBytes​(String pResourceName)  
      long getCreationTimestamp()  
      File getFile()  
      Collection<String> getFileNames()  
      ClassLoader getModuleClassLoader()  
      org.drools.core.io.internal.InternalResource getResource​(String fileName)  
      boolean isAvailable​(String pResourceName)  
      static boolean isOsgiBundleUrl​(String str)
      Determines if the provided string is OSGi bundle URL or not.
      static String parseBundleId​(String url)
      Parses OSGi bundle ID from the provided URL.
      String toString()  
      • Methods inherited from class org.drools.compiler.kie.builder.impl.AbstractKieModule

        addDTableToCompiler, addKieDependency, addResourceToCompiler, addResourceToCompiler, buildKnowledgePackages, cacheKnowledgeBuilderForKieBase, cacheResultsForKieBase, checkStreamMode, createBuilderConfiguration, createKieBase, createResourceProvider, getClassesMap, getCompilationCache, getJarDependencies, getKieDependencies, getKieModuleModel, getKnowledgeBuilderForKieBase, getKnowledgePackagesForKieBase, getKnowledgeResultsCache, getPackage, getPomAsStream, getPomModel, getReleaseId, getResourceConfiguration, getUnresolvedDependencies, hasResource, loadResourceConfiguration, setPomModel, setUnresolvedDependencies, updateResource
      • Methods inherited from interface org.drools.compiler.kie.builder.impl.InternalKieModule

        addGeneratedClassNames, afterKieBaseCreationUpdate, build, cloneForIncrementalCompilation, createKieBaseUpdater, createModuleClassLoader, getChanges, isFileInKBase, updateKieModule
    • Method Detail

      • getBytes

        public byte[] getBytes()
      • getResource

        public org.drools.core.io.internal.InternalResource getResource​(String fileName)
      • isAvailable

        public boolean isAvailable​(String pResourceName)
      • getBytes

        public byte[] getBytes​(String pResourceName)
      • getModuleClassLoader

        public ClassLoader getModuleClassLoader()
        Specified by:
        getModuleClassLoader in interface org.drools.compiler.kie.builder.impl.InternalKieModule
        Overrides:
        getModuleClassLoader in class org.drools.compiler.kie.builder.impl.AbstractKieModule
      • getFile

        public File getFile()
      • getCreationTimestamp

        public long getCreationTimestamp()
      • create

        public static OsgiKieModule create​(URL url,
                                           org.kie.api.builder.ReleaseId releaseId,
                                           org.kie.api.builder.model.KieModuleModel kieProject)
      • create

        public static OsgiKieModule create​(org.kie.api.builder.ReleaseId releaseId,
                                           org.kie.api.builder.model.KieModuleModel kieProject,
                                           org.osgi.framework.Bundle bundle)
      • parseBundleId

        public static String parseBundleId​(String url)
        Parses OSGi bundle ID from the provided URL. The URL may not be coming from OSGi, in which case "null" is returned
        Parameters:
        url - URL
        Returns:
        parsed bundle ID, or null if the url is not OSGi bundle URL
      • isOsgiBundleUrl

        public static boolean isOsgiBundleUrl​(String str)
        Determines if the provided string is OSGi bundle URL or not.
        Parameters:
        str - string to check
        Returns:
        true if the string is OSGi bundle URL, otherwise false