Interface AclLinterHelperService

All Known Implementing Classes:
AclLinterHelperServiceImpl

public interface AclLinterHelperService
Transaction boundary for the ACL linter's parent-linking repair.

This exists so a bulk repair does not have to be one transaction. AclLinterService's entry points are @Transactional, and the fix for a whole type used to run inside that single call: on production that is 631,709 BioAssay identities and as many BioMaterial ones, so a failure anywhere threw away hours of committed-nothing work. Batches go through this bean with REQUIRES_NEW instead, which needs a separate bean — a self-invocation is not proxied and would silently join the caller's transaction.

Batching is safe here only because the repair is idempotent: a linked identity stops matching parent_object IS NULL, so re-running after a failure picks up exactly what is left.

  • Method Details

    • linkParentsInNewTransaction

      Collection<AclLinterService.LintResult> linkParentsInNewTransaction(Class<? extends SecuredChild<?>> clazz, List<Long> identifiers)
      Link each of identifiers to the parent ACL identity its entity resolves to, in a new transaction that commits independently of the caller's.

      Identifiers whose entity cannot be found, or whose parent cannot be resolved, are reported as unfixed rather than failing the batch — a BioMaterial shared by more than one experiment has no single parent to pick, and there is no point losing the rest of the batch over it.

    • setParentAcl

      void setParentAcl(Class<? extends Securable> clazz, Long identifier, AclObjectIdentity parentAoi)
      Attach the ACL identity of identifier to parentAoi, joining the caller's transaction.