@Override public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) { if (!result.isSuccess()) { Toast.makeText(this, R.string.todo_operation_finished_in_fail, Toast.LENGTH_SHORT).show(); Log.e(LOG_TAG, result.getLogMessage(), result.getException()); } else if (operation instanceof ReadRemoteFolderOperation) { onSuccessfulRefresh((ReadRemoteFolderOperation)operation, result); } else if (operation instanceof com.owncloud.android.lib.resources.files.UploadRemoteFileOperation) { onSuccessfulUpload((com.owncloud.android.lib.resources.files.UploadRemoteFileOperation)operation, result); } else if (operation instanceof RemoveRemoteFileOperation ) { onSuccessfulRemoteDeletion((RemoveRemoteFileOperation)operation, result); } else if (operation instanceof DownloadRemoteFileOperation ) { onSuccessfulDownload(); } else { Toast.makeText(this, R.string.todo_operation_finished_in_success, Toast.LENGTH_SHORT).show(); } }
Log_OC.e(TAG, "Fetching of public key failed: " + result.getLogMessage(), result.getException()); } finally { if (getMethod != null)
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Fetching of metadata for folder " + fileId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (getMethod != null)
Log_OC.e(TAG, "Fetching of signing CSR failed: " + result.getLogMessage(), result.getException()); } finally { if (postMethod != null)
Log_OC.e(TAG, "Storing private key failed: " + result.getLogMessage(), result.getException()); } finally { if (postMethod != null)
Log_OC.e(TAG, "Lock file with id " + localId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (postMethod != null)
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Storing of metadata for folder " + fileId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (postMethod != null)
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Storing of metadata for folder " + fileId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (putMethod != null)
Log_OC.e(TAG, "Fetching of public key failed: " + result.getLogMessage(), result.getException()); } finally { if (getMethod != null)
e.printStackTrace(); Log_OC.e(TAG, "Synchronizing file " + mRemotePath + ": " + result.getLogMessage(), result.getException());
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Read file " + mRemotePath + " failed: " + result.getLogMessage(), result.getException()); } finally { if (propfind != null)
/** * @param client Client object */ @Override protected RemoteOperationResult run(OwnCloudClient client) { DeleteMethod postMethod = null; RemoteOperationResult result; try { // remote request postMethod = new DeleteMethod(client.getBaseUri() + PUBLIC_KEY_URL); postMethod.addRequestHeader(OCS_API_HEADER, OCS_API_HEADER_VALUE); int status = client.executeMethod(postMethod, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT); result = new RemoteOperationResult(status == HttpStatus.SC_OK, postMethod); client.exhaustResponse(postMethod.getResponseBodyAsStream()); } catch (Exception e) { result = new RemoteOperationResult(e); Log_OC.e(TAG, "Deletion of public key failed: " + result.getLogMessage(), result.getException()); } finally { if (postMethod != null) postMethod.releaseConnection(); } return result; }
if (result.isException()) { Log_OC.e(TAG, "Synchronized " + mRemotePath + ": " + result.getLogMessage(), result.getException()); } else { Log_OC.e(TAG, "Synchronized " + mRemotePath + ": " + result.getLogMessage());
if (result.isException()) { Log_OC.e(TAG, "Synchronized " + remotePath + ": " + result.getLogMessage(), result.getException()); } else { Log_OC.e(TAG, "Synchronized " + remotePath + ": " + result.getLogMessage());
WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException()); return result; } finally {
if (result.isException()) { Log_OC.e(TAG, "Get quota from " + mRemotePath + ": " + result.getLogMessage(), result.getException()); } else { Log_OC.e(TAG, "Get quota from " + mRemotePath + ": " + result.getLogMessage());
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Unlock file with id " + localId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (deleteMethod != null)
result = new RemoteOperationResult(e); Log_OC.e(TAG, "Setting encryption status of " + localId + " failed: " + result.getLogMessage(), result.getException()); } finally { if (method != null)
if (result.isException()) { Log_OC.e(TAG, "Synchronized " + mRemotePath + ": " + result.getLogMessage(), result.getException()); } else { Log_OC.e(TAG, "Synchronized " + mRemotePath + ": " + result.getLogMessage());
WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException());