Class DefaultFileDownloadService
- java.lang.Object
-
- fr.paris.lutece.portal.service.file.implementation.DefaultFileDownloadService
-
- All Implemented Interfaces:
IFileDownloadUrlService,Serializable
public class DefaultFileDownloadService extends Object implements IFileDownloadUrlService
DatabaseBlobStoreService.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_LINK_VALIDITY_TIME-
Fields inherited from interface fr.paris.lutece.portal.service.file.IFileDownloadUrlService
LINK_VALIDITY_TIME
-
-
Constructor Summary
Constructors Constructor Description DefaultFileDownloadService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,String>buildAdditionnalDatas(String strFileId, String strResourceId, String strResourceType)Build the additionnel data map to provide encryption datavoidcheckLinkValidity(Map<String,String> fileData)check link validityStringgetFileDownloadUrlBO(String strFileKey, String strFileStorageServiceProviderName)get Back Office user download URLStringgetFileDownloadUrlBO(String strFileKey, Map<String,String> additionnalData, String strFileStorageServiceProviderName)get Back Office user download URLStringgetFileDownloadUrlFO(String strFileKey, String strFileStorageServiceProviderName)get Front Office user download URLStringgetFileDownloadUrlFO(String strFileKey, Map<String,String> additionnalData, String strFileStorageServiceProviderName)get Front Office user download URLStringgetName()get service nameMap<String,String>getRequestDataBO(javax.servlet.http.HttpServletRequest request)get BO file data from requestMap<String,String>getRequestDataFO(javax.servlet.http.HttpServletRequest request)get FO file data from request-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.paris.lutece.portal.service.file.IFileDownloadUrlService
getValidityTime
-
-
-
-
Field Detail
-
KEY_LINK_VALIDITY_TIME
public static final String KEY_LINK_VALIDITY_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildAdditionnalDatas
public static Map<String,String> buildAdditionnalDatas(String strFileId, String strResourceId, String strResourceType)
Build the additionnel data map to provide encryption data- Parameters:
strFileId-strResourceId-strResourceType-- Returns:
- the map
-
getFileDownloadUrlFO
public String getFileDownloadUrlFO(String strFileKey, String strFileStorageServiceProviderName)
get Front Office user download URL- Specified by:
getFileDownloadUrlFOin interfaceIFileDownloadUrlService- Parameters:
strFileKey- the file key- Returns:
- the url
-
getFileDownloadUrlFO
public String getFileDownloadUrlFO(String strFileKey, Map<String,String> additionnalData, String strFileStorageServiceProviderName)
get Front Office user download URL- Specified by:
getFileDownloadUrlFOin interfaceIFileDownloadUrlService- Parameters:
strFileKey- the file keyadditionnalData- the data used to build the url- Returns:
- the url
-
getFileDownloadUrlBO
public String getFileDownloadUrlBO(String strFileKey, String strFileStorageServiceProviderName)
get Back Office user download URL- Specified by:
getFileDownloadUrlBOin interfaceIFileDownloadUrlService- Parameters:
strFileKey- the file key- Returns:
- the url
-
getFileDownloadUrlBO
public String getFileDownloadUrlBO(String strFileKey, Map<String,String> additionnalData, String strFileStorageServiceProviderName)
get Back Office user download URL- Specified by:
getFileDownloadUrlBOin interfaceIFileDownloadUrlService- Parameters:
strFileKey- the file keyadditionnalData- the data used to build the url- Returns:
- the url
-
getName
public String getName()
get service name- Specified by:
getNamein interfaceIFileDownloadUrlService- Returns:
- the service name
-
getRequestDataBO
public Map<String,String> getRequestDataBO(javax.servlet.http.HttpServletRequest request)
get BO file data from request- Specified by:
getRequestDataBOin interfaceIFileDownloadUrlService- Returns:
- the map of file data
-
getRequestDataFO
public Map<String,String> getRequestDataFO(javax.servlet.http.HttpServletRequest request)
get FO file data from request- Specified by:
getRequestDataFOin interfaceIFileDownloadUrlService- Returns:
- the map of file data
-
checkLinkValidity
public void checkLinkValidity(Map<String,String> fileData) throws ExpiredLinkException
check link validity- Specified by:
checkLinkValidityin interfaceIFileDownloadUrlService- Throws:
ExpiredLinkException- if link is invadid
-
-