@Override public String toString() { return String.format( "[dn=%s%s, responseControls=%s, messageId=%s]", getDn(), getAttributes(), Arrays.toString(responseControls), messageId); } }
@Override public String toString() { return String.format( "[dn=%s%s, responseControls=%s, messageId=%s]", getDn(), getAttributes(), Arrays.toString(responseControls), messageId); } }
@Override public String toString() { return String.format( "[dn=%s%s, responseControls=%s, messageId=%s]", getDn(), getAttributes(), Arrays.toString(responseControls), messageId); } }
/** * Handle the attributes of a search entry. * * @param conn the search was performed on * @param request used to find the search entry * @param entry search entry to extract the attributes from * * @throws LdapException if the LDAP returns an error */ protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { handleAttribute(conn, request, la); } }
/** * Handle the attributes of a search entry. * * @param conn the search was performed on * @param request used to find the search entry * @param entry search entry to extract the attributes from * * @throws LdapException if the LDAP returns an error */ protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { handleAttribute(conn, request, la); } }
/** * Handle the attributes of a search entry. * * @param conn the search was performed on * @param request used to find the search entry * @param entry search entry to extract the attributes from * * @throws LdapException if the LDAP returns an error */ protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { handleAttribute(conn, request, la); } }
@Override public int hashCode() { return LdapUtils.computeHashCode( HASH_CODE_SEED, getDn() != null ? getDn().toLowerCase() : null, getAttributes(), messageId, responseControls); }
@Override public int hashCode() { return LdapUtils.computeHashCode( HASH_CODE_SEED, getDn() != null ? getDn().toLowerCase() : null, getAttributes(), messageId, responseControls); }
@Override public int hashCode() { return LdapUtils.computeHashCode( HASH_CODE_SEED, getDn() != null ? getDn().toLowerCase() : null, getAttributes(), messageId, responseControls); }
/** * Returns a jndi search result that represents the supplied search entry. * * @param entry search entry * * @return jndi search result */ public SearchResult fromSearchEntry(final SearchEntry entry) { return new SearchResult(entry.getDn(), null, fromLdapAttributes(entry.getAttributes())); }
/** * Returns a jndi search result that represents the supplied search entry. * * @param entry search entry * * @return jndi search result */ public SearchResult fromSearchEntry(final SearchEntry entry) { return new SearchResult(entry.getDn(), null, fromLdapAttributes(entry.getAttributes())); }
/** * Returns a jndi search result that represents the supplied search entry. * * @param entry search entry * * @return jndi search result */ public SearchResult fromSearchEntry(final SearchEntry entry) { return new SearchResult(entry.getDn(), null, fromLdapAttributes(entry.getAttributes())); }
for (LdapAttribute la : entry.getAttributes()) {
for (LdapAttribute la : entry.getAttributes()) {
for (LdapAttribute la : entry.getAttributes()) {
@Override protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { if (attributeName.equalsIgnoreCase(la.getName())) { if (la.isBinary()) { final LdapAttribute newAttr = new LdapAttribute(la.getSortBehavior()); newAttr.setName(la.getName()); for (byte[] b : la.getBinaryValues()) { newAttr.addStringValue(convertValue(b)); } entry.addAttribute(newAttr); logger.debug("Processed attribute {}", newAttr); handleAttribute(conn, request, newAttr); } else { logger.warn("Attribute {} must be set as a binary attribute", attributeName); handleAttribute(conn, request, la); } } else { handleAttribute(conn, request, la); } } }
@Override protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { if (attributeName.equalsIgnoreCase(la.getName())) { if (la.isBinary()) { final LdapAttribute newAttr = new LdapAttribute(la.getSortBehavior()); newAttr.setName(la.getName()); for (byte[] b : la.getBinaryValues()) { newAttr.addStringValue(convertValue(b)); } entry.addAttribute(newAttr); logger.debug("Processed attribute {}", newAttr); handleAttribute(conn, request, newAttr); } else { logger.warn("Attribute {} must be set as a binary attribute", attributeName); handleAttribute(conn, request, la); } } else { handleAttribute(conn, request, la); } } }
@Override protected void handleAttributes(final Connection conn, final SearchRequest request, final SearchEntry entry) throws LdapException { for (LdapAttribute la : entry.getAttributes()) { if (attributeName.equalsIgnoreCase(la.getName())) { if (la.isBinary()) { final LdapAttribute newAttr = new LdapAttribute(la.getSortBehavior()); newAttr.setName(la.getName()); for (byte[] b : la.getBinaryValues()) { newAttr.addStringValue(convertValue(b)); } entry.addAttribute(newAttr); logger.debug("Processed attribute {}", newAttr); handleAttribute(conn, request, newAttr); } else { logger.warn("Attribute {} must be set as a binary attribute", attributeName); handleAttribute(conn, request, la); } } else { handleAttribute(conn, request, la); } } }