Package com.day.cq.dam.api.smartcrop
Interface AssetSmartCropStore
-
@ProviderType public interface AssetSmartCropStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<Rendition>
addOrUpdateSmartCrops(java.util.Collection<SmartCrop> crops, Asset asset)
Adds or updates crops as renditions.java.util.Collection<SmartCrop>
getSmartCrops(Asset asset)
Lists allSmartCrop
s for an assetboolean
hasLocalCropDefns(Asset asset)
Returns true if the asset hasSmartCrop
s stored in jcr as renditionsboolean
isManualCropped(Asset asset, java.lang.String cropName)
Returns the value of 'manualCrop' property for the Asset's smart crop rendition.void
removeSmartCrops(Asset asset, java.util.List<java.lang.String> crops)
Removes the smart crops renditions for an assetvoid
setManualCropFlag(Asset asset, java.lang.String cropName, boolean value)
Sets a property 'manualCrop' with the "value" to the the asset's smart crop rendition
-
-
-
Method Detail
-
getSmartCrops
java.util.Collection<SmartCrop> getSmartCrops(Asset asset)
Lists allSmartCrop
s for an asset- Parameters:
asset
- asset- Returns:
- all available
SmartCrop
s
-
removeSmartCrops
void removeSmartCrops(Asset asset, java.util.List<java.lang.String> crops)
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
java.util.Collection<Rendition> addOrUpdateSmartCrops(java.util.Collection<SmartCrop> crops, Asset asset)
Adds or updates crops as renditions. This method will replace any existing crops of the same name .- Parameters:
asset
- Asset to which crops are to be stored.crops
- Smart Crops to assign to the asset.- Returns:
- collection of
Rendition
s corresponding to input crops
-
hasLocalCropDefns
boolean hasLocalCropDefns(Asset asset)
Returns true if the asset hasSmartCrop
s stored in jcr as renditions- Parameters:
asset
- asset- Returns:
- true or false depending upon if asset has smartcrop renditions
-
setManualCropFlag
void setManualCropFlag(Asset asset, java.lang.String cropName, boolean value)
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
boolean isManualCropped(Asset asset, java.lang.String cropName)
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.
-
-