|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.android.upload.UploadService
public class UploadService
Uploads file on the cloud. Allows access to the files through url. Its especially useful for Mobile/Device apps. It minimizes the App footprint on the device.
Upload
,
App42Response
Constructor Summary | |
---|---|
UploadService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
This is a constructor that takes |
Method Summary | |
---|---|
Upload |
getAllFiles()
Gets all the files for the App |
Upload |
getAllFiles(int max,
int offset)
Gets all the files By Paging for the App |
Upload |
getAllFilesByUser(java.lang.String userName)
Gets the file based on user name. |
Upload |
getAllFilesByUser(java.lang.String userName,
int max,
int offset)
Gets the file based on user name by Paging. |
App42Response |
getAllFilesCount()
Gets count of all the files for the App |
App42Response |
getAllFilesCountByUser(java.lang.String userName)
Gets the count of file based on user name. |
Upload |
getFileByName(java.lang.String name)
Gets the file based on file name. |
Upload |
getFileByUser(java.lang.String name,
java.lang.String userName)
Gets the file based on user and file name. |
Upload |
getFilesByType(UploadFileType uploadFileType)
Get the files based on file type. |
Upload |
getFilesByType(UploadFileType uploadFileType,
int max,
int offset)
Get the files based on file type by Paging. |
App42Response |
getFilesCountByType(UploadFileType uploadFileType)
Get the count of files based on file type. |
App42Response |
removeAllFiles()
Removes all the files for the App |
App42Response |
removeAllFilesByUser(java.lang.String userName)
Removes the file based on user name. |
App42Response |
removeFileByName(java.lang.String name)
Removes the file based on file name. |
App42Response |
removeFileByUser(java.lang.String name,
java.lang.String userName)
Removes the file based on file name and user name. |
Upload |
uploadFile(java.lang.String name,
java.io.InputStream inputStream,
UploadFileType fileType,
java.lang.String description)
Uploads file on the cloud. |
Upload |
uploadFile(java.lang.String name,
java.lang.String filePath,
UploadFileType fileType,
java.lang.String description)
Uploads file on the cloud. |
Upload |
uploadFileForUser(java.lang.String name,
java.lang.String userName,
java.io.InputStream inputStream,
UploadFileType fileType,
java.lang.String description)
Uploads file on the cloud for given user. |
Upload |
uploadFileForUser(java.lang.String name,
java.lang.String userName,
java.lang.String filePath,
UploadFileType fileType,
java.lang.String description)
Uploads file on the cloud for given user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UploadService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public Upload uploadFile(java.lang.String name, java.lang.String filePath, UploadFileType fileType, java.lang.String description) throws App42Exception
name
- The name for the file which has to be saved. It is used to
retrieve the filefilePath
- The local path for the filefileType
- The type of the file. File can be either Audio, Video, Image,
Binary, Txt, xml, json, csv or other Use the static constants
e.g. Upload.AUDIO, Upload.XML etc.description
- Description of the file to be uploaded.
App42Exception
public Upload uploadFile(java.lang.String name, java.io.InputStream inputStream, UploadFileType fileType, java.lang.String description) throws App42Exception
name
- The name for the file which has to be saved. It is used to
retrieve the fileinputStream
- InputStream of the file to be uploaded.fileType
- The type of the file. File can be either Audio, Video, Image,
Binary, Txt, xml, json, csv or other Use the static constants
e.g. Upload.AUDIO, Upload.XML etc.description
- Description of the file to be uploaded.
App42Exception
public Upload uploadFileForUser(java.lang.String name, java.lang.String userName, java.lang.String filePath, UploadFileType fileType, java.lang.String description) throws App42Exception
name
- The name for the file which has to be saved. It is used to
retrieve the fileuserName
- The name for the user for which file has to be saved.filePath
- The local path for the filefileType
- The type of the file. File can be either Audio, Video, Image,
Binary, Txt, xml, json, csv or other Use the static constants
e.g. Upload.AUDIO, Upload.XML etc.description
- Description of the file to be uploaded.
App42Exception
public Upload uploadFileForUser(java.lang.String name, java.lang.String userName, java.io.InputStream inputStream, UploadFileType fileType, java.lang.String description) throws App42Exception
name
- The name for the file which has to be saved. It is used to
retrieve the fileuserName
- The name for the user for which file has to be saved.inputStream
- InputStream of the file to be uploaded.fileType
- The type of the file. File can be either Audio, Video, Image,
Binary, Txt, xml, json, csv or other Use the static constants
e.g. Upload.AUDIO, Upload.XML etc.description
- Description of the file to be uploaded.
App42Exception
public App42Response getAllFilesCount() throws App42Exception
App42Exception
public Upload getAllFiles() throws App42Exception
App42Exception
public Upload getAllFiles(int max, int offset) throws App42Exception
max
- Maximum number of records to be fetchedoffset
- From where the records are to be fetched
App42Exception
public Upload getFileByUser(java.lang.String name, java.lang.String userName) throws App42Exception
name
- The name of the file which has to be retrieveduserName
- The name of the user for which file has to be retrieved
App42Exception
public App42Response getAllFilesCountByUser(java.lang.String userName) throws App42Exception
userName
- The name of the user for which count of the file has to be retrieved
App42Exception
public Upload getAllFilesByUser(java.lang.String userName) throws App42Exception
userName
- The name of the user for which file has to be retrieved
App42Exception
public Upload getAllFilesByUser(java.lang.String userName, int max, int offset) throws App42Exception
userName
- The name of the user for which file has to be retrievedmax
- Maximum number of records to be fetchedoffset
- From where the records are to be fetched
App42Exception
public Upload getFileByName(java.lang.String name) throws App42Exception
name
- The name of the file which has to be retrieved
App42Exception
public App42Response removeFileByUser(java.lang.String name, java.lang.String userName) throws App42Exception
name
- The name of the file which has to be removeduserName
- The name of the user for which file has to be removed
App42Exception
public App42Response removeAllFilesByUser(java.lang.String userName) throws App42Exception
userName
- The name of the user for which file has to be removed
App42Exception
public App42Response removeFileByName(java.lang.String name) throws App42Exception
name
- The name of the file which has to be removed
App42Exception
public App42Response removeAllFiles() throws App42Exception
App42Exception
public App42Response getFilesCountByType(UploadFileType uploadFileType) throws App42Exception
uploadFileType
- Type of the file e.g. Upload.AUDIO, Upload.XML etc.
App42Exception
public Upload getFilesByType(UploadFileType uploadFileType) throws App42Exception
uploadFileType
- Type of the file e.g. Upload.AUDIO, Upload.XML etc.
App42Exception
public Upload getFilesByType(UploadFileType uploadFileType, int max, int offset) throws App42Exception
uploadFileType
- Type of the file e.g. Upload.AUDIO, Upload.XML etc.max
- Maximum number of records to be fetchedoffset
- From where the records are to be fetched
App42Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |