Search in sources :

Example 6 with WalkModFacade

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

the class AddCfgProviderCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        command.usage("add-provider");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addProviderConfig(build(), recursive);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 7 with WalkModFacade

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

the class AddParamCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        command.usage("add-param");
    } else {
        WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
        facade.addConfigurationParameter(param, value, type, category, name, chain, recursive);
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 8 with WalkModFacade

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

the class AddPluginCommand method execute.

@Override
public void execute() throws Exception {
    if (help) {
        command.usage("add-plugin");
    } else {
        List<PluginConfig> list = build();
        for (PluginConfig pc : list) {
            WalkModFacade facade = new WalkModFacade(OptionsBuilder.options().printErrors(printErrors));
            facade.addPluginConfig(pc, recursive);
        }
    }
}
Also used : PluginConfig(org.walkmod.conf.entities.PluginConfig) WalkModFacade(org.walkmod.WalkModFacade)

Example 9 with WalkModFacade

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

the class ApplyCommand method execute.

@Override
public void execute() throws Exception {
    if (isHelpNeeded()) {
        command.usage("apply");
    } else {
        WalkModFacade facade = new WalkModFacade(buildOptions());
        String[] params = new String[getParameters().size()];
        if (params.length == 0) {
            facade.apply();
        } else {
            facade.apply(getParameters().toArray(params));
        }
    }
}
Also used : WalkModFacade(org.walkmod.WalkModFacade)

Example 10 with WalkModFacade

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

the class CheckCommand method execute.

@Override
public void execute() throws Exception {
    if (isHelpNeeded()) {
        command.usage("check");
    } else {
        WalkModFacade facade = new WalkModFacade(buildOptions());
        String[] params = new String[getParameters().size()];
        if (params.length == 0) {
            facade.check();
        } else {
            facade.check(getParameters().toArray(params));
        }
    }
}
Also used : 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