Class DefaultOnDemandConversionFacade
- java.lang.Object
-
- de.hybris.platform.mediaconversion.web.facades.DefaultOnDemandConversionFacade
-
- All Implemented Interfaces:
OnDemandConversionFacade
public class DefaultOnDemandConversionFacade extends java.lang.Object implements OnDemandConversionFacade
Standard implementation ofOnDemandConversionFacade.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_WEBAPP_PATHDefault webapp path.-
Fields inherited from interface de.hybris.platform.mediaconversion.web.facades.OnDemandConversionFacade
BEAN_NAME
-
-
Constructor Summary
Constructors Constructor Description DefaultOnDemandConversionFacade()
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_WEBAPP_PATH
public static final java.lang.String DEFAULT_WEBAPP_PATH
Default webapp path. The actual path is retrieved from the configuration.- See Also:
- Constant Field Values
-
-
Method Detail
-
convert
public java.lang.String convert(PK container, java.lang.String format)
- Specified by:
convertin interfaceOnDemandConversionFacade- Parameters:
container- theMediaContainerModel'sPKin questionformat- the qualifier of theConversionMediaFormatModelto convert to.- Returns:
- the URL to the requested Media.
-
convert
public java.lang.String convert(MediaContainerModel container, ConversionMediaFormatModel format)
- Specified by:
convertin interfaceOnDemandConversionFacade- Parameters:
container- theMediaContainerModelin questionformat- theConversionMediaFormatModelto convert to ornull(or the empty string) to retrieve the container's master media url.- Returns:
- the URL to the requested Media
-
convert
public java.lang.String convert(MediaContainerModel container, java.lang.String format)
- Specified by:
convertin interfaceOnDemandConversionFacade- Parameters:
container- theMediaContainerModelin questionformat- the qualifier of theConversionMediaFormatModelto convert to ornull(or the empty string) to retrieve the container's master media url.- Returns:
- the URL to the requested Media
-
retrieveURL
public java.lang.String retrieveURL(MediaContainerModel container, java.lang.String format)
- Specified by:
retrieveURLin interfaceOnDemandConversionFacade- Parameters:
container- theMediaContainerModelin questionformat- the qualifier of theConversionMediaFormatModelto convert to ornull(or the empty string) to retrieve the container's master media url.- Returns:
- the URL to the requested Media.
-
appendFileExtension
protected void appendFileExtension(java.lang.StringBuilder urlBuilder, ConversionMediaFormatModel format)Adds the file extension depending on the formats mime type.- Parameters:
urlBuilder- The string builder containing the url part which has been created beforeformat- TheConversionMediaFormatModel
-
retrieveURL
public java.lang.String retrieveURL(MediaContainerModel container, ConversionMediaFormatModel format)
- Specified by:
retrieveURLin interfaceOnDemandConversionFacade- Parameters:
container- theMediaContainerModelin questionformat- the qualifier of theConversionMediaFormatModelto convert to ornull(or the empty string) to retrieve the container's master media url.- Returns:
- the URL to the requested Media
-
buildConvertUrl
protected java.lang.String buildConvertUrl(MediaContainerModel container, ConversionMediaFormatModel format)
-
getMediaService
public MediaService getMediaService()
-
setMediaService
public void setMediaService(MediaService mediaService)
-
getConfigurationService
public ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getConversionServletPath
public java.lang.String getConversionServletPath()
-
setConversionServletPath
public void setConversionServletPath(java.lang.String path)
-
getMediaConversionService
public MediaConversionService getMediaConversionService()
-
setMediaConversionService
public void setMediaConversionService(MediaConversionService mediaConversionService)
-
getMimeMappingStrategy
public MimeMappingStrategy getMimeMappingStrategy()
Gets the wiredMimeMappingStrategy.- Returns:
- The wired strategy.
-
setMimeMappingStrategy
public void setMimeMappingStrategy(MimeMappingStrategy mimeMappingStrategy)
Sets the wiredMimeMappingStrategyto use.- Parameters:
mimeMappingStrategy- The strategy to use
-
-