com.atlassian.user.search.page
Class PagerUtils

java.lang.Object
  extended by com.atlassian.user.search.page.PagerUtils

public class PagerUtils
extends Object

Util class for making it easier to work with paging iterators TODO: Roll these methods into an extension of the Pager interface


Field Summary
static Pager EMPTY_PAGER
           
static String ESCAPEDCOMMA
           
static org.apache.log4j.Category log
           
 
Constructor Summary
PagerUtils()
           
 
Method Summary
static int count(Pager pager)
           
static String extractSearchResultName(String distinguishedName)
          Deprecated. This method will only get the first element of the DN which wont necessarily be username. To get the username from a DN you should look the record up for the DN and query the username attribute.
static
<T> List<T>
toList(Pager<T> pager)
           
static List toListOfEntityNames(Pager pager)
          Deprecated. since 1.25. In general, the Pager should not be used wherever possible. Manually extract entity names from the Pager itself if it is still required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Category log

EMPTY_PAGER

public static final Pager EMPTY_PAGER

ESCAPEDCOMMA

public static final String ESCAPEDCOMMA
See Also:
Constant Field Values
Constructor Detail

PagerUtils

public PagerUtils()
Method Detail

toList

public static <T> List<T> toList(Pager<T> pager)

count

public static int count(Pager pager)

toListOfEntityNames

public static List toListOfEntityNames(Pager pager)
Deprecated. since 1.25. In general, the Pager should not be used wherever possible. Manually extract entity names from the Pager itself if it is still required.


extractSearchResultName

public static String extractSearchResultName(String distinguishedName)
Deprecated. This method will only get the first element of the DN which wont necessarily be username. To get the username from a DN you should look the record up for the DN and query the username attribute.

For example, for cn=jsmith,dc=atlassian,dc=com this returns jsmith. If the distinguishedName is not well formed, this will be logged and it will be returned as is



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