Package org.kie.internal.builder

## Interface CompositeKnowledgeBuilder

-     public interface CompositeKnowledgeBuilder

  A KnowledgeBuilder with a fluent interface allowing to add multiple Resources at the same time, without worrying about cross dependencies among them.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CompositeKnowledgeBuilder` | `add​(org.kie.api.io.Resource resource)` | Add a resource of the given ResourceType, using the default type and resource configuration.
    `CompositeKnowledgeBuilder` | `add​(org.kie.api.io.Resource resource, org.kie.api.io.ResourceType type)` | Add a resource of the given ResourceType, using the default resource configuration.
    `CompositeKnowledgeBuilder` | `add​(org.kie.api.io.Resource resource, org.kie.api.io.ResourceType type, org.kie.api.io.ResourceConfiguration configuration)` | Add a resource of the given ResourceType, using the provided ResourceConfiguration.
    `CompositeKnowledgeBuilder` | `add​(org.kie.api.io.Resource resource, org.kie.api.io.ResourceType determineResourceType, org.kie.api.io.ResourceConfiguration conf, ResourceChangeSet changes)` |
    `CompositeKnowledgeBuilder` | `add​(org.kie.api.io.Resource resource, org.kie.api.io.ResourceType determineResourceType, ResourceChangeSet changes)` |
    `void` | `build()` | Build all the Resources added during this batch
    `CompositeKnowledgeBuilder` | `type​(org.kie.api.io.ResourceType type)` | Set the default resource type of all the subsequently added Resources.

- - ### Method Detail

    - #### type

          CompositeKnowledgeBuilder type​(org.kie.api.io.ResourceType type)

      Set the default resource type of all the subsequently added Resources.
      Parameters:
        `type` - the resource type
      Returns:

    - #### add

          CompositeKnowledgeBuilder add​(org.kie.api.io.Resource resource)

      Add a resource of the given ResourceType, using the default type and resource configuration.
      Parameters:
        `resource` - the Resource to add
      Returns:

    - #### add

          CompositeKnowledgeBuilder add​(org.kie.api.io.Resource resource,
                                        org.kie.api.io.ResourceType type)

      Add a resource of the given ResourceType, using the default resource configuration.
      Parameters:
        `resource` - the Resource to add
        `type` - the resource type
      Returns:

    - #### add

          CompositeKnowledgeBuilder add​(org.kie.api.io.Resource resource,
                                        org.kie.api.io.ResourceType type,
                                        org.kie.api.io.ResourceConfiguration configuration)

      Add a resource of the given ResourceType, using the provided ResourceConfiguration. Resources can be created by calling any of the "newX" factory methods of ResourceFactory. The kind of resource (DRL, XDRL, DSL,... CHANGE_SET) must be indicated by the second argument.
      Parameters:
        `resource` - the Resource to add
        `type` - the resource type
        `configuration` - the resource configuration
      Returns:

    - #### build

          void build()

      Build all the Resources added during this batch

    - #### add

          CompositeKnowledgeBuilder add​(org.kie.api.io.Resource resource,
                                        org.kie.api.io.ResourceType determineResourceType,
                                        ResourceChangeSet changes)

    - #### add

          CompositeKnowledgeBuilder add​(org.kie.api.io.Resource resource,
                                        org.kie.api.io.ResourceType determineResourceType,
                                        org.kie.api.io.ResourceConfiguration conf,
                                        ResourceChangeSet changes)