public class AgentHelperImpl extends Object implements AgentHelper
Description: This is an integrated context implementation helper delegate class for the AgentFacade class. "Integrated" means that Samigo (Tests and Quizzes) is running within the context of the Sakai portal and authentication mechanisms, and therefore makes calls on Sakai for things it needs.
Note: To customize behavior you can add your own helper class to the Spring injection via the integrationContext.xml for your context. The particular integrationContext.xml to be used is selected by the build process.
Sakai Project Copyright (c) 2005
UNASSIGNED_AGENT_STRING
Constructor and Description |
---|
AgentHelperImpl() |
Modifier and Type | Method and Description |
---|---|
String |
createAnonymous(AgentFacade agent)
Create anonymous user and return the anonymous user id.
|
AgentImpl |
getAgent()
Get an osid Agent implementation class instance.
|
String |
getAgentString(String agentString)
Get the agent string.
|
String |
getAnonymousId(String agentString)
Get the anonymous user id.
|
String |
getCurrentSiteId(boolean accessViaUrl)
Get the current site id.
|
String |
getCurrentSiteName(boolean accessViaUrl)
Get the current site name.
|
String |
getDisplayId(String agentString)
Get the Agent DisplayId given an Id String.
|
String |
getDisplayName(String agentString)
Get the Agent display name.
|
String |
getDisplayNameByAgentId(String agentId)
Get the display name for a specific agent id string.
|
String |
getEid(String agentString) |
String |
getEidById(String agentString)
Get the Agent Eid given an Id String.
|
String |
getEmail(String agentString)
Get the Agent email.
|
String |
getFirstName(String agentString)
Get the Agent first name.
|
String |
getLastName(String agentString)
Get the Agent last name.
|
String |
getRole(String agentString)
Can be called statically from AgentFacade from an instance
|
String |
getRoleForAgentAndSite(String agentString,
String siteId) |
String |
getRoleForCurrentAgent(String agentString)
Called by AgentFacade from an instance.
|
String |
getSiteName(String siteId)
Get the site name.
|
Map |
getUserRolesFromContextRealm(Collection inUsers)
This gets the current site id and transforms it into the realm.
|
boolean |
isFileUploadAvailable()
Deprecated.
|
boolean |
isIntegratedEnvironment()
Is this an integrated environment?
|
public AgentImpl getAgent()
getAgent
in interface AgentHelper
public String getAgentString(String agentString)
getAgentString
in interface AgentHelper
public String getEid(String agentString)
getEid
in interface AgentHelper
public String getEidById(String agentString)
getEidById
in interface AgentHelper
agentS
- the Agent Id string.public String getDisplayName(String agentString)
getDisplayName
in interface AgentHelper
agentS
- the Agent string.public String getFirstName(String agentString)
getFirstName
in interface AgentHelper
agentString
- teh agent stringpublic String getLastName(String agentString)
getLastName
in interface AgentHelper
agentString
- teh agent stringpublic String getEmail(String agentString)
getEmail
in interface AgentHelper
agentString
- teh agent stringpublic String getRole(String agentString)
getRole
in interface AgentHelper
agentString
- the agent string for an agentpublic String getRoleForCurrentAgent(String agentString)
getRoleForCurrentAgent
in interface AgentHelper
agentString
- the agent string for current AgentFacade instancepublic String getCurrentSiteId(boolean accessViaUrl)
getCurrentSiteId
in interface AgentHelper
public String createAnonymous(AgentFacade agent)
createAnonymous
in interface AgentHelper
public String getCurrentSiteName(boolean accessViaUrl)
getCurrentSiteName
in interface AgentHelper
public String getSiteName(String siteId)
getSiteName
in interface AgentHelper
siteId
- site idpublic String getDisplayNameByAgentId(String agentId)
getDisplayNameByAgentId
in interface AgentHelper
agentId
- the agent id string.public boolean isIntegratedEnvironment()
isIntegratedEnvironment
in interface AgentHelper
public String getAnonymousId(String agentString)
getAnonymousId
in interface AgentHelper
public Map getUserRolesFromContextRealm(Collection inUsers)
getUserRolesFromContextRealm
in interface AgentHelper
inUsers
- the Collection of users who have their roles looked up.
This is a Collection of userId Stringspublic String getRoleForAgentAndSite(String agentString, String siteId)
getRoleForAgentAndSite
in interface AgentHelper
public boolean isFileUploadAvailable()
isFileUploadAvailable
in interface AgentHelper
public String getDisplayId(String agentString)
getDisplayId
in interface AgentHelper
agentString
- the Agent Id string.Copyright © 2003–2019 The Sakai Foundation. All rights reserved.