Interface AssetSmartCropStore

    • Method Detail

      • removeSmartCrops

        void removeSmartCrops​(Asset asset,
                              List<String> crops)
        Removes the smart crops renditions for an asset
        Parameters:
        asset - Asset for which the smart crops need to be removed
        crops - Smart crop names which are to be removed.
      • addOrUpdateSmartCrops

        Collection<Rendition> addOrUpdateSmartCrops​(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 Renditions corresponding to input crops
      • hasLocalCropDefns

        boolean hasLocalCropDefns​(Asset asset)
        Returns true if the asset has SmartCrops stored in jcr as renditions
        Parameters:
        asset - asset
        Returns:
        true or false depending upon if asset has smartcrop renditions
      • setManualCropFlag

        void setManualCropFlag​(Asset asset,
                               String cropName,
                               boolean value)
        Sets a property 'manualCrop' with the "value" to the the asset's smart crop rendition
        Parameters:
        asset - Asset
        cropName - Smart Crop name
        value - true or false to the 'manualCrop' property
      • isManualCropped

        boolean isManualCropped​(Asset asset,
                                String cropName)
        Returns the value of 'manualCrop' property for the Asset's smart crop rendition.
        Parameters:
        asset - Asset
        cropName - Smart Crop name
        Returns:
        true or false depending upon if asset's smartcrop renditions is manually edited.