| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | */ |
| | | package org.opends.server.protocols.ldap; |
| | | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.types.RawModification; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.RawModification; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | |
| | | /** |
| | | * This class defines the structures and methods for an LDAP modify request |
| | | * protocol op, which is used to alter the contents of an entry in the Directory |
| | |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | |
| | | // The set of modifications for this modify request. |
| | | private ArrayList<RawModification> modifications; |
| | | /** The set of modifications for this modify request. */ |
| | | private List<RawModification> modifications; |
| | | |
| | | // The DN for this modify request. |
| | | /** The DN for this modify request. */ |
| | | private ByteString dn; |
| | | |
| | | |
| | |
| | | * @param modifications The set of modifications for this modify request. |
| | | */ |
| | | public ModifyRequestProtocolOp(ByteString dn, |
| | | ArrayList<RawModification> modifications) |
| | | List<RawModification> modifications) |
| | | { |
| | | this.dn = dn; |
| | | |
| | |
| | | * |
| | | * @return The set of modifications for this modify request. |
| | | */ |
| | | public ArrayList<RawModification> getModifications() |
| | | public List<RawModification> getModifications() |
| | | { |
| | | return modifications; |
| | | } |
| | |
| | | * |
| | | * @return The BER type for this protocol op. |
| | | */ |
| | | @Override |
| | | public byte getType() |
| | | { |
| | | return OP_TYPE_MODIFY_REQUEST; |
| | |
| | | * |
| | | * @return The name for this protocol op type. |
| | | */ |
| | | @Override |
| | | public String getProtocolOpName() |
| | | { |
| | | return "Modify Request"; |
| | |
| | | * @param stream The ASN.1 output stream to write to. |
| | | * @throws IOException If a problem occurs while writing to the stream. |
| | | */ |
| | | @Override |
| | | public void write(ASN1Writer stream) throws IOException |
| | | { |
| | | stream.writeStartSequence(OP_TYPE_MODIFY_REQUEST); |
| | |
| | | * |
| | | * @param buffer The buffer to which the string should be appended. |
| | | */ |
| | | @Override |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | buffer.append("ModifyRequest(dn="); |
| | |
| | | * @param indent The number of spaces from the margin that the lines should |
| | | * be indented. |
| | | */ |
| | | @Override |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | StringBuilder indentBuf = new StringBuilder(indent); |