com.webmethods.caf.faces.data.dir
Class PrincipalModelList

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by com.webmethods.caf.faces.data.dir.PrincipalModelList
All Implemented Interfaces:
Serializable, Iterable, Collection, List

public class PrincipalModelList
extends AbstractList
implements Serializable

A list wrapper class of principal models.

See Also:
Serialized Form

Field Summary
protected  List membersList
           
protected  Map wrappedObjCache
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PrincipalModelList(List membersList)
          Constructor to provide the list object for this class.
 
Method Summary
 void add(int index, Object element)
          Add a member to the members list.
 void clear()
          Clear the members list.
 Object get(int index)
          Get a member from the members list.
protected  IDirSystemBizPolicy getDirSystemBizPolicy()
          Get the biz policy for directory systems.
protected  IContext getPortalContext()
          Acquire a portal context and cache it.
 Object remove(int index)
          Remove a member from the members list.
 int size()
          Size of the members list.
protected  PrincipalModel wrapObject(Object obj)
          Create a principal model from the provided object.
 
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

membersList

protected List membersList

wrappedObjCache

protected Map wrappedObjCache
Constructor Detail

PrincipalModelList

public PrincipalModelList(List membersList)
Constructor to provide the list object for this class. Object may be an empty list. May not be a null object.

Parameters:
membersList - The list object for this class.
Method Detail

add

public void add(int index,
                Object element)
Add a member to the members list.

Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
index - The position in the list.
element - The member to add.

remove

public Object remove(int index)
Remove a member from the members list.

Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index - The position in the list.
Returns:
The removed member.

clear

public void clear()
Clear the members list.

Specified by:
clear in interface Collection
Specified by:
clear in interface List
Overrides:
clear in class AbstractList

size

public int size()
Size of the members list.

Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

get

public Object get(int index)
Get a member from the members list.

Specified by:
get in interface List
Specified by:
get in class AbstractList
Parameters:
index - The position in the list.
Returns:
The member at this index in the list.

getPortalContext

protected IContext getPortalContext()
Acquire a portal context and cache it. Cache the results.

Returns:
The portal context.

getDirSystemBizPolicy

protected IDirSystemBizPolicy getDirSystemBizPolicy()
                                             throws BizException
Get the biz policy for directory systems. Cache the results.

Returns:
The biz policy for directory systems.
Throws:
BizException

wrapObject

protected PrincipalModel wrapObject(Object obj)
Create a principal model from the provided object. The object can be a IDirPrincipal, IURI, URI as a string, and PrincipalModel. Checks the cache for existing principal model created by this object. Cache the created principal model for later access.

Parameters:
obj - The object used to create a principal model.
Returns:
principal model The principal model.
Throws:
PortalException