org.sakaiproject.metaobj.security.impl.sakai
Class AgentWrapper

java.lang.Object
  extended byorg.sakaiproject.metaobj.shared.model.IdentifiableObject
      extended byorg.sakaiproject.metaobj.security.impl.sakai.AgentWrapper
All Implemented Interfaces:
Agent, Principal, Serializable

public class AgentWrapper
extends IdentifiableObject
implements Agent

See Also:
Serialized Form

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
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
AgentWrapper(Id id, User sakaiUser, StructuredArtifact profile, SecurityBase securityBase)
           
 
Method Summary
 AgentManager getAgentManager()
           
 String getDisplayName()
           
 Id getId()
           
 String getName()
          Returns the name of this principal.
 Artifact getProfile()
           
 Object getProperty(String key)
           
 String getRole()
           
 User getSakaiUser()
           
 SecurityBase getSecurityBase()
           
 List getWorksiteRoles()
           
 List getWorksiteRoles(String worksiteId)
           
 boolean isInitialized()
           
 boolean isInRole(String role)
           
 boolean isRole()
           
 void setProfile(StructuredArtifact profile)
           
 
Methods inherited from class org.sakaiproject.metaobj.shared.model.IdentifiableObject
equals, getNewId, hashCode, setId, setNewId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Field Detail

logger

protected final transient org.apache.commons.logging.Log logger
Constructor Detail

AgentWrapper

public AgentWrapper(Id id,
                    User sakaiUser,
                    StructuredArtifact profile,
                    SecurityBase securityBase)
Method Detail

getId

public Id getId()
Specified by:
getId in interface Agent
Overrides:
getId in class IdentifiableObject

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

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

getSakaiUser

public User getSakaiUser()

getAgentManager

public AgentManager getAgentManager()

getSecurityBase

public SecurityBase getSecurityBase()

getName

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

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