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 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()NodegetAssetNode()intgetCommentsSize()Get number of commentsStringgetDescription()Get description of the assetlonggetHeight()Get height of the assetlonggetLastModified()Get last modifiedStringgetMimeType()Get mime type of assetStringgetName()Get nameStringgetParamJSON()intgetReferencesSize(AssetReferenceResolver customResolver)Count all asset referencesStringgetResolution()Get resolution of assetStringgetSize()Get size of assetStringgetThumbnailUrl()Get URL for thumbnaillonggetWidth()Get width of the asset
-
-
-
Constructor Detail
-
AssetDetails
public AssetDetails(Resource resource)
-
-
Method Detail
-
getAssetNode
public Node getAssetNode()
-
getAsset
public Asset getAsset()
-
getName
public String getName() throws RepositoryException
Get name- Specified by:
getNamein interfaceResourceDetails- Throws:
RepositoryException
-
getLastModified
public long getLastModified() throws RepositoryExceptionGet last modified- Specified by:
getLastModifiedin interfaceResourceDetails- Returns:
- Throws:
RepositoryException
-
getMimeType
public String getMimeType()
Get mime type of asset- Returns:
- mime type of asset
- Throws:
RepositoryException
-
getReferencesSize
public int getReferencesSize(AssetReferenceResolver customResolver) throws RepositoryException
Count all asset references- Specified by:
getReferencesSizein interfaceResourceDetails- Parameters:
customResolver-- Returns:
- Throws:
RepositoryException
-
getCommentsSize
public int getCommentsSize() throws RepositoryExceptionGet number of comments- Specified by:
getCommentsSizein interfaceResourceDetails- Returns:
- number of comments
- Throws:
RepositoryException
-
getThumbnailUrl
public String getThumbnailUrl()
Get URL for thumbnail- Returns:
-
getWidth
public long getWidth() throws RepositoryExceptionGet width of the asset- Returns:
- width of asset
- Throws:
RepositoryException
-
getHeight
public long getHeight() throws RepositoryExceptionGet height of the asset- Returns:
- height of asset
- Throws:
RepositoryException
-
getSize
public String getSize()
Get size of asset- Returns:
- size of asset
- Throws:
RepositoryException
-
getResolution
public String getResolution() throws RepositoryException
Get resolution of asset- Returns:
- resolution of asset
- Throws:
RepositoryException
-
getDescription
public String getDescription() throws RepositoryException
Get description of the asset- Returns:
- description
- Throws:
RepositoryException
-
getParamJSON
public String getParamJSON() throws RepositoryException
- Throws:
RepositoryException
-
-