org.jbpm.kie.services.impl

## Class KModuleDeploymentService

- java.lang.Object
- - org.jbpm.kie.services.impl.AbstractDeploymentService
  - - org.jbpm.kie.services.impl.KModuleDeploymentService

- All Implemented Interfaces:
    DeploymentService, ListenerSupport
  Direct Known Subclasses:
    DeploymentServiceCDIImpl, DeploymentServiceEJBImpl

      public class KModuleDeploymentService
      extends AbstractDeploymentService

- - ### Field Summary

    - ### Fields inherited from class org.jbpm.kie.services.impl.AbstractDeploymentService

      `deploymentsMap, emf, identityProvider, listeners, managerFactory, runtimeDataService`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KModuleDeploymentService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate(String deploymentId)` Activates given deployment by making sure it will be available for execution.
    `protected org.kie.api.runtime.manager.RuntimeEnvironmentBuilder` | `boostrapRuntimeEnvironmentBuilder(KModuleDeploymentUnit deploymentUnit, DeployedUnit deployedUnit, org.kie.api.runtime.KieContainer kieContainer, org.kie.internal.runtime.conf.MergeMode mode)` This creates and fills a `RuntimeEnvironmentBuilder` instance, which is later used when creating services.
    `void` | `deactivate(String deploymentId)` Deactivates given deployment by making it only available for already running instances.
    `void` | `deploy(DeploymentUnit unit)` Performs deployment operation of given `unit`.
    `protected Object` | `getInstanceFromModel(org.kie.internal.runtime.conf.ObjectModel model, org.kie.api.runtime.KieContainer kieContainer, Map<String,Object> contaxtParams)`
    `protected String` | `getProcessId(String processSource)`
    `protected org.kie.api.runtime.manager.RegisterableItemsFactory` | `getRegisterableItemsFactory(AuditEventBuilder auditLoggerBuilder, org.kie.api.runtime.KieContainer kieContainer, KModuleDeploymentUnit unit)`
    `void` | `onInit()`
    `protected void` | `processClassloader(org.kie.api.runtime.KieContainer kieContainer, DeployedUnitImpl deployedUnit)` This processes the deployment dependencies, which are made available by the `KieContainer` `ClassLoader`.
    `protected void` | `processResources(org.drools.compiler.kie.builder.impl.InternalKieModule module, Collection<String> files, org.kie.api.runtime.KieContainer kieContainer, DeploymentUnit unit, DeployedUnitImpl deployedUnit, org.kie.api.builder.ReleaseId releaseId, Map<String,ProcessDescriptor> processes)` Goes through all files in a deployment, and processes them so that they are then ready for use after deployment.
    `void` | `setBpmn2Service(DefinitionService bpmn2Service)`
    `void` | `setExecutorService(org.kie.api.executor.ExecutorService executorService)`
    `void` | `setFormManagerService(FormManagerService formManagerService)`
    `void` | `setMerger(DeploymentDescriptorMerger merger)`
    `void` | `undeploy(DeploymentUnit unit)` Performs undeployment operation of given `unit`.

    - ### Methods inherited from class org.jbpm.kie.services.impl.AbstractDeploymentService

      `addListener, commonDeploy, getDeployedUnit, getDeployedUnits, getDeploymentsMap, getEmf, getListeners, getManagerFactory, getRuntimeDataService, getRuntimeManager, isDeployed, notifyOnActivate, notifyOnDeactivate, notifyOnDeploy, notifyOnUnDeploy, removeListener, setEmf, setIdentityProvider, setManagerFactory, setRuntimeDataService, setupAuditLogger, shutdown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KModuleDeploymentService

          public KModuleDeploymentService()

  - ### Method Detail

    - #### onInit

          public void onInit()

    - #### deploy

          public void deploy(DeploymentUnit unit)

      Description copied from interface: `DeploymentService`
      Performs deployment operation of given `unit`.
      Specified by:
        `deploy` in interface `DeploymentService`
      Overrides:
        `deploy` in class `AbstractDeploymentService`
      Parameters:
        `unit` - deployment unit to be deployed to runtime

    - #### getRegisterableItemsFactory

          protected org.kie.api.runtime.manager.RegisterableItemsFactory getRegisterableItemsFactory(AuditEventBuilder auditLoggerBuilder,
                                                                                         org.kie.api.runtime.KieContainer kieContainer,
                                                                                         KModuleDeploymentUnit unit)

    - #### undeploy

          public void undeploy(DeploymentUnit unit)

      Description copied from interface: `DeploymentService`
      Performs undeployment operation of given `unit`.
      Specified by:
        `undeploy` in interface `DeploymentService`
      Overrides:
        `undeploy` in class `AbstractDeploymentService`
      Parameters:
        `unit` - deployment unit to be undeployed from runtime

    - #### boostrapRuntimeEnvironmentBuilder

          protected org.kie.api.runtime.manager.RuntimeEnvironmentBuilder boostrapRuntimeEnvironmentBuilder(KModuleDeploymentUnit deploymentUnit,
                                                                                                DeployedUnit deployedUnit,
                                                                                                org.kie.api.runtime.KieContainer kieContainer,
                                                                                                org.kie.internal.runtime.conf.MergeMode mode)

      This creates and fills a `RuntimeEnvironmentBuilder` instance, which is later used when creating services. A lot of the logic here is used to process the information in the `DeploymentDescriptor` instance, which is part of the `DeploymentUnit`.
      Parameters:
        `deploymentUnit` - The `KModuleDeploymentUnit`, which is filled by the method
        `deployedUnit` - The `DeployedUnit`, which is also filled by the method
        `kieContainer` - The `KieContainer`, which contains information needed to fill the above two arguments
        `mode` - The `MergeMode` used to resolve conflicts in the `DeploymentDescriptor`.
      Returns:
        A `RuntimeEnvironmentBuilder` instance ready for use

    - #### getInstanceFromModel

          protected Object getInstanceFromModel(org.kie.internal.runtime.conf.ObjectModel model,
                                    org.kie.api.runtime.KieContainer kieContainer,
                                    Map<String,Object> contaxtParams)

    - #### processResources

          protected void processResources(org.drools.compiler.kie.builder.impl.InternalKieModule module,
                              Collection<String> files,
                              org.kie.api.runtime.KieContainer kieContainer,
                              DeploymentUnit unit,
                              DeployedUnitImpl deployedUnit,
                              org.kie.api.builder.ReleaseId releaseId,
                              Map<String,ProcessDescriptor> processes)

      Goes through all files in a deployment, and processes them so that they are then ready for use after deployment.
      Parameters:
        `module` - The `InternalKieModule`, necessary to get form content
        `files` - The `List` of file (names) to process.
        `kieContainer` - The `KieContainer`, necesary in order to load classes
        `deploymentUnit` - The `DeploymentUnit`, necessary to get the deployment id
        `deployedUnit` - The `DeployedUnit`, which contains the results of actions here

    - #### processClassloader

          protected void processClassloader(org.kie.api.runtime.KieContainer kieContainer,
                                DeployedUnitImpl deployedUnit)

      This processes the deployment dependencies, which are made available by the `KieContainer` `ClassLoader`.
      Parameters:
        `kieContainer` - The `KieContainer`, used to get the `ClassLoader`
        `deployedUnit` - The `DeployedUnitImpl`, used to store the classes loaded

    - #### setBpmn2Service

          public void setBpmn2Service(DefinitionService bpmn2Service)

    - #### setMerger

          public void setMerger(DeploymentDescriptorMerger merger)

    - #### setFormManagerService

          public void setFormManagerService(FormManagerService formManagerService)

    - #### setExecutorService

          public void setExecutorService(org.kie.api.executor.ExecutorService executorService)

    - #### activate

          public void activate(String deploymentId)

      Description copied from interface: `DeploymentService`
      Activates given deployment by making sure it will be available for execution.

    - #### deactivate

          public void deactivate(String deploymentId)

      Description copied from interface: `DeploymentService`
      Deactivates given deployment by making it only available for already running instances.

    - #### getProcessId

          protected String getProcessId(String processSource)

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