Author: ruchira
Date: Mon Aug 17 11:45:27 2009
New Revision: 43579
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=43579

Log:
Fixing JIRA MASHUP-1238


Modified:
   trunk/mashup/java/modules/samples/RESTSample/RESTSample.js
   trunk/mashup/java/modules/samples/TwitterMap/TwitterMap.js
   trunk/mashup/java/modules/samples/digit2image/digit2image.js
   trunk/mashup/java/modules/samples/exchangeRate/exchangeRate.js
   trunk/mashup/java/modules/samples/feedCache/feedCache.js
   trunk/mashup/java/modules/samples/formulaFlicks/formulaFlicks.js
   trunk/mashup/java/modules/samples/storexml/storexml.js
   trunk/mashup/java/modules/samples/sudoku/sudoku.js
   trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
   trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js
   trunk/mashup/java/modules/samples/yahooGeoCode/yahooGeoCode.js

Modified: trunk/mashup/java/modules/samples/RESTSample/RESTSample.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/RESTSample/RESTSample.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/RESTSample/RESTSample.js  (original)
+++ trunk/mashup/java/modules/samples/RESTSample/RESTSample.js  Mon Aug 17 
11:45:27 2009
@@ -15,59 +15,59 @@
  */
 
 this.documentation =
-    <div>The RESTSample service demonstrate the use of httpmethod and 
httpLocation annotations to develop RESTy mashups.</div>;
-this.scope="application";
+<div>The RESTSample service demonstrate the use of httpmethod and httpLocation 
annotations to develop RESTy mashups.</div>;
+this.scope = "application";
 
 getWeather.safe = true;
 getWeather.httpMethod = "GET";
 getWeather.httpLocation = "weather/{city}";
 getWeather.inputTypes = "string";
 getWeather.outputType = "string";
-function getWeather(city){
-var details = session.get(city);
-if (details == null) {
-   throw ("Cannot find weather details of city " + city + ".")
-}
-return details;
+function getWeather(city) {
+    var details = session.get(city);
+    if (details == null) {
+        throw ("Cannot find weather details of city " + city + ".")
+    }
+    return details;
 }
 
 POSTWeather.httpMethod = "POST";
 POSTWeather.httpLocation = "weather/{city}";
 POSTWeather.inputTypes = {"city" : "string",
-"weatherDetails" : "string"};
+    "weatherDetails" : "string"};
 POSTWeather.outputType = "string";
