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

  Modifier and Type
  Method
  Description
  `CompositeKnowledgeBuilder`
  `add(Resource resource)`
  Add a resource of the given ResourceType, using the default type and resource configuration.
  `CompositeKnowledgeBuilder`
  `add(Resource resource, ResourceType type)`
  Add a resource of the given ResourceType, using the default resource configuration.
  `CompositeKnowledgeBuilder`
  `add(Resource resource, ResourceType type, ResourceConfiguration configuration)`
  Add a resource of the given ResourceType, using the provided ResourceConfiguration.
  `CompositeKnowledgeBuilder`
  `add(Resource resource, ResourceType determineResourceType, ResourceConfiguration conf, ResourceChangeSet changes)`
  `CompositeKnowledgeBuilder`
  `add(Resource resource, ResourceType determineResourceType, ResourceChangeSet changes)`
  `void`
  `build()`
  Build all the Resources added during this batch
  `CompositeKnowledgeBuilder`
  `type(ResourceType type)`
  Set the default resource type of all the subsequently added Resources.

- ## Method Details

  - ### type

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

  - ### add

    CompositeKnowledgeBuilder add(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(Resource resource, 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(Resource resource, ResourceType type, 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,... ) 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(Resource resource, ResourceType determineResourceType, ResourceChangeSet changes)

  - ### add

    CompositeKnowledgeBuilder add(Resource resource, ResourceType determineResourceType, ResourceConfiguration conf, ResourceChangeSet changes)