@Test public void afterWithNullUser() throws JobExecutionException { when(userDAO.find(entity.getKey())).thenReturn(null); ldapPasswordPullActions.after(profile, syncDelta, entity, result); assertNull(ReflectionTestUtils.getField(ldapPasswordPullActions, "encodedPassword")); assertNull(ReflectionTestUtils.getField(ldapPasswordPullActions, "cipher")); }
@Transactional @Override public void after( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final ProvisioningReport result) throws JobExecutionException { if (entity instanceof UserTO && encodedPassword != null && cipher != null) { User user = userDAO.find(entity.getKey()); if (user != null) { byte[] encodedPasswordBytes = Base64.getDecoder().decode(encodedPassword.getBytes()); String encodedHexStr = DatatypeConverter.printHexBinary(encodedPasswordBytes).toUpperCase(); user.setEncodedPassword(encodedHexStr, cipher); } encodedPassword = null; cipher = null; } }
LDAPPasswordPullActions implements PullActions { @Transactional @Override public void after( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final ProvisioningReport result) throws JobExecutionException { if (entity instanceof UserTO && encodedPassword != null && cipher != null) { User user = userDAO.find(entity.getKey()); if (user != null) { byte[] encodedPasswordBytes = Base64.getDecoder().decode(encodedPassword.getBytes()); String encodedHexStr = DatatypeConverter.printHexBinary(encodedPasswordBytes).toUpperCase(); user.setEncodedPassword(encodedHexStr, cipher); } encodedPassword = null; cipher = null; } } }
LDAPPasswordPullActions implements PullActions { @Transactional @Override public void after( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final ProvisioningReport result) throws JobExecutionException { if (entity instanceof UserTO && encodedPassword != null && cipher != null) { User user = userDAO.find(entity.getKey()); if (user != null) { byte[] encodedPasswordBytes = Base64.getDecoder().decode(encodedPassword.getBytes()); String encodedHexStr = DatatypeConverter.printHexBinary(encodedPasswordBytes).toUpperCase(); user.setEncodedPassword(encodedHexStr, cipher); } encodedPassword = null; cipher = null; } }  }
LDAPPasswordPullActions implements PullActions { @Transactional @Override public void after( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final ProvisioningReport result) throws JobExecutionException { if (entity instanceof UserTO && encodedPassword != null && cipher != null) { User user = userDAO.find(entity.getKey()); if (user != null) { byte[] encodedPasswordBytes = Base64.getDecoder().decode(encodedPassword.getBytes()); String encodedHexStr = DatatypeConverter.printHexBinary(encodedPasswordBytes).toUpperCase(); user.setEncodedPassword(encodedHexStr, cipher); } encodedPassword = null; cipher = null; } }  @Transactional(readOnly = true) @Override void beforeProvision(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final AnyCR anyCR); @Transactional(readOnly = true) @Override void beforeUpdate(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entityTO,
            final AnyUR anyUR); @Transactional @Override void after(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final ProvisioningReport result); }
LDAPPasswordPullActions implements PullActions { @Transactional @Override public void after( final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final EntityTO entity, final ProvisioningReport result) throws JobExecutionException { if (entity instanceof UserTO && encodedPassword != null && cipher != null) { User user = userDAO.find(entity.getKey()); if (user != null) { byte[] encodedPasswordBytes = Base64.getDecoder().decode(encodedPassword.getBytes()); String encodedHexStr = DatatypeConverter.printHexBinary(encodedPasswordBytes).toUpperCase(); user.setEncodedPassword(encodedHexStr, cipher); } encodedPassword = null; cipher = null; } }  @Transactional(readOnly = true) @Override void beforeProvision(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final AnyCR anyCR); @Transactional(readOnly = true) @Override void beforeUpdate(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entityTO,
            final AnyUR anyUR); @Transactional @Override void after(
            final ProvisioningProfile<?, ?> profile,
            final SyncDelta delta,
            final EntityTO entity,
            final ProvisioningReport result);  }