Package org.springframework.shell

Examples of org.springframework.shell.ShellException


  public QualifiedModuleName convertFromText(String value, Class<?> targetType, String optionContext) {
    int colonIndex = value.indexOf(':');
    if (colonIndex == -1) {
      logger.warning("Incorrect syntax. Valid syntax is '<ModuleType>:<ModuleName>'.");
      logger.warning("For example, 'module info source:file' to get 'file' <source> module info.");
      throw new ShellException();
    }
    RESTModuleType moduleType = validateAndReturnModuleType(value.substring(0, colonIndex));
    return new QualifiedModuleName(value.substring(colonIndex + 1), moduleType);
  }
View Full Code Here


      return RESTModuleType.valueOf(value);
    }
    catch (IllegalArgumentException e) {
      logger.warning("Not a valid module type. Valid module types are: "
          + Arrays.toString(RESTModuleType.values()));
      throw new ShellException();
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.shell.ShellException

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.