|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.tool.assessment.integration.helper.standalone.AgentHelperImpl
public class AgentHelperImpl
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
| Field Summary |
|---|
| Fields inherited from interface org.sakaiproject.tool.assessment.integration.helper.ifc.AgentHelper |
|---|
UNASSIGNED_AGENT_STRING |
| Constructor Summary | |
|---|---|
AgentHelperImpl()
|
|
| Method Summary | |
|---|---|
String |
createAnonymous(AgentFacade agent)
Create anonymous user and return the anonymous user id. |
AgentImpl |
getAgent()
Get an osid Agent implementation class instance. |
String |
getAgentString(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.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(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Get current site id from within an external servlet. |
String |
getCurrentSiteName(boolean accessViaUrl)
Get the current site name. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentHelperImpl()
| Method Detail |
|---|
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 AgentHelper
public String getAgentString(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
req - the HttpServletRequestres - the HttpServletResponse
public String getDisplayName(String agentString)
getDisplayName in interface AgentHelperagentS - the Agent string.
public String getFirstName(String agentString)
getFirstName in interface AgentHelperagentString - teh agent string
public String getLastName(String agentString)
getLastName in interface AgentHelperagentString - the agent string
public String getEmail(String agentString)
getEmail in interface AgentHelperagentString - teh agent string
public String getRoleForCurrentAgent(String agentString)
getRoleForCurrentAgent in interface AgentHelperagentString - the agent string for current AgentFacade instance
public String getRole(String agentString)
getRole in interface AgentHelperagentString - the agent string
public 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 id
public 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 AgentHelper
public String getCurrentSiteIdFromExternalServlet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
req - the HttpServletRequestres - the HttpServletResponse
public 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 Strings
public String getRoleForAgentAndSite(String agentString,
String siteId)
getRoleForAgentAndSite in interface AgentHelperpublic boolean isFileUploadAvailable()
isFileUploadAvailable in interface AgentHelper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||