Package org.syncany.plugins.transfer

Examples of org.syncany.plugins.transfer.StorageException


      transferManager.download(remoteFile, tmpRepoFile);
      return tmpRepoFile;
    }
    catch (Exception e) {
      throw new StorageException("Unable to connect to repository.", e);
    }
  }
View Full Code Here


    try {
      Serializer serializer = new Persister();
      serializer.read(RepoTO.class, repoFileStr);
    }
    catch (Exception e) {
      throw new StorageException("Repo file corrupt.", e);
    }
  }
View Full Code Here

    try {
      Serializer serializer = new Persister();
      return serializer.read(MasterTO.class, tmpMasterFile);
    }
    catch (Exception e) {
      throw new StorageException("Master file corrupt.", e);
    }
  }
View Full Code Here

  public LocalTransferSettings subsettings2;

  @Validate
  public void validate() throws StorageException {
    if (baz != null && !baz.equalsIgnoreCase("baz")) {
      throw new StorageException("Only allowed value for baz field is 'baz'");
    }
  }
View Full Code Here

    if (!settings.isValid()) {
      if (askRetryInvalidSettings(settings.getReasonForLastValidationFail())) {
        return askPluginSettings(settings, knownPluginSettings);
      }

      throw new StorageException("Validation failed: " + settings.getReasonForLastValidationFail());
    }

    logger.log(Level.INFO, "Settings are " + settings.toString());

    return settings;
View Full Code Here

    try {
      return askPluginSettings(transferSettings, new HashMap<String, String>());
    }
    catch (Exception e) {
      logger.log(Level.SEVERE, "Unable to reload old plugin settings", e);
      throw new StorageException("Unable to reload old plugin settings: " + e.getMessage());
    }
  }
View Full Code Here

  @Override
  protected String validateName(String name) throws StorageException {
    Matcher matcher = NAME_PATTERN.matcher(name);

    if (!matcher.matches()) {
      throw new StorageException(name + ": remote filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
    }
   
    try {
      targetRemoteFile = RemoteFile.createRemoteFile(matcher.group(2));
    }
    catch (Exception e) {
      throw new StorageException(name + ": remote filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
    }

    return name;
  }
View Full Code Here

  @Override
  protected String validateName(String name) throws StorageException {
    Matcher matcher = NAME_PATTERN.matcher(name);

    if (!matcher.matches()) {
      throw new StorageException(name + ": remote database filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
    }

    clientName = matcher.group(1);
    clientVersion = Long.parseLong(matcher.group(2));
View Full Code Here

  }

  @Override
  protected String validateName(String name) throws StorageException {
    if (!NAME_FORMAT.equals(name)) {
      throw new StorageException(name + ": remote filename pattern does not match: " + NAME_FORMAT + " expected.");
    }
   
    return name;
  }
View Full Code Here

  @Override
  protected String validateName(String name) throws StorageException {
    Matcher matcher = NAME_PATTERN.matcher(name);

    if (!matcher.matches()) {
      throw new StorageException(name + ": remote filename pattern does not match: " + NAME_PATTERN.pattern() + " expected.");
    }

    return name;
  }
View Full Code Here

TOP

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

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.