[Building Sakai] Web Service - Change Page Tool Order?

Matthew Jones matthew at longsight.com
Sat Jun 9 21:13:11 PDT 2012


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/20120610/08145662/attachment.html 


More information about the sakai-dev mailing list