Sc dsc 698 recurse del

Yes, in fact the deletion of any element via the amberdb interface will be part of a transaction, and all transactions should be picked up by the Indexer routine.

From: shuangzhou <notifications@github.com<mailto:notifications@github.com>>
Reply-To: nla/banjo <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Wednesday, 12 November 2014 4:48 PM
To: nla/banjo <banjo@noreply.github.com<mailto:banjo@noreply.github.com>>
Cc: Shaun Coen <scoen@nla.gov.au<mailto:scoen@nla.gov.au>>
Subject: Re: [banjo] Sc dsc 698 recurse del (#830)


In src/banjo/controllers/WorksController.java:

>
> -        if (!userAccess.hasEditAccess(work)) {
> -            throw new NoAccessException();
> +        try (AmberSession amberSession = amberDbService.get()) {
> +            Work work = amberSession.findWork(objectId);
> +            checkAccess(userAccess.hasEditAccess(work));
> +            String parentId = (work.getParent() == null) ? "" : work.getParent().getObjId();
> +            work.setCommentsInternal(work.getCommentsInternal() + "\n\nDeletion reason:" + deleteReason);
> +            Map<String, Integer> counts = amberSession.deleteWorkWithAudit(new HashMap<String, Integer>(), work);


Does amberSession.deleteWorkWithAudit mark the vertices been deleted for the TransactionIndexer?

—
Reply to this email directly or view it on GitHub<https://github.com/nla/banjo/pull/830/files#r20202343>.