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

DAVID ROLDAN MARTINEZ darolmar at upvnet.upv.es
Thu Sep 8 04:15:22 PDT 2011


I don't think so. If you run your app in the same context that Sakai, you should be able to inject siteService in your app via Spring, shouldn't you? I'm not sure...

De: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-bounces at collab.sakaiproject.org] En nombre de Miguel Carro Pellicer
Enviado el: jueves, 08 de septiembre de 2011 13:01
Para: Jehan
CC: sakai-dev at collab.sakaiproject.org
Asunto: Re: [Building Sakai] how to create groups in project site using JAVA source code?

Well, then i recommend you to use webservices in your application to communicate with Sakai API. If some webservices are not available, implement custom webservices.

Also i recommend to use Sakai API instead of SQL sentences.

How do you create Sakai objects with your external APP?

Regards, Miguel.

El 08/09/2011 12:56, Jehan escribió:
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<mailto: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 list

sakai-dev at collab.sakaiproject.org<mailto: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<mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"

--
[cid:image001.jpg at 01CC6E29.5D309040]<http://www.samoo.es/>
 <http://www.samoo.es/>
Miguel Carro Pellicer
Technical Manager - Director técnico
miguel.carro at samoo.es<mailto:miguel.carro at samoo.es>
+34 - 96 393 69 15<tel:%2B34%20-%2096%20393%2069%2015>
www.samoo.es<http://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.




--

[cid:image001.jpg at 01CC6E29.5D309040]<http://www.samoo.es/>
 <http://www.samoo.es/>
Miguel Carro Pellicer
Technical Manager - Director técnico
miguel.carro at samoo.es<mailto:miguel.carro at samoo.es>
+34 - 96 393 69 15
www.samoo.es<http://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/6f9d1dc7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3022 bytes
Desc: image001.jpg
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110908/6f9d1dc7/attachment.jpg 


More information about the sakai-dev mailing list