com.day.cq.dam.api.lightbox
Interface Lightbox


public interface Lightbox

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


Method Summary
 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 .
 String getAssetReference(String path)
          Deprecated. 
 List<String> getEntries()
          Lists all entries from the lightbox.
 String getReference(String path)
          Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.
 void remove(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(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.

clear

void clear()
           throws RepositoryException
Removes all lightbox entries.

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.

Returns:
the path of referenced asset.
Throws:
RepositoryException

getReference

String getReference(String path)
                    throws RepositoryException
Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.

Returns:
the path of referenced asset or rendition.
Throws:
RepositoryException


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.