| | |
| | | * |
| | | * |
| | | * Copyright 2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package com.forgerock.opendj.ldap.tools; |
| | | |
| | |
| | | import org.forgerock.opendj.ldap.ConnectionFactory; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.forgerock.opendj.ldap.DecodeOptions; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.LdapException; |
| | | import org.forgerock.opendj.ldap.Filter; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.controls.AssertionRequestControl; |
| | |
| | | Result r = connection.add(change); |
| | | printResult(opType, change.getName().toString(), r); |
| | | return r.getResultCode().intValue(); |
| | | } catch (final ErrorResultException ere) { |
| | | } catch (final LdapException ere) { |
| | | return Utils.printErrorMessage(LDAPModify.this, ere); |
| | | } |
| | | } |
| | |
| | | Result r = connection.delete(change); |
| | | printResult(opType, change.getName().toString(), r); |
| | | return r.getResultCode().intValue(); |
| | | } catch (final ErrorResultException ere) { |
| | | } catch (final LdapException ere) { |
| | | return printErrorMessage(LDAPModify.this, ere); |
| | | } |
| | | } |
| | |
| | | Result r = connection.modifyDN(change); |
| | | printResult(opType, change.getName().toString(), r); |
| | | return r.getResultCode().intValue(); |
| | | } catch (final ErrorResultException ere) { |
| | | } catch (final LdapException ere) { |
| | | return Utils.printErrorMessage(LDAPModify.this, ere); |
| | | } |
| | | } |
| | |
| | | Result r = connection.modify(change); |
| | | printResult(opType, change.getName().toString(), r); |
| | | return r.getResultCode().intValue(); |
| | | } catch (final ErrorResultException ere) { |
| | | } catch (final LdapException ere) { |
| | | return Utils.printErrorMessage(LDAPModify.this, ere); |
| | | } |
| | | } |
| | |
| | | if (!noop.isPresent()) { |
| | | try { |
| | | connection = connectionFactory.getConnection(); |
| | | } catch (final ErrorResultException ere) { |
| | | } catch (final LdapException ere) { |
| | | return Utils.printErrorMessage(this, ere); |
| | | } |
| | | } |