Package org.syncany.plugins.transfer

Examples of org.syncany.plugins.transfer.TransferSettings


public class NoCliRequestsWhileSyncingTest {
  private Map<Integer, Response> responses = new HashMap<Integer, Response>();
 
  @Test
  public void testNoCliRequestWhileSyncing() throws Exception {
    final TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();   
    final TestClient clientA = new TestClient("ClientA", testConnection);
    int port = 58444;
   
    // Load config template
    DaemonConfigTO daemonConfig = TestDaemonUtil.loadDaemonConfig("daemonOneFolderNoWebServer.xml");
View Full Code Here


    // Set interactivity mode 
    isInteractive = !options.has(optionPlugin);
     
    // Ask or set transfer settings
    TransferSettings transferSettings = createTransferSettingsFromOptions(options, optionPlugin, optionPluginOpts);

    // Some misc settings
    boolean createTargetPath = options.has(optionCreateTargetPath);
    boolean advancedModeEnabled = options.has(optionAdvanced);
    boolean encryptionEnabled = !options.has(optionNoEncryption);
View Full Code Here

  protected TransferSettings createTransferSettingsFromOptions(OptionSet options, OptionSpec<String> optionPlugin,
      OptionSpec<String> optionPluginOpts) throws Exception {

    TransferPlugin plugin;
    TransferSettings transferSettings;

    // Parse --plugin and --plugin-option values
    List<String> pluginOptionStrings = options.valuesOf(optionPluginOpts);
    Map<String, String> knownPluginSettings = parsePluginSettingsFromOptions(pluginOptionStrings);
View Full Code Here

    if (isInteractive) {
      out.println();
    }

    // Create nested/child settings
    TransferSettings childSettings = childPlugin.createEmptySettings();

    settings.setField(option.getField().getName(), childSettings);
    nestPrefix = nestPrefix + option.getName() + NESTED_OPTIONS_SEPARATOR;

    for (TransferPluginOption nestedOption : TransferPluginOptions.getOrderedOptions(childSettings.getClass())) {
      askPluginSettings(childSettings, nestedOption, knownPluginSettings, nestPrefix);
    }

    if (isInteractive) {
      callAndPrintPostQueryCallback(optionCallback, null);
View Full Code Here

      if (nestedTransferSettingsClass == null) {
        throw new RuntimeException("No class found for type: " + option.getType());
      }

      TransferSettings nestedSettings = (TransferSettings) nestedTransferSettingsClass.newInstance();

      settings.setField(option.getField().getName(), nestedSettings);
      nestPrefix = nestPrefix + option.getName() + NESTED_OPTIONS_SEPARATOR;

      askPluginSettings(nestedSettings, nestedPluginOption, knownPluginSettings, nestPrefix);
View Full Code Here

    // Set interactivity mode 
    isInteractive = !options.has(optionPlugin) && !options.has(optionPassword);
   
    // Plugin
    TransferSettings transferSettings = null;

    if (nonOptionArgs.size() == 1) {
      String connectLink = (String) nonOptionArgs.get(0);

      operationOptions.setStrategy(ConnectOptionsStrategy.CONNECTION_LINK);
View Full Code Here

  }

  @Test
  public void testFilenameNonASCII() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
    TestClient clientA = new TestClient("A", testConnection);
    TestClient clientB = new TestClient("B", testConnection);

    // Run
    clientA.createNewFile("Exposé"); // Non-ASCII
View Full Code Here

  // TODO [high] Fix issues with readonly files on Windows, and r------ files on Linux

  @Test
  public void testFileLocked() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
    TestClient clientA = new TestClient("A", testConnection);

    // Run!
    clientA.createNewFile("locked-file");
    RandomAccessFile lockedFile = new RandomAccessFile(clientA.getLocalFile("locked-file"), "rw");
View Full Code Here

    if (EnvironmentUtil.isWindows()) {
      return; // Not possible in windows
    }

    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
    TestClient clientA = new TestClient("A", testConnection);

    // Run
    File noReadPermissionFile = clientA.createNewFile("no-read-permission-file");
    Path filePath = Paths.get(noReadPermissionFile.getAbsolutePath());
View Full Code Here

  }

  @Test
  public void testPermissionDeniedNotWritable() throws Exception {
    // Setup
    TransferSettings testConnection = TestConfigUtil.createTestLocalConnection();
    TestClient clientA = new TestClient("A", testConnection);

    // Run
    File noReadPermissionFile = clientA.createNewFile("no-read-permission-file");
    noReadPermissionFile.setWritable(false, false);
View Full Code Here

TOP

Related Classes of org.syncany.plugins.transfer.TransferSettings

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.