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

java.lang.Object
  extended by SelectItem
      extended by com.webmethods.caf.faces.data.object.DefaultSelectItemProvider
          extended by com.webmethods.caf.faces.data.object.DefaultSelectItemGroupProvider
              extended by com.webmethods.caf.faces.data.dir.PrincipalAttributeValueSourceSelectItemGroupProvider
All Implemented Interfaces:
IFilterableSelectItemGroupProvider, ISelectItemGroupProvider, ISelectItemProvider, Serializable

public class PrincipalAttributeValueSourceSelectItemGroupProvider
extends DefaultSelectItemGroupProvider
implements ISelectItemGroupProvider

Option Group Provider that provides all the principal attributes available to the requested principal type.

Since:
7.0

Field Summary
 
Fields inherited from class com.webmethods.caf.faces.data.object.DefaultSelectItemGroupProvider
m_filter, m_filterable, m_items
 
Fields inherited from class com.webmethods.caf.faces.data.object.DefaultSelectItemProvider
m_description, m_disabled, m_escaped, m_icon, m_label, m_style, m_value, source
 
Constructor Summary
PrincipalAttributeValueSourceSelectItemGroupProvider()
          Default AttrValueSource provider.
PrincipalAttributeValueSourceSelectItemGroupProvider(int principalType)
          AttrValueSource provider.
PrincipalAttributeValueSourceSelectItemGroupProvider(int principalType, boolean includeCommonAttrs)
          AttrValueSource provider.
 
Method Summary
protected  List calculateAttrValueItems(int principalType, boolean includeCommonAttrs)
          Calculate the available attributes for the requested principal type.
protected  SelectItemGroup loadAttributesForProvider(Locale locale, IContext portalContext, IPrincipalAttributeBizPolicy papBizPolicy, IThingID providerThingID, int principalType, IDirSystemBizPolicy dirSysPolicy)
          Load all the attributes for a principal type and return them as a SelectItemGroup.
 
Methods inherited from class com.webmethods.caf.faces.data.object.DefaultSelectItemGroupProvider
add, findSelectItemContentProvider, getFilter, getSelectItemContentProviders, initialize, initialize, initialize, initialize, initialize, isFilterable, setFilter, setFilterable
 
Methods inherited from class com.webmethods.caf.faces.data.object.DefaultSelectItemProvider
getDescription, getIcon, getLabel, getSource, getStyle, getValue, isDisabled, isEscape, setDescription, setDisabled, setEscape, setIcon, setLabel, setSource, setStyle, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.ISelectItemGroupProvider
getSelectItemContentProviders
 
Methods inherited from interface com.webmethods.caf.faces.data.ISelectItemProvider
getDescription, getIcon, getLabel, getStyle, getValue, isDisabled, isEscape
 

Constructor Detail

PrincipalAttributeValueSourceSelectItemGroupProvider

public PrincipalAttributeValueSourceSelectItemGroupProvider()
Default AttrValueSource provider. Provides value source for user attributes. Defaults to IDirConstants.TYPE_USER.


PrincipalAttributeValueSourceSelectItemGroupProvider

public PrincipalAttributeValueSourceSelectItemGroupProvider(int principalType)
AttrValueSource provider. Provides value source for user attributes. Defaults to include common attributes.

Parameters:
principalType - The principal type to use for this provider.

PrincipalAttributeValueSourceSelectItemGroupProvider

public PrincipalAttributeValueSourceSelectItemGroupProvider(int principalType,
                                                            boolean includeCommonAttrs)
AttrValueSource provider. Provides value source for user attributes.

Parameters:
principalType - The principal type to use for this provider.
includeCommonAttrs - To include common attributes provided by the directory service.
Method Detail

calculateAttrValueItems

protected List calculateAttrValueItems(int principalType,
                                       boolean includeCommonAttrs)
Calculate the available attributes for the requested principal type. Place all the SelectItemGroup in the returned list and sort them by their titles.

Parameters:
principalType - The principal type to use.
includeCommonAttrs - To include common attributes provided by the directory service.
Returns:
A sorted list of attribute value items for the given principal type.

loadAttributesForProvider

protected SelectItemGroup loadAttributesForProvider(Locale locale,
                                                    IContext portalContext,
                                                    IPrincipalAttributeBizPolicy papBizPolicy,
                                                    IThingID providerThingID,
                                                    int principalType,
                                                    IDirSystemBizPolicy dirSysPolicy)
                                             throws PortalException
Load all the attributes for a principal type and return them as a SelectItemGroup. Sort the attributes by their titles.

Parameters:
locale - The local to use for the attributes titles.
portalContext -
papBizPolicy -
providerThingID -
principalType - Use IDirConstants.TYPE_USER, IDirConstants.TYPE_ROLE, or IDirConstants.TYPE_GROUP.
dirSysPolicy -
Returns:
The select item group for the provider.
Throws:
PortalException