public class AgentHelperImpl extends Object implements AgentHelper
Description: This is a stub standalone context implementation helper delegate class for the AgentFacade class. "Standalone" means that Samigo (Tests and Quizzes) is running without the context of the Sakai portal and authentication mechanisms, and therefore we "make up" some of the values returned.
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(HttpServletRequest req,
HttpServletResponse res)
Get the agent string.
|
String |
getAgentString(String agentString) |
String |
getAnonymousId(String agentString)
Get the anonymous user id.
|
String |
getCurrentSiteId(boolean accessViaUrl)
Get the current site id.
|
String |
getCurrentSiteIdFromExternalServlet(HttpServletRequest req,
HttpServletResponse res)
Get current site id from within an external servlet.
|
String |
getCurrentSiteName(boolean accessViaUrl)
Get the current site name.
|
String |
getDisplayId(String agentId) |
String |
getDisplayName(String agentString)
Get the Agent display name.
|
String |
getDisplayNameByAgentId(String agentId)
Get the display name fo ra specific agent id string.
|
String |
getEid(String agentString)
Get the agent string.
|
String |
getEidById(String agentString) |
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)
For a specific agent id, get the agent role.
|
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?
|
boolean |
isStandaloneEnvironment()
Is this a standalone environment?
|
void |
setAgentString(String agentString)
Set the agent string.
|
public AgentImpl getAgent()
getAgent in interface AgentHelperpublic String getEid(String agentString)
getEid in interface AgentHelperpublic String getEidById(String agentString)
getEidById in interface AgentHelperpublic String getAgentString(String agentString)
getAgentString in interface AgentHelperpublic String getAgentString(HttpServletRequest req, HttpServletResponse res)
req - the HttpServletRequestres - the HttpServletResponsepublic String getDisplayName(String agentString)
getDisplayName in interface AgentHelperagentS - the Agent string.public String getFirstName(String agentString)
getFirstName in interface AgentHelperagentString - teh agent stringpublic String getLastName(String agentString)
getLastName in interface AgentHelperagentString - the agent stringpublic String getEmail(String agentString)
getEmail in interface AgentHelperagentString - teh agent stringpublic String getRoleForCurrentAgent(String agentString)
getRoleForCurrentAgent in interface AgentHelperagentString - the agent string for current AgentFacade instancepublic String getRole(String agentString)
getRole in interface AgentHelperagentString - the agent stringpublic String getCurrentSiteId(boolean accessViaUrl)
getCurrentSiteId in interface AgentHelperpublic String getCurrentSiteName(boolean accessViaUrl)
getCurrentSiteName in interface AgentHelperpublic String getSiteName(String siteId)
getSiteName in interface AgentHelpersiteId - site idpublic String getDisplayNameByAgentId(String agentId)
getDisplayNameByAgentId in interface AgentHelperagentId - the agent id string.public String createAnonymous(AgentFacade agent)
createAnonymous in interface AgentHelperpublic boolean isStandaloneEnvironment()
isStandaloneEnvironment in interface AgentHelperpublic boolean isIntegratedEnvironment()
isIntegratedEnvironment in interface AgentHelperpublic String getCurrentSiteIdFromExternalServlet(HttpServletRequest req, HttpServletResponse res)
req - the HttpServletRequestres - the HttpServletResponsepublic String getAnonymousId(String agentString)
getAnonymousId in interface AgentHelperpublic void setAgentString(String agentString)
agentString - the agent string.public Map getUserRolesFromContextRealm(Collection inUsers)
getUserRolesFromContextRealm in interface AgentHelperinUsers - 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 AgentHelperpublic boolean isFileUploadAvailable()
isFileUploadAvailable in interface AgentHelperpublic String getDisplayId(String agentId)
getDisplayId in interface AgentHelperCopyright © 2005-2014 Sakai Project. All Rights Reserved.