Interface Lightbox


  • public interface Lightbox
    The Lightbox interface provides all needed functionality in order to "manage" the user's lighboxes.
    • 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​(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

        List<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
        String getAssetReference​(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

        String getReference​(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