fr.paris.lutece.portal.service.blobstore
Interface IBlobStoreClientService


public interface IBlobStoreClientService

IBlobStoreClientService


Method Summary
 java.lang.String doDeleteFile(java.lang.String strBaseUrl, java.lang.String strBlobStore, java.lang.String strBlobKey)
          Do delete a file in the blobstore webapp
 org.apache.commons.fileupload.FileItem doDownloadFile(java.lang.String strUrl)
          Download the file
 void doDownloadFile(java.lang.String strUrl, java.lang.String strFilePath)
          Download the file to the file path
 java.lang.String doUploadFile(java.lang.String strBaseUrl, org.apache.commons.fileupload.FileItem fileItem, java.lang.String strBlobStore)
          Do upload a file in the blobstore webapp
 java.lang.String getFileName(java.lang.String strUrl)
          Get the file name given an url
 java.lang.String getFileUrl(java.lang.String strBaseUrl, java.lang.String strBlobStore, java.lang.String strBlobKey)
          Get the file url
 

Method Detail

getFileName

java.lang.String getFileName(java.lang.String strUrl)
                             throws BlobStoreClientException
Get the file name given an url

Parameters:
strUrl - the url
Returns:
the file name
Throws:
BlobStoreClientException - exception if there is an issue

doDeleteFile

java.lang.String doDeleteFile(java.lang.String strBaseUrl,
                              java.lang.String strBlobStore,
                              java.lang.String strBlobKey)
                              throws BlobStoreClientException
Do delete a file in the blobstore webapp

Parameters:
strBaseUrl - the base url
strBlobStore - the blobstore service name
strBlobKey - the blob key
Returns:
the deleted blob key
Throws:
BlobStoreClientException - exception if there is an issue

doUploadFile

java.lang.String doUploadFile(java.lang.String strBaseUrl,
                              org.apache.commons.fileupload.FileItem fileItem,
                              java.lang.String strBlobStore)
                              throws BlobStoreClientException
Do upload a file in the blobstore webapp

Parameters:
strBaseUrl - the base url
fileItem - the file to upload
strBlobStore - the blobstore service name
Returns:
the uploaded file blob key
Throws:
BlobStoreClientException - exception if there is an issue

getFileUrl

java.lang.String getFileUrl(java.lang.String strBaseUrl,
                            java.lang.String strBlobStore,
                            java.lang.String strBlobKey)
                            throws BlobStoreClientException
Get the file url

Parameters:
strBaseUrl - the base url
strBlobStore - the blobstore service name
strBlobKey - the blob key
Returns:
the file url
Throws:
BlobStoreClientException - exception if there is an issue

doDownloadFile

void doDownloadFile(java.lang.String strUrl,
                    java.lang.String strFilePath)
                    throws BlobStoreClientException
Download the file to the file path

Parameters:
strUrl - the url of the file
strFilePath - the file path
Throws:
BlobStoreClientException - exception if there is an error

doDownloadFile

org.apache.commons.fileupload.FileItem doDownloadFile(java.lang.String strUrl)
                                                      throws BlobStoreClientException
Download the file

Parameters:
strUrl - the url of the file
Returns:
a FileItem
Throws:
BlobStoreClientException - exception if there is an error


Copyright © 2012 Mairie de Paris. All Rights Reserved.