-function POSTWeather(city, weatherDetails){
-var details = session.get(city);
-if (details != null) {
-   throw ("Weather details of city " + city + " already exists.")
-}
-session.put(city ,weatherDetails);
-return city;
+function POSTWeather(city, weatherDetails) {
+    var details = session.get(city);
+    if (details != null) {
+        throw ("Weather details of city " + city + " already exists.")
+    }
+    session.put(city, weatherDetails);
+    return city;
 }
 
 DeleteWeather.httpMethod = "DELETE";
 DeleteWeather.httpLocation = "weather/{city}";
 DeleteWeather.inputTypes = "string";
 DeleteWeather.outputType = "string";
-function DeleteWeather(city){
-var details = session.get(city);
-if (details == null) {
-   throw ("Cannot find weather details of city " + city + " to delete.")
-}
-session.remove(city);
-return city;
+function DeleteWeather(city) {
+    var details = session.get(city);
+    if (details == null) {
+        throw ("Cannot find weather details of city " + city + " to delete.")
+    }
+    session.remove(city);
+    return city;
 }
 
 PUTWeather.httpMethod = "PUT";
 PUTWeather.httpLocation = "weather/{city}";
 PUTWeather.inputTypes = {"city" : "string",
-"weatherDetails" : "string"};
+    "weatherDetails" : "string"};
 PUTWeather.outputType = "string";
-function PUTWeather(city, weatherDetails){
-var details = session.get(city);
-if (details == null) {
-   throw ("Cannot find weather details of city " + city + " to update.")
-}
-session.put(city ,weatherDetails);
-return city;
+function PUTWeather(city, weatherDetails) {
+    var details = session.get(city);
+    if (details == null) {
+        throw ("Cannot find weather details of city " + city + " to update.")
+    }
+    session.put(city, weatherDetails);
+    return city;
 }

Modified: trunk/mashup/java/modules/samples/TwitterMap/TwitterMap.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/TwitterMap/TwitterMap.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/TwitterMap/TwitterMap.js  (original)
+++ trunk/mashup/java/modules/samples/TwitterMap/TwitterMap.js  Mon Aug 17 
11:45:27 2009
@@ -22,6 +22,8 @@
 
 
 fetchTwitterMap.documentation = "Fetches the list of recent Tweets. Requires 
Twitter authentication for 'Friends Only' mode." ;
+fetchTwitterMap.httpMethod = "POST";
+fetchTwitterMap.httpLocation = "fetchTwitterMap";
 fetchTwitterMap.inputTypes = {"isFriendsOnly" : "boolean", "username" : 
"string", "password" : "string"};
 fetchTwitterMap.outputType = "xml";
 function fetchTwitterMap(isFriendsOnly, username, password){
@@ -33,6 +35,8 @@
 }
 
 validateTwitterLogin.documentation = "Validates a username/password 
combination from Twitter." ;
+validateTwitterLogin.httpMethod = "POST";
+validateTwitterLogin.httpLocation = "validateTwitterLogin";
 validateTwitterLogin.inputTypes = {"username" : "string", "password" : 
"string"};
 validateTwitterLogin.outputType = "xml";
 function validateTwitterLogin(username, password){

Modified: trunk/mashup/java/modules/samples/digit2image/digit2image.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/digit2image/digit2image.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/digit2image/digit2image.js        
(original)
+++ trunk/mashup/java/modules/samples/digit2image/digit2image.js        Mon Aug 
17 11:45:27 2009
@@ -42,6 +42,8 @@
     Except for "original" size, which returns the original format, all links 
are to JPEGs.
     </div>;
 digit2image.safe = true;
+digit2image.httpMethod = "GET";
+digit2image.httpLocation = "digit2image/{digit}/{size}";
 digit2image.inputTypes = {"digit" : "0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9", 
"size" : "small | thumbnail | medium | normal | big | original"}; // MASHUP-303 
"small | thumbnail | medium | normal | big | original"
 digit2image.outputType = "xs:anyURI";
 

Modified: trunk/mashup/java/modules/samples/exchangeRate/exchangeRate.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/exchangeRate/exchangeRate.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/exchangeRate/exchangeRate.js      
(original)
+++ trunk/mashup/java/modules/samples/exchangeRate/exchangeRate.js      Mon Aug 
17 11:45:27 2009
@@ -29,6 +29,8 @@
             <p>Note : The currency codes are case sensitive.</p>
     </div>;
 convert.safe = true;
+convert.httpMethod = "GET";
+convert.httpLocation = "convert/{fromCurrency}/{toCurrency}";
 convert.inputTypes = { "fromCurrency" : "string", "toCurrency" : "string" };
 convert.outputType = "string";
 
@@ -74,4 +76,4 @@
        
     return rate;
 }
- 
\ No newline at end of file
+ 

Modified: trunk/mashup/java/modules/samples/feedCache/feedCache.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/feedCache/feedCache.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/feedCache/feedCache.js    (original)
+++ trunk/mashup/java/modules/samples/feedCache/feedCache.js    Mon Aug 17 
11:45:27 2009
@@ -27,7 +27,9 @@
 cacheSettings.documentation = <div>Set the caching properties for a feed.
                                 <b>prefetch</b> determines whether the feed 
should be fetched regularly in the background (true), or only on demand (false).
                                 <b>lifespan</b> is the number of milliseconds 
that the feed should be cached; when prefetch=true, this is the refresh 
interval,
-                                when prefetch=false, this is how long a cached 
version should be used until it is considered stale.</div>;
+                                when prefetch=false, this is how long a cached 
version should be used until it is considered stale.</div>;
+cacheSettings.httpMethod = "POST";
+cacheSettings.httpLocation = "cacheSettings";
 cacheSettings.inputTypes = {"feedUrl" : "xs:anyURI", "lifespan" : "number", 
"prefetch" : "boolean"};
 cacheSettings.outputType = "boolean";
 function cacheSettings(feedUrl, lifespan, prefetch) {
@@ -71,7 +73,9 @@
 }
 
 feedReference.documentation = <div>Return a local reference to a cached feed.  
If the feed is stale, it will be refreshed.
-                              If the feed has not been cached before, it will 
be using the default settings of no prefetching, cache lifespan 24 hours.</div>;
+                              If the feed has not been cached before, it will 
be using the default settings of no prefetching, cache lifespan 24 hours.</div>;
+feedReference.httpMethod = "GET";
+feedReference.httpLocation = "feedReference/{feedUrl}";
 feedReference.inputTypes = {"feedUrl" : "xs:anyURI"};
 feedReference.outputType = "xs:anyURI";
 feedReference.safe = true;
@@ -125,7 +129,9 @@
 
 feedContent.documentation = <div>Return the XML representation of the feed 
directly (updating the cache in the process).
                               If the feed is stale, it will be refreshed.
-                              If the feed has not been cached before, it will 
be using the default settings of no prefetching, cache lifespan 24 hours.</div>;
+                              If the feed has not been cached before, it will 
be using the default settings of no prefetching, cache lifespan 24 hours.</div>;
+feedContent.httpMethod = "GET";
+feedContent.httpLocation = "feedContent/{feedUrl}";
 feedContent.inputTypes = {"feedUrl" : "xs:anyURI"};
 feedContent.outputType = "#raw";
 feedContent.safe = true;
@@ -190,4 +196,4 @@
     f.openForWriting();
     f.write(data.toXMLString());
     f.close();
-}
\ No newline at end of file
+}

