com.atlassian.user.impl.ldap.search.page
Class AbstractLDAPPager<T>

java.lang.Object
  extended by com.atlassian.user.search.page.AbstractPrefetchingPager<T>
      extended by com.atlassian.user.impl.ldap.search.page.AbstractLDAPPager<T>
All Implemented Interfaces:
Pager<T>, Iterable<T>, Iterator<T>
Direct Known Subclasses:
LDAPEntityPager, LDAPSingleStringPager

public abstract class AbstractLDAPPager<T>
extends AbstractPrefetchingPager<T>
implements Iterator<T>


Field Summary
 boolean closed
           
protected  NamingEnumeration<SearchResult> enume
           
protected  org.apache.log4j.Logger log
           
protected  String originalBaseSearchContext
           
protected  net.sf.ldaptemplate.support.filter.Filter originalQuery
           
protected  LdapContextFactory repository
           
protected  String[] returningAttributes
           
protected  boolean searchAllDepths
           
protected  LdapSearchProperties searchProperties
           
 
Fields inherited from class com.atlassian.user.search.page.AbstractPrefetchingPager
idx, indexOfFirstItemInCurrentPage, lastPage
 
Fields inherited from interface com.atlassian.user.search.page.Pager
EMPTY_PAGER, NO_POSITION, PRELOAD_LIMIT
 
Constructor Summary
  AbstractLDAPPager()
           
protected AbstractLDAPPager(LdapSearchProperties searchProperties, LdapContextFactory repository, LDAPPagerInfo info)
           
 
Method Summary
protected  List<T> fetch(Object element, List<T> prefetched)
           
protected  void preload()
          Preloads the page into the prefetched list.
protected abstract  List<T> preloadSearchResult(SearchResult result, List<T> prefetched)
          Parses the SearchResult and stores the result in the list of prefetched items.
 void remove()
           
 
Methods inherited from class com.atlassian.user.search.page.AbstractPrefetchingPager
getCurrentPage, getIndex, getIndexOfFirstItemInCurrentPage, getIndexWithinPage, hasNext, isEmpty, iterator, next, nextPage, onLastPage, preload, skipTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next
 

Field Detail

log

protected final org.apache.log4j.Logger log

enume

protected NamingEnumeration<SearchResult> enume

originalQuery

protected net.sf.ldaptemplate.support.filter.Filter originalQuery

searchProperties

protected LdapSearchProperties searchProperties

repository

protected LdapContextFactory repository

originalBaseSearchContext

protected String originalBaseSearchContext

searchAllDepths

protected boolean searchAllDepths

returningAttributes

protected String[] returningAttributes

closed

public boolean closed
Constructor Detail

AbstractLDAPPager

protected AbstractLDAPPager(LdapSearchProperties searchProperties,
                            LdapContextFactory repository,
                            LDAPPagerInfo info)

AbstractLDAPPager

public AbstractLDAPPager()
Method Detail

preloadSearchResult

protected abstract List<T> preloadSearchResult(SearchResult result,
                                               List<T> prefetched)
                                        throws EntityException
Parses the SearchResult and stores the result in the list of prefetched items.

Returns:
the List of prefetched results.
Throws:
EntityException

remove

public void remove()
Specified by:
remove in interface Iterator<T>
Overrides:
remove in class AbstractPrefetchingPager<T>

preload

protected void preload()
Preloads the page into the prefetched list.

Specified by:
preload in class AbstractPrefetchingPager<T>

fetch

protected List<T> fetch(Object element,
                        List<T> prefetched)
                 throws EntityException
Specified by:
fetch in class AbstractPrefetchingPager<T>
Throws:
EntityException


Copyright © 2005-2009 Atlassian Software Systems Pty Ltd. All Rights Reserved.