/** * Constructs an empty entry. * * @see <a href="../../../../api/com/novell/ldap/LDAPEntry.html#LDAPEntry()"> com.novell.ldap.LDAPEntry.LDAPEntry()</a> */ public LDAPEntry() { entry = new com.novell.ldap.LDAPEntry(); return; }
/** * Constructs a new entry with the specified distinguished name and with * an empty attribute set. * * @see <a href="../../../../api/com/novell/ldap/LDAPEntry.html#LDAPEntry(java.lang.String)"> com.novell.ldap.LDAPEntry.LDAPEntry(String)</a> */ public LDAPEntry(String dn) { entry = new com.novell.ldap.LDAPEntry(dn); return; }
/** * Constructs a new entry with the specified distinguished name and set * of attributes. * * @see <a href="../../../../api/com/novell/ldap/LDAPEntry.html#LDAPEntry(java.lang.String, com.novell.ldap.LDAPAttributeSet)"> com.novell.ldap.LDAPEntry.LDAPEntry(String, LDAPAttributeSet)</a> */ public LDAPEntry(String dn, LDAPAttributeSet attrs) { com.novell.ldap.LDAPAttributeSet attrset = null; if( attrs != null) { attrset = attrs.getWrappedObject(); } entry = new com.novell.ldap.LDAPEntry(dn, attrset); return; }
protected void endElement() { LDAPAttributeSet attrset = new LDAPAttributeSet(); attrset.addAll(valuelist); LDAPEntry entry = new LDAPEntry(dn,attrset); setObject(entry); valuelist.clear(); } protected void addValue(String tag, Object value) {
protected void endElement() { LDAPAttributeSet attrset = new LDAPAttributeSet(); attrset.addAll(valuelist); LDAPEntry entry = new LDAPEntry(dn,attrset); setObject(entry); } protected void addValue(String tag, Object value) {
protected void endElement() { LDAPAttributeSet attrset = new LDAPAttributeSet(); attrset.addAll(valuelist); LDAPEntry entry = new LDAPEntry(dn,attrset); LDAPSchema sch = new LDAPSchema(entry); setObject(sch); } protected void addValue(String tag, Object value) {
LDAPEntry ret = new LDAPEntry(id.getType().substring(id.getType().lastIndexOf('#') + 1) + "=" + id.getId(),attribSet);
this.currentEntry = new LDAPEntry(this.entryDN, attrSet); return;
/** * 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); }
/** * Returns the entry of a server's search response. * * @return The LDAPEntry associated with this LDAPSearchResult */ public LDAPEntry getEntry() { if( entry == null) { LDAPAttributeSet attrs = new LDAPAttributeSet(); ASN1Sequence attrList = ((RfcSearchResultEntry)message.getResponse()).getAttributes(); ASN1Object[] seqArray = attrList.toArray(); for(int i = 0; i < seqArray.length; i++) { ASN1Sequence seq = (ASN1Sequence)seqArray[i]; LDAPAttribute attr = new LDAPAttribute(((ASN1OctetString)seq.get(0)).stringValue()); ASN1Set set = (ASN1Set)seq.get(1); Object[] setArray = set.toArray(); for(int j = 0; j < setArray.length; j++) { attr.addValue(((ASN1OctetString)setArray[j]).byteValue()); } attrs.add(attr); } entry = new LDAPEntry( ((RfcSearchResultEntry)message.getResponse()).getObjectName().stringValue(), attrs); } return entry; }