org.jasig.portal.groups
Class PersonDirNameFinder

java.lang.Object
  extended by org.jasig.portal.groups.PersonDirNameFinder
All Implemented Interfaces:
IEntityNameFinder

public class PersonDirNameFinder
extends java.lang.Object
implements IEntityNameFinder

Implementation of IEntityNameFinder for IPersons by looking up displayName from an IPersonAttributeDao.

Version:
$Revision: 1.15.2.1 $
Author:
Alex Vigdor

Field Summary
private  java.util.Map names
          Our cache of entity names:
private  IPersonAttributeDao paDao
          Data Access Object backing this name finder.
 
Constructor Summary
PersonDirNameFinder(IPersonAttributeDao pa)
          Instantiate a PersonDirNameFinder backed by the given IPersonAttributeDao.
 
Method Summary
 java.lang.String getName(java.lang.String key)
          Given the key, returns the entity's name.
 java.util.Map getNames(java.lang.String[] keys)
          Given an array of keys, returns the names of the entities.
 java.lang.Class getType()
          Returns the entity type for this IEntityFinder.
private  java.lang.String primGetName(java.lang.String key)
          Actually lookup a user name using the underlying IPersonAttributeDao.
static IEntityNameFinder singleton()
          Deprecated. as of uP 2.5 instead use PersonDirNameFinderFactory
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

paDao

private IPersonAttributeDao paDao
Data Access Object backing this name finder.


names

private java.util.Map names
Our cache of entity names:

Constructor Detail

PersonDirNameFinder

PersonDirNameFinder(IPersonAttributeDao pa)
Instantiate a PersonDirNameFinder backed by the given IPersonAttributeDao.

Parameters:
pa - DAO to back this PersonDirNameFinder
Method Detail

getName

public java.lang.String getName(java.lang.String key)
Description copied from interface: IEntityNameFinder
Given the key, returns the entity's name.

Specified by:
getName in interface IEntityNameFinder
Parameters:
key - java.lang.String

getNames

public java.util.Map getNames(java.lang.String[] keys)
Description copied from interface: IEntityNameFinder
Given an array of keys, returns the names of the entities.

Specified by:
getNames in interface IEntityNameFinder
Parameters:
keys - java.lang.String[]

getType

public java.lang.Class getType()
Description copied from interface: IEntityNameFinder
Returns the entity type for this IEntityFinder.

Specified by:
getType in interface IEntityNameFinder
Returns:
java.lang.Class

primGetName

private java.lang.String primGetName(java.lang.String key)
Actually lookup a user name using the underlying IPersonAttributeDao.

Parameters:
key - - entity key which in this case is a unique identifier for a user
Returns:
the display name for the identified user

singleton

public static IEntityNameFinder singleton()
Deprecated. as of uP 2.5 instead use PersonDirNameFinderFactory

Get a static singleton instance of this class backed by PersonDirectory.

Returns:
singleton PersonDirNameFinder backed by PersonDirectory

toString

public java.lang.String toString()
Returns a String that represents the value of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the receiver