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 Asset
getAsset()
Node
getAssetNode()
int
getCommentsSize()
Get number of commentsjava.lang.String
getDescription()
Get description of the assetlong
getHeight()
Get height of the assetlong
getLastModified()
Get last modifiedjava.lang.String
getMimeType()
Get mime type of assetjava.lang.String
getName()
Get namejava.lang.String
getParamJSON()
int
getReferencesSize(AssetReferenceResolver customResolver)
Count all asset referencesjava.lang.String
getResolution()
Get resolution of assetjava.lang.String
getSize()
Get size of assetjava.lang.String
getThumbnailUrl()
Get URL for thumbnaillong
getWidth()
Get width of the asset
-
-
-
Constructor Detail
-
AssetDetails
public AssetDetails(Resource resource)
-
-
Method Detail
-
getAssetNode
public Node getAssetNode()
-
getAsset
public Asset getAsset()
-
getName
public java.lang.String getName() throws RepositoryException
Get name- Specified by:
getName
in interfaceResourceDetails
- Throws:
RepositoryException
-
getLastModified
public long getLastModified() throws RepositoryException
Get last modified- Specified by:
getLastModified
in interfaceResourceDetails
- Returns:
- Throws:
RepositoryException
-
getMimeType
public java.lang.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:
getReferencesSize
in interfaceResourceDetails
- Parameters:
customResolver
-- Returns:
- Throws:
RepositoryException
-
getCommentsSize
public int getCommentsSize() throws RepositoryException
Get number of comments- Specified by:
getCommentsSize
in interfaceResourceDetails
- Returns:
- number of comments
- Throws:
RepositoryException
-
getThumbnailUrl
public java.lang.String getThumbnailUrl()
Get URL for thumbnail- Returns:
-
getWidth
public long getWidth() throws RepositoryException
Get width of the asset- Returns:
- width of asset
- Throws:
RepositoryException
-
getHeight
public long getHeight() throws RepositoryException
Get height of the asset- Returns:
- height of asset
- Throws:
RepositoryException
-
getSize
public java.lang.String getSize()
Get size of asset- Returns:
- size of asset
- Throws:
RepositoryException
-
getResolution
public java.lang.String getResolution() throws RepositoryException
Get resolution of asset- Returns:
- resolution of asset
- Throws:
RepositoryException
-
getDescription
public java.lang.String getDescription() throws RepositoryException
Get description of the asset- Returns:
- description
- Throws:
RepositoryException
-
getParamJSON
public java.lang.String getParamJSON() throws RepositoryException
- Throws:
RepositoryException
-
-