| | |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.Entry; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.LdapException; |
| | | import org.forgerock.opendj.ldap.Filter; |
| | | import org.forgerock.opendj.ldap.Function; |
| | | import org.forgerock.opendj.ldap.Modification; |
| | |
| | | completeIfNecessary(SUCCESS); |
| | | } |
| | | } |
| | | }).onFailure(new FailureHandler<ErrorResultException>() { |
| | | }).onFailure(new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(ErrorResultException error) { |
| | | public void handleError(LdapException error) { |
| | | synchronized (sequenceLock) { |
| | | completeIfNecessary(asResourceException(error)); |
| | | } |
| | |
| | | public void handleResult(final SearchResultEntry entry) { |
| | | adaptEntry(c, entry, h); |
| | | } |
| | | }).onFailure(new FailureHandler<ErrorResultException>() { |
| | | }).onFailure(new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(final ErrorResultException error) { |
| | | public void handleError(final LdapException error) { |
| | | h.handleError(asResourceException(error)); |
| | | } |
| | | }); |
| | |
| | | h.handleError(asResourceException(e)); |
| | | } |
| | | } |
| | | }).onFailure(new FailureHandler<ErrorResultException>() { |
| | | }).onFailure(new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(final ErrorResultException error) { |
| | | public void handleError(final LdapException error) { |
| | | h.handleError(asResourceException(error)); |
| | | } |
| | | }); |
| | |
| | | updateHandler.handleError(asResourceException(e)); |
| | | } |
| | | } |
| | | }).onFailure(new FailureHandler<ErrorResultException>() { |
| | | }).onFailure(new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(final ErrorResultException error) { |
| | | public void handleError(final LdapException error) { |
| | | updateHandler.handleError(asResourceException(error)); |
| | | } |
| | | }); |
| | |
| | | }; |
| | | } |
| | | |
| | | private FailureHandler<ErrorResultException> postEmptyPatchFailureHandler(final ResultHandler<Resource> h) { |
| | | return new FailureHandler<ErrorResultException>() { |
| | | private FailureHandler<LdapException> postEmptyPatchFailureHandler(final ResultHandler<Resource> h) { |
| | | return new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(final ErrorResultException error) { |
| | | public void handleError(final LdapException error) { |
| | | h.handleError(asResourceException(error)); |
| | | } |
| | | }; |
| | |
| | | }; |
| | | } |
| | | |
| | | private FailureHandler<ErrorResultException> postUpdateFailureHandler(final ResultHandler<Resource> handler) { |
| | | private FailureHandler<LdapException> postUpdateFailureHandler(final ResultHandler<Resource> handler) { |
| | | // The handler which will be invoked for the LDAP add result. |
| | | return new FailureHandler<ErrorResultException>() { |
| | | return new FailureHandler<LdapException>() { |
| | | @Override |
| | | public void handleError(final ErrorResultException error) { |
| | | public void handleError(final LdapException error) { |
| | | handler.handleError(asResourceException(error)); |
| | | } |
| | | }; |