Package org.opends.server.protocols.ldap
Class AddRequestProtocolOp
- java.lang.Object
-
- org.opends.server.protocols.ldap.ProtocolOp
-
- org.opends.server.protocols.ldap.AddRequestProtocolOp
-
public class AddRequestProtocolOp extends ProtocolOp
This class defines the structures and methods for an LDAP add request protocol op, which is used to add a new entry to the Directory Server.
-
-
Constructor Summary
Constructors Constructor Description AddRequestProtocolOp(ByteString dn)Creates a new LDAP add request protocol op with the specified DN and no attributes.AddRequestProtocolOp(ByteString dn, List<RawAttribute> attributes)Creates a new LDAP add request protocol op with the specified DN and set of attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RawAttribute>getAttributes()Retrieves the set of attributes for this add request.ByteStringgetDN()Retrieves the DN for this add request.StringgetProtocolOpName()Retrieves the name for this protocol op type.bytegetType()Retrieves the BER type for this protocol op.voidtoLDIF(StringBuilder buffer, int wrapColumn)Appends an LDIF representation of the entry to the provided buffer.voidtoString(StringBuilder buffer)Appends a string representation of this LDAP protocol op to the provided buffer.voidtoString(StringBuilder buffer, int indent)Appends a multi-line string representation of this LDAP protocol op to the provided buffer.voidwrite(ASN1Writer stream)Writes this protocol op to an ASN.1 output stream.-
Methods inherited from class org.opends.server.protocols.ldap.ProtocolOp
toString
-
-
-
-
Constructor Detail
-
AddRequestProtocolOp
public AddRequestProtocolOp(ByteString dn)
Creates a new LDAP add request protocol op with the specified DN and no attributes.- Parameters:
dn- The DN for this add request.
-
AddRequestProtocolOp
public AddRequestProtocolOp(ByteString dn, List<RawAttribute> attributes)
Creates a new LDAP add request protocol op with the specified DN and set of attributes.- Parameters:
dn- The DN for this add request.attributes- The set of attributes for this add request.
-
-
Method Detail
-
getDN
public ByteString getDN()
Retrieves the DN for this add request.- Returns:
- The DN for this add request.
-
getAttributes
public List<RawAttribute> getAttributes()
Retrieves the set of attributes for this add request. The returned list may be altered by the caller.- Returns:
- The set of attributes for this add request.
-
getType
public byte getType()
Retrieves the BER type for this protocol op.- Specified by:
getTypein classProtocolOp- Returns:
- The BER type for this protocol op.
-
getProtocolOpName
public String getProtocolOpName()
Retrieves the name for this protocol op type.- Specified by:
getProtocolOpNamein classProtocolOp- Returns:
- The name for this protocol op type.
-
write
public void write(ASN1Writer stream) throws IOException
Writes this protocol op to an ASN.1 output stream.- Specified by:
writein classProtocolOp- Parameters:
stream- The ASN.1 output stream to write to.- Throws:
IOException- If a problem occurs while writing to the stream.
-
toString
public void toString(StringBuilder buffer)
Appends a string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the string should be appended.
-
toString
public void toString(StringBuilder buffer, int indent)
Appends a multi-line string representation of this LDAP protocol op to the provided buffer.- Specified by:
toStringin classProtocolOp- Parameters:
buffer- The buffer to which the information should be appended.indent- The number of spaces from the margin that the lines should be indented.
-
toLDIF
public void toLDIF(StringBuilder buffer, int wrapColumn)
Appends an LDIF representation of the entry to the provided buffer.- Parameters:
buffer- The buffer to which the entry should be appended.wrapColumn- The column at which long lines should be wrapped.
-
-