Package java.io

Examples of java.io.Console.readLine()


        instance.addExclude(projectId, pattern);
      }
      else if(args.length == 1 && args[0].equals("del"))
      {
        int projectId = Integer.parseInt(console.readLine("Project ID: "));

        instance.deleteProject(projectId);
      }
      else if(args.length == 2 && args[0].equals("del") && args[1].equals("resource"))
      {
View Full Code Here


        instance.deleteProject(projectId);
      }
      else if(args.length == 2 && args[0].equals("del") && args[1].equals("resource"))
      {
        int resourceId = Integer.parseInt(console.readLine("Resource ID: "));

        instance.deleteResource(resourceId);
      }
      else if(args.length == 2 && args[0].equals("del") && args[1].equals("exclude"))
      {
View Full Code Here

        instance.deleteResource(resourceId);
      }
      else if(args.length == 2 && args[0].equals("del") && args[1].equals("exclude"))
      {
        int excludeId = Integer.parseInt(console.readLine("Exclude ID: "));

        instance.deleteExclude(excludeId);
      }
      else if(args.length == 1 && args[0].equals("build"))
      {
View Full Code Here

                    String prompt = "Value: ";
                    if (associatedProperty != null && associatedProperty.toLowerCase().contains("password")) {
                        prompt = "Password: ";
                    }

                    valueToEncode = String.valueOf(console.readLine("%s", prompt));
                } else {
                    LOG.error("NO CONSOLE!");
                }

                break;
View Full Code Here

            Console console = System.console();
            console.format("\nThe [%s] property is required but not set in [%s].\n", propertyName, propertiesFileName);
            console.format("Do you want to set [%s] value now?\n", propertyName);
            String response = "";
            while (!(response.startsWith("n") || response.startsWith("y"))) {
                response = String.valueOf(console.readLine("%s", "yes|no: ")).toLowerCase();
            }
            if (response.startsWith("n")) {
                throw new RHQControlException("Please update the [" + propertiesFileName + "] file as required.");
            }
View Full Code Here

            do {
                propertyValue = "";
                while (StringUtil.isBlank(propertyValue)) {
                    if (!hideInput) {
                        propertyValue = String.valueOf(console.readLine("%s", propertyName
                            + (((obfuscate || encode) ? " (enter as plain text): " : ": "))));
                    } else {
                        propertyValue = String.valueOf(console.readPassword("%s", propertyName
                            + (((obfuscate || encode) ? " (enter as plain text): " : ": "))));
                    }
View Full Code Here

                if (!hideInput) {
                    console.format("Is [" + propertyValue + "] correct?\n");
                    response = "";
                    while (!(response.startsWith("n") || response.startsWith("y"))) {
                        response = String.valueOf(console.readLine("%s", "yes|no: ")).toLowerCase();
                    }
                } else {
                    console.format("Confirm:\n");
                    String confirmValue = String.valueOf(console.readPassword("%s", propertyName
                        + (((obfuscate || encode) ? " (enter as plain text): " : ": "))));
View Full Code Here

            if(i!=choices_list.size()-1)
                System.out.print("/");
        }
        System.out.print(")");
        while(true) {
            valasz = konzol.readLine();
            if(choices_list.contains(valasz)) {
                choice_id = choices_list.indexOf(valasz);
                break;
            }
            else
View Full Code Here

            if(i!=choices_list.size()-1)
                System.out.print("/");
        }
        System.out.print(")");
        while(true) {
            valasz = konzol.readLine();
            if(choices_list.contains(valasz)) {
                choice_id = choices_list.indexOf(valasz);
                break;
            }
            else
View Full Code Here

            System.err.println(SecurityLogger.ROOT_LOGGER.noConsole());
            System.exit(1);
        }

        while (encDir == null || encDir.length() == 0) {
            encDir = console
                    .readLine(SecurityLogger.ROOT_LOGGER.enterEncryptionDirectory() + " ");
        }

        while (keystoreURL == null || keystoreURL.length() == 0) {
            keystoreURL = console.readLine(SecurityLogger.ROOT_LOGGER.enterKeyStoreURL() + " ");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.