Interface AssetReferenceHandler


  • public interface AssetReferenceHandler
    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.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> lookupReferences​(java.lang.String assetPath, ResourceResolver resolver)
      This method looks up references of a given asset in the content space which the implementation class decides.
      void removeReferences​(java.lang.String assetPath, ResourceResolver resolver)
      This method removes the references of a given asset in the content space which the implementation class decides.
    • Method Detail

      • lookupReferences

        java.util.List<java.lang.String> lookupReferences​(java.lang.String assetPath,
                                                          ResourceResolver resolver)
        This method looks up references of a given asset in the content space which the implementation class decides.
        Parameters:
        assetPath - The asset path to look for
        resolver - ResourceResolver instance
        Returns:
        the list of references of the given asset
      • removeReferences

        void removeReferences​(java.lang.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,
        Parameters:
        assetPath - The path of the asset
        resolver - ResourceResolver instance