org.alfresco.repo.ownable.impl
Class OwnableServiceImpl
java.lang.Object
org.alfresco.repo.ownable.impl.OwnableServiceImpl
- All Implemented Interfaces:
- NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, ClassPolicy, Policy, OwnableService, org.springframework.beans.factory.InitializingBean
public class OwnableServiceImpl
- extends java.lang.Object
- implements OwnableService, org.springframework.beans.factory.InitializingBean, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy
Ownership service support. Use in permissions framework as dynamic authority.
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OwnableServiceImpl
public OwnableServiceImpl()
setNodeService
public void setNodeService(NodeService nodeService)
setAuthenticationService
public void setAuthenticationService(AuthenticationService authenticationService)
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
setNodeOwnerCache
public void setNodeOwnerCache(SimpleCache ownerCache)
- Parameters:
ownerCache
- a transactionally-safe cache of node owners
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
init
public void init()
getOwner
public java.lang.String getOwner(NodeRef nodeRef)
- Description copied from interface:
OwnableService
- Get the username of the owner of the given object.
- Specified by:
getOwner
in interface OwnableService
- Returns:
- the username or null if the object has no owner
setOwner
public void setOwner(NodeRef nodeRef,
java.lang.String userName)
- Description copied from interface:
OwnableService
- Set the owner of the object.
- Specified by:
setOwner
in interface OwnableService
takeOwnership
public void takeOwnership(NodeRef nodeRef)
- Description copied from interface:
OwnableService
- Set the owner of the object to be the current user.
- Specified by:
takeOwnership
in interface OwnableService
hasOwner
public boolean hasOwner(NodeRef nodeRef)
- Description copied from interface:
OwnableService
- Does the given node have an owner?
- Specified by:
hasOwner
in interface OwnableService
- Returns:
onAddAspect
public void onAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
- Description copied from interface:
NodeServicePolicies.OnAddAspectPolicy
- Called after an aspect has been added to a node
- Specified by:
onAddAspect
in interface NodeServicePolicies.OnAddAspectPolicy
- Parameters:
nodeRef
- the node to which the aspect was addedaspectTypeQName
- the type of the aspect
onRemoveAspect
public void onRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
- Description copied from interface:
NodeServicePolicies.OnRemoveAspectPolicy
- Called after an aspect has been removed from a node
- Specified by:
onRemoveAspect
in interface NodeServicePolicies.OnRemoveAspectPolicy
- Parameters:
nodeRef
- the node from which the aspect will be removedaspectTypeQName
- the type of the aspect
onDeleteNode
public void onDeleteNode(ChildAssociationRef childAssocRef,
boolean isNodeArchived)
- Description copied from interface:
NodeServicePolicies.OnDeleteNodePolicy
- Called after a node is deleted. The reference given is for an association
which has been deleted and cannot be used to retrieve node or associaton
information from any of the services.
- Specified by:
onDeleteNode
in interface NodeServicePolicies.OnDeleteNodePolicy
- Parameters:
childAssocRef
- the primary parent-child association of the deleted nodeisNodeArchived
- indicates whether the node has been archived rather than purged
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
- Description copied from interface:
NodeServicePolicies.OnUpdatePropertiesPolicy
- Called after a node's properties have been changed.
- Specified by:
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
- Parameters:
nodeRef
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the change
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.