[Building Sakai] Tool placement id
Jaques Smith
jaques at psybergate.co.za
Thu Apr 29 08:12:59 PDT 2010
Thanks Mark,
I'll have a look at this.
Jaques
-----Original Message-----
From: Mark Norton [mailto:markjnorton at earthlink.net]
Sent: 29 April 2010 04:01 PM
To: Jaques Smith
Cc: Matthew Buckett; sakai-dev at collab.sakaiproject.org
Subject: Re: [Building Sakai] Tool placement id
Depending on what you're trying to accomplish, a servlet may not even
need a placement. If the servlet is a REST processor, for example, it
doesn't need to be registered as a Sakai tool and have a placement.
OTOH, if the servlet is generating a UI in response to requests and
needs to be visible in the Sakai portal, then it will need a tool id and
placement. For example of a REST handler with no tool id that runs in
Sakai, see https://source.sakaiproject.org/contrib/softchalk/trunk.
- Mark Norton
Jaques Smith wrote:
> Thanks Matthew,
>
> Yes it looks like the placement id only exist after placement, makes sense. I want to use the tool though a Servlet and that must be in the context of the portal. So I need the url http://sakai/portal/<placement-id-here>/myservlet.
>
> Jaques
>
> -----Original Message-----
> From: Matthew Buckett [mailto:matthew.buckett at oucs.ox.ac.uk]
> Sent: 29 April 2010 03:21 PM
> To: Jaques Smith
> Cc: sakai-dev at collab.sakaiproject.org
> Subject: Re: [Building Sakai] Tool placement id
>
> On 29 April 2010 14:06, Jaques Smith <jaques at psybergate.co.za> wrote:
>
>> We need the tool placement id. Is it possible to get the tool placement id
>> without the tool being added to a site?
>>
>
> I think the placement is only generated when the tool is added to the
> page. Could you expand on why you need the placement of a tool that
> doesn't yet exist?
>
>
>> And what if the tool is hidden? Is
>> there another way to get the id from anywhere in sakai, or out, except
>> toolManager.getCurrentPlacement().getId()?
>>
>
> The org.sakaiproject.site.api.ToolConfiguration class extends
> placement and is can be got from a Site:
>
> Site site = SiteService.getSite("!gateway");
> Collection<ToolConfiguration> toolConfigs = site.getTools(new
> String[]{"sakai.createuser"});
> for (ToolConfiguration toolConfig: toolConfigs) {
> log.warn("Found placement of: "+ toolConfig.getId())
> }
>
> You can also get all the pages (SitePage) from a site and then find
> the placements in the pages.
>
>
=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 7.0.0.18, Virus/Spyware Database: 6.14890)
http://www.pctools.com/
=======
More information about the sakai-dev
mailing list