public interface SakaiProxy
| Modifier and Type | Method and Description |
|---|---|
org.sakaiproject.authz.api.SecurityAdvisor |
addSiteUpdateSecurityAdvisor()
Adds a security advisor to allow site.update
|
boolean |
allowAccessAdminsSetBecomeUserPerm()
Returns a sakai.property: delegatedaccess.allow.accessadmin.set.allowBecomeUser (default true)
This property determines whether an Access Admin is able to set the advanced option permission
"allowBecomeUser".
|
void |
copyNewRole(String siteRef,
String copyRealm,
String copyRole,
String newRole)
Copy one role to another in an
AuthzGroup |
List<org.sakaiproject.site.api.Site> |
getAllSites()
returns all site's in Sakai
|
List<org.sakaiproject.site.api.Site> |
getAllSitesByPages(Map<String,String> propsMap,
int page,
int pageMax,
boolean orderByModifiedDate)
returns all sites in Sakai, but uses a paging mechanism
|
Set<org.sakaiproject.tool.api.Tool> |
getAllTools()
returns all available tools in Sakai Map: ToolId -> Tool Name
|
org.sakaiproject.authz.api.AuthzGroup |
getAuthzGroup(String siteRef)
Remove this role from the authz group and update the group.
|
org.sakaiproject.tool.api.Session |
getCurrentSession()
returns the user's current session
|
String |
getCurrentUserId()
Get current user id
|
Map<String,List<String>> |
getDelegatedAccessRealmOptions()
Returns a list of realm/role options for the shopping period role
first checks the sakai.property: delegatedaccess.realmoptions.delegatedaccess
if not found, defaults to: all site realm templates that start with "!
|
boolean |
getDisableShoppingTreeView()
returns a sakai.property for
delegatedaccess.disable.shopping.tree.view
|
boolean |
getDisableUserTreeView()
returns the setting for
delegatedaccess.disable.user.tree.view
|
String[] |
getHideRolesForInstructorViewAccess()
returns a list of hidden roles that an instructor shouldn't know have access to their site
delegatedaccess.siteaccess.instructorViewable.hiddenRoles
|
String[] |
getHomeTools()
returns sakai.properties setting of home tool ids
delegatedaccess.hometools
|
List<org.sakaiproject.user.api.User> |
getInstructorsForSite(String siteId)
returns a list of users who have site.upd permission for this site
|
String |
getRootName()
will return Sakai's name for the root of the hierarchy.
|
String[] |
getServerConfigurationStrings(String property)
Returns a list of Strings for the sakai.property
|
Map<String,List<String>> |
getShoppingRealmOptions()
Returns a list of realm/role options for the shopping period role
first checks the sakai.property: delegatedaccess.realmoptions.shopping
if not found, defaults to: all site realm templates that start with "!
|
org.sakaiproject.site.api.Site |
getSiteById(String siteRef)
Returns the site for that Id
|
org.sakaiproject.site.api.Site |
getSiteByRef(String siteRef)
Returns the site for the site ref
|
List<org.sakaiproject.site.api.Site> |
getSites(org.sakaiproject.site.api.SiteService.SelectionType type,
String search,
Map<String,String> propsMap)
Returns a list of sites based on the attributes sent in
|
String |
getSkinRepoProperty()
Wrapper for ServerConfigurationService.getString("skin.repo")
|
String[] |
getSubAdminOrderedRealmRoles()
returns a list of "realm:role;realm:role;" from highest to lowest level of access.
|
boolean |
getSyncMyworkspaceTool()
returns a sakai.property value for the setting: delegatedaccess.sync.myworkspacetool
true by default
|
String |
getTermField()
returns the systems term field based on a sakai.property (delegatedaccess.termfield)
default is term_eid
|
List<String[]> |
getTerms()
Returns a map (id, title) of terms either by the course management api or by the unique set of site propeties if you unset useCourseManagementApiForTerms
|
org.sakaiproject.tool.api.Tool |
getTool(String toolId)
returns the tool for the given tool id
|
String |
getToolSkinCSS(String skinRepo)
Gets the tool skin CSS first by checking the tool, otherwise by using the
default property.
|
org.sakaiproject.user.api.User |
getUser(String id)
returns a user for passed in userId
|
org.sakaiproject.user.api.User |
getUserByEid(String eid)
returns user by eid
|
Set<String> |
getUserMembershipForCurrentUser()
returns a list of site references that the current user has access to
|
boolean |
isActiveSiteFlagEnabled()
This requires an external quartz job that determines whether a site is active or not.
|
boolean |
isShoppingPeriodInstructorEditable()
returns true if delegatedaccess.shopping.instructorEditable is set to true, otherwise, false
|
boolean |
isShoppingTool()
returns true if this is the shopping period tool
|
boolean |
isSuperUser()
Is the current user a superUser?
|
boolean |
isUserInstructor(String userId,
String siteId)
returns true only if the user is a member of the site and has site.upd permission
|
Map<String,String> |
isUserMember(String userId,
Collection<String> siteRefs)
returns a map of site ref -> role.
|
boolean |
isUserMember(String userId,
String siteRef)
returns true if the user is a member of the site
|
void |
popSecurityAdvisor(org.sakaiproject.authz.api.SecurityAdvisor advisor)
pops the site.update security advisor
|
void |
postEvent(String event,
String reference,
boolean modify)
Post an event to Sakai
|
void |
refreshCurrentUserAuthz()
call authzGroupService.refreshUser for current user
|
void |
removeRoleFromAuthzGroup(org.sakaiproject.authz.api.AuthzGroup group,
org.sakaiproject.authz.api.Role role)
Delete an
AuthzGroup in Sakai |
void |
saveSite(org.sakaiproject.site.api.Site site)
Save a Sakai site via the SiteService.
|
List<org.sakaiproject.user.api.User> |
searchUsers(String search)
user's Sakai userDirectoryService to search for users
|
void |
sendEmail(String subject,
String body)
Sends an email
|
void |
setSessionUserId(String userId)
Sets the current session userId
|
boolean |
useCourseManagementApiForTerms()
default is true
if this is true, then the term options will be loaded from the CourseManagement API,
otherwise, a distinct query will be ran against site properties based on the
term field
delegatedaccess.term.useCourseManagmentApi
|
String getCurrentUserId()
boolean isSuperUser()
void postEvent(String event, String reference, boolean modify)
event - name of eventreference - referencemodify - true if something changed, false if just accessString getSkinRepoProperty()
String getToolSkinCSS(String skinRepo)
the - location of the skin repoorg.sakaiproject.tool.api.Session getCurrentSession()
List<org.sakaiproject.site.api.Site> getAllSites()
List<org.sakaiproject.site.api.Site> getAllSitesByPages(Map<String,String> propsMap, int page, int pageMax, boolean orderByModifiedDate)
propsMap - can be null or send over props to filter sites onpage - Page to start from (1 based)pageMax - maximum number of sites per pageorderByModifiedDate - List<org.sakaiproject.user.api.User> searchUsers(String search)
search - first - last - org.sakaiproject.site.api.Site getSiteByRef(String siteRef)
siteRef - org.sakaiproject.site.api.Site getSiteById(String siteRef)
siteRef - void saveSite(org.sakaiproject.site.api.Site site)
site - String getRootName()
String[] getServerConfigurationStrings(String property)
property - Map<String,List<String>> getShoppingRealmOptions()
Map<String,List<String>> getDelegatedAccessRealmOptions()
void refreshCurrentUserAuthz()
Set<org.sakaiproject.tool.api.Tool> getAllTools()
Set<String> getUserMembershipForCurrentUser()
org.sakaiproject.authz.api.AuthzGroup getAuthzGroup(String siteRef)
siteRef - role - void removeRoleFromAuthzGroup(org.sakaiproject.authz.api.AuthzGroup group,
org.sakaiproject.authz.api.Role role)
AuthzGroup in Sakaiid - void copyNewRole(String siteRef, String copyRealm, String copyRole, String newRole)
AuthzGroupsiteRef - copyRealm - copyRole - newRole - org.sakaiproject.authz.api.SecurityAdvisor addSiteUpdateSecurityAdvisor()
void popSecurityAdvisor(org.sakaiproject.authz.api.SecurityAdvisor advisor)
advisor - List<org.sakaiproject.site.api.Site> getSites(org.sakaiproject.site.api.SiteService.SelectionType type, String search, Map<String,String> propsMap)
type - search - propsMap - boolean isShoppingTool()
String getTermField()
String[] getHomeTools()
boolean useCourseManagementApiForTerms()
List<String[]> getTerms()
boolean getDisableUserTreeView()
boolean getDisableShoppingTreeView()
org.sakaiproject.user.api.User getUser(String id)
id - boolean isUserInstructor(String userId, String siteId)
userId - siteId - boolean isShoppingPeriodInstructorEditable()
boolean isUserMember(String userId, String siteRef)
userId - siteRef - List<org.sakaiproject.user.api.User> getInstructorsForSite(String siteId)
siteId - boolean getSyncMyworkspaceTool()
org.sakaiproject.tool.api.Tool getTool(String toolId)
toolId - String[] getHideRolesForInstructorViewAccess()
Map<String,String> isUserMember(String userId, Collection<String> siteRefs)
userId - siteRefs - String[] getSubAdminOrderedRealmRoles()
boolean isActiveSiteFlagEnabled()
void setSessionUserId(String userId)
userId - boolean allowAccessAdminsSetBecomeUserPerm()
org.sakaiproject.user.api.User getUserByEid(String eid)
eid - Copyright © 2003-2016 Sakai Project. All Rights Reserved.