Package edu.vt.middleware.ldap.dsml
Class DsmlSearch
- java.lang.Object
-
- edu.vt.middleware.ldap.LdapSearch
-
- edu.vt.middleware.ldap.dsml.DsmlSearch
-
public class DsmlSearch extends LdapSearch
DsmlSearchqueries an LDAP and returns the result as DSML. Each instance ofDsmlSearchmaintains it's own pool of LDAP connections.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDsmlSearch.VersionValid DSML versions.
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.LdapSearch
beanFactory, logger, pool
-
-
Constructor Summary
Constructors Constructor Description DsmlSearch(LdapPool<Ldap> pool)This creates a newDsmlSearchwith the supplied pool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DsmlSearch.VersiongetVersion()This gets the version of dsml to produce.voidsearch(java.lang.String query, java.lang.String[] attrs, java.io.Writer writer)This will perform an LDAP search with the supplied query and return attributes.voidsetVersion(DsmlSearch.Version v)This sets the version of dsml to produce.-
Methods inherited from class edu.vt.middleware.ldap.LdapSearch
close, finalize, getLdapBeanFactory, search, setLdapBeanFactory
-
-
-
-
Method Detail
-
getVersion
public DsmlSearch.Version getVersion()
This gets the version of dsml to produce.- Returns:
Versionof DSML to produce
-
setVersion
public void setVersion(DsmlSearch.Version v)
This sets the version of dsml to produce.- Parameters:
v-Versionof DSML to produce
-
search
public void search(java.lang.String query, java.lang.String[] attrs, java.io.Writer writer) throws javax.naming.NamingException, java.io.IOExceptionThis will perform an LDAP search with the supplied query and return attributes. The results will be written to the suppliedWriter. Useversionto control which version of DSML is written.- Overrides:
searchin classLdapSearch- Parameters:
query-Stringto search forattrs-String[]to returnwriter-Writerto write to- Throws:
javax.naming.NamingException- if an error occurs while searchingjava.io.IOException- if an error occurs while writing search results
-
-