Package org.springframework.roo.addon.tailor.config

Examples of org.springframework.roo.addon.tailor.config.CommandConfiguration


        final TailorConfiguration configuration = configLocator
                .getActiveTailorConfiguration();
        if (configuration == null) {
            return;
        }
        final CommandConfiguration commandConfig = configuration
                .getCommandConfigFor(commandTrafo.getInputCommand());
        if (commandConfig == null) {
            return;
        }
        logInDevelopmentMode(Level.INFO,
                "Tailor: detected " + commandTrafo.getInputCommand());

        for (final ActionConfig config : commandConfig.getActions()) {
            final Action component = actionLocator.getAction(config
                    .getActionTypeId());
            if (component != null) {
                logInDevelopmentMode(Level.INFO,
                        "\tTailoring: " + component.getDescription(config));
View Full Code Here


            if (StringUtils.isBlank(command)) {
                logTailorXMLInvalid("found <config> without command attribute");
                return null;
            }

            final CommandConfiguration newCmdConfig = new CommandConfiguration();
            newCmdConfig.setCommandName(command);
            final List<Element> elActions = XmlUtils.findElements("action",
                    elConfig);
            for (final Element elAction : elActions) {
                // Determine the action type
                if (StringUtils.isBlank(elAction.getAttribute("type"))) {
                    logTailorXMLInvalid("found <action> without type attribute");
                    return null;
                }
                final ActionConfig newAction = new ActionConfig(
                        elAction.getAttribute("type"));
                final NamedNodeMap attributes = elAction.getAttributes();
                for (int i = 0; i < attributes.getLength(); i++) {
                    final Node item = attributes.item(i);
                    final String attributeKey = item.getNodeName();
                    if (!"type".equals(attributeKey)) {
                        newAction.setAttribute(attributeKey,
                                item.getNodeValue());
                    }
                }
                newCmdConfig.addAction(newAction);
            }
            result.addCommandConfig(newCmdConfig);

        }
        return result;
View Full Code Here

TOP

Related Classes of org.springframework.roo.addon.tailor.config.CommandConfiguration

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.