Search in sources :

Example 1 with KieAssemblerService

use of org.kie.api.internal.assembler.KieAssemblerService in project drools by kiegroup.

the class KnowledgeBuilderImpl method addPackageForExternalType.

void addPackageForExternalType(ResourceType type, List<ResourceWithConfiguration> resources) throws Exception {
    KieAssemblers assemblers = ServiceRegistry.getInstance().get(KieAssemblers.class);
    KieAssemblerService assembler = assemblers.getAssemblers().get(type);
    if (assembler != null) {
        assembler.addResources(this, resources, type);
    } else {
        throw new RuntimeException("Unknown resource type: " + type);
    }
}
Also used : KieAssemblerService(org.kie.api.internal.assembler.KieAssemblerService) KieAssemblers(org.kie.api.internal.assembler.KieAssemblers)

Example 2 with KieAssemblerService

use of org.kie.api.internal.assembler.KieAssemblerService in project drools by kiegroup.

the class KnowledgeBuilderImpl method addPackageForExternalType.

@Deprecated
void addPackageForExternalType(Resource resource, ResourceType type, ResourceConfiguration configuration) throws Exception {
    KieAssemblers assemblers = ServiceRegistry.getInstance().get(KieAssemblers.class);
    KieAssemblerService assembler = assemblers.getAssemblers().get(type);
    if (assembler != null) {
        assembler.addResource(this, resource, type, configuration);
    } else {
        throw new RuntimeException("Unknown resource type: " + type);
    }
}
Also used : KieAssemblerService(org.kie.api.internal.assembler.KieAssemblerService) KieAssemblers(org.kie.api.internal.assembler.KieAssemblers)

Aggregations

KieAssemblerService (org.kie.api.internal.assembler.KieAssemblerService)2 KieAssemblers (org.kie.api.internal.assembler.KieAssemblers)2