public class CmsImageCacheHelper extends java.lang.Object
| Constructor and Description |
|---|
CmsImageCacheHelper(CmsObject cms,
boolean withVariations,
boolean showSize,
boolean statsOnly)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List |
getAllCachedImages()
Returns all cached images.
|
int |
getFilesCount()
Returns the total number of files.
|
java.lang.String |
getLength(java.lang.String imgName)
Returns the length of the given image.
|
java.lang.String |
getSingleSize(CmsObject cms,
java.lang.String resPath)
Reads the size of a single image.
|
java.lang.String |
getSize(java.lang.String imgName)
Returns the size of the given image.
|
java.util.List |
getVariations(java.lang.String imgName)
Returns the variations for the given image.
|
int |
getVariationsCount()
Returns the total number of variations.
|
int |
getVariationsSize()
Returns the total size of all variations.
|
public CmsImageCacheHelper(CmsObject cms, boolean withVariations, boolean showSize, boolean statsOnly)
cms - the cms contextwithVariations - if also variations should be readshowSize - if it is needed to compute the image sizestatsOnly - if only statistical information should be retrievedpublic java.util.List getAllCachedImages()
public int getFilesCount()
public java.lang.String getLength(java.lang.String imgName)
imgName - the image namepublic java.lang.String getSingleSize(CmsObject cms, java.lang.String resPath) throws CmsException
cms - CmsObejctresPath - Path of image (uri)CmsException - if something goes wrongpublic java.lang.String getSize(java.lang.String imgName)
imgName - the image namepublic java.util.List getVariations(java.lang.String imgName)
imgName - the image namepublic int getVariationsCount()
public int getVariationsSize()