Package com.day.cq.dam.usage.api
Interface AssetUsageTracker
public interface AssetUsageTracker
The
AssetUsageTracker interface describes the methods for
recording and accessing the asset usage record.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe Class AggregateUsageInfo, defines the meta properties for the asset usage information. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionlonggetAssetScore(Asset asset) Gets the asset score.getUsageStats(Asset asset, List<String> usagesType) Gets the asset usage stats.voidrecordUsage(Asset asset, AssetUsageRecord assetUsageRecord) Update theassetusages information withassetUsageRecord.
-
Field Details
-
USAGE_COUNT
The usage count.- See Also:
-
LAST_USED
The last used.- See Also:
-
USAGE_TYPE
The asset usage type.- See Also:
-
-
Method Details
-
recordUsage
void recordUsage(Asset asset, AssetUsageRecord assetUsageRecord) throws RepositoryException, PersistenceException, ReplicationException Update theassetusages information withassetUsageRecord.- Parameters:
asset- the asset to updateassetUsageRecord- the new asset usage record- Throws:
RepositoryException- the repository exceptionPersistenceException- the persistence exceptionReplicationException- the replication exception
-
getAssetScore
Gets the asset score.- Parameters:
asset- asset for which score is required- Returns:
- the asset score
-
getUsageStats
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.
-