Class AttributeProviderModel
java.lang.Object
com.webmethods.caf.faces.data.dir.AttributeProviderModel
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,
AttributeModel> protected IPrincipalAttributeBizPolicy
protected IContext
protected IURI
protected IThingID
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AttributeProviderModel
(IThingID providerThingID, IURI principalURI) Create an attribute provider model from a provider thing Id and principal URI. -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeModel
(String attributeName) Get the attribute model by its name.Get the array of attribute models stored in this provider.String[]
Get an array of names for all the attribute models in this provider.protected Map<String,
AttributeModel> Get the map of attribute models stored in this provider.Get the display name for this attribute.protected String
getLocaleLanguageWithCountry
(Locale locale) TODO: move this to a shared common class?protected IContext
Acquire a portal context and cache it.protected IPrincipalAttributeBizPolicy
Get the biz policy for handling principal attributes.Get the principal URI.Set the provider thing Id.protected void
initialize
(IThingID providerThingID, IURI principalURI) Copies the supplied values into the classes members.void
setPrincipalURI
(IURI principalURI) Set the principal URI.void
setProviderThingID
(IThingID providerThingID) Set the provider thing Id.
-
Field Details
-
fProviderThingID
-
fPrincipalURI
-
fAttrsMap
-
fPortalContext
-
fPapBizPolicy
-
-
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
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
Copies the supplied values into the classes members.- Parameters:
providerThingID
- The provider thing Id.principalURI
- The principal URI
-
getPrincipalURI
Get the principal URI.- Returns:
- The principal URI.
-
setPrincipalURI
Set the principal URI. Clears the cache when the URI changes.- Parameters:
principalURI
- The principal URI.
-
getProviderThingID
Set the provider thing Id. Clears the cache when the provider changes.- Parameters:
providerThingID
- The provider thing Id.
-
setProviderThingID
Set the provider thing Id. Clears the cache when the provider changes.- Parameters:
providerThingID
- The provider thing Id.
-
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
TODO: move this to a shared common class?- Parameters:
locale
-- Returns:
-
getPortalContext
Acquire a portal context and cache it. Cache the results.- Returns:
- The portal context.
-
getPrincipalAttributeBizPolicy
Get the biz policy for handling principal attributes. Cache the results.- Returns:
- The biz policy for principal attributes.
- Throws:
BizException
-
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
Get the array of attribute models stored in this provider.- Returns:
- An array of attribute models.
-
getAttributeModel
Get the attribute model by its name.- Parameters:
attributeName
- The name of the attribute.- Returns:
- The attribute model.
-
getAttributesMap
Get the map of attribute models stored in this provider. Cache the results.- Returns:
- A map of attribute models.
-