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

Matthew Jones matthew at longsight.com
Sat Jun 9 21:25:57 PDT 2012


Ideally, for custom stuff you'd create another jws file. Just dump all the
imports on top you want, put it in a class with the same name as that file,
have a constructor that uses ComponentManager to get whatever components
you need and be off! You can put them right into this file too, but it can
be more confusing for an updated.

If you did make good methods, you could file a jira on
jira.sakaiproject.orgthen we could include them in the official script
for later versions. I
believe that ideally if there ever was a "Sakai Script 2.0" that some of
these might be re-factored anyway into separate files. (Like Gradebook.jws,
Assignment.jws, ContentManagement.jws, etc)

On Sun, Jun 10, 2012 at 12:21 AM, Benjamin Willard
<developman at uniphix.com>wrote:

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


More information about the sakai-dev mailing list