// notify DeleteListener
if (deleteListener != null) {
deleteListener.beforeDelete(targetUri);
}
NodeRevisionDescriptors revisionDescriptors =
contentHelper.retrieve(token, currentObject.getUri());
// remove the associated locks
Enumeration locks = lockHelper.enumerateLocks
(token, currentObject.getUri(), false);
while (locks.hasMoreElements()) {
lockHelper.unlock(token, (NodeLock) locks.nextElement());
}
// remove the associated security
Enumeration permissions = securityHelper.enumeratePermissions
(token, currentObject);
while (permissions.hasMoreElements()) {
NodePermission permission =
(NodePermission) permissions.nextElement();
securityHelper.revokePermission(token, permission);
}
// remove all revisions
if( !revisionDescriptors.isRedirected() ) {
Enumeration revisionNumberEnum =
revisionDescriptors.enumerateRevisionNumbers();
if (revisionNumberEnum != null) {
while (revisionNumberEnum.hasMoreElements()) {
contentHelper.remove
(token, currentObject.getUri(),
(NodeRevisionNumber)revisionNumberEnum.nextElement());