Package com.day.cq.dam.api.s7dam.utils
Interface VideoViewerUtil
-
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 java.lang.String
getPreviewUrlForVideoAssetResource(Resource resource)
Constructs the preview url for the video assetresource
java.lang.String
getS7FileHandleForVideoAssetResource(Resource resource)
Retrieves the value ofdam:scene7FileAvs
property ordam:scene7File
property of the video asset slingresource
.java.lang.String
getS7ViewerPath(ResourceResolver resourceResolver)
Constructs the Scene7 viewers' parent node path from viewer presets config in the JCR Repository.
-
-
-
Method Detail
-
getPreviewUrlForVideoAssetResource
java.lang.String getPreviewUrlForVideoAssetResource(@Nonnull 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
java.lang.String getS7FileHandleForVideoAssetResource(@Nonnull Resource resource)
Retrieves the value ofdam:scene7FileAvs
property ordam:scene7File
property of the video asset slingresource
.- Parameters:
resource
- Video asset Sling resource. Should be adaptable toAsset
.- Returns:
The value of
dam:scene7FileAvs
property from the video asset metadata.If
dam:scene7FileAvs
property is not found, returns the value ofdam:scene7File
property.Returns null if the
resource
is not adaptable toAsset
.- Throws:
java.lang.IllegalArgumentException
- Ifresource
is null.
-
getS7ViewerPath
java.lang.String getS7ViewerPath(@Nonnull ResourceResolver resourceResolver) throws javax.jcr.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:
javax.jcr.RepositoryException
- If the methods fails to read the repository.java.lang.IllegalArgumentException
- IfresourceResolver
is null.
-
-