org.kie.internal

## Interface KnowledgeBase

- All Superinterfaces:
    org.kie.api.KieBase, org.kie.api.event.kiebase.KieBaseEventManager

  Deprecated.

      @Deprecated
      public interface KnowledgeBase
      extends org.kie.api.KieBase

  Will be removed imminently

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addKnowledgePackages(Collection<KnowledgePackage> kpackages)` Deprecated. Add the collection of KnowledgePackages to the KnowledgeBase.
    `Set<String>` | `getEntryPointIds()` Deprecated. Returns the set of the entry points declared and/or used in this knowledge base
    `org.kie.api.definition.type.FactType` | `getFactType(String packageName, String typeName)` Deprecated. Returns the FactType identified by the given package and type names.
    `KnowledgePackage` | `getKnowledgePackage(String packageName)` Deprecated. Returns a reference to the KnowledgePackage identified by the given name.
    `Collection<KnowledgePackage>` | `getKnowledgePackages()` Deprecated. Return an immutable collection of the packages that exist in this KnowledgeBase.
    `org.kie.api.definition.process.Process` | `getProcess(String processId)` Deprecated. Returns a referent to the Process identified by the given processId
    `Collection<org.kie.api.definition.process.Process>` | `getProcesses()` Deprecated.
    `org.kie.api.definition.rule.Query` | `getQuery(String packageName, String queryName)` Deprecated. Returns a reference to the Rule identified by the given package and rule names.
    `org.kie.api.definition.rule.Rule` | `getRule(String packageName, String ruleName)` Deprecated. Returns a reference to the Rule identified by the given package and rule names.
    `Collection<StatefulKnowledgeSession>` | `getStatefulKnowledgeSessions()` Deprecated. Return a collection of the StatefulKnowledgeSessions that exist in this KnowledgeBase.
    `StatefulKnowledgeSession` | `newStatefulKnowledgeSession()` Deprecated. Create a new StatefulKnowledgeSession using the default session configuration.
    `StatefulKnowledgeSession` | `newStatefulKnowledgeSession(org.kie.api.runtime.KieSessionConfiguration conf, org.kie.api.runtime.Environment environment)` Deprecated. Create a new StatefulKnowledgeSession using the given session configuration and/or environment.
    `StatelessKnowledgeSession` | `newStatelessKnowledgeSession()` Deprecated. Create a new StatelessKnowledgeSession using the default session configuration.
    `StatelessKnowledgeSession` | `newStatelessKnowledgeSession(org.kie.api.runtime.KieSessionConfiguration conf)` Deprecated. Create a new StatelessKnowledgeSession using the given session configuration.
    `void` | `removeFunction(String packageName, String ruleName)` Deprecated. Remove a function from the specified package.
    `void` | `removeKnowledgePackage(String packageName)` Deprecated. Remove a KnowledgePackage and all the definitions it contains from the KnowledgeBase.
    `void` | `removeProcess(String processId)` Deprecated. Remove a process.
    `void` | `removeQuery(String packageName, String queryName)` Deprecated. Remove a rule from the specified package.
    `void` | `removeRule(String packageName, String ruleName)` Deprecated. Remove a rule from the specified package.

    - ### Methods inherited from interface org.kie.api.KieBase

      `getKiePackage, getKiePackages, getKieSessions, newKieSession, newKieSession, newStatelessKieSession, newStatelessKieSession, removeKiePackage`

    - ### Methods inherited from interface org.kie.api.event.kiebase.KieBaseEventManager

      `addEventListener, getKieBaseEventListeners, removeEventListener`

- - ### Method Detail

    - #### addKnowledgePackages

          void addKnowledgePackages(Collection<KnowledgePackage> kpackages)

      Deprecated.
      Add the collection of KnowledgePackages to the KnowledgeBase. It is recommended that you ALWAYS check KnowledgeBuilder.hasErrors() first before doing this.
      Parameters:
        `kpackages` -

    - #### getKnowledgePackages

          Collection<KnowledgePackage> getKnowledgePackages()

      Deprecated.
      Return an immutable collection of the packages that exist in this KnowledgeBase.
      Returns:

    - #### getKnowledgePackage

          KnowledgePackage getKnowledgePackage(String packageName)

      Deprecated.
      Returns a reference to the KnowledgePackage identified by the given name.
      Parameters:
        `packageName` - the name of the KnowledgePackage to return
      Returns:
        the KnowledgePackage identified by the the given name or null if package not found.

    - #### removeKnowledgePackage

          void removeKnowledgePackage(String packageName)

      Deprecated.
      Remove a KnowledgePackage and all the definitions it contains from the KnowledgeBase.
      Parameters:
        `packageName` -

    - #### getRule

          org.kie.api.definition.rule.Rule getRule(String packageName,
                                                   String ruleName)

      Deprecated.
      Returns a reference to the Rule identified by the given package and rule names.
      Specified by:
        `getRule` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` - the package name to which the rule belongs to.
        `ruleName` - the name of the rule.
      Returns:
        the Rule object or null if not found.

    - #### removeRule

          void removeRule(String packageName,
                          String ruleName)

      Deprecated.
      Remove a rule from the specified package.
      Specified by:
        `removeRule` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` -
        `ruleName` -

    - #### getQuery

          org.kie.api.definition.rule.Query getQuery(String packageName,
                                                     String queryName)

      Deprecated.
      Returns a reference to the Rule identified by the given package and rule names.
      Specified by:
        `getQuery` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` - the package name to which the rule belongs to.
        `queryName` - the name of the rule.
      Returns:
        the Rule object or null if not found.

    - #### removeQuery

          void removeQuery(String packageName,
                           String queryName)

      Deprecated.
      Remove a rule from the specified package.
      Specified by:
        `removeQuery` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` -
        `queryName` -

    - #### removeFunction

          void removeFunction(String packageName,
                              String ruleName)

      Deprecated.
      Remove a function from the specified package.
      Specified by:
        `removeFunction` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` -
        `ruleName` -

    - #### getFactType

          org.kie.api.definition.type.FactType getFactType(String packageName,
                                                           String typeName)

      Deprecated.
      Returns the FactType identified by the given package and type names.
      Specified by:
        `getFactType` in interface `org.kie.api.KieBase`
      Parameters:
        `packageName` - the name of the package the fact belongs to.
        `typeName` - the name of the type.
      Returns:
        the FactType identified by the parameters or null if FactType not found.

    - #### getProcess

          org.kie.api.definition.process.Process getProcess(String processId)

      Deprecated.
      Returns a referent to the Process identified by the given processId
      Specified by:
        `getProcess` in interface `org.kie.api.KieBase`
      Parameters:
        `processId` - the id of the process
      Returns:
        the Process identified by the given processId or null if process not found.

    - #### removeProcess

          void removeProcess(String processId)

      Deprecated.
      Remove a process.
      Specified by:
        `removeProcess` in interface `org.kie.api.KieBase`
      Parameters:
        `processId` -

    - #### getProcesses

          Collection<org.kie.api.definition.process.Process> getProcesses()

      Deprecated.
      Specified by:
        `getProcesses` in interface `org.kie.api.KieBase`

    - #### newStatefulKnowledgeSession

          StatefulKnowledgeSession newStatefulKnowledgeSession(org.kie.api.runtime.KieSessionConfiguration conf,
                                                               org.kie.api.runtime.Environment environment)

      Deprecated.
      Create a new StatefulKnowledgeSession using the given session configuration and/or environment. Either one can be null and it will use a default. Don't forget to dispose() session when you are done.
      Parameters:
        `conf` -
        `environment` -
      Returns:
        The StatefulKnowledgeSession.

    - #### newStatefulKnowledgeSession

          StatefulKnowledgeSession newStatefulKnowledgeSession()

      Deprecated.
      Create a new StatefulKnowledgeSession using the default session configuration. Don't forget to dispose() session when you are done.
      Returns:
        The StatefulKnowledgeSession.

    - #### getStatefulKnowledgeSessions

          Collection<StatefulKnowledgeSession> getStatefulKnowledgeSessions()

      Deprecated.
      Return a collection of the StatefulKnowledgeSessions that exist in this KnowledgeBase. Be careful as sessions are not thread-safe and could be in use elsewhere.
      Returns:
        a Collection of StatefulKnowledgeSessions

    - #### newStatelessKnowledgeSession

          StatelessKnowledgeSession newStatelessKnowledgeSession(org.kie.api.runtime.KieSessionConfiguration conf)

      Deprecated.
      Create a new StatelessKnowledgeSession using the given session configuration. You do not need to call dispose() on this.
      Parameters:
        `conf` -
      Returns:
        The StatelessKnowledgeSession.

    - #### newStatelessKnowledgeSession

          StatelessKnowledgeSession newStatelessKnowledgeSession()

      Deprecated.
      Create a new StatelessKnowledgeSession using the default session configuration. You do not need to call dispose() on this.
      Returns:
        The StatelessKnowledgeSession.

    - #### getEntryPointIds

          Set<String> getEntryPointIds()

      Deprecated.
      Returns the set of the entry points declared and/or used in this knowledge base
      Specified by:
        `getEntryPointIds` in interface `org.kie.api.KieBase`
      Returns:

Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.