Class BlobStoreFileStorageService
- java.lang.Object
-
- fr.paris.lutece.plugins.blobstore.service.BlobStoreFileStorageService
-
- All Implemented Interfaces:
fr.paris.lutece.portal.service.file.IFileStoreServiceProvider,java.io.Serializable
public class BlobStoreFileStorageService extends java.lang.Object implements fr.paris.lutece.portal.service.file.IFileStoreServiceProviderDatabaseBlobStoreService.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BlobStoreFileStorageService(fr.paris.lutece.portal.service.file.IFileDownloadUrlService fileDownloadUrlService, fr.paris.lutece.portal.service.file.IFileRBACService fileRBACService, fr.paris.lutece.plugins.blobstore.service.IBlobStoreService blobStoreService)init
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAccessRights(java.util.Map<java.lang.String,java.lang.String> fileData, fr.paris.lutece.api.user.User user)voidcheckLinkValidity(java.util.Map<java.lang.String,java.lang.String> fileData)voiddelete(java.lang.String strKey)fr.paris.lutece.portal.service.file.IFileDownloadUrlServicegetDownloadUrlService()Get the downloadServicefr.paris.lutece.portal.business.file.FilegetFile(java.lang.String strKey)fr.paris.lutece.portal.business.file.FilegetFile(java.lang.String strKey, boolean withPhysicalFile)get file from databasejava.lang.StringgetFileDownloadUrlBO(java.lang.String strKey)java.lang.StringgetFileDownloadUrlBO(java.lang.String strKey, java.util.Map<java.lang.String,java.lang.String> additionnalData)java.lang.StringgetFileDownloadUrlFO(java.lang.String strKey)java.lang.StringgetFileDownloadUrlFO(java.lang.String strKey, java.util.Map<java.lang.String,java.lang.String> additionnalData)fr.paris.lutece.portal.business.file.FilegetFileFromRequestBO(javax.servlet.http.HttpServletRequest request)fr.paris.lutece.portal.business.file.FilegetFileFromRequestFO(javax.servlet.http.HttpServletRequest request)fr.paris.lutece.portal.business.file.FilegetFileMetaData(java.lang.String strKey)fr.paris.lutece.portal.service.file.IFileRBACServicegetFileRBACService()get the FileRBACServicejava.io.InputStreamgetInputStream(java.lang.String strKey)java.lang.StringgetName()booleanisDefault()voidsetDefault(boolean bDefault)voidsetDownloadUrlService(fr.paris.lutece.portal.service.file.IFileDownloadUrlService downloadUrlService)Sets the downloadServicevoidsetFileRBACService(fr.paris.lutece.portal.service.file.IFileRBACService fileRBACService)set the FileRBACServicejava.lang.StringstoreBytes(byte[] blob)java.lang.StringstoreFile(fr.paris.lutece.portal.business.file.File file)java.lang.StringstoreFileItem(org.apache.commons.fileupload.FileItem fileItem)java.lang.StringstoreInputStream(java.io.InputStream inputStream)
-
-
-
Constructor Detail
-
BlobStoreFileStorageService
public BlobStoreFileStorageService(fr.paris.lutece.portal.service.file.IFileDownloadUrlService fileDownloadUrlService, fr.paris.lutece.portal.service.file.IFileRBACService fileRBACService, fr.paris.lutece.plugins.blobstore.service.IBlobStoreService blobStoreService)init- Parameters:
fileDownloadUrlService-fileRBACService-blobStoreService-
-
-
Method Detail
-
getFileRBACService
public fr.paris.lutece.portal.service.file.IFileRBACService getFileRBACService()
get the FileRBACService- Returns:
- the FileRBACService
-
setFileRBACService
public void setFileRBACService(fr.paris.lutece.portal.service.file.IFileRBACService fileRBACService)
set the FileRBACService- Parameters:
fileRBACService-
-
getDownloadUrlService
public fr.paris.lutece.portal.service.file.IFileDownloadUrlService getDownloadUrlService()
Get the downloadService- Returns:
- the downloadService
-
setDownloadUrlService
public void setDownloadUrlService(fr.paris.lutece.portal.service.file.IFileDownloadUrlService downloadUrlService)
Sets the downloadService- Parameters:
downloadUrlService- downloadService
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
delete
public void delete(java.lang.String strKey)
- Specified by:
deletein interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFile
public fr.paris.lutece.portal.business.file.File getFile(java.lang.String strKey)
- Specified by:
getFilein interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFileMetaData
public fr.paris.lutece.portal.business.file.File getFileMetaData(java.lang.String strKey)
- Specified by:
getFileMetaDatain interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFile
public fr.paris.lutece.portal.business.file.File getFile(java.lang.String strKey, boolean withPhysicalFile)get file from database- Parameters:
strKey-withPhysicalFile-- Returns:
- the file with the physical file content if withPhysicalFile is true
-
storeBytes
public java.lang.String storeBytes(byte[] blob)
- Specified by:
storeBytesin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
storeInputStream
public java.lang.String storeInputStream(java.io.InputStream inputStream)
- Specified by:
storeInputStreamin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
storeFileItem
public java.lang.String storeFileItem(org.apache.commons.fileupload.FileItem fileItem)
- Specified by:
storeFileItemin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
storeFile
public java.lang.String storeFile(fr.paris.lutece.portal.business.file.File file)
- Specified by:
storeFilein interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
setDefault
public void setDefault(boolean bDefault)
-
isDefault
public boolean isDefault()
- Specified by:
isDefaultin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getInputStream
public java.io.InputStream getInputStream(java.lang.String strKey)
- Specified by:
getInputStreamin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFileDownloadUrlFO
public java.lang.String getFileDownloadUrlFO(java.lang.String strKey)
- Specified by:
getFileDownloadUrlFOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFileDownloadUrlFO
public java.lang.String getFileDownloadUrlFO(java.lang.String strKey, java.util.Map<java.lang.String,java.lang.String> additionnalData)- Specified by:
getFileDownloadUrlFOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFileDownloadUrlBO
public java.lang.String getFileDownloadUrlBO(java.lang.String strKey)
- Specified by:
getFileDownloadUrlBOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
getFileDownloadUrlBO
public java.lang.String getFileDownloadUrlBO(java.lang.String strKey, java.util.Map<java.lang.String,java.lang.String> additionnalData)- Specified by:
getFileDownloadUrlBOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider
-
checkAccessRights
public void checkAccessRights(java.util.Map<java.lang.String,java.lang.String> fileData, fr.paris.lutece.api.user.User user) throws fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.security.UserNotSignedException- Specified by:
checkAccessRightsin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider- Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedExceptionfr.paris.lutece.portal.service.security.UserNotSignedException
-
checkLinkValidity
public void checkLinkValidity(java.util.Map<java.lang.String,java.lang.String> fileData) throws fr.paris.lutece.portal.service.file.ExpiredLinkException- Specified by:
checkLinkValidityin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider- Throws:
fr.paris.lutece.portal.service.file.ExpiredLinkException
-
getFileFromRequestBO
public fr.paris.lutece.portal.business.file.File getFileFromRequestBO(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.file.ExpiredLinkException, fr.paris.lutece.portal.service.security.UserNotSignedException- Specified by:
getFileFromRequestBOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider- Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedExceptionfr.paris.lutece.portal.service.file.ExpiredLinkExceptionfr.paris.lutece.portal.service.security.UserNotSignedException
-
getFileFromRequestFO
public fr.paris.lutece.portal.business.file.File getFileFromRequestFO(javax.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.admin.AccessDeniedException, fr.paris.lutece.portal.service.file.ExpiredLinkException, fr.paris.lutece.portal.service.security.UserNotSignedException- Specified by:
getFileFromRequestFOin interfacefr.paris.lutece.portal.service.file.IFileStoreServiceProvider- Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedExceptionfr.paris.lutece.portal.service.file.ExpiredLinkExceptionfr.paris.lutece.portal.service.security.UserNotSignedException
-
-