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>
AbstractResultHandler
implements 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.Log
logger
Log 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 suppliedList
and return a List of those results.java.util.List<O>
process(SearchCriteria sc, javax.naming.NamingEnumeration<? extends R> en)
This will enumerate through the suppliedNamingEnumeration
and 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 suppliedNamingEnumeration
and return a List of those results.protected abstract O
processResult(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 suppliedNamingEnumeration
and return a List of those results. The results are unaltered and the dn is ignored.- Specified by:
process
in interfaceResultHandler<R,O>
- Parameters:
sc
-SearchCriteria
used to find enumerationen
-NamingEnumeration
LDAP 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 suppliedNamingEnumeration
and 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:
process
in interfaceResultHandler<R,O>
- Parameters:
sc
-SearchCriteria
used to find enumerationen
-NamingEnumeration
LDAP 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 suppliedList
and return a List of those results. The results are unaltered and the dn is ignored.- Specified by:
process
in interfaceResultHandler<R,O>
- Parameters:
sc
-SearchCriteria
used to find enumerationl
-List
LDAP 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
-SearchCriteria
used to retrieve the resultr
-R
result to process- Returns:
O
processed result- Throws:
javax.naming.NamingException
- if the supplied result cannot be read
-
-