Package org.switchyard.component.common.knowledge.config.model

Examples of org.switchyard.component.common.knowledge.config.model.ManifestModel


     * @param model the specified KnowledgeComponentImplementationModel
     * @return the ContainerModel
     */
    public static ContainerModel getContainerModel(KnowledgeComponentImplementationModel model) {
        if (model != null) {
            ManifestModel manifestModel = model.getManifest();
            if (manifestModel != null) {
                return manifestModel.getContainer();
            }
        }
        return null;
    }
View Full Code Here


    public static KnowledgeSessionFactory newSessionFactory(KnowledgeComponentImplementationModel model, ClassLoader loader, ServiceDomain domain, Properties propertyOverrides) {
        // XXX: how bad is this???
        // make sure we can load jbpm classes in osgi environment
        final ClassLoader origTCCL = Classes.setTCCL(loader);
        try {
            ManifestModel manifestModel = model.getManifest();
            if (manifestModel != null) {
                if (manifestModel.getContainer() == null) {
                    ResourcesModel resourcesModel = manifestModel.getResources();
                    if (resourcesModel != null) {
                        return new KnowledgeBuilderSessionFactory(model, loader, domain, propertyOverrides);
                    }
                    RemoteModel remoteModel = manifestModel.getRemote();
                    if (remoteModel != null) {
                        return new KnowledgeRemoteSessionFactory(model, loader, domain, propertyOverrides);
                    }
                }
            }
View Full Code Here

     * @param model the model
     * @param loader the class loader
     * @param fileSystem the kie file system
     */
    public static void addResources(KnowledgeComponentImplementationModel model, ClassLoader loader, KieFileSystem fileSystem) {
        ManifestModel manifestModel = model.getManifest();
        if (manifestModel != null) {
            ResourcesModel resourcesModel = manifestModel.getResources();
            if (resourcesModel != null) {
                KieResources kieResources = KieServices.Factory.get().getResources();
                for (Resource syResource : resourcesModel.getResources()) {
                    URL locationURL = syResource.getLocationURL(loader);
                    if (locationURL != null) {
View Full Code Here

        Assert.assertEquals(DebugRuleRuntimeEventListener.class, listener.getClazz(loader));
        LoggerModel logger = rules.getLoggers().getLoggers().get(0);
        Assert.assertEquals(Integer.valueOf(2000), logger.getInterval());
        Assert.assertEquals("theLog", logger.getLog());
        Assert.assertEquals(LoggerType.CONSOLE, logger.getType());
        ManifestModel manifest = rules.getManifest();
        ContainerModel container = manifest.getContainer();
        ResourcesModel resources = manifest.getResources();
        RemoteModel remote = manifest.getRemote();
        if (CONTAINER_XML.equals(xml)) {
            ReleaseId rid = Containers.toReleaseId(container.getReleaseId());
            Assert.assertEquals("theGroupId", rid.getGroupId());
            Assert.assertEquals("theArtifactId", rid.getArtifactId());
            Assert.assertEquals("theVersion", rid.getVersion());
View Full Code Here

        Assert.assertEquals(DebugProcessEventListener.class, listener.getClazz(loader));
        LoggerModel logger = bpm.getLoggers().getLoggers().get(0);
        Assert.assertEquals(Integer.valueOf(2000), logger.getInterval());
        Assert.assertEquals("theLog", logger.getLog());
        Assert.assertEquals(LoggerType.CONSOLE, logger.getType());
        ManifestModel manifest = bpm.getManifest();
        ContainerModel container = manifest.getContainer();
        ResourcesModel resources = manifest.getResources();
        RemoteModel remote = manifest.getRemote();
        if (CONTAINER_XML.equals(xml)) {
            Assert.assertNull(resources);
            Assert.assertNull(remote);
            ReleaseId rid = Containers.toReleaseId(container.getReleaseId());
            Assert.assertEquals("theGroupId", rid.getGroupId());
View Full Code Here

TOP

Related Classes of org.switchyard.component.common.knowledge.config.model.ManifestModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.