Class AttributeProviderModel

java.lang.Object
com.webmethods.caf.faces.data.dir.AttributeProviderModel
All Implemented Interfaces:
Serializable

public class AttributeProviderModel extends Object implements Serializable
A provider for a map of attribute models. Used to access an attribute models, based on the principal URI and provider thing Id.
See Also:
  • Field Details

  • Constructor Details

    • AttributeProviderModel

      public AttributeProviderModel()
      Default constructor. Create an attribute provider model from the current user's Directory URI. Use the Directory URI as principal URI.
    • AttributeProviderModel

      public AttributeProviderModel(IThingID providerThingID, IURI principalURI)
      Create an attribute provider model from a provider thing Id and principal URI.
      Parameters:
      providerThingID - The provider thing Id.
      principalURI - The principal URI.
  • Method Details

    • initialize

      protected void initialize(IThingID providerThingID, IURI principalURI)
      Copies the supplied values into the classes members.
      Parameters:
      providerThingID - The provider thing Id.
      principalURI - The principal URI
    • getPrincipalURI

      public IURI getPrincipalURI()
      Get the principal URI.
      Returns:
      The principal URI.
    • setPrincipalURI

      public void setPrincipalURI(IURI principalURI)
      Set the principal URI. Clears the cache when the URI changes.
      Parameters:
      principalURI - The principal URI.
    • getProviderThingID

      public IThingID getProviderThingID()
      Set the provider thing Id. Clears the cache when the provider changes.
      Parameters:
      providerThingID - The provider thing Id.
    • setProviderThingID

      public void setProviderThingID(IThingID providerThingID)
      Set the provider thing Id. Clears the cache when the provider changes.
      Parameters:
      providerThingID - The provider thing Id.
    • getDisplayName

      public String getDisplayName()
      Get the display name for this attribute. If attribute name or principalURI are null then null is returned.
      Returns:
      The title for this attribute based on the current local.
    • getLocaleLanguageWithCountry

      protected String getLocaleLanguageWithCountry(Locale locale)
      TODO: move this to a shared common class?
      Parameters:
      locale -
      Returns:
    • getPortalContext

      protected IContext getPortalContext()
      Acquire a portal context and cache it. Cache the results.
      Returns:
      The portal context.
    • getPrincipalAttributeBizPolicy

      protected IPrincipalAttributeBizPolicy getPrincipalAttributeBizPolicy() throws BizException
      Get the biz policy for handling principal attributes. Cache the results.
      Returns:
      The biz policy for principal attributes.
      Throws:
      BizException
    • getAttributeNames

      public String[] getAttributeNames()
      Get an array of names for all the attribute models in this provider.
      Returns:
      An array of name for all the attribute models.
    • getAttributeModels

      public AttributeModel[] getAttributeModels()
      Get the array of attribute models stored in this provider.
      Returns:
      An array of attribute models.
    • getAttributeModel

      public AttributeModel getAttributeModel(String attributeName)
      Get the attribute model by its name.
      Parameters:
      attributeName - The name of the attribute.
      Returns:
      The attribute model.
    • getAttributesMap

      protected Map<String,AttributeModel> getAttributesMap()
      Get the map of attribute models stored in this provider. Cache the results.
      Returns:
      A map of attribute models.