All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.day.cq.dam.api.s7dam.utils.VideoViewerUtil Maven / Gradle / Ivy

/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2018 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.day.cq.dam.api.s7dam.utils;

import aQute.bnd.annotation.ProviderType;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import javax.annotation.Nonnull;
import javax.jcr.RepositoryException;

/**
 * This utility interface provides miscellaneous functions which are used to construct a VideoViewer object
 */

@ProviderType
public interface VideoViewerUtil {

    /**
     * Constructs the preview url for the video asset {@code resource}
     *
     * @param resource Video asset sling resource
     *
     * @return Preview url for video asset {@code resource}. Returns null if preview url can't be found.
     */
    String getPreviewUrlForVideoAssetResource(@Nonnull Resource resource);

    /**
     * Retrieves the value of {@code dam:scene7FileAvs} property or {@code  dam:scene7File} property of
     * the video asset sling {@code resource}.
     *
     * @param resource Video asset Sling resource. Should be adaptable to {@link com.day.cq.dam.api.Asset}.
     *
     * @return
     * 

The value of {@code dam:scene7FileAvs} property from the video asset metadata.

*

If {@code dam:scene7FileAvs} property is not found, returns the value of {@code dam:scene7File} property.

*

Returns null if the {@code resource} is not adaptable to {@link com.day.cq.dam.api.Asset}.

* * @throws IllegalArgumentException If {@code resource} is null. */ String getS7FileHandleForVideoAssetResource(@Nonnull Resource resource); /** * * Constructs the Scene7 viewers' parent node path from viewer presets config in the JCR Repository. * * @param resourceResolver ResourceResolver object for accessing the JCR repository. * * @return The absolute JCR path to the Scene7 viewers parent node. * * @throws RepositoryException If the methods fails to read the repository. * @throws IllegalArgumentException If {@code resourceResolver} is null. */ String getS7ViewerPath(@Nonnull ResourceResolver resourceResolver) throws RepositoryException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy