Package org.syncany.operations.ls_remote

Examples of org.syncany.operations.ls_remote.LsRemoteOperation


  }

  @Override
  public Response handleRequest(FolderRequest request) {
    try {
      LsRemoteOperation operation = new LsRemoteOperation(config);
      LsRemoteOperationResult operationResult = operation.execute();
      LsRemoteFolderResponse response = new LsRemoteFolderResponse(operationResult, request.getId());
   
      return response;
    }
    catch (Exception e) {
View Full Code Here


      return false;
    }

    // Find remote changes (unless --force is enabled)
    if (!options.forceUploadEnabled()) {
      LsRemoteOperationResult lsRemoteOperationResult = new LsRemoteOperation(config, transferManager).execute();
      List<DatabaseRemoteFile> unknownRemoteDatabases = lsRemoteOperationResult.getUnknownRemoteDatabases();

      if (unknownRemoteDatabases.size() > 0) {
        logger.log(Level.INFO, "There are remote changes. Call 'down' first or use --force you must, Luke!");
        result.setResultCode(UpResultCode.NOK_UNKNOWN_DATABASES);
View Full Code Here

  /**
   * Lists unknown/new remote databases using the {@link LsRemoteOperation}.
   */
  private LsRemoteOperationResult listUnknownRemoteDatabases() throws Exception {
    return new LsRemoteOperation(config, transferManager).execute();
  }
View Full Code Here

    Iterator<DatabaseVersion> dirtyDatabaseVersions = localDatabase.getDirtyDatabaseVersions();
    return dirtyDatabaseVersions.hasNext(); // TODO [low] Is this a resource creeper?
  }

  private boolean hasRemoteChanges() throws Exception {
    LsRemoteOperationResult lsRemoteOperationResult = new LsRemoteOperation(config).execute();
    return lsRemoteOperationResult.getUnknownRemoteDatabases().size() > 0;
  }
View Full Code Here

  public StatusOperationResult status(StatusOperationOptions options) throws Exception {
    return new StatusOperation(config, options).execute();
  }

  public LsRemoteOperationResult lsRemote() throws Exception {
    return new LsRemoteOperation(config).execute();
  }
View Full Code Here

TOP

Related Classes of org.syncany.operations.ls_remote.LsRemoteOperation

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.