public class ContentUsageImpl extends Object implements ContentUsageService, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnCreateNodePolicy
Policy.ArgARG_0, ARG_1, ARG_2, QNAMEQNAMEQNAME| Constructor and Description |
|---|
ContentUsageImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeDeleteNode(NodeRef nodeRef)
Called before a node is deleted.
|
boolean |
getEnabled()
Are ContentUsages enabled (refer to 'system.usages.enabled' repository property) ?
|
List<String> |
getStores() |
long |
getUserQuota(String userName)
Gets user quota
Note: -1 means no quota limit set
|
long |
getUserStoredUsage(NodeRef personNodeRef) |
long |
getUserUsage(NodeRef personNodeRef,
boolean removeDeltas) |
long |
getUserUsage(String userName)
Gets user usage
|
void |
init()
The initialise method
|
void |
onCreateNode(ChildAssociationRef childAssocRef)
Called when a new node has been created.
|
void |
onUpdateProperties(NodeRef nodeRef,
Map<QName,Serializable> before,
Map<QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setAuthenticationContext(AuthenticationContext authenticationContext) |
void |
setEnabled(boolean enabled) |
void |
setExcludedTypes(List<String> excludedTypes) |
void |
setNodeService(NodeService nodeService) |
void |
setPersonService(PersonService personService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setStores(List<String> stores) |
void |
setTenantService(TenantService tenantService) |
void |
setUsageService(UsageService usageService) |
void |
setUserQuota(String userName,
long currentQuota)
Set user's current quota.
|
void |
setUserStoredUsage(NodeRef personNodeRef,
long currentUsage)
Set user's usage.
|
public void setNodeService(NodeService nodeService)
public void setPersonService(PersonService personService)
public void setUsageService(UsageService usageService)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setAuthenticationContext(AuthenticationContext authenticationContext)
public void setTenantService(TenantService tenantService)
public void setEnabled(boolean enabled)
public void init()
public void onCreateNode(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodePolicyonCreateNode in interface NodeServicePolicies.OnCreateNodePolicychildAssocRef - the created child association referencepublic void onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)
onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic void beforeDeleteNode(NodeRef nodeRef)
beforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicynodeRef - the node referencepublic void setUserStoredUsage(NodeRef personNodeRef, long currentUsage)
personNodeRef - person nodeRefcurrentUsage - longpublic long getUserStoredUsage(NodeRef personNodeRef)
public long getUserUsage(String userName)
ContentUsageServicegetUserUsage in interface ContentUsageServicepublic long getUserUsage(NodeRef personNodeRef, boolean removeDeltas)
public void setUserQuota(String userName, long currentQuota)
setUserQuota in interface ContentUsageServiceuserName - user namecurrentQuota - User's new quota (in bytes)public long getUserQuota(String userName)
ContentUsageServicegetUserQuota in interface ContentUsageServicepublic boolean getEnabled()
ContentUsageServicegetEnabled in interface ContentUsageServiceCopyright © 2005–2020 Alfresco Software. All rights reserved.