Package com.day.cq.dam.commons.util
Class StockUtil
- java.lang.Object
-
- com.day.cq.dam.commons.util.StockUtil
-
public class StockUtil extends java.lang.Object
This class provides various utility methods pertaining to Adobe Stock integration required in presentation/user interface.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PN_STOCK_ID
static java.lang.String
PN_STOCK_IS_EDITORIAL
static java.lang.String
PN_STOCK_LICENSE
static java.lang.String
STOCK_ROOT_PATH
static java.lang.String
STOCK_STATE_UNLICENSED
-
Constructor Summary
Constructors Constructor Description StockUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isStockAccessible(ResourceResolver resourceResolver)
Returns true if Stock API is accessible by the current contextstatic boolean
isStockAsset(Resource res)
Returns true if resource is an asset imported from Adobe Stockstatic boolean
isStockAssetEditorial(Resource res)
Returns true if resource is a Adobe Stock Asset and isEditorial property is truestatic boolean
isStockAssetLicensed(Resource res)
Returns true if resource is a licensed asset imported from Adobe Stock
-
-
-
Field Detail
-
STOCK_ROOT_PATH
public static final java.lang.String STOCK_ROOT_PATH
- See Also:
- Constant Field Values
-
STOCK_STATE_UNLICENSED
public static final java.lang.String STOCK_STATE_UNLICENSED
- See Also:
- Constant Field Values
-
PN_STOCK_ID
public static final java.lang.String PN_STOCK_ID
- See Also:
- Constant Field Values
-
PN_STOCK_LICENSE
public static final java.lang.String PN_STOCK_LICENSE
- See Also:
- Constant Field Values
-
PN_STOCK_IS_EDITORIAL
public static final java.lang.String PN_STOCK_IS_EDITORIAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
isStockAsset
public static boolean isStockAsset(Resource res)
Returns true if resource is an asset imported from Adobe Stock- Parameters:
res
- a resource- Returns:
- returns true if resource is identified as Stock asset
-
isStockAssetLicensed
public static boolean isStockAssetLicensed(Resource res)
Returns true if resource is a licensed asset imported from Adobe Stock- Parameters:
res
- a resource- Returns:
- returns true if resource is identified as licensed Stock asset
-
isStockAssetEditorial
public static boolean isStockAssetEditorial(Resource res)
Returns true if resource is a Adobe Stock Asset and isEditorial property is true- Parameters:
res
- a resource- Returns:
- returns true if resource is identified as editorial Stock asset
-
isStockAccessible
public static boolean isStockAccessible(ResourceResolver resourceResolver)
Returns true if Stock API is accessible by the current context- Parameters:
resourceResolver
- resource resolver- Returns:
- returns true if stock API is accessible
-
-