private LDAPEntry read(String dn) throws LDAPException, UnsupportedEncodingException { if (dn == null) return null; LDAPEntry r = null; op("read start for dn: " + dn); LDAPConnection lc = getConnection(); r = lc.read(dn); closeIt(lc); // op( r.toString()); op("read end"); return r; }
/** * Synchronously reads the entry for the specified distiguished name (DN) * and retrieves all attributes for the entry. * * @param dn The distinguished name of the entry to retrieve. * * @return the LDAPEntry read from the server. * * @exception LDAPException if the object was not found */ public LDAPEntry read(String dn) throws LDAPException { return read(dn, defSearchCons); }
/** * * Synchronously reads the entry for the specified distiguished name (DN), * using the specified constraints, and retrieves all attributes for the * entry. * * @param dn The distinguished name of the entry to retrieve. *<br><br> * @param cons The constraints specific to the operation. * * @return the LDAPEntry read from the server * * @exception LDAPException if the object was not found */ public LDAPEntry read(String dn, LDAPSearchConstraints cons) throws LDAPException { return read(dn, null, cons); }
/** * * Synchronously reads the entry for the specified distinguished name (DN) * and retrieves only the specified attributes from the entry. * * @param dn The distinguished name of the entry to retrieve. *<br><br> * @param attrs The names of the attributes to retrieve. * * @return the LDAPEntry read from the server * * @exception LDAPException if the object was not found */ public LDAPEntry read(String dn, String[] attrs) throws LDAPException { return read(dn, attrs, defSearchCons); }
/** * Retrieves the schema associated with a particular schema DN in the * directory server. * <p>The schema DN for a particular entry is obtained by calling the * getSchemaDN method of LDAPConnection</p> * * @param schemaDN The schema DN used to fetch the schema. * * @return An LDAPSchema entry containing schema attributes. If the * entry contains no schema attributes then the returned LDAPSchema object * will be empty. * * @exception LDAPException This exception occurs if the schema entry * cannot be retrieved with this connection. * @see #getSchemaDN() * @see #getSchemaDN(String) */ public LDAPSchema fetchSchema ( String schemaDN ) throws LDAPException { /* Read the schema definitions. If no entry is found an * Exception is thrown */ LDAPEntry ent = read(schemaDN, LDAPSchema.schemaTypeNames); return new LDAPSchema(ent); }
/** * Synchronously reads the entry for the specified distiguished name (DN) * and retrieves all attributes for the entry. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(java.lang.String)"> com.novell.ldap.LDAPConnection.read(String)</a> */ public LDAPEntry read(String dn) throws LDAPException { try { return new LDAPEntry( conn.read( dn)); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
/** * * Synchronously reads the entry for the specified distinguished name (DN) * and retrieves only the specified attributes from the entry. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(java.lang.String, java.lang.String[])"> com.novell.ldap.LDAPConnection.read(String, String[])</a> */ public LDAPEntry read(String dn, String[] attrs) throws LDAPException { try { return new LDAPEntry( conn.read( dn, attrs)); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
LDAPEntry userEntry = ldapConnection.read(userDN, attrArray); if (userEntry == null) return Collections.<String, String>emptyMap();
/** * Synchronously reads the entry specified by the LDAP URL. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(com.novell.ldap.LDAPUrl)"> com.novell.ldap.LDAPConnection.read(LDAPUrl)</a> */ public static LDAPEntry read(LDAPUrl toGet) throws LDAPException { try { return new LDAPEntry( com.novell.ldap.LDAPConnection.read( toGet.getWrappedObject())); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
/** * Synchronously reads the entry for the specified distiguished name (DN), * using the specified constraints, and retrieves all attributes for the * entry. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(java.lang.String, com.novell.ldap.LDAPSearchConstraints)"> com.novell.ldap.LDAPConnection.read(String, LDAPSearchConstraints)</a> */ public LDAPEntry read(String dn, LDAPSearchConstraints cons) throws LDAPException { try { return new LDAPEntry( conn.read(dn, cons.getWrappedSearchObject())); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
/** * * Synchronously reads the entry for the specified distinguished name (DN), * using the specified constraints, and retrieves only the specified * attributes from the entry. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(java.lang.String, java.lang.String[], com.novell.ldap.LDAPSearchConstraints)"> com.novell.ldap.LDAPConnection.read(String, String[], LDAPSearchConstraints)</a> */ public LDAPEntry read(String dn, String[] attrs, LDAPSearchConstraints cons) throws LDAPException { try { return new LDAPEntry( conn.read( dn,attrs, cons.getWrappedSearchObject())); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
LDAPEntry ent = this.read( dn, attrSubSchema );
/** * Synchronously reads the entry specified by the LDAP URL, using the * specified constraints. * * @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#read(com.novell.ldap.LDAPUrl, com.novell.ldap.LDAPSearchConstraints)"> com.novell.ldap.LDAPConnection.read(LDAPUrl, LDAPSearchConstraints)</a> */ public static LDAPEntry read(LDAPUrl toGet, LDAPSearchConstraints cons) throws LDAPException { try { return new LDAPEntry( com.novell.ldap.LDAPConnection.read( toGet.getWrappedObject(), cons.getWrappedSearchObject())); } catch( com.novell.ldap.LDAPException ex) { if( ex instanceof com.novell.ldap.LDAPReferralException) { throw new LDAPReferralException( (com.novell.ldap.LDAPReferralException)ex); } else { throw new LDAPException( ex); } } }
LDAPEntry toReturn = lconn.read(toGet.getDN(),toGet.getAttributeArray()); if( Debug.LDAP_DEBUG) { Debug.trace( Debug.apiRequests, "read: disconnect()");
LDAPEntry toReturn = lconn.read(toGet.getDN(), toGet.getAttributeArray(), cons); if( Debug.LDAP_DEBUG) {