Package com.day.cq.dam.api.lightbox
Interface Lightbox
-
public interface LightboxTheLightboxinterface 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 voidadd(Asset asset)Adds the original rendition of the asset to the user's lightbox.voidadd(Rendition rendition)Adds the rendition of the asset to the user's lightbox.voidclear()Removes all lightbox entries.booleancontains(Asset asset)Checks if the asset of the given path is contained in the lightbox .booleancontains(Rendition rendition)Checks if the rendition of the given path is contained in the lightbox .java.lang.StringgetAssetReference(java.lang.String path)Deprecated.java.util.List<java.lang.String>getEntries()Lists all entries from the lightbox.java.lang.StringgetReference(java.lang.String path)Return path of referenced asset or rendition in /content/dam for the lightbox entry else return null.voidremove(java.lang.String name)Removes a lightbox entry.
-
-
-
Method Detail
-
add
void add(Asset asset) throws javax.jcr.RepositoryException
Adds the original rendition of the asset to the user's lightbox.- Parameters:
asset- Asset- Throws:
javax.jcr.RepositoryException- in case an exception occurs while adding the file.
-
add
void add(Rendition rendition) throws javax.jcr.RepositoryException
Adds the rendition of the asset to the user's lightbox.- Parameters:
rendition- Rendition- Throws:
javax.jcr.RepositoryException- in case an exception occurs while adding the file.
-
remove
void remove(java.lang.String name) throws javax.jcr.RepositoryExceptionRemoves a lightbox entry.- Parameters:
name- Name of the entry (node name)- Throws:
javax.jcr.RepositoryException- in case an exception occurs while removing an entry.
-
clear
void clear() throws javax.jcr.RepositoryExceptionRemoves all lightbox entries.- Throws:
javax.jcr.RepositoryException- in case an exception occurs while removing an entry.
-
getEntries
java.util.List<java.lang.String> getEntries() throws javax.jcr.RepositoryExceptionLists all entries from the lightbox. The list contains the path of each entry.- Returns:
- list of all lightbox entries
- Throws:
javax.jcr.RepositoryException- in case an exception occurs while fetching the entries.
-
contains
boolean contains(Asset asset) throws javax.jcr.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:
javax.jcr.RepositoryException- in case an exception occurs while checking the entries.
-
contains
boolean contains(Rendition rendition) throws javax.jcr.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:
javax.jcr.RepositoryException- in case an exception occurs while checking the entries.
-
getAssetReference
@Deprecated java.lang.String getAssetReference(java.lang.String path) throws javax.jcr.RepositoryExceptionDeprecated.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:
javax.jcr.RepositoryException- in case an exception occurs while accessing the referenced asset
-
getReference
java.lang.String getReference(java.lang.String path) throws javax.jcr.RepositoryExceptionReturn 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:
javax.jcr.RepositoryException- thrown in case an exception occurs while accessing the asset
-
-