Examples of SimpleCommandLineParser


Examples of com.google.feedserver.util.SimpleCommandLineParser

    SampleFileSystemFeedConfigStore feedConfigStore = new SampleFileSystemFeedConfigStore();
    log.info("Created a file store");
    FeedServerConfiguration config = FeedServerConfiguration.createIntance(feedConfigStore);
    config.setAclValidator(new AllowAllAclValidator());
    config.initialize(new SimpleCommandLineParser(args));
    config.setWrapperManagerClassName("com.google.feedserver.samples.manager.XmlWrapperManager");
    // set up server
    Server server = new Server(config.getPort());
    Context context = new Context(server, "/", Context.SESSIONS);
View Full Code Here

Examples of com.google.feedserver.util.SimpleCommandLineParser

    SampleFileSystemFeedConfigStore feedConfigStore = new SampleFileSystemFeedConfigStore();
    logger.info("Created a file system config store");
    FeedServerConfiguration config = FeedServerConfiguration.createIntance(feedConfigStore);
    config.setAclValidator(new AllowAllAclValidator());
    config.initialize(new SimpleCommandLineParser(args));
    config.setWrapperManagerClassName(XmlWrapperManager.class.getName());
    // set up server
    Server server = new Server(config.getPort());
//    server.getConnectors()[0].setHost("localhost");  // listen on localhost:{port} only
    Context context = new Context(server, "/", Context.SESSIONS);
View Full Code Here

Examples of sample.util.SimpleCommandLineParser

      System.out.println(s);
    }
  }

  public static void main(String[] args) throws IOException, ServiceException {
    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String username = parser.getValue("username", "user", "u");
    String password = parser.getValue("password", "pass", "p");
    String domain = parser.getValue("domain", "d");
    String site = parser.getValue("site", "s");

    if (domain == null) {
      domain = "site";
    }
   
View Full Code Here

Examples of sample.util.SimpleCommandLineParser

  }

  public static void main(String[] args) throws DocumentListException,
      IOException, ServiceException, InterruptedException {

    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String user = parser.getValue("username", "user", "u");
    String password = parser.getValue("password", "pass", "p");
    boolean help = parser.containsKey("help", "h");

    if (help || (user == null || password == null)) {
      printMessage(USAGE_MESSAGE);
      System.exit(1);
    }
View Full Code Here

Examples of sample.util.SimpleCommandLineParser

  /**
   * Main entry point. Parses arguments and creates and invokes the demo.
   */
  public static void main(String[] arg) throws Exception {
    SimpleCommandLineParser parser = new SimpleCommandLineParser(arg);

    // Parse command-line flags
    String project = parser.getValue("project");
    String username = parser.getValue("username");
    String password = parser.getValue("password");

    boolean help = parser.containsKey("help");
    if (help || (project == null)) {
      usage();
      System.exit(help ? 0 : 1);
    }

View Full Code Here

Examples of sample.util.SimpleCommandLineParser

  /**
   * Main entry point. Parses arguments and creates and invokes the demo.
   */
  public static void main(String[] arg) throws Exception {
    SimpleCommandLineParser parser = new SimpleCommandLineParser(arg);

    // Parse command-line flags
    String project = parser.getValue("project");
    String username = parser.getValue("username");
    String password = parser.getValue("password");

    boolean help = parser.containsKey("help");
    if (help || (project == null) || (username == null) || (password == null)) {
      usage();
      System.exit(help ? 0 : 1);
    }

View Full Code Here

Examples of sample.util.SimpleCommandLineParser

   * @param args the command-line arguments
   * @throws AuthenticationException if the service is unable to validate the
   *         username and password.
   */
  public static void main(String[] args) throws AuthenticationException {
    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String username = parser.getValue("username", "user", "u");
    String password = parser.getValue("password", "pass", "p");
    boolean help = parser.containsKey("help", "h");

    if (help || username == null || password == null) {
      usage();
      System.exit(1);
    }
View Full Code Here

Examples of sample.util.SimpleCommandLineParser

   * @throws IOException
   */
  public static void main(String[] args)
      throws DocumentListException, IOException, ServiceException,
      InterruptedException {
    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String authSub = parser.getValue("authSub", "auth", "a");
    String user = parser.getValue("username", "user", "u");
    String password = parser.getValue("password", "pass", "p");
    String host = parser.getValue("host", "s");
    boolean help = parser.containsKey("help", "h");

    if (host == null) {
      host = DocumentList.DEFAULT_HOST;
    }

    if (help || (user == null || password == null) && authSub == null) {
      printMessage(USAGE_MESSAGE);
      System.exit(1);
    }

    if (parser.containsKey("log", "l")) {
      turnOnLogging();
    }

    DocumentListDemo demo = new DocumentListDemo(System.out, APPLICATION_NAME,
        host);
View Full Code Here

Examples of sample.util.SimpleCommandLineParser

   * @param args See the usage method.
   */
  public static void main(String[] args) {

    // Set username, password and feed URI from command-line arguments.
    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String userName = parser.getValue("username", "user", "u");
    String userPassword = parser.getValue("password", "pwd", "p");
    boolean help = parser.containsKey("help", "h");
    if (help || (userName == null)) {
      usage();
      System.exit(1);
    }

View Full Code Here

Examples of sample.util.SimpleCommandLineParser

*/
public class Tester {

  public static void main(String[] args) throws Exception {

    SimpleCommandLineParser parser = new SimpleCommandLineParser(args);
    String serviceName = parser.getValue("serviceName", "service", "s");
    String appName = parser.getValue("appName", "app", "a");
    String feedUrlString = parser.getValue("feedUrl", "feed", "f");
    String username = parser.getValue("username", "user", "u");
    String password = parser.getValue("password", "pass", "p");
    boolean updateEntry = parser.containsKey("update");
    boolean help = parser.containsKey("help", "h");

    if (help) {
      usage();
      System.exit(1);
    }
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.