|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStorageProvider
Reference interface for storage providers.
| Method Summary | |
|---|---|
void |
close()
Close the provider. |
boolean |
createFolder(CPath path)
Create a folder at given path, with intermediate folders if needed. |
boolean |
delete(CPath path)
Deletes blob, or recursively delete folder at given path. |
void |
download(CDownloadRequest downloadRequest)
Downloads a blob from provider to a byte sink, as defined by the download_request object. |
CFile |
getFile(CPath path)
Return detailed file information at given path, or None if no object exists at this path |
String |
getProviderName()
Get the provider name |
CQuota |
getQuota()
Returns a CQuota object |
String |
getUserId()
Return user identifier (login in case of login/password, or email in case of OAuth |
CFolderContent |
listFolder(CFolder folder)
Return a map of files present in given CFolder. keys of map are CPath objects, values are CFile objects (CFolder or CBlob). |
CFolderContent |
listFolder(CPath path)
Return a map of files present in given CPath. keys of map are CPath objects, values are CFile objects (CFolder or CBlob). |
CFolderContent |
listRootFolder()
Equivalent to listFolder(net.netheos.pcsapi.models.CPath) with "/" |
void |
upload(CUploadRequest uploadRequest)
Uploads a byte source to provider, as defined by upload_request object. |
| Method Detail |
|---|
String getProviderName()
String getUserId()
throws CStorageException
CStorageException - Error getting the user identifier
CQuota getQuota()
throws CStorageException
CStorageException - Error getting the quota
CFolderContent listRootFolder()
throws CStorageException
listFolder(net.netheos.pcsapi.models.CPath) with "/"
CStorageException - Error getting the root folder
CFolderContent listFolder(CPath path)
throws CStorageException
path - The folder path
CStorageException - Error getting the files in the folder
CFolderContent listFolder(CFolder folder)
throws CStorageException
folder - The folder to get the files in
CStorageException - Error getting the files in the folder
boolean createFolder(CPath path)
throws CStorageException
path - The folder path to create
CStorageException - Error creating the folder
boolean delete(CPath path)
throws CStorageException
path - The file path to delete
CStorageException - Error deleting the file
CFile getFile(CPath path)
throws CStorageException
path - The file path
CStorageException - Error getting the file
void download(CDownloadRequest downloadRequest)
throws CStorageException
downloadRequest - The download request object
CStorageException - Download error
void upload(CUploadRequest uploadRequest)
throws CStorageException
uploadRequest - The upload resuest object
CStorageException - Upload error
void close()
throws CStorageException
CStorageException - Close error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||