com.webmethods.caf.faces.data.dir
Class SimpleWrappedPrincipalModel

java.lang.Object
  extended by com.webmethods.caf.faces.bean.PageFlowScopeAdapter
      extended by com.webmethods.caf.faces.data.dir.SimpleWrappedPrincipalModel
All Implemented Interfaces:
IPageFlowScopeAdapter, IPrincipalProvider, Externalizable, Serializable

public class SimpleWrappedPrincipalModel
extends PageFlowScopeAdapter
implements IPrincipalProvider, Externalizable

Base interface for directory objects content providers: users, groups and roles.

See Also:
Serialized Form

Field Summary
protected  PrincipalModel fPrincipalModel
           
 
Fields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
 
Constructor Summary
SimpleWrappedPrincipalModel()
           
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 Map getAttributes()
          Get all attributes as a Map.
 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.
 String getPrincipalDN()
          Get the value of the principal DN.
 String getPrincipalID()
          Get the principal object internal ID.
 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.
 PrincipalModel getWrappedPrincipalModel()
           
 void readExternal(ObjectInput in)
          Set the principal DN from an input.
 void setPrincipalAlias(String alias)
          Sets principal alias and initialized this content provider with principal data identified by this alias
 void setPrincipalDN(String dn)
          Get the value of the principal DN.
 void setPrincipalID(String principalID)
          Sets principal internal ID and initializes this content provider with principal data identified by this ID
 void writeExternal(ObjectOutput out)
          Get the principal DN as an output.
 
Methods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fPrincipalModel

protected PrincipalModel fPrincipalModel
Constructor Detail

SimpleWrappedPrincipalModel

public SimpleWrappedPrincipalModel()
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Set the principal DN from an input.

Specified by:
readExternal in interface Externalizable
Parameters:
in - The ObjectInput containing the DN.
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Get the principal DN as an output.

Specified by:
writeExternal in interface Externalizable
Parameters:
out - The ObjectOutput to write the DN into.
Throws:
IOException

getWrappedPrincipalModel

public PrincipalModel getWrappedPrincipalModel()
Returns:

getPrincipalType

public int getPrincipalType()
Get the type of principal used by this model.

Returns:
IDirConstants.TYPE_USER, IDirConstants.TYPE_GROUP, or IDirConstants.TYPE_ROLE

getAttributes

public Map getAttributes()
Get all attributes as a Map.

Specified by:
getAttributes in interface IPrincipalProvider
Returns:
The attribute map for this principal.

getDisplayName

public String 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 interface IPrincipalProvider
Returns:
The display name for this principal.

getEmail

public String getEmail()
Get the defined email address for this principal.

Specified by:
getEmail in interface IPrincipalProvider
Returns:
The email address for this principal.

getIconURL

public String getIconURL()
Get icon URL for this principal. Different icons are used for different principal types.

Specified by:
getIconURL in interface IPrincipalProvider
Returns:
The URL for this principal's icon.

getLink

public String getLink()
Get the linkable URL to open My Profile page for this principal.

Specified by:
getLink in interface IPrincipalProvider
Returns:
The linkable URL as a string.

getPrincipalDN

public String getPrincipalDN()
Get the value of the principal DN.

Specified by:
getPrincipalDN in interface IPrincipalProvider
Returns:
The DN value.

getPrincipalID

public String getPrincipalID()
Get the principal object internal ID.

Specified by:
getPrincipalID in interface IPrincipalProvider
Returns:
The Id value for this principal.

setPrincipalAlias

public void setPrincipalAlias(String alias)
Sets principal alias and initialized this content provider with principal data identified by this alias

Specified by:
setPrincipalAlias in interface IPrincipalProvider
Parameters:
alias - The alias value for this principal.

setPrincipalDN

public void setPrincipalDN(String dn)
Get the value of the principal DN.

Specified by:
setPrincipalDN in interface IPrincipalProvider
Parameters:
dn - The DN value for this principal.

setPrincipalID

public void setPrincipalID(String principalID)
Sets principal internal ID and initializes this content provider with principal data identified by this ID

Specified by:
setPrincipalID in interface IPrincipalProvider
Parameters:
principalID - The Id value for this principal.

getPrincipalURI

public IURI getPrincipalURI()
Get the value of the principal URI.

Returns:
The IURI value for the principal.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(Object)

getPrincipalURIAsString

public String getPrincipalURIAsString()
Get the internal principal object URI as String.

Specified by:
getPrincipalURIAsString in interface IPrincipalProvider
Returns:
The URI, as a string.