Class 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
See Also:
  • Constructor Details

    • 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 Details

    • calculateAttrValueItems

      protected List<SelectItemGroup> 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