public class OwnableServiceImpl extends Object implements OwnableService, org.springframework.beans.factory.InitializingBean, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnDeleteNodePolicy
Policy.ArgNO_OWNERQNAMEARG_0, ARG_1, ARG_2, QNAMEQNAMEQNAME| Constructor and Description |
|---|
OwnableServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
String |
getOwner(NodeRef nodeRef)
Get the username of the owner of the given object.
|
boolean |
hasOwner(NodeRef nodeRef)
Does the given node have an owner?
|
void |
init() |
void |
onAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
Called after an aspect has been added to a node
|
CopyBehaviourCallback |
onCopyNode(QName classRef,
CopyDetails copyDetails)
When an owned or audited node is copied, control which properties
go over, and which are re-created
|
void |
onDeleteNode(ChildAssociationRef childAssocRef,
boolean isNodeArchived)
Called after a node is deleted.
|
void |
onRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
Called after an aspect has been removed from a node
|
void |
onUpdateProperties(NodeRef nodeRef,
Map<QName,Serializable> before,
Map<QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setAuthenticationService(AuthenticationService authenticationService) |
void |
setNodeOwnerCache(SimpleCache<NodeRef,String> ownerCache) |
void |
setNodeService(NodeService nodeService) |
void |
setOwner(NodeRef nodeRef,
String userName)
Set the owner of the object.
|
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setRenditionService(RenditionService renditionService) |
void |
setStoresToIgnorePolicies(Set<String> storesToIgnorePolicies) |
void |
setTenantService(TenantService tenantService) |
void |
takeOwnership(NodeRef nodeRef)
Set the owner of the object to be the current user.
|
public void setNodeService(NodeService nodeService)
public void setAuthenticationService(AuthenticationService authenticationService)
public void setPolicyComponent(PolicyComponent policyComponent)
public void setTenantService(TenantService tenantService)
public void setNodeOwnerCache(SimpleCache<NodeRef,String> ownerCache)
ownerCache - a transactionally-safe cache of node ownerspublic void setRenditionService(RenditionService renditionService)
renditionService - the renditionService to setpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void init()
public String getOwner(NodeRef nodeRef)
OwnableServicegetOwner in interface OwnableServicenodeRef - NodeRefpublic void setOwner(NodeRef nodeRef, String userName)
OwnableServicesetOwner in interface OwnableServicenodeRef - NodeRefuserName - Stringpublic void takeOwnership(NodeRef nodeRef)
OwnableServicetakeOwnership in interface OwnableServicenodeRef - NodeRefpublic boolean hasOwner(NodeRef nodeRef)
OwnableServicehasOwner in interface OwnableServicenodeRef - NodeRefpublic void onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.OnAddAspectPolicyonAddAspect in interface NodeServicePolicies.OnAddAspectPolicynodeRef - the node to which the aspect was addedaspectTypeQName - the type of the aspectpublic void onRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)
NodeServicePolicies.OnRemoveAspectPolicyonRemoveAspect in interface NodeServicePolicies.OnRemoveAspectPolicynodeRef - the node from which the aspect will be removedaspectTypeQName - the type of the aspectpublic void onDeleteNode(ChildAssociationRef childAssocRef, boolean isNodeArchived)
NodeServicePolicies.OnDeleteNodePolicyonDeleteNode in interface NodeServicePolicies.OnDeleteNodePolicychildAssocRef - the primary parent-child association of the deleted nodeisNodeArchived - indicates whether the node has been archived rather than purgedpublic void onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)
NodeServicePolicies.OnUpdatePropertiesPolicyonUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic CopyBehaviourCallback onCopyNode(QName classRef, CopyDetails copyDetails)
Copyright © 2005–2021 Alfresco Software. All rights reserved.