| | |
| | | */ |
| | | public AddRequestProtocolOp(ASN1OctetString dn) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | this.attributes = new ArrayList<LDAPAttribute>(); |
| | | } |
| | |
| | | public AddRequestProtocolOp(ASN1OctetString dn, |
| | | ArrayList<LDAPAttribute> attributes) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | |
| | | if (attributes == null) |
| | |
| | | */ |
| | | public ASN1OctetString getDN() |
| | | { |
| | | |
| | | return dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setDN(ASN1OctetString dn) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<LDAPAttribute> getAttributes() |
| | | { |
| | | |
| | | return attributes; |
| | | } |
| | | |
| | |
| | | */ |
| | | public byte getType() |
| | | { |
| | | |
| | | return OP_TYPE_ADD_REQUEST; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getProtocolOpName() |
| | | { |
| | | |
| | | return "Add Request"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2); |
| | | elements.add(dn); |
| | | |
| | |
| | | public static AddRequestProtocolOp decodeAddRequest(ASN1Element element) |
| | | throws LDAPException |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements; |
| | | try |
| | | { |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("AddRequest(dn="); |
| | | dn.toString(buffer); |
| | | buffer.append(", attrs={"); |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer, int indent) |
| | | { |
| | | |
| | | StringBuilder indentBuf = new StringBuilder(indent); |
| | | for (int i=0 ; i < indent; i++) |
| | | { |
| | |
| | | */ |
| | | public void toLDIF(StringBuilder buffer, int wrapColumn) |
| | | { |
| | | |
| | | |
| | | // Add the DN to the buffer. |
| | | String dnString; |
| | | int colsRemaining; |