public abstract class PrincipalModel extends PageFlowScopeAdapter implements IPrincipalProvider, Externalizable
Modifier and Type | Field and Description |
---|---|
protected IDirPrincipal |
fDirPrincipal |
protected IDirSystemBizPolicy |
fDirSysBizPolicy |
protected IPrincipalAttributeBizPolicy |
fPapBizPolicy |
protected IContext |
fPortalContext |
protected Map<Object,Object> |
fPrincipalAttributes |
protected IPrincipalBizPolicy |
fPrincipalBizPolicy |
protected Map<IThingID,AttributeProviderModel> |
fProvidersMap |
fExpireWithPageFlow
Constructor and Description |
---|
PrincipalModel()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
clear()
Clear the provider, map, and attribute information.
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
AttributeProviderModel |
getAttributeProvider(IThingID providerThingID)
Get the principal attribute provider model.
|
AttributeProviderModel[] |
getAttributeProviders()
Get the principal's attribute providers.
|
protected Map<IThingID,AttributeProviderModel> |
getAttributeProvidersMap()
Get the principal's attribute providers as a map.
|
Map<Object,Object> |
getAttributes()
Get all attributes as a Map.
|
protected IDirPrincipal |
getDirPrincipal()
Look up the principal using the current context's user directory URI.
|
protected IDirSystemBizPolicy |
getDirSystemBizPolicy()
Get system level biz policies (commands) for this principal.
|
abstract String |
getDisplayName()
Get display name for this principal.
|
String |
getEmail()
Get the defined email address for this principal.
|
String |
getIconURL()
Get icon URL for this principal.
|
String |
getLink()
Get the linkable URL to open My Profile page for this principal.
|
protected IContext |
getPortalContext()
Acquire a portal context and cache it.
|
protected IPrincipalAttributeBizPolicy |
getPrincipalAttributeBizPolicy()
Get service level biz policies (commands) for this principal's attributes providers.
|
protected IPrincipalBizPolicy |
getPrincipalBizPolicy()
Get system level biz policies (commands) for this principal.
|
String |
getPrincipalDN()
Get the value of the principal DN.
|
String |
getPrincipalID()
Get the principal object internal ID.
|
abstract int |
getPrincipalType()
Get the type of principal used by this model.
|
IURI |
getPrincipalURI()
Get the value of the principal URI.
|
String |
getPrincipalURIAsString()
Get the internal principal object URI as String.
|
void |
readExternal(ObjectInput in)
Set the principal DN from an input.
|
protected void |
setDirPrincipal(IDirPrincipal principal)
Set the directory principal.
|
void |
setPrincipalAlias(String alias)
Sets principal alias and initialized this content provider with principal data identified by this alias
If the principal is different or null, clear the provider, map, and attribute information.
|
void |
setPrincipalDN(String dn)
Sets principal DN and initializes this content provider with principal data identified by this DN.
|
void |
setPrincipalID(String principalID)
Sets principal internal ID and initializes this content provider with principal data identified by this ID
If the principal is different or null, clear the provider, map, and attribute information.
|
void |
setPrincipalURI(IURI uri)
Set the URI value for this principal.
|
String |
toString()
Returns a string representation of the object.
|
void |
writeExternal(ObjectOutput out)
Get the principal DN as an output.
|
getExpireWithPageFlow, setExpireWithPageFlow
protected transient IDirPrincipal fDirPrincipal
protected transient Map<IThingID,AttributeProviderModel> fProvidersMap
protected transient IContext fPortalContext
protected transient IPrincipalAttributeBizPolicy fPapBizPolicy
protected transient IDirSystemBizPolicy fDirSysBizPolicy
protected transient IPrincipalBizPolicy fPrincipalBizPolicy
public PrincipalModel()
public abstract int getPrincipalType()
protected void clear()
protected IDirPrincipal getDirPrincipal()
protected void setDirPrincipal(IDirPrincipal principal)
principal
- The directory principal.public void setPrincipalURI(IURI uri)
uri
- The IURI value for the principal.public IURI getPrincipalURI()
public String getPrincipalDN()
getPrincipalDN
in interface IPrincipalProvider
public void setPrincipalDN(String dn)
setPrincipalDN
in interface IPrincipalProvider
dn
- The DN value for this principal.public String getPrincipalID()
getPrincipalID
in interface IPrincipalProvider
public void setPrincipalID(String principalID)
setPrincipalID
in interface IPrincipalProvider
principalID
- The Id value for this principal.public void setPrincipalAlias(String alias)
setPrincipalAlias
in interface IPrincipalProvider
alias
- The alias value for this principal.protected IContext getPortalContext()
protected IPrincipalAttributeBizPolicy getPrincipalAttributeBizPolicy() throws BizException
BizException
protected IDirSystemBizPolicy getDirSystemBizPolicy() throws BizException
BizException
protected IPrincipalBizPolicy getPrincipalBizPolicy() throws BizException
BizException
public String getLink()
getLink
in interface IPrincipalProvider
public String getIconURL()
getIconURL
in interface IPrincipalProvider
public abstract String getDisplayName()
getDisplayName
in interface IPrincipalProvider
public String getEmail()
getEmail
in interface IPrincipalProvider
public AttributeProviderModel[] getAttributeProviders()
protected Map<IThingID,AttributeProviderModel> getAttributeProvidersMap()
public Map<Object,Object> getAttributes()
getAttributes
in interface IPrincipalProvider
public AttributeProviderModel getAttributeProvider(IThingID providerThingID)
providerThingID
- The thing Id for the attribute provider.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- The ObjectInput containing the DN.IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- The ObjectOutput to write the DN into.IOException
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.equals(Object)
public String toString()
public String getPrincipalURIAsString()
getPrincipalURIAsString
in interface IPrincipalProvider