[Building Sakai] How to get siteId from a SAKAI tool

Aaron Zeckoski aaronz at vt.edu
Fri Apr 3 13:00:20 PDT 2009


That is the right way to do it. Where are you executing this? If you
run it outside of a request (like in some quartz job) then you will
end up getting nothing but otherwise you should get the current site.
http://bugs.sakaiproject.org/confluence/display/BOOT/Using+the+ToolManager+Service
-AZ


On Fri, Apr 3, 2009 at 7:33 PM, Luiz Antonio Falaguasta Barbosa
<lafbarbosa at gmail.com> wrote:
> Ho people,
>
> Please, I need to take siteId to be used in a SAKAI tool.
>
> I've tried in this way:
>
> Placement placement = ToolManager.getCurrentPlacement();
> String siteid = placement.getContext();
>
> and got null for siteId(String siteid = placement.getContext();).
>
> Please, could somebody help me?
>
> Thanks in advance!
>
> Luiz
>
> _______________________________________________
> sakai-dev mailing list
> 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
> with a subject of "unsubscribe"
>
>



-- 
Aaron Zeckoski (aaronz at vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]


More information about the sakai-dev mailing list