Search in sources :

Example 16 with WalkModFacade

use of org.walkmod.WalkModFacade in project walkmod-core by walkmod.

the class AddExcludesCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        jcommander.usage("add-excludes");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addExcludesToChain(chain, excludes, recursive, setToReader, setToWriter);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 17 with WalkModFacade

use of org.walkmod.WalkModFacade in project walkmod-core by walkmod.

the class AddIncludesCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        jcommander.usage("add-includes");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addIncludesToChain(chain, includes, recursive, setToReader, setToWriter);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 18 with WalkModFacade

use of org.walkmod.WalkModFacade in project walkmod-core by walkmod.

the class AddModuleCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        jcommander.usage("add-module");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addModules(modules);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 19 with WalkModFacade

use of org.walkmod.WalkModFacade in project walkmod-core by walkmod.

the class AddTransformationCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        jcommander.usage("add");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addTransformationConfig(chain, path, recursive, buildTransformationCfg(), order, before);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 20 with WalkModFacade

use of org.walkmod.WalkModFacade in project walkmod-core by walkmod.

the class PrintModulesCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        command.usage("modules");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options());
        Configuration cfg = facade.getConfiguration();
        if (cfg == null) {
            log.error("Sorry, the current directory does not contain a walkmod configuration file or it is invalid.");
        }
        at = new V2_AsciiTable();
        at.addRule();
        at.addRow("MODULE");
        at.addRule();
        if (cfg != null) {
            List<String> modules = cfg.getModules();
            if (modules != null) {
                for (String module : modules) {
                    at.addRow(module);
                }
            }
        }
        at.addRule();
    }
}
Also used : Configuration(org.walkmod.conf.entities.Configuration) V2_AsciiTable(de.vandermeer.asciitable.v2.V2_AsciiTable) WalkModFacade(org.walkmod.WalkModFacade)

Aggregations

WalkModFacade (org.walkmod.WalkModFacade)25 V2_AsciiTable (de.vandermeer.asciitable.v2.V2_AsciiTable)6 Configuration (org.walkmod.conf.entities.Configuration)5 PluginConfig (org.walkmod.conf.entities.PluginConfig)3 ChainConfig (org.walkmod.conf.entities.ChainConfig)2 TransformationConfig (org.walkmod.conf.entities.TransformationConfig)2 PluginConfigImpl (org.walkmod.conf.entities.impl.PluginConfigImpl)2 JSONArray (com.alibaba.fastjson.JSONArray)1 JSONObject (com.alibaba.fastjson.JSONObject)1 DefaultJSONParser (com.alibaba.fastjson.parser.DefaultJSONParser)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 URL (java.net.URL)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)1 Document (org.w3c.dom.Document)1 NodeList (org.w3c.dom.NodeList)1 BeanDefinition (org.walkmod.conf.entities.BeanDefinition)1