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?
|
boolean |
isStandaloneEnvironment()
Is this a standlaone environment?
|
public AgentImpl getAgent()
getAgent in interface AgentHelperpublic String getAgentString(String agentString)
getAgentString in interface AgentHelperpublic String getEid(String agentString)
getEid in interface AgentHelperpublic String getEidById(String agentString)
getEidById in interface AgentHelperagentS - the Agent Id string.public 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 - teh agent stringpublic String getEmail(String agentString)
getEmail in interface AgentHelperagentString - teh agent stringpublic String getRole(String agentString)
getRole in interface AgentHelperagentString - the agent string for an agentpublic String getRoleForCurrentAgent(String agentString)
getRoleForCurrentAgent in interface AgentHelperagentString - the agent string for current AgentFacade instancepublic String getCurrentSiteId(boolean accessViaUrl)
getCurrentSiteId in interface AgentHelperpublic String createAnonymous(AgentFacade agent)
createAnonymous 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 boolean isStandaloneEnvironment()
isStandaloneEnvironment in interface AgentHelperpublic boolean isIntegratedEnvironment()
isIntegratedEnvironment in interface AgentHelperpublic String getAnonymousId(String agentString)
getAnonymousId in interface AgentHelperpublic 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 agentString)
getDisplayId in interface AgentHelperagentString - the Agent Id string.Copyright © 2005-2014 Sakai Project. All Rights Reserved.