|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CopyServicePolicies
Policies for the CopyService.
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
Nested Class Summary | |
---|---|
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. |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |