[Building Sakai] Web Service - Change Page Tool Order?
Benjamin Willard
developman at uniphix.com
Sat Jun 9 21:21:15 PDT 2012
So let me ask, I can add more Web Service calls to the SakaiScript? OR
whatever??? Because then I would do a lot of custom stuff as I need to?
Basically If I add this method below and adjust it for Tools I should be
able to do what I need?
Ben
From: Matthew Jones [mailto:matthew at longsight.com]
Sent: Saturday, June 09, 2012 9:13 PM
To: Benjamin Willard
Cc: sakai-dev at collab.sakaiproject.org
Subject: Re: [Building Sakai] Web Service - Change Page Tool Order?
No, unfortunately I don't see a webservice for this already. It looks like a
few functions setPosition, but none of them "setCustomPageOrdered".
It basically only should involve two calls, one of which is in
addNewPageToSite and the other is similar to addNewToolToAllWorkspaces.
Maybe combine a few functions and set it up like
public String movePageinSite(String sessionid, String siteid, String
pagetitle, int position) throws AxisFault
{
Session session = establishSession(sessionid);
try {
Site siteEdit = siteService.getSite(siteid);
List pageEdits = siteEdit.getPages();
int numPages = pageEdits.size();
for (Iterator i = pageEdits.iterator(); i.hasNext();)
{
SitePage pageEdit = (SitePage) i.next();
if (pageEdit.getTitle().equals(pagetitle))
{
if(position > numPages) {
position = numPages-1;
}
siteEdit.setCustomPageOrdered(true);
pageEdit.setPosition(position);
}
}
siteService.save(siteEdit)
}
catch (Exception e) {
LOG.error("WS movePageinSite(): " + e.getClass().getName() + " : "
+ e.getMessage());
return e.getClass().getName() + " : " + e.getMessage();
}
return "success";
}
On Sat, Jun 9, 2012 at 5:05 PM, Benjamin Willard <developman at uniphix.com>
wrote:
-----Original Message-----
From: Benjamin Willard [mailto:benw at needsmet.org]
Sent: Saturday, June 09, 2012 1:32 PM
To: 'sakai-dev at collab.sakaiproject.org'
Cc: 'Steve Sasser'; 'Chris Maurer'; 'Tim Krauss'
Subject: Web Service - Change Page Tool Order?
Is there a way to change the tool's page order using the Sakai Web Service?
I am doing an auto-generated copySite, and creating a special sakai.iframe
content page, that I need positioned in a certain order on the Sakai Site...
How can I change the page order for this?
Ben
_______________________________________________
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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120609/3e94623c/attachment.html
More information about the sakai-dev
mailing list