[Building Sakai] Get All Sites

Nguni Phakela nguni52 at gmail.com
Fri May 17 07:15:49 PDT 2013


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<http://source.sakaiproject.org/release/kernel/1.2.2/apidocs/org/sakaiproject/site/api/SiteService.html#getSites(org.sakaiproject.site.api.SiteService.SelectionType,%20java.lang.Object,%20java.lang.String,%20java.util.Map,%20org.sakaiproject.site.api.SiteService.SortType,%20org.sakaiproject.javax.PagingPosition)>
> (SiteService.SelectionType<http://source.sakaiproject.org/release/kernel/1.2.2/apidocs/org/sakaiproject/site/api/SiteService.SelectionType.html>
>  type, Object<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true>
>  ofType, String<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true>
>  criteria, Map<http://download.oracle.com/javase/1.5.0/docs/api/java/util/Map.html?is-external=true>
> <String<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true>
> ,String<http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true>
> > propertyCriteria, SiteService.SortType<http://source.sakaiproject.org/release/kernel/1.2.2/apidocs/org/sakaiproject/site/api/SiteService.SortType.html>
>  sort, PagingPosition<http://source.sakaiproject.org/release/kernel/1.2.2/apidocs/org/sakaiproject/javax/PagingPosition.html>
>  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130517/94135722/attachment.html 


More information about the sakai-dev mailing list