public class AttributeProviderModel extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Map<String,AttributeModel> |
fAttrsMap |
protected IPrincipalAttributeBizPolicy |
fPapBizPolicy |
protected IContext |
fPortalContext |
protected IURI |
fPrincipalURI |
protected IThingID |
fProviderThingID |
Constructor and Description |
---|
AttributeProviderModel()
Default constructor.
|
AttributeProviderModel(IThingID providerThingID,
IURI principalURI)
Create an attribute provider model from a provider thing Id and principal URI.
|
Modifier and Type | Method and Description |
---|---|
AttributeModel |
getAttributeModel(String attributeName)
Get the attribute model by its name.
|
AttributeModel[] |
getAttributeModels()
Get the array of attribute models stored in this provider.
|
String[] |
getAttributeNames()
Get an array of names for all the attribute models in this provider.
|
protected Map<String,AttributeModel> |
getAttributesMap()
Get the map of attribute models stored in this provider.
|
String |
getDisplayName()
Get the display name for this attribute.
|
protected String |
getLocaleLanguageWithCountry(Locale locale)
TODO: move this to a shared common class?
|
protected IContext |
getPortalContext()
Acquire a portal context and cache it.
|
protected IPrincipalAttributeBizPolicy |
getPrincipalAttributeBizPolicy()
Get the biz policy for handling principal attributes.
|
IURI |
getPrincipalURI()
Get the principal URI.
|
IThingID |
getProviderThingID()
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.
|
protected IThingID fProviderThingID
protected IURI fPrincipalURI
protected Map<String,AttributeModel> fAttrsMap
protected transient IContext fPortalContext
protected transient IPrincipalAttributeBizPolicy fPapBizPolicy
public AttributeProviderModel()
protected void initialize(IThingID providerThingID, IURI principalURI)
providerThingID
- The provider thing Id.principalURI
- The principal URIpublic IURI getPrincipalURI()
public void setPrincipalURI(IURI principalURI)
principalURI
- The principal URI.public IThingID getProviderThingID()
providerThingID
- The provider thing Id.public void setProviderThingID(IThingID providerThingID)
providerThingID
- The provider thing Id.public String getDisplayName()
protected String getLocaleLanguageWithCountry(Locale locale)
locale
- protected IContext getPortalContext()
protected IPrincipalAttributeBizPolicy getPrincipalAttributeBizPolicy() throws BizException
BizException
public String[] getAttributeNames()
public AttributeModel[] getAttributeModels()
public AttributeModel getAttributeModel(String attributeName)
attributeName
- The name of the attribute.protected Map<String,AttributeModel> getAttributesMap()