|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SakaiProxy
An interface to abstract all Sakai related API calls in a central method that can be injected into our app.
| Method Summary | |
|---|---|
org.sakaiproject.authz.api.SecurityAdvisor |
addSiteUpdateSecurityAdvisor()
Adds a security advisor to allow site.update |
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 "!site." |
boolean |
getDisableShoppingTreeView()
returns a sakai.property for delegatedaccess.disable.shopping.tree.view |
boolean |
getDisableUserTreeView()
returns the setting for delegatedaccess.disable.user.tree.view |
String[] |
getHomeTools()
returns sakai.properties setting of home tool ids delegatedaccess.hometools |
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 "!site." |
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 |
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 |
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 |
Set<String> |
getUserMembershipForCurrentUser()
returns a list of site references that the current user has access to |
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 |
isShowTermColumnAccess()
default is true, otherwise looks up sakai.property delegatedaccess.showtermcolumn.access |
boolean |
isShowTermColumnShopping()
default is true, otherwise looks up sakai.property delegatedaccess.showtermcolumn.shopping |
boolean |
isSuperUser()
Is the current user a superUser? (anyone in admin realm) |
boolean |
isUserInstructor(String userId,
String siteId)
returns true only if the user is a member of the site and has site.upd permission |
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 |
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 |
| Method Detail |
|---|
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 repo
org.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 Sakai
id -
void copyNewRole(String siteRef,
String copyRealm,
String copyRole,
String newRole)
AuthzGroup
siteRef - 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 isShowTermColumnShopping()
boolean isShowTermColumnAccess()
boolean useCourseManagementApiForTerms()
List<String[]> getTerms()
void sendEmail(String subject,
String body)
subject - body - 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 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||