Package org.alfresco.repo.domain.usage
Interface UsageDAO
- All Known Implementing Classes:
AbstractUsageDAOImpl,UsageDAOImpl
public interface UsageDAO
This 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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceA callback handler for iterating over the Map resultsstatic interfaceA callback handler for iterating over the String results -
Method Summary
Modifier and TypeMethodDescriptionintdeleteDeltas(long nodeId) Delete usage deltas for given node entity idintdeleteDeltas(NodeRef nodeRef) Delete usage deltas for given nodeRefgetContentSizeForStoreForUser(StoreRef storeRef, String userName) Get user with a calculated usagelonggetTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas) Get the total delta size for a node.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 Details
-
insertDelta
Create a usage delta entry.- Parameters:
deltaSize- the size change
-
getTotalDeltaSize
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
-
getUsageDeltaNodes
-
deleteDeltas
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
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
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
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
-
getContentSizeForStoreForUser
Get user with a calculated usage- Parameters:
storeRef- the store to search inuserName- the username- Returns:
- Returns ussage
-