Modified: trunk/mashup/java/modules/samples/formulaFlicks/formulaFlicks.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/formulaFlicks/formulaFlicks.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/formulaFlicks/formulaFlicks.js    
(original)
+++ trunk/mashup/java/modules/samples/formulaFlicks/formulaFlicks.js    Mon Aug 
17 11:45:27 2009
@@ -116,7 +116,9 @@
 
 currentRace.documentation = 
     <div>Scrapes the last element of a given list of similarly formatted 
strings. Input should be CSS class used to format list items.</div>;
-currentRace.safe = true;
+currentRace.safe = true;
+currentRace.httpMethod = "GET";
+currentRace.httpLocation = "currentRace/{targetStyle}";
 currentRace.inputTypes = { "targetStyle" : "string" };
 currentRace.outputType = "string";
 

Modified: trunk/mashup/java/modules/samples/storexml/storexml.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/storexml/storexml.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/storexml/storexml.js      (original)
+++ trunk/mashup/java/modules/samples/storexml/storexml.js      Mon Aug 17 
11:45:27 2009
@@ -30,6 +30,8 @@
     removal of the element.  This operation returns a copy of the XML element
     stored (when successful) or a <fault/> element when it fails.  If the name
     already exists, the XML associated with it is replaced by the submitted 
value.</div>;
+store.httpMethod = "GET";
+store.httpLocation = "store/{name}/{value}";
 store.inputTypes = {"name" : "string", "value" : "any"};
 store.outputType = "any";
 function store(name, value) {
@@ -53,6 +55,8 @@
     a copy of the requested XML element (when successful) or a 
     <fault/> element when it fails (e.g. no element has been stored with that
     name).</div>;
+retrieve.httpMethod = "GET";
+retrieve.httpLocation = "retrieve/{name}";
 retrieve.inputTypes = {"name" : "string"};
 retrieve.outputType = "any";
 retrieve.safe = true;
@@ -74,6 +78,8 @@
     using the "name" under which the element was stored.  This operation 
returns 
     a copy of the XML element that has just been deleted (when successful) or 
a 
     <fault/> element when it fails.</div>;
+remove.httpMethod = "GET";
+remove.httpLocation = "remove/{name}";
 remove.inputTypes = {"name" : "string"};
 remove.outputType = "any";
 function remove(name) {

Modified: trunk/mashup/java/modules/samples/sudoku/sudoku.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/sudoku/sudoku.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/sudoku/sudoku.js  (original)
+++ trunk/mashup/java/modules/samples/sudoku/sudoku.js  Mon Aug 17 11:45:27 2009
@@ -119,6 +119,8 @@
     &lt;symmetrical&gt;<b>true</b> | false&lt;/symmetrical&gt; ?
 &lt;/options&gt; ?</pre></div>;
 newpuzzle.safe = true;
+newpuzzle.httpMethod = "POST";
+newpuzzle.httpLocation = "newpuzzle";
 newpuzzle.inputTypes = {"options" : "xml?"};
 newpuzzle.outputType = "xml";
 

Modified: trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js  (original)
+++ trunk/mashup/java/modules/samples/tomatoTube/tomatoTube.js  Mon Aug 17 
11:45:27 2009
@@ -34,6 +34,8 @@
                                    "The current expected inputs are 'theater' 
and 'dvd'. " +
                                    "The mashed up feed is written to a file in 
the workspace directory";
 readTomatoTubeFeed.safe = true;
+readTomatoTubeFeed.httpMethod = "GET";
+readTomatoTubeFeed.httpLocation = "readTomatoTubeFeed/{mode}";
 readTomatoTubeFeed.inputTypes = { "mode" : "string" };
 readTomatoTubeFeed.outputType = "xml";
 
@@ -194,6 +196,8 @@
 
 findTrailer.documentation = "Uses the YouTube GData API to search for the 
trailer of a given movie.";
 findTrailer.safe = true;
+findTrailer.httpMethod = "GET";
+findTrailer.httpLocation = "findTrailer/{moviename}";
 findTrailer.inputTypes = { "moviename" : "string" };
 findTrailer.outputType = "String";
 

Modified: trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js  
(original)
+++ trunk/mashup/java/modules/samples/upgradeChecker/upgradeChecker.js  Mon Aug 
17 11:45:27 2009
@@ -165,7 +165,9 @@
 
 testXML.documentation = <div>Simulates various scenarios for UI testing 
purposes (XML representation).</div>;
 
-testXML.safe = true;
+testXML.safe = true;
+testXML.httpMethod = "GET";
+testXML.httpLocation = "testXML/{id}";
 testXML.inputTypes = {"id" : "release-new-nightly | release-no-nightly | 
old-release-new-nightly | old-release-no-nightly"};
 testXML.outputType = "xml";
 
@@ -207,7 +209,9 @@
 
 test.documentation = <div>Simulates various scenarios for UI testing 
purposes.</div>;
 
-test.safe = true;
+test.safe = true;
+test.httpMethod = "GET";
+test.httpLocation = "test/{id2}";
 test.inputTypes = {"id2" : "release-new-nightly | release-no-nightly | 
old-release-new-nightly | old-release-no-nightly"};
 test.outputType = "object";
 

Modified: trunk/mashup/java/modules/samples/yahooGeoCode/yahooGeoCode.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/samples/yahooGeoCode/yahooGeoCode.js?rev=43579&r1=43578&r2=43579&view=diff
==============================================================================
--- trunk/mashup/java/modules/samples/yahooGeoCode/yahooGeoCode.js      
(original)
+++ trunk/mashup/java/modules/samples/yahooGeoCode/yahooGeoCode.js      Mon Aug 
17 11:45:27 2009
@@ -19,6 +19,8 @@
 
 geocode.documentation = "Given an address returns a specific latitude and 
longitude" ;
 geocode.safe = true;
+geocode.httpMethod = "GET";
+geocode.httpLocation = "geocode/{street}/{city}/{state}";
 geocode.inputTypes = {
     "street" : "string" ,
     "city" : "string",
@@ -49,6 +51,8 @@
 
 provisionApiKey.documentation = <div>Before using the geocode service, 
register for a Yahoo API Key [1] and use it to provision the service 
(write-once only).<br/>[1] <a 
href="http://developer.yahoo.com/wsregapp/index.php";>http://developer.yahoo.com/wsregapp/index.php</a>.<br/>
                                 For sample purposes (though it kind of defeats 
the exercise) you can use ours: 
"rPJmz.HV34Hn654ySbBEOJf2i4nuae6LqGKX5EmrN30Q9aTeabb3vwThv2jRDN.rf3aAIw--".</div>
+provisionApiKey.httpMethod = "GET";
+provisionApiKey.httpLocation = "provisionApiKey/{key}";
 provisionApiKey.inputTypes = {"key" : "string"};
 provisionApiKey.outputType = "boolean";
 function provisionApiKey (key) {

_______________________________________________
Mashup-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to