Package org.alfresco.repo.domain.usage
Interface UsageDAO
-
- All Known Implementing Classes:
AbstractUsageDAOImpl,UsageDAOImpl
public interface UsageDAOThis provides basic services such as caching, but defers to the underlying implementation for CRUD operations. alf_usage_delta- Since:
- 3.4
- Author:
- janv
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUsageDAO.MapHandlerA callback handler for iterating over the Map resultsstatic interfaceUsageDAO.StringHandlerA callback handler for iterating over the String results
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intdeleteDeltas(long nodeId)Delete usage deltas for given node entity idintdeleteDeltas(NodeRef nodeRef)Delete usage deltas for given nodeRefLonggetContentSizeForStoreForUser(StoreRef storeRef, String userName)Get user with a calculated usagelonggetTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas)Get the total delta size for a node.Set<NodeRef>getUsageDeltaNodes()voidgetUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)New style content urls - Iterate and sum all content node sizes for user (owner/creator)voidgetUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)Iterate over all person nodes to get users without a calculated usagevoidgetUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)Iterate over all person nodes to get users with a calculated usagevoidinsertDelta(NodeRef usageNodeRef, long deltaSize)Create a usage delta entry.
-
-
-
Method Detail
-
insertDelta
void insertDelta(NodeRef usageNodeRef, long deltaSize)
Create a usage delta entry.- Parameters:
deltaSize- the size change
-
getTotalDeltaSize
long getTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas)
Get the total delta size for a node.- Parameters:
nodeRef- the node referenceremoveDeltas- true to remove the deltas before returning the result.- Returns:
- sum of delta sizes (in bytes) - can be +ve or -ve
-
deleteDeltas
int deleteDeltas(NodeRef nodeRef)
Delete usage deltas for given nodeRef- Parameters:
nodeRef- NodeRef- Returns:
- int
-
deleteDeltas
int deleteDeltas(long nodeId)
Delete usage deltas for given node entity id- Parameters:
nodeId- long- Returns:
- int
-
getUserContentSizesForStore
void getUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
New style content urls - Iterate and sum all content node sizes for user (owner/creator)- Parameters:
storeRef- the store to search inresultsCallback- the callback to use while iterating over the content sizes (one row per user)
-
getUsersWithoutUsage
void getUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
Iterate over all person nodes to get users without a calculated usage- Parameters:
storeRef- the store to search inresultsCallback- the callback to use while iterating over the people
-
getUsersWithUsage
void getUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
Iterate over all person nodes to get users with a calculated usage- Parameters:
storeRef- the store to search inresultsCallback- the callback to use while iterating over the people
-
-