Package edu.vt.middleware.ldap.handler
Class AbstractResultHandler<R,O>
- java.lang.Object
-
- edu.vt.middleware.ldap.handler.AbstractResultHandler<R,O>
-
- Type Parameters:
R- type of resultO- type of output
- All Implemented Interfaces:
ResultHandler<R,O>
- Direct Known Subclasses:
CopyResultHandler
public abstract class AbstractResultHandler<R,O> extends java.lang.Object implements ResultHandler<R,O>
AbstractResultHandlerimplements common handler functionality.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.LogloggerLog for this class.
-
Constructor Summary
Constructors Constructor Description AbstractResultHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<O>process(SearchCriteria sc, java.util.List<? extends R> l)This will enumerate through the suppliedListand return a List of those results.java.util.List<O>process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends R> en)This will enumerate through the suppliedNamingEnumerationand return a List of those results.java.util.List<O>process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends R> en, java.lang.Class<?>[] ignore)This will enumerate through the suppliedNamingEnumerationand return a List of those results.protected abstract OprocessResult(SearchCriteria sc, R r)Processes the supplied result.
-
-
-
Method Detail
-
process
public java.util.List<O> process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends R> en) throws javax.naming.NamingException
This will enumerate through the suppliedNamingEnumerationand return a List of those results. The results are unaltered and the dn is ignored.- Specified by:
processin interfaceResultHandler<R,O>- Parameters:
sc-SearchCriteriaused to find enumerationen-NamingEnumerationLDAP results- Returns:
List- LDAP results- Throws:
javax.naming.NamingException- if the LDAP returns an error
-
process
public java.util.List<O> process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends R> en, java.lang.Class<?>[] ignore) throws javax.naming.NamingException
This will enumerate through the suppliedNamingEnumerationand return a List of those results. The results are unaltered and the dn is ignored. Any exceptions passed into this method will be ignored and results will be returned as if no exception occurred.- Specified by:
processin interfaceResultHandler<R,O>- Parameters:
sc-SearchCriteriaused to find enumerationen-NamingEnumerationLDAP resultsignore-Class[]of exception types to ignore- Returns:
List- LDAP results- Throws:
javax.naming.NamingException- if the LDAP returns an error
-
process
public java.util.List<O> process(SearchCriteria sc, java.util.List<? extends R> l) throws javax.naming.NamingException
This will enumerate through the suppliedListand return a List of those results. The results are unaltered and the dn is ignored.- Specified by:
processin interfaceResultHandler<R,O>- Parameters:
sc-SearchCriteriaused to find enumerationl-ListLDAP results- Returns:
List- LDAP results- Throws:
javax.naming.NamingException- if the LDAP returns an error
-
processResult
protected abstract O processResult(SearchCriteria sc, R r) throws javax.naming.NamingException
Processes the supplied result.- Parameters:
sc-SearchCriteriaused to retrieve the resultr-Rresult to process- Returns:
Oprocessed result- Throws:
javax.naming.NamingException- if the supplied result cannot be read
-
-