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

com.adobe.cq.social.enablement.resource.model.api.EnablementAssetModel Maven / Gradle / Ivy

There is a newer version: 6.5.21
Show newest version
/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2016 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.adobe.cq.social.enablement.resource.model.api;

import javax.jcr.Session;

import org.apache.sling.api.resource.PersistenceException;
import org.apache.sling.commons.json.JSONException;

import com.adobe.cq.social.enablement.exceptions.EnablementException;
import com.adobe.cq.social.scf.SocialComponent;

/**
 * @author akeith
 */
public interface EnablementAssetModel extends SocialComponent {

    public static final String RESOURCE_TYPE = "social/enablement/components/hbs/model/resource/asset";

    public static final String ASSET_PATH = "se_asset-path";
    public static final String DAM_PATH = "se_dam-path";

    public static final String ASSET_CATEGORY = "se_asset-category";
    public static final String CATEGORY_DAM = "enablementAsset:dam";
    public static final String CATEGORY_URL = "enablementAsset:url";
    public static final String CATEGORY_CONNECT = "enablementAsset:connect";
    public static final String CATEGORY_EXTERNAL = "enablementAsset:externalResource";

    public static final String ASSET_NAME = "se_resource-asset-name";
    public static final String COVER_IMG_PATH = "se_cover-img-path";
    public static final String URL = "se_url";
    public static final String LOCATION = "se_location";

    public static final String ASSET_SUB_CATEGORY = "se_asset-sub-category";

    public static final String SUB_CATEGORY_CONNECT = "adobe-connect";

    public static final String STATE = "state";
    public static final String STATE_INITIAL = "initial";
    public static final String STATE_DELETED = "deleted";
    public static final String STATE_ADDED = "added";
    public static final String STATE_EDITED = "edited";

    public static final String ASSET_PATH_PROP = "asset-path";
    public static final String ASSET_COVER_IMG_PATH_PROP = "cover-img-path";
    public static final String RESOURCE_ASSET_THUMBNAIL_SOURCE_PROPNAME = "thumbnail-source";
    public static final String SCORMENDPOINT = "scormendpoint";

    /**
     * @return dam path
     */
    public String getDamPath();

    /**
     * Returns path of an asset under its belonged resource
     * @return path
     */
    public String getPath();

    /**
     * For video assets, returns the duration of the video in milliseconds. Returns null if a non-video asset or if
     * the duration wasn't found for some reason.
     * @return duration
     */
    public String getFriendlyDuration();

    /**
     * Get the asset size
     * @return size
     */
    public Long getSize();

    /**
     * Get the number of pages for pdf
     * @return num of pages
     */
    public Long getNumPages();

    /**
     * Get the asset mime type (e.g. image/png)
     * @return asset mime type
     */
    public String getAssetMimeType();

    /**
     * Get the asset type, less specific than mime type (e.g. image)
     * @return asset type
     */
    public String getAssetType();

    /**
     * @return asset name
     */
    public String getAssetName();

    /**
     * setting over image
     * @param imagePath - path of image
     * @throws PersistenceException thrown if exception occurs while persisting data
     * @throws EnablementException thrown if exception occurs while updating enablement model
     */
    public void setCoverImage(String imagePath) throws PersistenceException, EnablementException;

    /**
     * @return cover image path
     */
    public String getCoverImagePath();

    /**
     * @return temp cover image path
     */
    public String getTempCoverImagePath();
    
    /**
     * @param session - session
     * @return temp cover image path
     */
    public String getTempCoverImagePath(Session session);

    /**
     * @return the path representing the DAM asset to be rendered
     */
    public String getAssetResourcePath();

    /**
     * (non-Javadoc)
     * @throws PersistenceException thrown if exception occurs while persisting data
     */
    public void deleteAsset() throws PersistenceException;

    /**
     * @return duration
     */
    public Long getDuration();

    /**
     * @return external url
     */
    public String getExternalUrl();

    /**
     * @return location
     */
    public String getLocation();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy