Package com.day.cq.dam.usage.api
Interface AssetUsageTracker
- 
public interface AssetUsageTrackerTheAssetUsageTrackerinterface describes the methods for recording and accessing the asset usage record. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAssetUsageTracker.AggregateUsageInfoThe Class AggregateUsageInfo, defines the meta properties for the asset usage information. 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLAST_USEDThe last used.static java.lang.StringUSAGE_COUNTThe usage count.static java.lang.StringUSAGE_TYPEThe asset usage type. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAssetScore(Asset asset)Gets the asset score.java.util.List<AssetUsageTracker.AggregateUsageInfo>getUsageStats(Asset asset, java.util.List<java.lang.String> usagesType)Gets the asset usage stats.voidrecordUsage(Asset asset, AssetUsageRecord assetUsageRecord)Update theassetusages information withassetUsageRecord. 
 - 
 
- 
- 
Field Detail
- 
USAGE_COUNT
static final java.lang.String USAGE_COUNT
The usage count.- See Also:
 - Constant Field Values
 
 
- 
LAST_USED
static final java.lang.String LAST_USED
The last used.- See Also:
 - Constant Field Values
 
 
- 
USAGE_TYPE
static final java.lang.String USAGE_TYPE
The asset usage type.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
recordUsage
void recordUsage(Asset asset, AssetUsageRecord assetUsageRecord) throws javax.jcr.RepositoryException, PersistenceException, ReplicationException
Update theassetusages information withassetUsageRecord.- Parameters:
 asset- the asset to updateassetUsageRecord- the new asset usage record- Throws:
 javax.jcr.RepositoryException- the repository exceptionPersistenceException- the persistence exceptionReplicationException- the replication exception
 
- 
getAssetScore
long getAssetScore(Asset asset)
Gets the asset score.- Parameters:
 asset- asset for which score is required- Returns:
 - the asset score
 
 
- 
getUsageStats
java.util.List<AssetUsageTracker.AggregateUsageInfo> getUsageStats(Asset asset, java.util.List<java.lang.String> usagesType)
Gets the asset usage stats.- Parameters:
 asset- the asset for which information is requiredusagesType- list of usages to be returned- Returns:
 - the list of 
AggregateUsageInfofor all the solutions in which thisassethas been used. 
 
 - 
 
 -