Class DefaultFileDownloadService
java.lang.Object
fr.paris.lutece.portal.service.file.implementation.DefaultFileDownloadService
- All Implemented Interfaces:
IFileDownloadUrlService,Serializable
@ApplicationScoped
@Named("defaultFileDownloadService")
public class DefaultFileDownloadService
extends Object
implements IFileDownloadUrlService
DatabaseBlobStoreService.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface fr.paris.lutece.portal.service.file.IFileDownloadUrlService
LINK_VALIDITY_TIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildAdditionnalDatas(String strFileId, String strResourceId, String strResourceType) Build the additionnel data map to provide encryption datavoidcheckLinkValidity(Map<String, String> fileData) check link validitygetFileDownloadUrlBO(String strFileKey, String strFileStorageServiceProviderName) get Back Office user download URLgetFileDownloadUrlBO(String strFileKey, Map<String, String> additionnalData, String strFileStorageServiceProviderName) get Back Office user download URLgetFileDownloadUrlFO(String strFileKey, String strFileStorageServiceProviderName) get Front Office user download URLgetFileDownloadUrlFO(String strFileKey, Map<String, String> additionnalData, String strFileStorageServiceProviderName) get Front Office user download URLgetName()get service namegetRequestDataBO(jakarta.servlet.http.HttpServletRequest request) get BO file data from requestgetRequestDataFO(jakarta.servlet.http.HttpServletRequest request) get FO file data from requestvoidsetSeparator(String separator) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.paris.lutece.portal.service.file.IFileDownloadUrlService
getValidityTime
-
Field Details
-
PARAMETER_FILE_ID
- See Also:
-
PARAMETER_RESOURCE_ID
- See Also:
-
PARAMETER_RESOURCE_TYPE
- See Also:
-
PARAMETER_VALIDITY_TIME
- See Also:
-
PARAMETER_DATA
- See Also:
-
PARAMETER_BO
- See Also:
-
PARAMETER_PROVIDER
- See Also:
-
KEY_LINK_VALIDITY_TIME
- See Also:
-
-
Constructor Details
-
DefaultFileDownloadService
public DefaultFileDownloadService()
-
-
Method Details
-
getSeparator
-
setSeparator
-
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
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
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
get service name- Specified by:
getNamein interfaceIFileDownloadUrlService- Returns:
- the service name
-
getRequestDataBO
get BO file data from request- Specified by:
getRequestDataBOin interfaceIFileDownloadUrlService- Returns:
- the map of file data
-
getRequestDataFO
get FO file data from request- Specified by:
getRequestDataFOin interfaceIFileDownloadUrlService- Returns:
- the map of file data
-
checkLinkValidity
check link validity- Specified by:
checkLinkValidityin interfaceIFileDownloadUrlService- Throws:
ExpiredLinkException- if link is invadid
-