[Building Sakai] problem with toolManager.getCurrentPlacement

Stephen Marquard stephen.marquard at uct.ac.za
Mon Jun 22 02:18:07 PDT 2009


Hi,

getCurrentPlacement() is usable when it is called by code running in
the context of a /portal/tool/toolid/... http request.

Outside that (for example in service code called by some other process,
e.g. a maintenance thread or webservice) it's not set or meaningful.

Generally service code should not rely on getCurrentPlacement() as this
breaks the SOA paradigm (i.e. it makes the service code only usable from
the tool UI code).

Regards
Stephen

Stephen Marquard, Learning Technologies Co-ordinator
Centre for Educational Technology, University of Cape Town
http://www.cet.uct.ac.za
Email/IM/XMPP: stephen.marquard at uct.ac.za 
Phone: +27-21-650-5037 Cell: +27-83-500-5290 


>>> "Diego del Blanco Orobitg" <diego.delblanco at setival.com> 2009/06/22
09:44 AM >>>
Hi all,

      

      I'm developing a new Sakai tool to be able to import IMS QTI and
IMS
CP to Samigo, Mneme and Melete, respectively, through these three
tools
Services to do that.

      

      The problem I have is that toolManager.getCurrentPlacement is
null
and, thus, I cannot get siteId to know which is the current site I am
visiting. This makes Samigo, Mneme and Melete services not know to
which
site they have to associate imported files.

      

      I've been browsing into Sakai 2.6.x and kernel 1.0.x source code
and,
if I'm not wrong, currentPlacement is stored by ThreadLocalManagement
in a
HashMap. Using SessionManager.getCurrentToolSession().getPlacementId()
I can
get the index of HashMap but the object stored with that index is null
and
this is why

      ToolSession.getCurrentPlacement() returns null.

      

      I really don't know if it is a problem of tool configuration or
if I
am missing some libraries.

      

      Any help would be appreciated.

      

      Thank you very much in advance.

 

 

 

 

barrita


 <http://www.setival.com/> logo correo

Tlf: 902 05 06 02

Fax: 96 199 42 43

                

 

Diego del Blanco Orobitg

Director del Área de e-Learning y Nuevas Tecnologías 

 <mailto:diego.delblanco at setival.com> diego.delblanco at setival.com 

   Móvil: 653 683 489

 

  Oficinas de Valencia

  Parque Tecnológico – Edificio CEEI

  C/Benjamin Franklin, 12

  46980 Valencia

Este mensaje y sus archivos son confidenciales. No está permitida su
reproducción o distribución sin la autorización expresa de SETIVAL SCV.
Si
usted no es el destinatario previsto, cualquier uso, acceso o copia de
este
mensaje queda desautorizado. Si ha recibido este mensaje por error,
por
favor bórrelo e infórmenos por esta misma vía.

De acuerdo con la LSSICE y la LOPD, le comunicamos que sus datos
personales
y dirección de correo electrónico forman parte de un fichero
automatizado,
cuyo responsable es SETIVAL SCV, siendo la finalidad del fichero el
envío de
información de carácter comercial sobre nuestros servicios. Si lo
desea
puede ejercer los derechos de oposición, acceso,rectificación y
cancelación
de sus datos enviando un mensaje de correo electrónico a
<mailto:setival at setival.com> setival at setival.com indicando en el asunto
el
derecho que desea ejercitar. Gracias por su colaboración.

 



More information about the sakai-dev mailing list