incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r485899 - /incubator/xap/trunk/src/xap/requestservice/RequestService.js
Date Mon, 11 Dec 2006 22:06:47 GMT
Author: jmargaris
Date: Mon Dec 11 14:06:47 2006
New Revision: 485899

URL: http://svn.apache.org/viewvc?view=rev&rev=485899
Log:
Doc cleanup

Modified:
    incubator/xap/trunk/src/xap/requestservice/RequestService.js

Modified: incubator/xap/trunk/src/xap/requestservice/RequestService.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/requestservice/RequestService.js?view=diff&rev=485899&r1=485898&r2=485899
==============================================================================
--- incubator/xap/trunk/src/xap/requestservice/RequestService.js (original)
+++ incubator/xap/trunk/src/xap/requestservice/RequestService.js Mon Dec 11 14:06:47 2006
@@ -42,23 +42,13 @@
 }
 
 /**
- * The response content is assumed to be an XMLHttpRequest object, which we process.
- * <br><br>
- * Note the given url must be relative to the current application's context path.
- * This is a server-side requirement.
+ * Retrieves a server-side page and processes it assuming it is proper XML,
+ * executing any namespaced commands like XModify.
  * 
- * @param url, the url will be relative to the application context path always.
- * @return The retrieved content (XMLHttpRequest)
- * @throws RequestServiceException, a wrapper exception of either a failed 
- * network call or a failed response processing.  Check the 
- * <code>getCausalThrowable()</code> and <code>printStackTrace()</code>
- * method to find out details. 
- * <P>
- * The process cause could be <code>ParserException</code> etc.
- * <P><code>ParserException</code>: when the data contains a 
- * malformed XML; however, any XML up to the point of malformed data will be 
- * processed and executed. Also note that a well-formed but non-relevant XML, 
- * will be ignored during the processing and will not trigger an exception.
+ * @param url The URL to retrieve.
+ * @return The retrieved XMLHttpRequest object
+ * @throws xap.util.Exception if there was an error retrieving or 
+ * processing the response.
  */
 xap.requestservice.RequestService.prototype.retrieveAndProcess = function(url) {
   var content = this.retrieve(url);
@@ -77,17 +67,14 @@
 }
 
 /**
- * Asynchronously sends to the given url - the response is assumed to be
- * in XML format and will be processed automatically by the client.
- * 
- * <br><br>
- * Note the given url must be relative to the current application's context path. 
- * This is a server-side requirement.
- *
- * @param url The destination url relative to the application context path.
- * @param listener The listener to asynchronously call back when the retrieve
- * is finished or an error occurs.
+ * Asynchronously retrieves a server-side page and processes it assuming it is proper XML,
+ * executing any namespaced commands like XModify.
  * 
+ * @param url The URL to retrieve.
+ * @param listener A NetServiceListener-style object to call back after the response is processed.
+ * @return The retrieved XMLHttpRequest object
+ * @throws xap.util.Exception if there was an error retrieving or 
+ * processing the response.
  */
 xap.requestservice.RequestService.prototype.retrieveAndProcessAsynchronously = function(url,
listener) {
 	var self = this;
@@ -112,15 +99,11 @@
 
 
 /**
- * Retrieves the XMLHttpRequest content from the specified URL.  
- * 
- * @param url If there is no leading slash, it's relative to current context 
- * path. If there is a leading slash, it's relative to server; or it needs to be 
- * a full url.
+ * Retrieves the XMLHttpRequest object from the specified URL.  
  * 
- * @return The content of the response (XMLHttpRequest)
- * @throws RequestServiceException, a wrapper exception. Check the 
- * <code>getCause()</code> method to find out details.
+ * @param url The URL to retrieve. 
+ * @return An XMLHttpRequest object representing the response.
+ * @throws xap.util.Exception if there was an error retrieving the response.
  */
 xap.requestservice.RequestService.prototype.retrieve = function(url) {
   var content = xap.util.HttpUtils.get(url); 
@@ -133,13 +116,13 @@
 
 
 /**
- * Asynchronously gets an HttpResponse object from the provided string url.
+ * Asynchronously retrieves the XMLHttpRequest object from the specified URL.  
  * 
- * @param url, if there is no leading slash, it's relative to current context path; if 
- * there is a leading slash, it's relative to server; or it needs to be a full url.
+ * @param url The URL to retrieve. 
+ * @param listener A NetServiceListener-style object to call back after the response is retrieved.
  * 
- * @param listener The NetServiceListener to asynchronously call back when the retrieve
- * is finished or an error occurs.
+ * @return An XMLHttpRequest object representing the response.
+ * @throws xap.util.Exception if there was an error retrieving the response.
  */
 xap.requestservice.RequestService.prototype.retrieveAsynchronously = function(url, listener)
{
   var callback = function( response ) {



Mime
View raw message