Package 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
Modifier and TypeMethodDescriptionvoidAdds the original rendition of the asset to the user's lightbox.voidAdds the rendition of the asset to the user's lightbox.voidclear()Removes all lightbox entries.booleanChecks if the asset of the given path is contained in the lightbox .booleanChecks if the rendition of the given path is contained in the lightbox .getAssetReference(String path) Deprecated.Lists all entries from the lightbox.getReference(String path) Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.voidRemoves a lightbox entry.
-
Method Details
-
add
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
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
Removes a lightbox entry.- Parameters:
name- Name of the entry (node name)- Throws:
RepositoryException- in case an exception occurs while removing an entry.
-
clear
Removes all lightbox entries.- Throws:
RepositoryException- in case an exception occurs while removing an entry.
-
getEntries
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
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
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.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
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
-