Class AttributeModel
java.lang.Object
com.webmethods.caf.faces.data.dir.AttributeModel
- All Implemented Interfaces:
Serializable
A model used to access an attribute's value and title, based on the principal URI, provider thing Id,
and attribute name.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AttributeModel
(IThingID providerThingID, IURI principalURI, String attributeName) Create an attribute model from a provider thing Id, principal URI, and the attribute's name. -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the attribute to reference by the biz policy.Get the display name for this attribute.protected IContext
Acquire a portal context and cache it.protected IPrincipalAttributeBizPolicy
Get the biz policy for handling principal attributes.Get the principal URI.Get the provider thing Id.getValue()
Get the attribute from the biz policy using this principal URI, thing Id, and attribute name.protected void
initialize
(IThingID providerThingID, IURI principalURI, String attributeName) Copies the supplied values into the classes members.void
setAttributeName
(String attrName) Set the name of the attribute to reference by the biz policy.void
setPrincipalURI
(IURI principalURI) Set the principal URI.void
setProviderThingID
(IThingID providerThingID) Set the provider thing Id.
-
Field Details
-
fProviderThingID
-
fPrincipalURI
-
fAttributeName
-
fDisplayName
-
fPortalContext
-
fPapBizPolicy
-
-
Constructor Details
-
AttributeModel
public AttributeModel()Default constructor. Create an attribute model from the current user's Directory URI. Use the Directory URI as principal URI. -
AttributeModel
Create an attribute model from a provider thing Id, principal URI, and the attribute's name.- Parameters:
providerThingID
- The provider thing Id.principalURI
- The principal URI.attributeName
- The name of the attribute to reference by the biz policy.
-
-
Method Details
-
initialize
Copies the supplied values into the classes members.- Parameters:
providerThingID
- The provider thing Id.principalURI
- The principal URIattributeName
- The name of the attribute to reference by the biz policy.
-
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
Get the provider thing Id.- Returns:
- The provider thing Id.
-
setProviderThingID
Set the provider thing Id. Clears the cache when the provider changes.- Parameters:
providerThingID
- The provider thing Id.
-
getAttributeName
Get the name of the attribute to reference by the biz policy.- Returns:
- The attribute reference name. IE. "lastName"
-
setAttributeName
Set the name of the attribute to reference by the biz policy. Clears the cache when the name changes.- Parameters:
attrName
- The attribute reference name. IE. "lastName"
-
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.
-
getValue
Get the attribute from the biz policy using this principal URI, thing Id, and attribute name.- Returns:
- The attribute value.
-
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
-