Package com.day.cq.wcm.resource.details
Class AssetDetails
- java.lang.Object
-
- com.day.cq.wcm.resource.details.AssetDetails
-
- All Implemented Interfaces:
ResourceDetails
public class AssetDetails extends java.lang.Object implements ResourceDetails
Class which gives access to some details of an asset
-
-
Constructor Summary
Constructors Constructor Description AssetDetails(Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetgetAsset()javax.jcr.NodegetAssetNode()intgetCommentsSize()Get number of commentsjava.lang.StringgetDescription()Get description of the assetlonggetHeight()Get height of the assetlonggetLastModified()Get last modifiedjava.lang.StringgetMimeType()Get mime type of assetjava.lang.StringgetName()Get namejava.lang.StringgetParamJSON()intgetReferencesSize(AssetReferenceResolver customResolver)Count all asset referencesjava.lang.StringgetResolution()Get resolution of assetjava.lang.StringgetSize()Get size of assetjava.lang.StringgetThumbnailUrl()Get URL for thumbnaillonggetWidth()Get width of the asset
-
-
-
Constructor Detail
-
AssetDetails
public AssetDetails(Resource resource)
-
-
Method Detail
-
getAssetNode
public javax.jcr.Node getAssetNode()
-
getAsset
public Asset getAsset()
-
getName
public java.lang.String getName() throws javax.jcr.RepositoryExceptionGet name- Specified by:
getNamein interfaceResourceDetails- Throws:
javax.jcr.RepositoryException
-
getLastModified
public long getLastModified() throws javax.jcr.RepositoryExceptionGet last modified- Specified by:
getLastModifiedin interfaceResourceDetails- Returns:
- Throws:
javax.jcr.RepositoryException
-
getMimeType
public java.lang.String getMimeType()
Get mime type of asset- Returns:
- mime type of asset
-
getReferencesSize
public int getReferencesSize(AssetReferenceResolver customResolver) throws javax.jcr.RepositoryException
Count all asset references- Specified by:
getReferencesSizein interfaceResourceDetails- Parameters:
customResolver-- Returns:
- Throws:
javax.jcr.RepositoryException
-
getCommentsSize
public int getCommentsSize() throws javax.jcr.RepositoryExceptionGet number of comments- Specified by:
getCommentsSizein interfaceResourceDetails- Returns:
- number of comments
- Throws:
javax.jcr.RepositoryException
-
getThumbnailUrl
public java.lang.String getThumbnailUrl()
Get URL for thumbnail- Returns:
-
getWidth
public long getWidth() throws javax.jcr.RepositoryExceptionGet width of the asset- Returns:
- width of asset
- Throws:
javax.jcr.RepositoryException
-
getHeight
public long getHeight() throws javax.jcr.RepositoryExceptionGet height of the asset- Returns:
- height of asset
- Throws:
javax.jcr.RepositoryException
-
getSize
public java.lang.String getSize()
Get size of asset- Returns:
- size of asset
-
getResolution
public java.lang.String getResolution() throws javax.jcr.RepositoryExceptionGet resolution of asset- Returns:
- resolution of asset
- Throws:
javax.jcr.RepositoryException
-
getDescription
public java.lang.String getDescription() throws javax.jcr.RepositoryExceptionGet description of the asset- Returns:
- description
- Throws:
javax.jcr.RepositoryException
-
getParamJSON
public java.lang.String getParamJSON() throws javax.jcr.RepositoryException- Throws:
javax.jcr.RepositoryException
-
-