Search in sources :

Example 16 with OCShare

use of com.owncloud.android.lib.resources.shares.OCShare in project android by owncloud.

the class CreateShareWithShareeOperation method run.

@Override
protected RemoteOperationResult run(OwnCloudClient client) {
    CreateRemoteShareOperation operation = new CreateRemoteShareOperation(mPath, mShareType, mShareeName, false, "", mPermissions);
    operation.setGetShareDetails(true);
    RemoteOperationResult result = operation.execute(client);
    if (result.isSuccess()) {
        if (result.getData().size() > 0) {
            OCShare share = (OCShare) result.getData().get(0);
            updateData(share);
        }
    }
    return result;
}
Also used : CreateRemoteShareOperation(com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation) RemoteOperationResult(com.owncloud.android.lib.common.operations.RemoteOperationResult) OCShare(com.owncloud.android.lib.resources.shares.OCShare)

Aggregations

OCShare (com.owncloud.android.lib.resources.shares.OCShare)16 RemoteOperationResult (com.owncloud.android.lib.common.operations.RemoteOperationResult)7 ArrayList (java.util.ArrayList)6 RemoteException (android.os.RemoteException)4 Cursor (android.database.Cursor)3 RemoteOperation (com.owncloud.android.lib.common.operations.RemoteOperation)3 GetRemoteSharesForFileOperation (com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation)3 ContentProviderOperation (android.content.ContentProviderOperation)2 ContentValues (android.content.ContentValues)2 OperationApplicationException (android.content.OperationApplicationException)2 CreateRemoteShareOperation (com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation)2 GetRemoteShareOperation (com.owncloud.android.lib.resources.shares.GetRemoteShareOperation)2 UpdateRemoteShareOperation (com.owncloud.android.lib.resources.shares.UpdateRemoteShareOperation)2 ContentProviderResult (android.content.ContentProviderResult)1 Intent (android.content.Intent)1 Drawable (android.graphics.drawable.Drawable)1 Snackbar (android.support.design.widget.Snackbar)1 DialogFragment (android.support.v4.app.DialogFragment)1 LayoutInflater (android.view.LayoutInflater)1 View (android.view.View)1