mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1981 (Cant reject the record that has any version records)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@98191 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -168,13 +168,22 @@ public class RecordAspect extends AbstractDisposableItem
|
||||
kind = BehaviourKind.CLASS,
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||
)
|
||||
public void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||
public void onRemoveReference(final NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||
{
|
||||
// Deal with versioned records
|
||||
if (reference.equals(CUSTOM_REF_VERSIONS))
|
||||
{
|
||||
// Apply the versioned aspect to the from node
|
||||
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
// Apply the versioned aspect to the from node
|
||||
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Execute script if for the reference event
|
||||
|
Reference in New Issue
Block a user