|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.usage.ContentUsageImpl
public class ContentUsageImpl
Implements Content Usage service and policies/behaviour.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
---|
Policy.Arg |
Field Summary |
---|
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy |
---|
ARG_0, ARG_1, ARG_2, QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy |
---|
QNAME |
Fields inherited from interface org.alfresco.repo.policy.Policy |
---|
NAMESPACE |
Constructor Summary | |
---|---|
ContentUsageImpl()
|
Method Summary | |
---|---|
void |
beforeDeleteNode(NodeRef nodeRef)
Called before a node is deleted. |
boolean |
getEnabled()
Are ContentUsages enabled (refer to 'system.usages.enabled' repository property) ? |
java.util.List |
getStores()
|
long |
getUserQuota(java.lang.String userName)
Gets user quota Note: -1 means no quota limit set |
long |
getUserStoredUsage(NodeRef personNodeRef)
|
long |
getUserUsage(java.lang.String userName)
Gets user usage |
long |
getUserUsage(java.lang.String userName,
boolean removeDeltas)
|
void |
init()
The initialise method |
void |
onAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
Called after an cm:ownable aspect has been added to a node |
void |
onCreateNode(ChildAssociationRef childAssocRef)
Called when a new node has been created. |
void |
onUpdateProperties(NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
Called after a node's properties have been changed. |
void |
setAuthenticationContext(AuthenticationContext authenticationContext)
|
void |
setEnabled(boolean enabled)
|
void |
setNodeService(NodeService nodeService)
|
void |
setPersonService(PersonService personService)
|
void |
setPolicyComponent(PolicyComponent policyComponent)
|
void |
setStores(java.util.List stores)
|
void |
setTenantService(TenantService tenantService)
|
void |
setUsageService(UsageService usageService)
|
void |
setUserQuota(java.lang.String userName,
long currentQuota)
Set user's current quota. |
void |
setUserStoredUsage(NodeRef personNodeRef,
long currentUsage)
Set user's usage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentUsageImpl()
Method Detail |
---|
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 setStores(java.util.List stores)
public java.util.List getStores()
public void init()
public void onCreateNode(ChildAssociationRef childAssocRef)
NodeServicePolicies.OnCreateNodePolicy
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
childAssocRef
- the created child association referencepublic void onUpdateProperties(NodeRef nodeRef, java.util.Map before, java.util.Map after)
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
nodeRef
- 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.BeforeDeleteNodePolicy
nodeRef
- the node referencepublic void onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
onAddAspect
in interface NodeServicePolicies.OnAddAspectPolicy
nodeRef
- the node to which the aspect was addedaspectTypeQName
- the type of the aspectpublic void setUserStoredUsage(NodeRef personNodeRef, long currentUsage)
userName
- currentUsage
- public long getUserStoredUsage(NodeRef personNodeRef)
public long getUserUsage(java.lang.String userName)
ContentUsageService
getUserUsage
in interface ContentUsageService
public long getUserUsage(java.lang.String userName, boolean removeDeltas)
public void setUserQuota(java.lang.String userName, long currentQuota)
setUserQuota
in interface ContentUsageService
userName
- currentQuota
- public long getUserQuota(java.lang.String userName)
ContentUsageService
getUserQuota
in interface ContentUsageService
public boolean getEnabled()
ContentUsageService
getEnabled
in interface ContentUsageService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |