Interface AssetSmartCropStore

    • Method Detail

      • getSmartCrops

        java.util.Collection<SmartCrop> getSmartCrops​(Asset asset)
        Lists all SmartCrops for an asset
        Parameters:
        asset - asset
        Returns:
        all available SmartCrops
      • 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 removed
        crops - 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 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,
                               java.lang.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,
                                java.lang.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.