public interface ExternalLogic
| Modifier and Type | Method and Description |
|---|---|
String |
getCurrentLocationId() |
String |
getCurrentLocationReference() |
ToolSession |
getCurrentToolSession()
Needed to invoke helper tools
|
String |
getCurrentUserId() |
String |
getCurrentuserReference()
Get the current user reference (/user/admin)
|
TimeZone |
getLocalTimeZone()
get the correct Timezone for the the current user
|
List<String> |
getPermissionKeys()
Get a list of the permission keys for the tool
|
List<String> |
getRoleIdsInRealm(String realmId)
Get a list of RoleIds in a the given realms
|
Map<String,PollRolePerms> |
getRoles(String locationReference)
Get the Roles in a site
|
String |
getSiteRefFromId(String siteId)
Get a site reference "/site/ABCD from its id (ABCD)
|
List<String> |
getSitesForUser(String userId,
String permission)
Get the sites users is a member of
|
String |
getSiteTile(String siteId) |
String |
getUserEidFromId(String userId)
Given a userId, return the associated userEid
|
boolean |
isAllowedInLocation(String permission,
String locationReference)
is the current user allowed to perform the action in the current location?
|
boolean |
isAllowedInLocation(String permission,
String locationReference,
String userRefence)
is the current user allowed to perform the action in the current location?
|
boolean |
isMobileBrowser()
Is the current user using a mobile browser?
|
boolean |
isResultsChartEnabled()
Are charts enabled on the results page?
|
boolean |
isRoleAllowedInRealm(String roleId,
String realmId,
String permission)
is the role allowed to perform the function in the given realm?
|
boolean |
isShowPublicAccess()
Are the public access options available to the Instructor?
|
boolean |
isUserAdmin()
Check if the current user has super admin access
|
boolean |
isUserAdmin(String userId)
Check if this user has super admin access
|
void |
notifyDeletedOption(List<String> userEids,
String siteTitle,
String pollQuestion)
Notify a list of users that an option they voted for in a poll has been deleted.
|
void |
postEvent(String eventId,
String reference,
boolean modify)
Post a new event to the event tracking service
|
void |
registerFunction(String function)
Register a function with the Sakai Function manager
|
void |
registerStatement(String pollText,
boolean newPoll)
Register a statement with the system LearningResourceStoreService
|
void |
registerStatement(String pollText,
Vote vote)
Register a statement with the system LearningResourceStoreService
|
void |
setToolPermissions(Map<String,PollRolePerms> permMap,
String locationReference)
Set the tool permissions for the given location
|
boolean |
userIsViewingAsRole()
is the user using the "view as ..." feature
|
boolean isUserAdmin(String userId)
userId - the internal user id (not username)boolean isUserAdmin()
userId - the internal user id (not username)String getCurrentLocationId()
String getCurrentLocationReference()
String getCurrentUserId()
String getCurrentuserReference()
String getUserEidFromId(String userId)
userId - The userIdboolean isAllowedInLocation(String permission, String locationReference)
permission - locationReference - boolean isAllowedInLocation(String permission, String locationReference, String userRefence)
permission - locationReference - the - userList<String> getSitesForUser(String userId, String permission)
userId - permission - void postEvent(String eventId, String reference, boolean modify)
eventId - reference - does - the event modify state?void registerFunction(String function)
function - TimeZone getLocalTimeZone()
List<String> getRoleIdsInRealm(String realmId)
RealmId - boolean isRoleAllowedInRealm(String roleId, String realmId, String permission)
RoleId - realmId - String getSiteRefFromId(String siteId)
siteId - void setToolPermissions(Map<String,PollRolePerms> permMap, String locationReference) throws SecurityException, IllegalArgumentException
permMap - locationReference - SecurityExceptionIllegalArgumentExceptionMap<String,PollRolePerms> getRoles(String locationReference)
locationReference - boolean userIsViewingAsRole()
void notifyDeletedOption(List<String> userEids, String siteTitle, String pollQuestion)
userEids - A List of user EID's that identify the users to be notifiedpollQuestion - The text of the poll whose option was deletedsiteTitle - The title of the site that owns the option's pollToolSession getCurrentToolSession()
boolean isResultsChartEnabled()
boolean isShowPublicAccess()
boolean isMobileBrowser()
List<String> getPermissionKeys()
void registerStatement(String pollText, Vote vote)
void registerStatement(String pollText, boolean newPoll)
Copyright © 2003–2016 Sakai Project. All rights reserved.