class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "TAG"
= "="
method_invocation
class_literal
type_identifier "UploadFileOperation"
. "."
class "class"
. "."
identifier "getSimpleName"
argument_list
( "("
) ")"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "CREATED_BY_USER"
= "="
decimal_integer_literal "0"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "CREATED_AS_INSTANT_PICTURE"
= "="
decimal_integer_literal "1"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "CREATED_AS_INSTANT_VIDEO"
= "="
decimal_integer_literal "2"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "MISSING_FILE_PERMISSION_NOTIFICATION_ID"
= "="
decimal_integer_literal "2501"
; ";"
block_comment "/**\n * OCFile which is to be uploaded.\n */"
field_declaration
modifiers
private "private"
type_identifier "OCFile"
variable_declarator
identifier "mFile"
; ";"
block_comment "/**\n * Original OCFile which is to be uploaded in case f"...
field_declaration
modifiers
private "private"
type_identifier "OCFile"
variable_declarator
identifier "mOldFile"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "mRemotePath"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "mFolderUnlockToken"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "mRemoteFolderToBeCreated"
; ";"
field_declaration
modifiers
private "private"
type_identifier "NameCollisionPolicy"
variable_declarator
identifier "mNameCollisionPolicy"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "mLocalBehaviour"
; ";"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "mCreatedBy"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "mOnWifiOnly"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "mWhileChargingOnly"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "mIgnoringPowerSaveMode"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "mDisableRetries"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "mWasRenamed"
; ";"
field_declaration
modifiers
private "private"
integral_type
long "long"
variable_declarator
identifier "mOCUploadId"
; ";"
block_comment "/**\n * Local path to file which is to be uploaded (befor"...
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "mOriginalStoragePath"
; ";"
field_declaration (+24 nodes collapsed)
field_declaration
modifiers
private "private"
type_identifier "OnRenameListener"
variable_declarator
identifier "mRenameUploadListener"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AtomicBoolean"
variable_declarator
identifier "mCancellationRequested"
= "="
object_creation_expression
new "new"
type_identifier "AtomicBoolean"
argument_list
( "("
false "false"
) ")"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AtomicBoolean"
variable_declarator
identifier "mUploadStarted"
= "="
object_creation_expression
new "new"
type_identifier "AtomicBoolean"
argument_list
( "("
false "false"
) ")"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Context"
variable_declarator
identifier "mContext"
; ";"
field_declaration
modifiers
private "private"
type_identifier "UploadFileRemoteOperation"
variable_declarator
identifier "mUploadOperation"
; ";"
field_declaration
modifiers
private "private"
type_identifier "RequestEntity"
variable_declarator
identifier "mEntity"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "User"
variable_declarator
identifier "user"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "OCUpload"
variable_declarator
identifier "mUpload"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "UploadsStorageManager"
variable_declarator
identifier "uploadsStorageManager"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "ConnectivityService"
variable_declarator
identifier "connectivityService"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "PowerManagementService"
variable_declarator
identifier "powerManagementService"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "encryptedAncestor"
; ";"
field_declaration
modifiers
private "private"
type_identifier "OCFile"
variable_declarator
identifier "duplicatedEncryptedFile"
; ";"
field_declaration
modifiers
private "private"
type_identifier "AtomicBoolean"
variable_declarator
identifier "missingPermissionThrown"
= "="
object_creation_expression
new "new"
type_identifier "AtomicBoolean"
argument_list
( "("
false "false"
) ")"
; ";"
method_declaration (+184 nodes collapsed)
constructor_declaration (+89 nodes collapsed)
constructor_declaration (+437 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isWifiRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mOnWifiOnly"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isChargingRequired"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mWhileChargingOnly"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isIgnoringPowerSaveMode"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mIgnoringPowerSaveMode"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "User"
identifier "getUser"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "user"
; ";"
} "}"
method_declaration (+32 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "OCFile"
identifier "getFile"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mFile"
; ";"
} "}"
block_comment "/**\n * If remote file was renamed, return original OCFil"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Nullable"
public "public"
type_identifier "OCFile"
identifier "getOldFile"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mOldFile"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getOriginalStoragePath"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mOriginalStoragePath"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLocalBehaviour"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mLocalBehaviour"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "wasRenamed"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mWasRenamed"
; ";"
} "}"
method_declaration (+45 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getCreatedBy"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mCreatedBy"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isInstantPicture"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "mCreatedBy"
== "=="
identifier "CREATED_AS_INSTANT_PICTURE"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isInstantVideo"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
identifier "mCreatedBy"
== "=="
identifier "CREATED_AS_INSTANT_VIDEO"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
long "long"
identifier "getOCUploadId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mOCUploadId"
; ";"
} "}"
method_declaration
modifiers
public "public"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "OnDatatransferProgressListener"
> ">"
identifier "getDataTransferListeners"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mDataTransferListeners"
; ";"
} "}"
method_declaration (+84 nodes collapsed)
method_declaration (+84 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Context"
identifier "getContext"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "mContext"
; ";"
} "}"
method_declaration (+21 nodes collapsed)
method_declaration (+615 nodes collapsed)
line_comment "// region E2E Upload"
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressLint"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "AndroidLintUseSparseArrays"
" "\""
) ")"
line_comment "// gson cannot handle sparse arrays easily, therefore use ha"...
private "private"
type_identifier "RemoteOperationResult"
identifier "encryptedUpload"
formal_parameters
( "("
formal_parameter
type_identifier "OwnCloudClient"
identifier "client"
, ","
formal_parameter
type_identifier "OCFile"
identifier "parentFile"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "RemoteOperationResult"
variable_declarator
identifier "result"
= "="
null_literal "null"
; ";"
local_variable_declaration (+27 nodes collapsed)
local_variable_declaration
type_identifier "FileLock"
variable_declarator
identifier "fileLock"
= "="
null_literal "null"
; ";"
local_variable_declaration
integral_type
long "long"
variable_declarator
identifier "size"
; ";"
local_variable_declaration
boolean_type "boolean"
variable_declarator
identifier "metadataExists"
= "="
false "false"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "token"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "Object"
variable_declarator
identifier "object"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "FileChannel"
variable_declarator
identifier "channel"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "ArbitraryDataProvider"
variable_declarator
identifier "arbitraryDataProvider"
= "="
object_creation_expression
new "new"
type_identifier "ArbitraryDataProviderImpl"
argument_list
( "("
method_invocation
identifier "getContext"
argument_list
( "("
) ")"
) ")"
; ";"
local_variable_declaration (+25 nodes collapsed)
try_statement
try "try"
block (+749 nodes collapsed)
catch_clause (+54 nodes collapsed)
catch_clause (+45 nodes collapsed)
catch_clause (+51 nodes collapsed)
finally_clause
finally "finally"
block
{ "{"
expression_statement (+23 nodes collapsed)
} "}"
expression_statement
method_invocation
identifier "completeE2EUpload"
argument_list
( "("
identifier "result"
, ","
identifier "e2eFiles"
, ","
identifier "client"
) ")"
; ";"
return_statement
return "return"
identifier "result"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+57 nodes collapsed)
method_declaration (+174 nodes collapsed)
method_declaration (+177 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration (+135 nodes collapsed)
method_declaration (+183 nodes collapsed)
method_declaration (+436 nodes collapsed)
method_declaration (+63 nodes collapsed)
method_declaration (+139 nodes collapsed)
method_declaration (+184 nodes collapsed)
method_declaration (+211 nodes collapsed)
method_declaration (+355 nodes collapsed)
method_declaration (+130 nodes collapsed)
method_declaration (+122 nodes collapsed)
method_declaration (+635 nodes collapsed)
line_comment "// endregion"
method_declaration (+338 nodes collapsed)
method_declaration
modifiers
private "private"
type_identifier "RemoteOperationResult"
identifier "normalUpload"
formal_parameters
( "("
formal_parameter
type_identifier "OwnCloudClient"
identifier "client"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "RemoteOperationResult"
variable_declarator
identifier "result"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "File"
variable_declarator
identifier "temporalFile"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "File"
variable_declarator
identifier "originalFile"
= "="
object_creation_expression
new "new"
type_identifier "File"
argument_list
( "("
identifier "mOriginalStoragePath"
) ")"
; ";"
local_variable_declaration
type_identifier "File"
variable_declarator
identifier "expectedFile"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "FileLock"
variable_declarator
identifier "fileLock"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "FileChannel"
variable_declarator
identifier "channel"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "FileInputStream"
variable_declarator
identifier "fileInputStream"
= "="
null_literal "null"
; ";"
local_variable_declaration
integral_type
long "long"
variable_declarator
identifier "size"
; ";"
try_statement
try "try"
block (+936 nodes collapsed)
catch_clause (+48 nodes collapsed)
catch_clause (+27 nodes collapsed)
finally_clause
finally "finally"
block
{ "{"
expression_statement
method_invocation
identifier "mUploadStarted"
. "."
identifier "set"
argument_list
( "("
false "false"
) ")"
; ";"
if_statement (+104 nodes collapsed)
if_statement (+92 nodes collapsed)
if_statement (+92 nodes collapsed)
if_statement (+55 nodes collapsed)
if_statement (+31 nodes collapsed)
expression_statement
method_invocation
identifier "logResult"
argument_list
( "("
identifier "result"
, ","
identifier "mOriginalStoragePath"
, ","
identifier "mRemotePath"
) ")"
; ";"
} "}"
if_statement (+73 nodes collapsed)
line_comment "// delete temporal file"
if_statement (+56 nodes collapsed)
return_statement
return "return"
identifier "result"
; ";"
} "}"
method_declaration (+65 nodes collapsed)
method_declaration (+258 nodes collapsed)
method_declaration (+152 nodes collapsed)
method_declaration (+441 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+595 nodes collapsed)
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Checks the existence of the folder where the curr"...
method_declaration (+228 nodes collapsed)
method_declaration (+177 nodes collapsed)
block_comment "/**\n * Create a new OCFile mFile with new remote path. T"...
method_declaration (+200 nodes collapsed)
block_comment "/**\n * Returns a new and available (does not exists on t"...
method_declaration (+215 nodes collapsed)
method_declaration (+140 nodes collapsed)
block_comment "/**\n * Cancels the current upload process.\n *\n *"...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * As soon as this method return true, upload can be"...
method_declaration (+21 nodes collapsed)
block_comment "/**\n * TODO rewrite with homogeneous fail handling, remo"...
method_declaration (+633 nodes collapsed)
block_comment "/**\n * TODO rewrite with homogeneous fail handling, remo"...
method_declaration (+239 nodes collapsed)
block_comment "/**\n * Saves a OC File after a successful upload.\n *"...
method_declaration (+473 nodes collapsed)
method_declaration (+162 nodes collapsed)
interface_declaration
modifiers
public "public"
interface "interface"
identifier "OnRenameListener"
interface_body
{ "{"
method_declaration
void_type "void"
identifier "onRenameUpload"
formal_parameters
( "("
) ")"
; ";"
} "}"
} "}"