Examples of toMetaData()


Examples of org.openengsb.core.api.model.ContextId.toMetaData()

    }

    private ConfigItem<Map<String, String>> loadContextConfigurationFromFile(File configurationFile) {
        String contextFileName = FilenameUtils.removeExtension(configurationFile.getName());
        ContextId contextId = new ContextId(contextFileName);
        ContextConfiguration contextConfig = new ContextConfiguration(contextId.toMetaData(), null);
        return contextConfig;
    }

    private String[] getContextExtensions() {
        String[] contextFileExtensions = { CONTEXT_FILE_EXTENSION };
View Full Code Here

Examples of org.openengsb.core.api.model.ContextId.toMetaData()

        return availableContexts;
    }

    private Context getContextById(String currentContextId) {
        ContextId contextId = new ContextId(currentContextId);
        List<ContextConfiguration> contexts = getContextConfigurationsOrEmptyOnError(contextId.toMetaData());
        if (contexts.isEmpty()) {
            return null;
        }
        return contexts.get(0).toContext();
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.GlobalDeclaration.toMetadata()

        Map<String, String> globals = readStorageFile();

        if (globals.containsKey(variableName)) {
            String className = globals.get(variableName);
            GlobalDeclaration global = new GlobalDeclaration(className, variableName);
            GlobalConfiguration cnf = new GlobalConfiguration(global.toMetadata(), global);
            ret.add(cnf);
        }
        return ret;
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.GlobalDeclaration.toMetadata()

        List<ConfigItem<GlobalDeclaration>> ret = new ArrayList<ConfigItem<GlobalDeclaration>>();
        Map<String, String> globals = readStorageFile();

        for (Entry<String, String> entry : globals.entrySet()) {
            GlobalDeclaration global = new GlobalDeclaration(entry.getValue(), entry.getKey());
            GlobalConfiguration cnf = new GlobalConfiguration(global.toMetadata(), global);
            ret.add(cnf);
        }
        return ret;
    }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.GlobalDeclaration.toMetadata()

    }

    @Override
    public void addGlobal(String className, String name) throws RuleBaseException {
        GlobalDeclaration globalDeclaration = new GlobalDeclaration(name);
        Map<String, String> metaData = globalDeclaration.toMetadata();
        List<GlobalConfiguration> queryResult;
        try {
            queryResult = globalPersistence.load(metaData);
        } catch (PersistenceException e) {
            throw new RuleBaseException(e);
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.GlobalDeclaration.toMetadata()

    }

    @Override
    public void removeGlobal(String name) throws RuleBaseException {
        GlobalDeclaration globalDeclaration = new GlobalDeclaration(name);
        Map<String, String> metaData = globalDeclaration.toMetadata();
        try {
            globalPersistence.remove(metaData);
        } catch (PersistenceException e) {
            throw new RuleBaseException(e);
        }
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.GlobalDeclaration.toMetadata()

    }

    @Override
    public Map<String, String> listGlobals() {
        GlobalDeclaration globalDeclaration = new GlobalDeclaration();
        Map<String, String> metaData = globalDeclaration.toMetadata();
        List<GlobalConfiguration> queryResult;
        try {
            queryResult = globalPersistence.load(metaData);
        } catch (PersistenceException e) {
            throw new RuleBaseException(e);
View Full Code Here

Examples of org.openengsb.core.workflow.drools.model.ImportDeclaration.toMetadata()

        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.ImportDeclaration.toMetadata()

        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.ImportDeclaration.toMetadata()

    }

    @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);
            }
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.