Package com.day.cq.dam.api.smartcrop
Interface AssetSmartCropStore
-
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateSmartCrops(Collection<SmartCrop> crops, Asset asset) Adds or updates crops as renditions.getSmartCrops(Asset asset) Lists allSmartCrops for an assetbooleanhasLocalCropDefns(Asset asset) Returns true if the asset hasSmartCrops stored in jcr as renditionsbooleanisManualCropped(Asset asset, String cropName) Returns the value of 'manualCrop' property for the Asset's smart crop rendition.voidremoveSmartCrops(Asset asset, List<String> crops) Removes the smart crops renditions for an assetvoidsetManualCropFlag(Asset asset, String cropName, boolean value) Sets a property 'manualCrop' with the "value" to the the asset's smart crop rendition
-
Method Details
-
getSmartCrops
Lists allSmartCrops for an asset- Parameters:
asset- asset- Returns:
- all available
SmartCrops
-
removeSmartCrops
Removes the smart crops renditions for an asset- Parameters:
asset- Asset for which the smart crops need to be removedcrops- Smart crop names which are to be removed.
-
addOrUpdateSmartCrops
Adds or updates crops as renditions. This method will replace any existing crops of the same name .- Parameters:
crops- Smart Crops to assign to the asset.asset- Asset to which crops are to be stored.- Returns:
- collection of
Renditions corresponding to input crops
-
hasLocalCropDefns
Returns true if the asset hasSmartCrops stored in jcr as renditions- Parameters:
asset- asset- Returns:
- true or false depending upon if asset has smartcrop renditions
-
setManualCropFlag
Sets a property 'manualCrop' with the "value" to the the asset's smart crop rendition- Parameters:
asset- AssetcropName- Smart Crop namevalue- true or false to the 'manualCrop' property
-
isManualCropped
Returns the value of 'manualCrop' property for the Asset's smart crop rendition.- Parameters:
asset- AssetcropName- Smart Crop name- Returns:
- true or false depending upon if asset's smartcrop renditions is manually edited.
-