public class LocalDatabaseFileService extends Object implements IFileStoreServiceProvider
| Constructor and Description |
|---|
LocalDatabaseFileService(IFileDownloadUrlService _fileDownloadUrlService,
IFileRBACService _fileRBACService)
init
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkAccessRights(Map<String,String> fileData,
fr.paris.lutece.api.user.User user)
check if current user can access the file
|
void |
checkLinkValidity(Map<String,String> fileData)
check if link is valid
|
void |
delete(String strKey)
Delete a blob
|
IFileDownloadUrlService |
getDownloadUrlService()
Get the downloadService
|
File |
getFile(String strKey)
Get a file
|
String |
getFileDownloadUrlBO(String strKey)
Gets the file download url for Back Office admin Lutece users
|
String |
getFileDownloadUrlBO(String strKey,
Map<String,String> additionnalData)
Gets the file download url for Back Office admin Lutece users
|
String |
getFileDownloadUrlFO(String strKey)
Gets the file download url for Front Office Lutece users
|
String |
getFileDownloadUrlFO(String strKey,
Map<String,String> additionnalData)
Gets the file download url for Front Office Lutece users
|
File |
getFileFromRequestBO(javax.servlet.http.HttpServletRequest request)
get requested file from BO
|
File |
getFileFromRequestFO(javax.servlet.http.HttpServletRequest request)
get requested file from FO
|
IFileRBACService |
getFileRBACService()
get the FileRBACService
|
InputStream |
getInputStream(String strKey)
Gets a blob as
InputStream |
String |
getName()
get the service name
|
boolean |
isDefault()
get the default
|
void |
setDefault(boolean bDefault) |
void |
setDownloadUrlService(IFileDownloadUrlService downloadUrlService)
Sets the downloadService
|
void |
setFileRBACService(IFileRBACService fileRBACService)
set the FileRBACService
|
void |
setName(String strName) |
String |
storeBytes(byte[] blob)
Store a blob from a bytes array
|
String |
storeFile(File file)
Stores a file Lutece File
|
String |
storeFileItem(org.apache.commons.fileupload.FileItem fileItem)
Stores a org.apache.commons.fileupload.FileItem
|
String |
storeInputStream(InputStream inputStream)
Stores an input stream
|
public LocalDatabaseFileService(IFileDownloadUrlService _fileDownloadUrlService, IFileRBACService _fileRBACService)
_fileDownloadUrlService - _fileRBACService - public IFileRBACService getFileRBACService()
public void setFileRBACService(IFileRBACService fileRBACService)
fileRBACService - public IFileDownloadUrlService getDownloadUrlService()
public void setDownloadUrlService(IFileDownloadUrlService downloadUrlService)
downloadUrlService - downloadServicepublic String getName()
getName in interface IFileStoreServiceProviderpublic void delete(String strKey)
delete in interface IFileStoreServiceProviderstrKey - The key of the blobpublic File getFile(String strKey)
getFile in interface IFileStoreServiceProviderstrKey - The key of the filepublic String storeBytes(byte[] blob)
storeBytes in interface IFileStoreServiceProviderblob - The blobpublic String storeInputStream(InputStream inputStream)
storeInputStream in interface IFileStoreServiceProviderinputStream - the input streampublic String storeFileItem(org.apache.commons.fileupload.FileItem fileItem)
storeFileItem in interface IFileStoreServiceProviderfileItem - the fileItempublic String storeFile(File file)
storeFile in interface IFileStoreServiceProviderfile - the filepublic void setDefault(boolean bDefault)
public void setName(String strName)
public boolean isDefault()
isDefault in interface IFileStoreServiceProviderpublic InputStream getInputStream(String strKey)
InputStreamgetInputStream in interface IFileStoreServiceProviderstrKey - the keyInputStreampublic String getFileDownloadUrlFO(String strKey)
getFileDownloadUrlFO in interface IFileStoreServiceProviderstrKey - thepublic String getFileDownloadUrlFO(String strKey, Map<String,String> additionnalData)
getFileDownloadUrlFO in interface IFileStoreServiceProviderstrKey - thepublic String getFileDownloadUrlBO(String strKey)
getFileDownloadUrlBO in interface IFileStoreServiceProviderstrKey - thepublic String getFileDownloadUrlBO(String strKey, Map<String,String> additionnalData)
getFileDownloadUrlBO in interface IFileStoreServiceProviderstrKey - thepublic void checkAccessRights(Map<String,String> fileData, fr.paris.lutece.api.user.User user) throws AccessDeniedException, UserNotSignedException
checkAccessRights in interface IFileStoreServiceProvideruser - the current userAccessDeniedExceptionUserNotSignedExceptionpublic void checkLinkValidity(Map<String,String> fileData) throws ExpiredLinkException
checkLinkValidity in interface IFileStoreServiceProviderExpiredLinkExceptionpublic File getFileFromRequestBO(javax.servlet.http.HttpServletRequest request) throws AccessDeniedException, ExpiredLinkException, UserNotSignedException
getFileFromRequestBO in interface IFileStoreServiceProviderAccessDeniedExceptionExpiredLinkExceptionUserNotSignedExceptionpublic File getFileFromRequestFO(javax.servlet.http.HttpServletRequest request) throws AccessDeniedException, ExpiredLinkException, UserNotSignedException
getFileFromRequestFO in interface IFileStoreServiceProviderAccessDeniedExceptionExpiredLinkExceptionUserNotSignedExceptionCopyright © 2022 City of Paris. All rights reserved.