| | |
| | | */ |
| | | public SearchResultEntryProtocolOp(DN dn) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | this.attributes = new LinkedList<LDAPAttribute>(); |
| | | } |
| | |
| | | public SearchResultEntryProtocolOp(DN dn, |
| | | LinkedList<LDAPAttribute> attributes) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | |
| | | if (attributes == null) |
| | |
| | | */ |
| | | public SearchResultEntryProtocolOp(SearchResultEntry searchEntry) |
| | | { |
| | | |
| | | this.dn = searchEntry.getDN(); |
| | | |
| | | attributes = new LinkedList<LDAPAttribute>(); |
| | |
| | | */ |
| | | public DN getDN() |
| | | { |
| | | |
| | | return dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setDN(DN dn) |
| | | { |
| | | |
| | | this.dn = dn; |
| | | } |
| | | |
| | |
| | | */ |
| | | public LinkedList<LDAPAttribute> getAttributes() |
| | | { |
| | | |
| | | return attributes; |
| | | } |
| | | |
| | |
| | | */ |
| | | public byte getType() |
| | | { |
| | | |
| | | return OP_TYPE_SEARCH_RESULT_ENTRY; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getProtocolOpName() |
| | | { |
| | | |
| | | return "Search Result Entry"; |
| | | } |
| | | |
| | |
| | | */ |
| | | public ASN1Element encode() |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2); |
| | | elements.add(new ASN1OctetString(dn.toString())); |
| | | |
| | |
| | | element) |
| | | throws LDAPException |
| | | { |
| | | |
| | | ArrayList<ASN1Element> elements; |
| | | try |
| | | { |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | |
| | | buffer.append("SearchResultEntry(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 = dn.toString(); |
| | | int colsRemaining; |
| | |
| | | public SearchResultEntry toSearchResultEntry() |
| | | throws LDAPException |
| | | { |
| | | |
| | | HashMap<ObjectClass,String> objectClasses = |
| | | new HashMap<ObjectClass,String>(); |
| | | HashMap<AttributeType,List<Attribute>> userAttributes = |