org.sakaiproject.metaobj.shared.model.impl
Class AgentImpl

java.lang.Object
  extended byorg.sakaiproject.metaobj.shared.model.impl.AgentImpl
All Implemented Interfaces:
Agent, Principal, Serializable

public class AgentImpl
extends Object
implements Agent

See Also:
Serialized Form

Field Summary
static String EMAIL
           
static String ID
           
static String REAL_NAME
           
static String ROLES
           
 
Fields inherited from interface org.sakaiproject.metaobj.shared.model.Agent
AGENT_SESSION_KEY, ROLE_ADMIN, ROLE_ANONYMOUS, ROLE_GUEST, ROLE_MEMEBER, ROLE_REVIEWER
 
Constructor Summary
AgentImpl()
           
AgentImpl(Id id)
           
AgentImpl(StructuredArtifact profile)
           
 
Method Summary
 boolean equals(Object o)
           
 String getClearPassword()
           
 String getDisplayName()
           
 HomeFactory getHomeFactory()
           
 Id getId()
           
 String getMd5Password()
           
 String getName()
          Returns the name of this principal.
 String getPassword()
           
 Artifact getProfile()
           
 Object getProperty(String key)
           
 String getRole()
           
 String[] getRoles()
          I imagine this will probably move into a authz call and out of here
 List getWorksiteRoles()
           
 List getWorksiteRoles(String worksiteId)
           
 int hashCode()
           
 boolean isInitialized()
           
 boolean isInRole(String role)
           
 boolean isRole()
           
 String naturalKey()
           
 void setDisplayName(String displayName)
           
 void setHomeFactory(HomeFactory homeFactory)
           
 void setId(Id id)
           
 void setInitialized(boolean initialized)
           
 void setMd5Password(String md5Password)
           
 void setPassword(String password)
           
 void setProfile(StructuredArtifact profile)
           
 void setRole(String role)
           
 void setRoles(String[] roles)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
toString
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

REAL_NAME

public static final String REAL_NAME
See Also:
Constant Field Values

EMAIL

public static final String EMAIL
See Also:
Constant Field Values

ROLES

public static final String ROLES
See Also:
Constant Field Values
Constructor Detail

AgentImpl

public AgentImpl()

AgentImpl

public AgentImpl(Id id)

AgentImpl

public AgentImpl(StructuredArtifact profile)
Method Detail

getId

public Id getId()
Specified by:
getId in interface Agent

setId

public void setId(Id id)

getProfile

public Artifact getProfile()
Specified by:
getProfile in interface Agent

setProfile

public void setProfile(StructuredArtifact profile)

getProperty

public Object getProperty(String key)
Specified by:
getProperty in interface Agent

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in interface Agent

isInRole

public boolean isInRole(String role)
Specified by:
isInRole in interface Agent

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface Agent

setInitialized

public void setInitialized(boolean initialized)

setDisplayName

public void setDisplayName(String displayName)

getRoles

public String[] getRoles()
I imagine this will probably move into a authz call and out of here

Returns:

setRoles

public void setRoles(String[] roles)

getHomeFactory

public HomeFactory getHomeFactory()

setHomeFactory

public void setHomeFactory(HomeFactory homeFactory)

getPassword

public String getPassword()

getClearPassword

public String getClearPassword()

setPassword

public void setPassword(String password)

getMd5Password

public String getMd5Password()

setMd5Password

public void setMd5Password(String md5Password)

getRole

public String getRole()
Specified by:
getRole in interface Agent

getWorksiteRoles

public List getWorksiteRoles(String worksiteId)
Specified by:
getWorksiteRoles in interface Agent

getWorksiteRoles

public List getWorksiteRoles()
Specified by:
getWorksiteRoles in interface Agent

isRole

public boolean isRole()
Specified by:
isRole in interface Agent

setRole

public void setRole(String role)

naturalKey

public String naturalKey()

equals

public boolean equals(Object o)
Specified by:
equals in interface Principal

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal

getName

public String getName()
Returns the name of this principal.

Specified by:
getName in interface Principal
Returns:
the name of this principal.