/** * Return an ASN1 representation of this add request. * * #return an ASN1 representation of this object. */ public String toString() { return getASN1Object().toString(); } protected void setDeserializedValues(LDAPMessage readObject, RfcControls asn1Ctrls)
/** * Constructs an LDAPEntry that represents the add request * * @return an LDAPEntry that represents the add request. */ public LDAPEntry getEntry() { RfcAddRequest addreq = (RfcAddRequest)getASN1Object().getRequest(); LDAPAttributeSet attrs = new LDAPAttributeSet(); // Build the list of attributes ASN1Object[] seqArray = addreq.getAttributes().toArray(); for(int i = 0; i < seqArray.length; i++) { RfcAttributeTypeAndValues seq = (RfcAttributeTypeAndValues)seqArray[i]; LDAPAttribute attr = new LDAPAttribute(((ASN1OctetString)seq.get(0)).stringValue()); // Add the values to the attribute ASN1SetOf set = (ASN1SetOf)seq.get(1); Object[] setArray = set.toArray(); for(int j = 0; j < setArray.length; j++) { attr.addValue(((ASN1OctetString)setArray[j]).byteValue()); } attrs.add(attr); } return new LDAPEntry( getASN1Object().getRequestDN(), attrs); }