Examples of ImportConfiguration


Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        List<ConfigItem<ImportDeclaration>> ret = new ArrayList<ConfigItem<ImportDeclaration>>();
        List<String> imports = readStorageFile();

        if (imports.contains(clazz)) {
            ImportDeclaration importDec = new ImportDeclaration(clazz);
            ImportConfiguration cnf = new ImportConfiguration(importDec.toMetadata(), importDec);
            ret.add(cnf);
        }
        return ret;
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        List<ConfigItem<ImportDeclaration>> ret = new ArrayList<ConfigItem<ImportDeclaration>>();
        List<String> imports = readStorageFile();

        for (String clazz : imports) {
            ImportDeclaration importDec = new ImportDeclaration(clazz);
            ImportConfiguration cnf = new ImportConfiguration(importDec.toMetadata(), importDec);
            ret.add(cnf);
        }
        return ret;
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        assertFalse(service.supports(GlobalConfiguration.class));
    }

    @Test
    public void testPersistImportConfiguration_shouldPersistAndLoadConfig() throws Exception {
        ImportConfiguration conf = new ImportConfiguration(new ImportDeclaration("java.util.List"));
        service.persist(conf);

        List<ConfigItem<ImportDeclaration>> loaded = service.load(conf.getMetaData());
        assertEquals(1, loaded.size());
        ImportConfiguration confLoaded = (ImportConfiguration) loaded.get(0);
        assertTrue(confLoaded.getContent().equals(conf.getContent()));
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

    @Test
    public void testPersistImportConfiguration_shouldCreateFileIfNoneExists() throws Exception {
        FileUtils.forceDelete(storageFile);
        assertFalse(storageFile.exists());
        ImportConfiguration conf = new ImportConfiguration(new ImportDeclaration("java.util.List"));
        service.persist(conf);
        assertTrue(storageFile.exists());
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        assertTrue(storageFile.exists());
    }

    @Test
    public void testLoadImportConfiguration_shouldOnlyLoadOneConfig() throws Exception {
        ImportConfiguration conf1 = new ImportConfiguration(new ImportDeclaration("java.util.List"));
        ImportConfiguration conf2 = new ImportConfiguration(new ImportDeclaration("java.util.Map"));
        ImportConfiguration conf3 = new ImportConfiguration(new ImportDeclaration("java.util.Dictionary"));

        service.persist(conf1);
        service.persist(conf2);
        service.persist(conf3);

        List<ConfigItem<ImportDeclaration>> loaded = service.load(conf2.getMetaData());
        assertEquals(1, loaded.size());
        ImportConfiguration confLoaded = (ImportConfiguration) loaded.get(0);
        assertEquals("java.util.Map", confLoaded.getContent().getClassName());
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        assertEquals("java.util.Map", confLoaded.getContent().getClassName());
    }

    @Test
    public void testLoadImportConfiguration_shouldLoadAllConfig() throws Exception {
        ImportConfiguration conf1 = new ImportConfiguration(new ImportDeclaration("java.util.List"));
        ImportConfiguration conf2 = new ImportConfiguration(new ImportDeclaration("java.util.Map"));
        ImportConfiguration conf3 = new ImportConfiguration(new ImportDeclaration("java.util.Dictionary"));

        service.persist(conf1);
        service.persist(conf2);
        service.persist(conf3);
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

        assertEquals(0, loaded.size());
    }

    @Test
    public void testRemoveImportConfiguration_ShouldDeleteConfiguration() throws Exception {
        ImportConfiguration conf1 = new ImportConfiguration(new ImportDeclaration("java.util.List"));
        ImportConfiguration conf2 = new ImportConfiguration(new ImportDeclaration("java.util.Map"));

        service.persist(conf1);
        service.persist(conf2);

        service.remove(conf1.getMetaData());
        List<ConfigItem<ImportDeclaration>> loaded = service.load(new HashMap<String, String>());
        assertEquals(1, loaded.size());
        ImportConfiguration confLoaded = (ImportConfiguration) loaded.get(0);
        assertEquals("java.util.Map", confLoaded.getContent().getClassName());
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportConfiguration

    @Override
    public void addImport(String className) throws RuleBaseException {
        ImportDeclaration imp = new ImportDeclaration(className);
        Map<String, String> metaData = imp.toMetadata();
        ImportConfiguration cnf = new ImportConfiguration(metaData, imp);
        try {
            if (importPersistence.load(metaData).isEmpty()) {
                importPersistence.persist(cnf);
            }
        } catch (PersistenceException e) {
            throw new RuleBaseException(e);
        }
        try {
            builder.reloadRulebase();
        } catch (RuleBaseException e) {
            importPersistence.remove(cnf.getMetaData());
            throw e;
        }
    }
View Full Code Here

Examples of org.rhq.core.domain.sync.ImportConfiguration

            InputStream exportData = createCompressedStream(exportXML);

            //let's just use the default configs so that we don't apply the changes suggested in
            //the changed default configs created above
            ImportConfiguration systemSettingsConfiguration = new ImportConfiguration(
                SystemSettingsSynchronizer.class.getName(), new SystemSettingsSynchronizer().getImporter()
                    .getImportConfigurationDefinition().getDefaultTemplate().createConfiguration());
            ImportConfiguration metricTemplatesConfiguration = new ImportConfiguration(
                MetricTemplateSynchronizer.class.getName(), new MetricTemplateSynchronizer().getImporter()
                    .getImportConfigurationDefinition().getDefaultTemplate().createConfiguration());

            try {
                synchronizationManager.importAllSubsystems(freshUser(), exportData,
View Full Code Here

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.importing.ImportConfiguration

      System.out.println("guide   : "+guide.getName());
      System.out.println("codeset : "+codeset.getName());
      System.out.println("type    : "+buildType);
      System.out.println();
     
      ImportConfiguration importConf = ImportUtils.importConfig(guide, codeset);
      String projectName = importConf.getProjectName();
      final IRunnableWithProgress importOp = buildType.getImportStrategy().createOperation(importConf);
//      buildJob(new GradleRunnable("import "+guide.getName() + " " + codeset.getName() + " "+buildType) {
//        @Override
//        public void doit(IProgressMonitor mon) throws Exception {
          importOp.run(new NullProgressMonitor());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.