[Building Sakai] Get All Sites

Paul Lukasewych plukasew at uwo.ca
Fri May 17 07:06:53 PDT 2013


Hi Nguni,

I'm actually looking at the code for the Membership tool right now. It is 
using this call to retrieve the sites a user is a member of:

SiteService.getSites(org.sakaiproject.site.api.SiteService.SelectionType.ACCESS, 
null, null,null, org.sakaiproject.site.api.SiteService.SortType.TITLE_ASC, 
null);

The key piece seems to be 
"org.sakaiproject.site.api.SiteService.SelectionType.ACCESS"

This is documented in SiteService.java as:
/** Get sites that the current user has read access to (non-myWorkspace, non-
special). */

I'm not sure what "non-special" means.

Paul Lukasewych
Applications Development Team
Information Technology Services
Support Services Building
Western University
(519) 661-2111 x80513
plukasew at uwo.ca


On May 17, 2013 03:50:15 PM Nguni Phakela wrote:

Hi,


I want to list all the courses that belong to a user, just like in Site 
Membership.


I saw in the api that there is something like this:


getSites(SiteService.SelectionType type, Object ofType, String criteria, Map<String,String> propertyCriteria, SiteService.SortType sort, PagingPosition page) 


How do I use this method to be able to retrieve all the sites that a specific 
user belongs to?


Cheers,-- 
Nguni Phakela



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130517/ed686c9b/attachment.html 


More information about the sakai-dev mailing list