Class PrincipalModel
java.lang.Object
com.webmethods.caf.faces.bean.PageFlowScopeAdapter
com.webmethods.caf.faces.data.dir.PrincipalModel
- All Implemented Interfaces:
IPageFlowScopeAdapter
,IPrincipalProvider
,Externalizable
,Serializable
- Direct Known Subclasses:
GroupModel
,RoleModel
,UserModel
public abstract class PrincipalModel
extends PageFlowScopeAdapter
implements IPrincipalProvider, Externalizable
Base interface implementation for directory objects content providers: users, groups and roles.
- Since:
- 7.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IDirPrincipal
protected IDirSystemBizPolicy
protected IPrincipalAttributeBizPolicy
protected IContext
protected IPrincipalBizPolicy
protected Map<IThingID,
AttributeProviderModel> Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
clear()
Clear the provider, map, and attribute information.boolean
Indicates whether some other object is "equal to" this one.getAttributeProvider
(IThingID providerThingID) Get the principal attribute provider model.Get the principal's attribute providers.protected Map<IThingID,
AttributeProviderModel> Get the principal's attribute providers as a map.Get all attributes as a Map.protected IDirPrincipal
Look up the principal using the current context's user directory URI.protected IDirSystemBizPolicy
Get system level biz policies (commands) for this principal.abstract String
Get display name for this principal.getEmail()
Get the defined email address for this principal.Get icon URL for this principal.getLink()
Get the linkable URL to open My Profile page for this principal.protected IContext
Acquire a portal context and cache it.protected IPrincipalAttributeBizPolicy
Get service level biz policies (commands) for this principal's attributes providers.protected IPrincipalBizPolicy
Get system level biz policies (commands) for this principal.Get the value of the principal DN.Get the principal object internal ID.abstract int
Get the type of principal used by this model.Get the value of the principal URI.Get the internal principal object URI as String.void
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.toString()
Returns a string representation of the object.void
Get the principal DN as an output.Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
-
Field Details
-
fDirPrincipal
-
fProvidersMap
-
fPortalContext
-
fPapBizPolicy
-
fDirSysBizPolicy
-
fPrincipalBizPolicy
-
fPrincipalAttributes
-
-
Constructor Details
-
PrincipalModel
public PrincipalModel()Default constructor. Provides info for the current user unless the setPrincipalURI is called with a different principal.
-
-
Method Details
-
getPrincipalType
public abstract int getPrincipalType()Get the type of principal used by this model. -
clear
protected void clear()Clear the provider, map, and attribute information. Used when changing principals. -
getDirPrincipal
Look up the principal using the current context's user directory URI.- Returns:
- The current context's user directory principal.
-
setDirPrincipal
Set the directory principal. If the principal is different or null, clear the provider, map, and attribute information.- Parameters:
principal
- The directory principal.
-
setPrincipalURI
Set the URI value for this principal. If the principal is different or null, clear the provider, map, and attribute information.- Parameters:
uri
- The IURI value for the principal.
-
getPrincipalURI
Get the value of the principal URI.- Returns:
- The IURI value for the principal.
-
getPrincipalDN
Get the value of the principal DN.- Specified by:
getPrincipalDN
in interfaceIPrincipalProvider
- Returns:
- The DN value.
-
setPrincipalDN
Sets principal DN and initializes this content provider with principal data identified by this DN. If the principal is different or null, clear the provider, map, and attribute information.- Specified by:
setPrincipalDN
in interfaceIPrincipalProvider
- Parameters:
dn
- The DN value for this principal.
-
getPrincipalID
Get the principal object internal ID.- Specified by:
getPrincipalID
in interfaceIPrincipalProvider
- Returns:
- The Id value for this principal.
-
setPrincipalID
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.- Specified by:
setPrincipalID
in interfaceIPrincipalProvider
- Parameters:
principalID
- The Id value for this principal.
-
setPrincipalAlias
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.- Specified by:
setPrincipalAlias
in interfaceIPrincipalProvider
- Parameters:
alias
- The alias value for this principal.
-
getPortalContext
Acquire a portal context and cache it. Cache the results.- Returns:
- The portal context.
-
getPrincipalAttributeBizPolicy
Get service level biz policies (commands) for this principal's attributes providers.- Returns:
- The biz policies for this principal's attribute providers.
- Throws:
BizException
-
getDirSystemBizPolicy
Get system level biz policies (commands) for this principal.- Returns:
- The biz policies for this principal.
- Throws:
BizException
-
getPrincipalBizPolicy
Get system level biz policies (commands) for this principal.- Returns:
- The biz policies for this principal.
- Throws:
BizException
-
getLink
Get the linkable URL to open My Profile page for this principal.- Specified by:
getLink
in interfaceIPrincipalProvider
- Returns:
- The linkable URL as a string.
-
getIconURL
Get icon URL for this principal. Different icons are used for different principal types.- Specified by:
getIconURL
in interfaceIPrincipalProvider
- Returns:
- The URL for this principal's icon.
-
getDisplayName
Get display name for this principal. It could be either role or group name, or combination of first and last name for the user- Specified by:
getDisplayName
in interfaceIPrincipalProvider
- Returns:
- The display name for this principal.
-
getEmail
Get the defined email address for this principal.- Specified by:
getEmail
in interfaceIPrincipalProvider
- Returns:
- The email address for this principal.
-
getAttributeProviders
Get the principal's attribute providers.- Returns:
- An array of attribute providers.
-
getAttributeProvidersMap
Get the principal's attribute providers as a map.- Returns:
- A map of attribute providers.
-
getAttributes
Get all attributes as a Map.- Specified by:
getAttributes
in interfaceIPrincipalProvider
- Returns:
- The attribute map for this principal.
-
getAttributeProvider
Get the principal attribute provider model.- Parameters:
providerThingID
- The thing Id for the attribute provider.- Returns:
- The attribute provider model.
-
readExternal
Set the principal DN from an input.- Specified by:
readExternal
in interfaceExternalizable
- Parameters:
in
- The ObjectInput containing the DN.- Throws:
IOException
ClassNotFoundException
-
writeExternal
Get the principal DN as an output.- Specified by:
writeExternal
in interfaceExternalizable
- Parameters:
out
- The ObjectOutput to write the DN into.- Throws:
IOException
-
equals
Indicates whether some other object is "equal to" this one. -
toString
Returns a string representation of the object. -
getPrincipalURIAsString
Get the internal principal object URI as String.- Specified by:
getPrincipalURIAsString
in interfaceIPrincipalProvider
- Returns:
- The URI, as a string.
-