Package org.springframework.roo.project

Examples of org.springframework.roo.project.Configuration


   * @param projectOperations
   */
  public static void updatePlugins(String pluginConfiguration,
      ProjectOperations projectOperations) {

    Configuration conf = null;

    // Generating configuration if necessary
    if (StringUtils.isNotBlank(pluginConfiguration)) {
      try {

        DocumentBuilderFactory docFactory = DocumentBuilderFactory
            .newInstance();
        DocumentBuilder docBuilder = docFactory.newDocumentBuilder();

        Document doc = docBuilder.newDocument();
        Element configElement = doc.createElement("configuration");

        // Getting all configurations
        String[] configurationTags = pluginConfiguration.split(",");

        for (String configurationTag : configurationTags) {
          String[] keyValue = configurationTag.split("=");
          if (keyValue.length == 2) {
            Element element = doc.createElement(keyValue[0]);
            element.setTextContent(keyValue[1]);
            configElement.appendChild(element);
          }
        }

        conf = new Configuration(configElement);

      } catch (Exception e) {
        LOGGER.log(Level.WARNING, "[ERROR] " + e);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.roo.project.Configuration

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.