[Building Sakai] Create a site by Sakai API

Phuc Bui phucbui2006 at yahoo.com.vn
Sat Jul 11 19:05:22 PDT 2009


Dear all,

I use class org.sakaiproject.site.api.SiteService to create a site.

But I do not know how to publish this site, and add some default tool for it
(ex: Home, SiteInfo, Announcement .) (of course, all works should be done by
Sakai API). I tried this class - org.sakaiproject.tool.api.ToolManager, and
see the method register(Tool tool), but I don't know how to use it ?

I have a part of code:

 

Site addedSite = siteService.addSite(siteId, siteType);

addedSite.setDescription("create by NLU Tool as a demo");

addedSite.setJoinable(true);

addedSite.setJoinerRole("student");

addedSite.setTitle("Demo site created by NLU Tool");

              

siteService.allowAccessSite(addedSite.getId());

siteService.save(addedSite);

 

I did it, but the site that was created by this method did not have the
title and description like this ?

 

Looking forward to your replies,

Thanks,

Phuc Bui

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


More information about the sakai-dev mailing list