public class QBContent extends BaseService
| Modifier and Type | Method and Description |
|---|---|
static Performer<QBFile> |
createFile(QBFile file)
Create a file entity.
|
static Performer<java.lang.Void> |
declareFileUploaded(int fileId,
int fileSize)
Declare file uploaded.
|
static Performer<java.lang.Void> |
deleteFile(int fileId)
Delete a file.
|
static Performer<java.io.InputStream> |
downloadFile(java.lang.String uid)
Download file by uid.
|
static Performer<java.io.InputStream> |
downloadFile(java.lang.String uid,
Bundle returnedBundle)
Download file by uid.
|
static Performer<java.io.InputStream> |
downloadFile(java.lang.String uid,
QBProgressCallback progressCallback,
Bundle bundle)
Download file by uid.
|
static Performer<java.io.InputStream> |
downloadFileById(int fileID,
Bundle returnedBundle,
QBProgressCallback progressCallback)
Download file by id.
|
static Performer<java.io.InputStream> |
downloadFileById(int fileID,
QBProgressCallback progressCallback)
Download file by id.
|
static Performer<QBFile> |
getFile(int fileId)
Get file info.
|
static Performer<QBFile> |
getFile(QBFile file)
Get file info.
|
static Performer<QBFileObjectAccess> |
getFileObjectAccess(int fileId)
Get file's object access entity with read access
|
static Performer<java.util.ArrayList<QBFile>> |
getFiles(QBPagedRequestBuilder paginationParameters)
Get list of users files.
|
static Performer<java.util.ArrayList<QBFile>> |
getFiles(QBPagedRequestBuilder paginationParameters,
Bundle returnedBundle)
Get list of users files.
|
static Performer<java.util.ArrayList<QBFile>> |
getTaggedList(QBPagedRequestBuilder paginationParameters)
Get list of tagged files.
|
static Performer<java.util.ArrayList<QBFile>> |
getTaggedList(QBPagedRequestBuilder paginationParameters,
Bundle returnedBundle)
Get list of tagged files.
|
static Performer<QBFile> |
updateFile(QBFile file)
Update a file (only wrapper).
|
static Performer<QBFile> |
updateFileBlob(QBFile file)
Update a file wrapper and also initiates a process to upload new version file to cloud (synchronous).
|
static Performer<QBFile> |
updateFileTask(java.io.File file,
int fileId,
java.lang.String tags,
QBProgressCallback progressCallback)
Update file task.
|
static Performer<java.lang.Void> |
uploadFile(java.io.File file,
java.lang.String params,
QBProgressCallback progressCallback)
Upload a file to cloud.
|
static Performer<QBFile> |
uploadFileTask(java.io.File file,
boolean publicAccess,
java.lang.String tags)
Upload File task.
|
static Performer<QBFile> |
uploadFileTask(java.io.File file,
boolean publicAccess,
java.lang.String tags,
QBProgressCallback progressCallback)
Upload File task.
|
createBaseService, createFromExistentToken, getBaseService, getToken, getTokenExpirationDate, resetCredentials, setToken, setTokenExpirationDatepublic static Performer<QBFile> createFile(QBFile file)
file - The file instance to create.public static Performer<java.lang.Void> uploadFile(java.io.File file, java.lang.String params, QBProgressCallback progressCallback)
file - The file to be uploaded.params - QBFileObjectAccess.params valueprogressCallback - A QBProgressCallback callback.public static Performer<java.lang.Void> declareFileUploaded(int fileId, int fileSize)
fileId - The file id to mark as uploaded.fileSize - Size of uploaded file, in bytespublic static Performer<QBFile> getFile(int fileId)
fileId - The file id get info about.public static Performer<QBFile> getFile(QBFile file)
file - The file get info about.public static Performer<java.util.ArrayList<QBFile>> getFiles(QBPagedRequestBuilder paginationParameters)
paginationParameters - The pagination parameters.public static Performer<java.util.ArrayList<QBFile>> getFiles(QBPagedRequestBuilder paginationParameters, Bundle returnedBundle)
paginationParameters - The pagination parameters.returnedBundle - The bundle with response additional information.public static Performer<java.util.ArrayList<QBFile>> getTaggedList(QBPagedRequestBuilder paginationParameters)
paginationParameters - The pagination parameters.public static Performer<java.util.ArrayList<QBFile>> getTaggedList(QBPagedRequestBuilder paginationParameters, Bundle returnedBundle)
paginationParameters - The pagination parameters.returnedBundle - The bundle with response additional information.public static Performer<java.io.InputStream> downloadFileById(int fileID, QBProgressCallback progressCallback)
fileID - The id of file to download.progressCallback - A QBProgressCallback callback.public static Performer<java.io.InputStream> downloadFileById(int fileID, Bundle returnedBundle, QBProgressCallback progressCallback)
fileID - The id of file to download.returnedBundle - The bundle with response additional information.progressCallback - A QBProgressCallback callback.public static Performer<java.io.InputStream> downloadFile(java.lang.String uid)
uid - The uid of file to download.public static Performer<java.io.InputStream> downloadFile(java.lang.String uid, QBProgressCallback progressCallback, Bundle bundle)
uid - The uid of file to download.progressCallback - A QBProgressCallback callback.public static Performer<java.io.InputStream> downloadFile(java.lang.String uid, Bundle returnedBundle)
uid - The uid of file to download.returnedBundle - The bundle with response additional information.public static Performer<java.lang.Void> deleteFile(int fileId)
fileId - The id of file to delete.public static Performer<QBFile> updateFile(QBFile file)
file - The file entity to update, should contain an id and fields to update.public static Performer<QBFile> updateFileBlob(QBFile file)
file - The file entity to update, should contain an id and fields to update.public static Performer<QBFileObjectAccess> getFileObjectAccess(int fileId)
fileId - A file identifierpublic static Performer<QBFile> uploadFileTask(java.io.File file, boolean publicAccess, java.lang.String tags, QBProgressCallback progressCallback)
file - The file to be uploaded.publicAccess - Is file publicly accessible (without session token) (by default: false)tags - Coma separated string with users' tags to share a file withprogressCallback - A QBProgressCallback callback.public static Performer<QBFile> uploadFileTask(java.io.File file, boolean publicAccess, java.lang.String tags)
file - The file to be uploaded.publicAccess - Is file publicly accessible (without session token) (by default: false)tags - Coma separated string with users' tags to share a file withpublic static Performer<QBFile> updateFileTask(java.io.File file, int fileId, java.lang.String tags, QBProgressCallback progressCallback)
file - The new file to be uploaded.fileId - The id of file to update.tags - Coma separated string with users' tags to share a file with.progressCallback - A QBProgressCallback callback.