[Building Sakai] how to create groups in project site using JAVA source code?

Jehan jeehaaan at gmail.com
Thu Sep 8 03:56:39 PDT 2011


Dear Miguel

 siteService ( org.sakaiproject.site.api.SiteService)  is only accessible in
sakai framework (or in sakai tool)

I want to create group using a standalone java application (jar file)



Regards
------------------------


On Thu, Sep 8, 2011 at 3:51 PM, Miguel Carro Pellicer <
farreri.sakai at gmail.com> wrote:

>  Code example:
> //imports
> import org.sakaiproject.site.api.Group;
> import org.sakaiproject.site.api.Site;
> import org.sakaiproject.site.api.SiteService;
>
> //definitions
> String someSiteId = "XXXXXXXX";
> String someUserId = "YYYYYYYY";
> String someProfile = "maintain";
>
> //code example
> Site site = siteService.getSite(someSiteId);
> Group newGroup = site.addGroup();
> newGroup.setTitle("Some Title");
> newGroup.addMember(someUserId someProfile,true,false);
> siteService.save(site);
>
> Remember to import SiteService correctly through Spring or
> ComponentManager.
>
> Regards, Miguel.
>
> El 08/09/2011 12:42, Jehan escribió:
>
> Dear All
>
>  We have integrated SAKAI with our existing student information system,
> and we are synchronizing SAKAI by running executable JARs.
>
>  My problem is how to create groups in project site using JAVA source
> code?
>
>
>  Regards
> ----------------------
>
>
>
>
>
> _______________________________________________
> sakai-dev mailing listsakai-dev at collab.sakaiproject.orghttp://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
>
> --
>
> [image: cid:image001.jpg at 01C9F98A.71C74E60]**** <http://www.samoo.es/>
>
> ** ** <http://www.samoo.es/>
>
> *Miguel Carro Pellicer*
>
> *Technical Manager - Director técnico*
>
> miguel.carro at samoo.es****
>
> +34 - 96 393 69 15****
>
> www.samoo.es****
>
> ** **
>
> Este  correo  y  sus archivos asociados son privados y confidenciales y va
> dirigido  exclusivamente  a su destinatario. Si recibe este correo sin ser
> el  destinatario del mismo, le rogamos proceda a su eliminación y lo ponga
> en  conocimiento del emisor. La difusión por cualquier medio del contenido
> de  este  correo podría ser sancionada conforme a lo previsto en las leyes
> españolas, Ley Orgánica 15/1999 de Protección de Datos de Carácter
> Personal.  No  se autoriza la utilización con fines comerciales o para su
> incorporación a ficheros automatizados de las direcciones del emisor o del
> destinatario.”****
>
> ** **
>
> This mail and its attached files are confidential and are only and
> exclusively intended to their addressee. In case you may receive this mail
> not being its addressee, we beg you to let us know the error by reply and to
> proceed to destroy it. The circulation by any mean of this mail could be
> penalised in accordance with the Spanish legislation. Is not allowed the use
> of both, the transmitter and the addressee’s, address with a commercial aim,
> or in order to be incorporated to automated data process or to any kind of
> files. ****
>
> ** **
>
> P Antes de imprimir este correo electrónico piense bien si es necesario
> hacerlo. El medioambiente es cosa de todos.****
>
> ** **
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110908/68fa6339/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3022 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110908/68fa6339/attachment.jpe 


More information about the sakai-dev mailing list