fr.paris.lutece.plugins.blobstoreclient.service
Class BlobStoreClientWebService

java.lang.Object
  extended by fr.paris.lutece.plugins.blobstoreclient.service.BlobStoreClientWebService

public class BlobStoreClientWebService
extends java.lang.Object

BlobStoreClientWebService


Constructor Summary
BlobStoreClientWebService()
           
 
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
 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
 void setWebServiceCaller(IWebServiceCaller webServiceCaller)
          Set the webservice caller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobStoreClientWebService

public BlobStoreClientWebService()
Method Detail

setWebServiceCaller

public void setWebServiceCaller(IWebServiceCaller webServiceCaller)
Set the webservice caller

Parameters:
webServiceCaller - the webservice caller

getFileName

public java.lang.String getFileName(java.lang.String strUrl)
                             throws fr.paris.lutece.util.httpaccess.HttpAccessException
Get the file name given an url

Parameters:
strUrl - the url
Returns:
the file name
Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException - exception if there is a HTTP issue

doDeleteFile

public java.lang.String doDeleteFile(java.lang.String strBaseUrl,
                                     java.lang.String strBlobStore,
                                     java.lang.String strBlobKey)
                              throws fr.paris.lutece.util.httpaccess.HttpAccessException
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:
fr.paris.lutece.util.httpaccess.HttpAccessException - exception if there is a HTTP issue

doUploadFile

public java.lang.String doUploadFile(java.lang.String strBaseUrl,
                                     org.apache.commons.fileupload.FileItem fileItem,
                                     java.lang.String strBlobStore)
                              throws fr.paris.lutece.util.httpaccess.HttpAccessException
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:
fr.paris.lutece.util.httpaccess.HttpAccessException - exception if there is a HTTP issue

getFileUrl

public java.lang.String getFileUrl(java.lang.String strBaseUrl,
                                   java.lang.String strBlobStore,
                                   java.lang.String strBlobKey)
                            throws fr.paris.lutece.util.httpaccess.HttpAccessException
Get the file url

Parameters:
strBaseUrl - the base url
strBlobStore - the blobstore service name
strBlobKey - the blob key
Returns:
the file url
Throws:
fr.paris.lutece.util.httpaccess.HttpAccessException - exception if there is a HTTP issue


Copyright © 2011 Mairie de Paris. All Rights Reserved.