@Test public void beforeUpdate() throws JobExecutionException { entity = new UserTO(); entity.setKey(UUID.randomUUID().toString()); Set<String> memb = new HashSet<>(); memb.add(entity.getKey()); membershipsBefore.put(user.getKey(), memb); ldapMembershipPullActions.beforeUpdate(profile, syncDelta, entity, anyReq); assertFalse(entity instanceof GroupTO); assertEquals(1, membershipsBefore.get(user.getKey()).size()); }
@Transactional(readOnly = true) @Override public void beforeUpdate( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final AnyUR anyUR) throws JobExecutionException { if (!(entity instanceof GroupTO)) { super.beforeUpdate(profile, delta, entity, anyUR); } groupDAO.findUMemberships(groupDAO.find(entity.getKey())).forEach(uMembership -> { Set<String> memb = membershipsBefore.get(uMembership.getLeftEnd().getKey()); if (memb == null) { memb = new HashSet<>(); membershipsBefore.put(uMembership.getLeftEnd().getKey(), memb); } memb.add(entity.getKey()); }); }
LDAPMembershipPullActions extends SchedulingPullActions { @Transactional(readOnly = true) @Override public void beforeUpdate( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final AnyUR anyUR) throws JobExecutionException { if (!(entity instanceof GroupTO)) { super.beforeUpdate(profile, delta, entity, anyUR); } groupDAO.findUMemberships(groupDAO.find(entity.getKey())).forEach(uMembership -> { Set<String> memb = membershipsBefore.get(uMembership.getLeftEnd().getKey()); if (memb == null) { memb = new HashSet<>(); membershipsBefore.put(uMembership.getLeftEnd().getKey(), memb); } memb.add(entity.getKey()); }); } }
LDAPMembershipPullActions extends SchedulingPullActions { @Transactional(readOnly = true) @Override public void beforeUpdate( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final AnyUR anyUR) throws JobExecutionException { if (!(entity instanceof GroupTO)) { super.beforeUpdate(profile, delta, entity, anyUR); } groupDAO.findUMemberships(groupDAO.find(entity.getKey())).forEach(uMembership -> { Set<String> memb = membershipsBefore.get(uMembership.getLeftEnd().getKey()); if (memb == null) { memb = new HashSet<>(); membershipsBefore.put(uMembership.getLeftEnd().getKey(), memb); } memb.add(entity.getKey()); }); }  }
LDAPMembershipPullActions extends SchedulingPullActions { @Transactional(readOnly = true) @Override public void beforeUpdate( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final AnyUR anyUR) throws JobExecutionException { if (!(entity instanceof GroupTO)) { super.beforeUpdate(profile, delta, entity, anyUR); } groupDAO.findUMemberships(groupDAO.find(entity.getKey())).forEach(uMembership -> { Set<String> memb = membershipsBefore.get(uMembership.getLeftEnd().getKey()); if (memb == null) { memb = new HashSet<>(); membershipsBefore.put(uMembership.getLeftEnd().getKey(), memb); } memb.add(entity.getKey()); }); }  @Transactional(readOnly = true) @Override void beforeUpdate(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final AnyUR anyUR); @Override void after(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final ProvisioningReport result); @Override void afterAll(final ProvisioningProfile<?, ?> profile); }
LDAPMembershipPullActions extends SchedulingPullActions { @Transactional(readOnly = true) @Override public void beforeUpdate( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final AnyUR anyUR) throws JobExecutionException { if (!(entity instanceof GroupTO)) { super.beforeUpdate(profile, delta, entity, anyUR); } groupDAO.findUMemberships(groupDAO.find(entity.getKey())).forEach(uMembership -> { Set<String> memb = membershipsBefore.get(uMembership.getLeftEnd().getKey()); if (memb == null) { memb = new HashSet<>(); membershipsBefore.put(uMembership.getLeftEnd().getKey(), memb); } memb.add(entity.getKey()); }); }  @Transactional(readOnly = true) @Override void beforeUpdate(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final AnyUR anyUR); @Override void after(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final ProvisioningReport result); @Override void afterAll(final ProvisioningProfile<?, ?> profile);  }