|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.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(java.lang.Integer max,
java.lang.Integer offset)
Gets all the files By Paging for the App |
Upload |
getAllFilesByUser(java.lang.String userName)
Get all the file based on user name. |
Upload |
getAllFilesByUser(java.lang.String userName,
java.lang.Integer max,
java.lang.Integer offset)
Get all the files 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(java.lang.String uploadFileType)
Get the files based on file type. |
Upload |
getFilesByType(java.lang.String uploadFileType,
java.lang.Integer max,
java.lang.Integer offset)
Get the files based on file type by Paging. |
App42Response |
getFilesCountByType(java.lang.String 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 files 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 fileStream,
java.lang.String fileType,
java.lang.String description)
Uploads file on the cloud. |
Upload |
uploadFileForUser(java.lang.String name,
java.lang.String userName,
java.io.InputStream fileInputStream,
java.lang.String 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 getAllFiles() throws App42Exception
App42Exception
public Upload getAllFiles(java.lang.Integer max, java.lang.Integer offset) throws App42Exception
max
- - Maximum number of records to be fetchedoffset
- - From where the records are to be fetched
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, java.lang.Integer max, java.lang.Integer 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 App42Response getAllFilesCount() throws App42Exception
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 getFileByName(java.lang.String name) throws App42Exception
name
- - The name of the file which has to be retrieved
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 Upload getFilesByType(java.lang.String uploadFileType) throws App42Exception
uploadFileType
- - Type of the file e.g. Upload.AUDIO, Upload.XML etc.
App42Exception
public Upload getFilesByType(java.lang.String uploadFileType, java.lang.Integer max, java.lang.Integer 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
public App42Response getFilesCountByType(java.lang.String uploadFileType) throws App42Exception
uploadFileType
- - Type of the file e.g. Upload.AUDIO, Upload.XML etc.
App42Exception
public App42Response removeAllFiles() throws App42Exception
App42Exception
public App42Response removeAllFilesByUser(java.lang.String userName) throws App42Exception
userName
- - The name of the user for which files 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 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 Upload uploadFile(java.lang.String name, java.io.InputStream fileStream, java.lang.String fileType, java.lang.String description) throws App42Exception
name
- - The name of the file which has to be saved. It is used to
retrieve the file.fileStream
- - 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 fileInputStream, java.lang.String fileType, java.lang.String description) throws App42Exception
name
- - The name of the file which has to be saved. It is used to
retrieve the fileuserName
- - The name of the user for which file has to be saved.fileInputStream
- - 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |