Package com.day.cq.dam.api.s7dam.utils
Interface VideoViewerUtil
-
@ProviderType @NotNullApi public interface VideoViewerUtil
This utility interface provides miscellaneous functions which are used to construct a VideoViewer object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable java.lang.StringgetPreviewUrlForVideoAssetResource(Resource resource)Constructs the preview url for the video assetresource@Nullable java.lang.StringgetS7FileHandleForVideoAssetResource(Resource resource)Retrieves the value ofdam:scene7FileAvsproperty ordam:scene7Fileproperty of the video asset slingresource.java.lang.StringgetS7ViewerPath(ResourceResolver resourceResolver)Constructs the Scene7 viewers' parent node path from viewer presets config in the JCR Repository.
-
-
-
Method Detail
-
getPreviewUrlForVideoAssetResource
@Nullable @Nullable java.lang.String getPreviewUrlForVideoAssetResource(Resource resource)
Constructs the preview url for the video assetresource- Parameters:
resource- Video asset sling resource- Returns:
- Preview url for video asset
resource. Returns null if preview url can't be found.
-
getS7FileHandleForVideoAssetResource
@Nullable @Nullable java.lang.String getS7FileHandleForVideoAssetResource(Resource resource)
Retrieves the value ofdam:scene7FileAvsproperty ordam:scene7Fileproperty of the video asset slingresource.- Parameters:
resource- Video asset Sling resource. Should be adaptable toAsset.- Returns:
The value of
dam:scene7FileAvsproperty from the video asset metadata.If
dam:scene7FileAvsproperty is not found, returns the value ofdam:scene7Fileproperty.Returns null if the
resourceis not adaptable toAsset.- Throws:
java.lang.IllegalArgumentException- Ifresourceis null.
-
getS7ViewerPath
java.lang.String getS7ViewerPath(ResourceResolver resourceResolver) throws RepositoryException
Constructs the Scene7 viewers' parent node path from viewer presets config in the JCR Repository.- Parameters:
resourceResolver- ResourceResolver object for accessing the JCR repository.- Returns:
- The absolute JCR path to the Scene7 viewers parent node.
- Throws:
RepositoryException- If the methods fails to read the repository.java.lang.IllegalArgumentException- IfresourceResolveris null.
-
-