| | |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.ldap.AddRequestProtocolOp; |
| | | import org.opends.server.protocols.ldap.AddResponseProtocolOp; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPMessage; |
| | | import org.opends.server.protocols.ldap.ProtocolOp; |
| | | import org.opends.server.tools.LDAPConnection; |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.LDAPException; |
| | | import org.opends.server.types.RawAttribute; |
| | | |
| | |
| | | LDAPResult addResponse = objFactory.createLDAPResult(); |
| | | addResponse.setRequestID(addRequest.getRequestID()); |
| | | |
| | | ASN1OctetString dnStr = new ASN1OctetString(addRequest.getDn()); |
| | | ByteString dnStr = ByteString.valueOf(addRequest.getDn()); |
| | | ArrayList<RawAttribute> attributes = new ArrayList<RawAttribute>(); |
| | | |
| | | List<DsmlAttr> addList = addRequest.getAttr(); |
| | | for(DsmlAttr attr : addList) |
| | | { |
| | | ArrayList<ASN1OctetString> values = new ArrayList<ASN1OctetString>(); |
| | | ArrayList<ByteString> values = new ArrayList<ByteString>(); |
| | | List<String> vals = attr.getValue(); |
| | | for(String val : vals) |
| | | { |
| | | values.add(new ASN1OctetString(val)); |
| | | values.add(ByteString.valueOf(val)); |
| | | } |
| | | LDAPAttribute ldapAttribute = new LDAPAttribute(attr.getName(), values); |
| | | attributes.add(ldapAttribute); |