public interface CopyServicePolicies
A typical registration and invocation would look like this:
public void init()
{
this.policyComponent.bindClassBehaviour(
OnCopyNodePolicy.QNAME,
ActionModel.ASPECT_ACTIONS,
new JavaBehaviour(this, "getCopyCallback"));
this.policyComponent.bindClassBehaviour(
OnCopyCompletePolicy.QNAME,
ActionModel.ASPECT_ACTIONS,
new JavaBehaviour(this, "onCopyComplete"));
...
}
public CopyBehaviourCallback getCopyCallback(QName classRef, CopyDetails copyDetails)
{
return new XyzAspectCopyBehaviourCallback();
}
private static class XyzAspectCopyBehaviourCallback extends DefaultCopyBehaviourCallback
{
// Override methods any to achieve the desired behaviour
public boolean mustCopyChildAssociation(QName classQName, CopyDetails copyDetails, ChildAssociationRef childAssocRef)
{
...
}
}
public void onCopyComplete(
NodeRef sourceNodeRef,
NodeRef targetNodeRef,
boolean copyToNewNode,
Map
Modifier and Type | Interface and Description |
---|---|
static interface |
CopyServicePolicies.BeforeCopyPolicy
The intermediate copy callback, which occurs once it has been decided which properties
and aspects will be copied, but before the copy occurs.
|
static interface |
CopyServicePolicies.OnCopyCompletePolicy
Final callback after the copy (including any cascading) has been completed.
|
static interface |
CopyServicePolicies.OnCopyNodePolicy
Policy invoked when a node is copied.
|
Copyright © 2005–2017 Alfresco Software. All rights reserved.