[Building Sakai] Get All Sites

Noah Botimer botimer at umich.edu
Tue May 28 10:11:31 PDT 2013


This is probably a bit outdated, since I forgot to send it along...

There is also a new getUserSites method on SiteService as of KNL-1011. This is not yet in 2.9.x, but we are planning to put it into 2.9.3 upon some further validation. 

The new method simplifies the interface some since getSites is quite complex. It also does some caching for performance. Please note that it is only for the current user, though, so it will be wrong for some needs.

Thanks,
-Noah

On May 17, 2013, at 10:15 AM, Nguni Phakela wrote:

> Hi Paul,
> 
> Great. I wasn't sure what the ACCESS was for. I will try it and see how it works out.
> 
> Thank you,
> Nguni
> 
> 
> On Fri, May 17, 2013 at 4:06 PM, Paul Lukasewych <plukasew at uwo.ca> wrote:
> 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
> 
> 
> 
> 
> 
> -- 
> Nguni Phakela
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

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


More information about the sakai-dev mailing list