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

com.day.cq.dam.api.AssetReferenceHandler Maven / Gradle / Ivy

package com.day.cq.dam.api;

import org.apache.sling.api.resource.ResourceResolver;

import java.util.List;

/**
 * The AssetReferenceHandler provides api to look up and manage the references of a given asset.
 * Implementation of this interface should be exposed as a component.
 * The implementations will be module specific. Each module (commerce, forms, dam, wcm, etc) will implement
 * their own handlers to optimize the search within their own content spaces.
 */
public interface AssetReferenceHandler {

    /**
     * This method looks up references of a given asset in the content space which the implementation class
     * decides.
     *
     * @param assetPath The asset path to look for
     * @param resolver ResourceResolver instance
     * @return
     */
    List lookupReferences(String assetPath, ResourceResolver resolver);

    /**
     * This method removes the references of a given asset in the content space which the implementation class
     * decides. Since different modules store the reference as their own property/node terminology,
     * @param assetPath
     * @param resolver
     */
    void removeReferences(String assetPath, ResourceResolver resolver);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy