Package org.syncany.operations.init

Examples of org.syncany.operations.init.GenlinkOperationOptions


  }

  @Override
  public Response handleRequest(FolderRequest request) {
    try {
      GenlinkOperation operation = new GenlinkOperation(config, new GenlinkOperationOptions());
      GenlinkOperationResult operationResult = operation.execute();
      GenlinkFolderResponse response = new GenlinkFolderResponse(operationResult, request.getId());
   
      return response;
    }
View Full Code Here


    // Compression: --no-compression
    List<TransformerTO> transformersTO = getTransformersTO(compressionEnabled, cipherSpecs);

    // Genlink options: --short
    GenlinkOperationOptions genlinkOptions = new GenlinkOperationOptions();
    genlinkOptions.setShortUrl(options.has(optionShortUrl));
       
    // Set repo password
    String password = validateAndGetPassword(options, optionNoEncryption, optionPassword);
    operationOptions.setPassword(password);
   
View Full Code Here

    return true;
  }
 
  @Override
  public int execute(String[] operationArgs) throws Exception {
    GenlinkOperationOptions operationOptions = parseOptions(operationArgs);   
    GenlinkOperationResult operationResult = client.genlink(operationOptions);   
   
    printResults(operationResult);
   
    return 0;   
View Full Code Here

    return 0;   
  }
 
  @Override
  public GenlinkOperationOptions parseOptions(String[] operationArgs) {
    GenlinkOperationOptions operationOptions = new GenlinkOperationOptions();
   
    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionMachineReadable = parser.acceptsAll(asList("m", "machine-readable"));   
    OptionSpec<Void> optionShort = parser.acceptsAll(asList("s", "short"));   

    parser.allowsUnrecognizedOptions();   
    OptionSet options = parser.parse(operationArgs);

    // --machine-readable, -m
    machineReadableOutput = options.has(optionMachineReadable);
   
    // --short, -s
    operationOptions.setShortUrl(options.has(optionShort));

    return operationOptions;
  }
View Full Code Here

TOP

Related Classes of org.syncany.operations.init.GenlinkOperationOptions

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.