Interface Lightbox


  • public interface Lightbox
    The Lightbox interface provides all needed functionality in order to "manage" the user's lighboxes.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(Asset asset)
      Adds the original rendition of the asset to the user's lightbox.
      void add​(Rendition rendition)
      Adds the rendition of the asset to the user's lightbox.
      void clear()
      Removes all lightbox entries.
      boolean contains​(Asset asset)
      Checks if the asset of the given path is contained in the lightbox .
      boolean contains​(Rendition rendition)
      Checks if the rendition of the given path is contained in the lightbox .
      java.lang.String getAssetReference​(java.lang.String path)
      Deprecated.
      java.util.List<java.lang.String> getEntries()
      Lists all entries from the lightbox.
      java.lang.String getReference​(java.lang.String path)
      Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.
      void remove​(java.lang.String name)
      Removes a lightbox entry.
    • Method Detail

      • add

        void add​(Asset asset)
          throws RepositoryException
        Adds the original rendition of the asset to the user's lightbox.
        Parameters:
        asset - Asset
        Throws:
        RepositoryException - in case an exception occurs while adding the file.
      • add

        void add​(Rendition rendition)
          throws RepositoryException
        Adds the rendition of the asset to the user's lightbox.
        Parameters:
        rendition - Rendition
        Throws:
        RepositoryException - in case an exception occurs while adding the file.
      • remove

        void remove​(java.lang.String name)
             throws RepositoryException
        Removes a lightbox entry.
        Parameters:
        name - Name of the entry (node name)
        Throws:
        RepositoryException - in case an exception occurs while removing an entry.
      • getEntries

        java.util.List<java.lang.String> getEntries()
                                             throws RepositoryException
        Lists all entries from the lightbox. The list contains the path of each entry.
        Returns:
        list of all lightbox entries
        Throws:
        RepositoryException - in case an exception occurs while fetching the entries.
      • contains

        boolean contains​(Asset asset)
                  throws RepositoryException
        Checks if the asset of the given path is contained in the lightbox .
        Parameters:
        asset - The asset to check
        Returns:
        true if contained in the lightbox, otherwise false
        Throws:
        RepositoryException - in case an exception occurs while checking the entries.
      • contains

        boolean contains​(Rendition rendition)
                  throws RepositoryException
        Checks if the rendition of the given path is contained in the lightbox .
        Parameters:
        rendition - The rendition to check
        Returns:
        true if contained in the lightbox, otherwise false
        Throws:
        RepositoryException - in case an exception occurs while checking the entries.
      • getAssetReference

        @Deprecated
        java.lang.String getAssetReference​(java.lang.String path)
                                    throws RepositoryException
        Deprecated.
        Return path of referenced asset in /content/dam for the lightbox entry else return null.
        Parameters:
        path - path of the asset.
        Returns:
        the path of referenced asset.
        Throws:
        RepositoryException - in case an exception occurs while accessing the referenced asset
      • getReference

        java.lang.String getReference​(java.lang.String path)
                               throws RepositoryException
        Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.
        Parameters:
        path - path of the asset.
        Returns:
        the path of referenced asset or rendition.
        Throws:
        RepositoryException - thrown in case an exception occurs while accessing the asset