juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [08/42] incubator-juneau-website git commit: Update javadocs.
Date Thu, 13 Apr 2017 20:44:54 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/client/RestRequestEntity.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/client/RestRequestEntity.html b/content/site/apidocs/src-html/org/apache/juneau/rest/client/RestRequestEntity.html
index b4a6294..023195b 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/client/RestRequestEntity.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/client/RestRequestEntity.html
@@ -62,38 +62,40 @@
 <span class="sourceLineNo">054</span>            } else if (! serializer.isWriterSerializer()) {<a name="line.54"></a>
 <span class="sourceLineNo">055</span>               OutputStreamSerializer s2 = (OutputStreamSerializer)serializer;<a name="line.55"></a>
 <span class="sourceLineNo">056</span>               s2.serialize(output, os);<a name="line.56"></a>
-<span class="sourceLineNo">057</span>               os.close();<a name="line.57"></a>
-<span class="sourceLineNo">058</span>            } else {<a name="line.58"></a>
-<span class="sourceLineNo">059</span>               Writer w = new OutputStreamWriter(os, IOUtils.UTF8);<a name="line.59"></a>
-<span class="sourceLineNo">060</span>               WriterSerializer s2 = (WriterSerializer)serializer;<a name="line.60"></a>
-<span class="sourceLineNo">061</span>               s2.serialize(output, w);<a name="line.61"></a>
-<span class="sourceLineNo">062</span>               w.close();<a name="line.62"></a>
-<span class="sourceLineNo">063</span>            }<a name="line.63"></a>
-<span class="sourceLineNo">064</span>         } catch (SerializeException e) {<a name="line.64"></a>
-<span class="sourceLineNo">065</span>            throw new org.apache.juneau.rest.client.RestCallException(e);<a name="line.65"></a>
-<span class="sourceLineNo">066</span>         }<a name="line.66"></a>
-<span class="sourceLineNo">067</span>      }<a name="line.67"></a>
-<span class="sourceLineNo">068</span>   }<a name="line.68"></a>
-<span class="sourceLineNo">069</span><a name="line.69"></a>
-<span class="sourceLineNo">070</span>   @Override /* BasicHttpEntity */<a name="line.70"></a>
-<span class="sourceLineNo">071</span>   public boolean isRepeatable() {<a name="line.71"></a>
-<span class="sourceLineNo">072</span>      return true;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>   }<a name="line.73"></a>
-<span class="sourceLineNo">074</span><a name="line.74"></a>
-<span class="sourceLineNo">075</span>   @Override /* BasicHttpEntity */<a name="line.75"></a>
-<span class="sourceLineNo">076</span>   public InputStream getContent() {<a name="line.76"></a>
-<span class="sourceLineNo">077</span>      if (outputBytes == null) {<a name="line.77"></a>
-<span class="sourceLineNo">078</span>         ByteArrayOutputStream baos = new ByteArrayOutputStream();<a name="line.78"></a>
-<span class="sourceLineNo">079</span>         try {<a name="line.79"></a>
-<span class="sourceLineNo">080</span>            writeTo(baos);<a name="line.80"></a>
-<span class="sourceLineNo">081</span>            outputBytes = baos.toByteArray();<a name="line.81"></a>
-<span class="sourceLineNo">082</span>         } catch (IOException e) {<a name="line.82"></a>
-<span class="sourceLineNo">083</span>            throw new RuntimeException(e);<a name="line.83"></a>
-<span class="sourceLineNo">084</span>         }<a name="line.84"></a>
-<span class="sourceLineNo">085</span>      }<a name="line.85"></a>
-<span class="sourceLineNo">086</span>      return new ByteArrayInputStream(outputBytes);<a name="line.86"></a>
-<span class="sourceLineNo">087</span>   }<a name="line.87"></a>
-<span class="sourceLineNo">088</span>}<a name="line.88"></a>
+<span class="sourceLineNo">057</span>               os.flush();<a name="line.57"></a>
+<span class="sourceLineNo">058</span>               os.close();<a name="line.58"></a>
+<span class="sourceLineNo">059</span>            } else {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>               Writer w = new OutputStreamWriter(os, IOUtils.UTF8);<a name="line.60"></a>
+<span class="sourceLineNo">061</span>               WriterSerializer s2 = (WriterSerializer)serializer;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>               s2.serialize(output, w);<a name="line.62"></a>
+<span class="sourceLineNo">063</span>               w.flush();<a name="line.63"></a>
+<span class="sourceLineNo">064</span>               w.close();<a name="line.64"></a>
+<span class="sourceLineNo">065</span>            }<a name="line.65"></a>
+<span class="sourceLineNo">066</span>         } catch (SerializeException e) {<a name="line.66"></a>
+<span class="sourceLineNo">067</span>            throw new org.apache.juneau.rest.client.RestCallException(e);<a name="line.67"></a>
+<span class="sourceLineNo">068</span>         }<a name="line.68"></a>
+<span class="sourceLineNo">069</span>      }<a name="line.69"></a>
+<span class="sourceLineNo">070</span>   }<a name="line.70"></a>
+<span class="sourceLineNo">071</span><a name="line.71"></a>
+<span class="sourceLineNo">072</span>   @Override /* BasicHttpEntity */<a name="line.72"></a>
+<span class="sourceLineNo">073</span>   public boolean isRepeatable() {<a name="line.73"></a>
+<span class="sourceLineNo">074</span>      return true;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>   }<a name="line.75"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
+<span class="sourceLineNo">077</span>   @Override /* BasicHttpEntity */<a name="line.77"></a>
+<span class="sourceLineNo">078</span>   public InputStream getContent() {<a name="line.78"></a>
+<span class="sourceLineNo">079</span>      if (outputBytes == null) {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>         ByteArrayOutputStream baos = new ByteArrayOutputStream();<a name="line.80"></a>
+<span class="sourceLineNo">081</span>         try {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>            writeTo(baos);<a name="line.82"></a>
+<span class="sourceLineNo">083</span>            outputBytes = baos.toByteArray();<a name="line.83"></a>
+<span class="sourceLineNo">084</span>         } catch (IOException e) {<a name="line.84"></a>
+<span class="sourceLineNo">085</span>            throw new RuntimeException(e);<a name="line.85"></a>
+<span class="sourceLineNo">086</span>         }<a name="line.86"></a>
+<span class="sourceLineNo">087</span>      }<a name="line.87"></a>
+<span class="sourceLineNo">088</span>      return new ByteArrayInputStream(outputBytes);<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   }<a name="line.89"></a>
+<span class="sourceLineNo">090</span>}<a name="line.90"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/client/RetryOn.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/client/RetryOn.html b/content/site/apidocs/src-html/org/apache/juneau/rest/client/RetryOn.html
index c52ce00..b0819da 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/client/RetryOn.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/client/RetryOn.html
@@ -20,39 +20,57 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.client;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>/**<a name="line.15"></a>
-<span class="sourceLineNo">016</span> * Used to determine whether a request should be retried based on the HTTP response code.<a name="line.16"></a>
-<span class="sourceLineNo">017</span> */<a name="line.17"></a>
-<span class="sourceLineNo">018</span>public interface RetryOn {<a name="line.18"></a>
-<span class="sourceLineNo">019</span><a name="line.19"></a>
-<span class="sourceLineNo">020</span>   /**<a name="line.20"></a>
-<span class="sourceLineNo">021</span>    * Default RetryOn that returns &lt;jk&gt;true&lt;/jk&gt; of any HTTP response &amp;gt;= 400 is received.<a name="line.21"></a>
-<span class="sourceLineNo">022</span>    */<a name="line.22"></a>
-<span class="sourceLineNo">023</span>   public static final RetryOn DEFAULT = new RetryOn() {<a name="line.23"></a>
-<span class="sourceLineNo">024</span>      @Override /* RetryOn */<a name="line.24"></a>
-<span class="sourceLineNo">025</span>      public boolean onCode(int httpResponseCode) {<a name="line.25"></a>
-<span class="sourceLineNo">026</span>         return httpResponseCode &lt;= 0 || httpResponseCode &gt;= 400;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>      }<a name="line.27"></a>
-<span class="sourceLineNo">028</span>   };<a name="line.28"></a>
-<span class="sourceLineNo">029</span><a name="line.29"></a>
-<span class="sourceLineNo">030</span>   /**<a name="line.30"></a>
-<span class="sourceLineNo">031</span>    * Default RetryOn that returns &lt;jk&gt;true&lt;/jk&gt; if the HTTP connection could not be made.<a name="line.31"></a>
-<span class="sourceLineNo">032</span>    */<a name="line.32"></a>
-<span class="sourceLineNo">033</span>   public static final RetryOn CONNECTION_LOST = new RetryOn() {<a name="line.33"></a>
-<span class="sourceLineNo">034</span>      @Override /* RetryOn */<a name="line.34"></a>
-<span class="sourceLineNo">035</span>      public boolean onCode(int httpResponseCode) {<a name="line.35"></a>
-<span class="sourceLineNo">036</span>         return httpResponseCode &lt;= 0;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>      }<a name="line.37"></a>
-<span class="sourceLineNo">038</span>   };<a name="line.38"></a>
-<span class="sourceLineNo">039</span><a name="line.39"></a>
-<span class="sourceLineNo">040</span>   /**<a name="line.40"></a>
-<span class="sourceLineNo">041</span>    * Subclasses should override this method to determine whether the HTTP response is retryable.<a name="line.41"></a>
-<span class="sourceLineNo">042</span>    *<a name="line.42"></a>
-<span class="sourceLineNo">043</span>    * @param httpResponseCode The HTTP response code.<a name="line.43"></a>
-<span class="sourceLineNo">044</span>    * @return &lt;jk&gt;true&lt;/jk&gt; if the specified response code is retryable.<a name="line.44"></a>
-<span class="sourceLineNo">045</span>    */<a name="line.45"></a>
-<span class="sourceLineNo">046</span>   boolean onCode(int httpResponseCode);<a name="line.46"></a>
-<span class="sourceLineNo">047</span>}<a name="line.47"></a>
+<span class="sourceLineNo">015</span>import org.apache.http.*;<a name="line.15"></a>
+<span class="sourceLineNo">016</span><a name="line.16"></a>
+<span class="sourceLineNo">017</span>/**<a name="line.17"></a>
+<span class="sourceLineNo">018</span> * Used to determine whether a request should be retried based on the HTTP response code.<a name="line.18"></a>
+<span class="sourceLineNo">019</span> * &lt;p&gt;<a name="line.19"></a>
+<span class="sourceLineNo">020</span> * Subclasses should override either the {@link #onCode(int)} method (if you only care about<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * the HTTP status code) or {@link #onResponse(HttpResponse)} (if you want full access to<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * the HTTP response object.<a name="line.22"></a>
+<span class="sourceLineNo">023</span> */<a name="line.23"></a>
+<span class="sourceLineNo">024</span>public abstract class RetryOn {<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span>   /**<a name="line.26"></a>
+<span class="sourceLineNo">027</span>    * Default RetryOn that returns &lt;jk&gt;true&lt;/jk&gt; of any HTTP response &amp;gt;= 400 is received.<a name="line.27"></a>
+<span class="sourceLineNo">028</span>    */<a name="line.28"></a>
+<span class="sourceLineNo">029</span>   public static final RetryOn DEFAULT = new RetryOn() {<a name="line.29"></a>
+<span class="sourceLineNo">030</span>      @Override /* RetryOn */<a name="line.30"></a>
+<span class="sourceLineNo">031</span>      public boolean onCode(int httpResponseCode) {<a name="line.31"></a>
+<span class="sourceLineNo">032</span>         return httpResponseCode &lt;= 0 || httpResponseCode &gt;= 400;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>      }<a name="line.33"></a>
+<span class="sourceLineNo">034</span>   };<a name="line.34"></a>
+<span class="sourceLineNo">035</span><a name="line.35"></a>
+<span class="sourceLineNo">036</span>   /**<a name="line.36"></a>
+<span class="sourceLineNo">037</span>    * Default RetryOn that returns &lt;jk&gt;true&lt;/jk&gt; if the HTTP connection could not be made.<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    */<a name="line.38"></a>
+<span class="sourceLineNo">039</span>   public static final RetryOn CONNECTION_LOST = new RetryOn() {<a name="line.39"></a>
+<span class="sourceLineNo">040</span>      @Override /* RetryOn */<a name="line.40"></a>
+<span class="sourceLineNo">041</span>      public boolean onCode(int httpResponseCode) {<a name="line.41"></a>
+<span class="sourceLineNo">042</span>         return httpResponseCode &lt;= 0;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>      }<a name="line.43"></a>
+<span class="sourceLineNo">044</span>   };<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>   /**<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    * Subclasses should override this method to determine whether the HTTP response is retryable.<a name="line.47"></a>
+<span class="sourceLineNo">048</span>    *<a name="line.48"></a>
+<span class="sourceLineNo">049</span>    * @param response The HTTP response object.  May be &lt;jk&gt;null&lt;/jk&gt; if a connection could not be made.<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    * @return &lt;jk&gt;true&lt;/jk&gt; if the specified response code is retryable.<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    */<a name="line.51"></a>
+<span class="sourceLineNo">052</span>   protected boolean onResponse(HttpResponse response) {<a name="line.52"></a>
+<span class="sourceLineNo">053</span>      return onCode(response == null || response.getStatusLine() == null ? -1 : response.getStatusLine().getStatusCode());<a name="line.53"></a>
+<span class="sourceLineNo">054</span>   }<a name="line.54"></a>
+<span class="sourceLineNo">055</span><a name="line.55"></a>
+<span class="sourceLineNo">056</span>   /**<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    * Subclasses should override this method to determine whether the HTTP response is retryable.<a name="line.57"></a>
+<span class="sourceLineNo">058</span>    *<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    * @param httpResponseCode The HTTP response code.  &lt;code&gt;-1&lt;/code&gt; if a connection could not be made.<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    * @return &lt;jk&gt;true&lt;/jk&gt; if the specified response code is retryable.<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    */<a name="line.61"></a>
+<span class="sourceLineNo">062</span>   protected boolean onCode(int httpResponseCode) {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>      return false;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>   }<a name="line.64"></a>
+<span class="sourceLineNo">065</span>}<a name="line.65"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/client/SerializedNameValuePair.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/client/SerializedNameValuePair.html b/content/site/apidocs/src-html/org/apache/juneau/rest/client/SerializedNameValuePair.html
index b82a2b0..4c69aee 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/client/SerializedNameValuePair.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/client/SerializedNameValuePair.html
@@ -20,76 +20,49 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.client;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import static org.apache.juneau.uon.UonSerializerContext.*;<a name="line.15"></a>
-<span class="sourceLineNo">016</span><a name="line.16"></a>
-<span class="sourceLineNo">017</span>import java.io.*;<a name="line.17"></a>
-<span class="sourceLineNo">018</span><a name="line.18"></a>
-<span class="sourceLineNo">019</span>import org.apache.http.*;<a name="line.19"></a>
-<span class="sourceLineNo">020</span>import org.apache.juneau.*;<a name="line.20"></a>
-<span class="sourceLineNo">021</span>import org.apache.juneau.uon.*;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.juneau.urlencoding.*;<a name="line.22"></a>
-<span class="sourceLineNo">023</span><a name="line.23"></a>
-<span class="sourceLineNo">024</span>/**<a name="line.24"></a>
-<span class="sourceLineNo">025</span> * Subclass of {@link NameValuePair} for serializing POJOs as URL-encoded form post entries<a name="line.25"></a>
-<span class="sourceLineNo">026</span> *    using the {@link UrlEncodingSerializer class}.<a name="line.26"></a>
-<span class="sourceLineNo">027</span> *<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * &lt;h5 class='section'&gt;Example:&lt;/h5&gt;<a name="line.28"></a>
-<span class="sourceLineNo">029</span> * &lt;p class='bcode'&gt;<a name="line.29"></a>
-<span class="sourceLineNo">030</span> *    NameValuePairs params = &lt;jk&gt;new&lt;/jk&gt; NameValuePairs()<a name="line.30"></a>
-<span class="sourceLineNo">031</span> *       .append(&lt;jk&gt;new&lt;/jk&gt; SerializedNameValuePair(&lt;js&gt;"myPojo"&lt;/js&gt;, pojo, UrlEncodingSerializer.&lt;jsf&gt;DEFAULT_SIMPLE&lt;/jsf&gt;))<a name="line.31"></a>
-<span class="sourceLineNo">032</span> *       .append(&lt;jk&gt;new&lt;/jk&gt; BasicNameValuePair(&lt;js&gt;"someOtherParam"&lt;/js&gt;, &lt;js&gt;"foobar"&lt;/js&gt;));<a name="line.32"></a>
-<span class="sourceLineNo">033</span> *    request.setEntity(&lt;jk&gt;new&lt;/jk&gt; UrlEncodedFormEntity(params));<a name="line.33"></a>
-<span class="sourceLineNo">034</span> * &lt;/p&gt;<a name="line.34"></a>
-<span class="sourceLineNo">035</span> */<a name="line.35"></a>
-<span class="sourceLineNo">036</span>public final class SerializedNameValuePair implements NameValuePair {<a name="line.36"></a>
-<span class="sourceLineNo">037</span>   private String name;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>   private Object value;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>   private UrlEncodingSerializer serializer;<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
-<span class="sourceLineNo">041</span>   // We must be sure to disable character encoding since it's done in the http client layer.<a name="line.41"></a>
-<span class="sourceLineNo">042</span>   private static final ObjectMap op = new ObjectMap().append(UON_encodeChars, false);<a name="line.42"></a>
-<span class="sourceLineNo">043</span><a name="line.43"></a>
-<span class="sourceLineNo">044</span>   /**<a name="line.44"></a>
-<span class="sourceLineNo">045</span>    * Constructor.<a name="line.45"></a>
-<span class="sourceLineNo">046</span>    *<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    * @param name The parameter name.<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    * @param value The POJO to serialize to the parameter value.<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    * @param serializer The serializer to use to convert the value to a string.<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    */<a name="line.50"></a>
-<span class="sourceLineNo">051</span>   public SerializedNameValuePair(String name, Object value, UrlEncodingSerializer serializer) {<a name="line.51"></a>
-<span class="sourceLineNo">052</span>      this.name = name;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>      this.value = value;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>      this.serializer = serializer;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>   }<a name="line.55"></a>
-<span class="sourceLineNo">056</span><a name="line.56"></a>
-<span class="sourceLineNo">057</span>   @Override /* NameValuePair */<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   public String getName() {<a name="line.58"></a>
-<span class="sourceLineNo">059</span>      if (name != null &amp;&amp; name.length() &gt; 0) {<a name="line.59"></a>
-<span class="sourceLineNo">060</span>         char c = name.charAt(0);<a name="line.60"></a>
-<span class="sourceLineNo">061</span>         if (c == '$' || c == '(') {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>            try {<a name="line.62"></a>
-<span class="sourceLineNo">063</span>               UonSerializerSession s = serializer.createSession(new StringWriter(), op, null, null, null, MediaType.UON);<a name="line.63"></a>
-<span class="sourceLineNo">064</span>               serializer.serialize(s, name);<a name="line.64"></a>
-<span class="sourceLineNo">065</span>               return s.getWriter().toString();<a name="line.65"></a>
-<span class="sourceLineNo">066</span>            } catch (Exception e) {<a name="line.66"></a>
-<span class="sourceLineNo">067</span>               throw new RuntimeException(e);<a name="line.67"></a>
-<span class="sourceLineNo">068</span>            }<a name="line.68"></a>
-<span class="sourceLineNo">069</span>         }<a name="line.69"></a>
-<span class="sourceLineNo">070</span>      }<a name="line.70"></a>
-<span class="sourceLineNo">071</span>      return name;<a name="line.71"></a>
-<span class="sourceLineNo">072</span>   }<a name="line.72"></a>
-<span class="sourceLineNo">073</span><a name="line.73"></a>
-<span class="sourceLineNo">074</span>   @Override /* NameValuePair */<a name="line.74"></a>
-<span class="sourceLineNo">075</span>   public String getValue() {<a name="line.75"></a>
-<span class="sourceLineNo">076</span>      try {<a name="line.76"></a>
-<span class="sourceLineNo">077</span>         UonSerializerSession s = serializer.createSession(new StringWriter(), op, null, null, null, MediaType.UON);<a name="line.77"></a>
-<span class="sourceLineNo">078</span>         serializer.serialize(s, value);<a name="line.78"></a>
-<span class="sourceLineNo">079</span>         return s.getWriter().toString();<a name="line.79"></a>
-<span class="sourceLineNo">080</span>      } catch (Exception e) {<a name="line.80"></a>
-<span class="sourceLineNo">081</span>         throw new RuntimeException(e);<a name="line.81"></a>
-<span class="sourceLineNo">082</span>      }<a name="line.82"></a>
-<span class="sourceLineNo">083</span>   }<a name="line.83"></a>
-<span class="sourceLineNo">084</span>}<a name="line.84"></a>
+<span class="sourceLineNo">015</span>import org.apache.http.*;<a name="line.15"></a>
+<span class="sourceLineNo">016</span>import org.apache.juneau.urlencoding.*;<a name="line.16"></a>
+<span class="sourceLineNo">017</span><a name="line.17"></a>
+<span class="sourceLineNo">018</span>/**<a name="line.18"></a>
+<span class="sourceLineNo">019</span> * Subclass of {@link NameValuePair} for serializing POJOs as URL-encoded form post entries<a name="line.19"></a>
+<span class="sourceLineNo">020</span> *    using the {@link UrlEncodingSerializer class}.<a name="line.20"></a>
+<span class="sourceLineNo">021</span> *<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * &lt;h5 class='section'&gt;Example:&lt;/h5&gt;<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * &lt;p class='bcode'&gt;<a name="line.23"></a>
+<span class="sourceLineNo">024</span> *    NameValuePairs params = &lt;jk&gt;new&lt;/jk&gt; NameValuePairs()<a name="line.24"></a>
+<span class="sourceLineNo">025</span> *       .append(&lt;jk&gt;new&lt;/jk&gt; SerializedNameValuePair(&lt;js&gt;"myPojo"&lt;/js&gt;, pojo, UrlEncodingSerializer.&lt;jsf&gt;DEFAULT_SIMPLE&lt;/jsf&gt;))<a name="line.25"></a>
+<span class="sourceLineNo">026</span> *       .append(&lt;jk&gt;new&lt;/jk&gt; BasicNameValuePair(&lt;js&gt;"someOtherParam"&lt;/js&gt;, &lt;js&gt;"foobar"&lt;/js&gt;));<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *    request.setEntity(&lt;jk&gt;new&lt;/jk&gt; UrlEncodedFormEntity(params));<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * &lt;/p&gt;<a name="line.28"></a>
+<span class="sourceLineNo">029</span> */<a name="line.29"></a>
+<span class="sourceLineNo">030</span>public final class SerializedNameValuePair implements NameValuePair {<a name="line.30"></a>
+<span class="sourceLineNo">031</span>   private String name;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>   private Object value;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>   private UrlEncodingSerializer serializer;<a name="line.33"></a>
+<span class="sourceLineNo">034</span><a name="line.34"></a>
+<span class="sourceLineNo">035</span>   /**<a name="line.35"></a>
+<span class="sourceLineNo">036</span>    * Constructor.<a name="line.36"></a>
+<span class="sourceLineNo">037</span>    *<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    * @param name The parameter name.<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    * @param value The POJO to serialize to the parameter value.<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    * @param serializer The serializer to use to convert the value to a string.<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    */<a name="line.41"></a>
+<span class="sourceLineNo">042</span>   public SerializedNameValuePair(String name, Object value, UrlEncodingSerializer serializer) {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>      this.name = name;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>      this.value = value;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>      this.serializer = serializer;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>   }<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>   @Override /* NameValuePair */<a name="line.48"></a>
+<span class="sourceLineNo">049</span>   public String getName() {<a name="line.49"></a>
+<span class="sourceLineNo">050</span>      return serializer.serializePart(name, false, null);<a name="line.50"></a>
+<span class="sourceLineNo">051</span>   }<a name="line.51"></a>
+<span class="sourceLineNo">052</span><a name="line.52"></a>
+<span class="sourceLineNo">053</span>   @Override /* NameValuePair */<a name="line.53"></a>
+<span class="sourceLineNo">054</span>   public String getValue() {<a name="line.54"></a>
+<span class="sourceLineNo">055</span>      return serializer.serializePart(value, false, null);<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   }<a name="line.56"></a>
+<span class="sourceLineNo">057</span>}<a name="line.57"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceDescription.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceDescription.html b/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceDescription.html
index 8fad78c..66b7e08 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceDescription.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceDescription.html
@@ -20,98 +20,100 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.labels;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import org.apache.juneau.dto.*;<a name="line.15"></a>
-<span class="sourceLineNo">016</span>import org.apache.juneau.rest.*;<a name="line.16"></a>
-<span class="sourceLineNo">017</span><a name="line.17"></a>
-<span class="sourceLineNo">018</span>/**<a name="line.18"></a>
-<span class="sourceLineNo">019</span> * Shortcut label for child resources.  Typically used in router resources.<a name="line.19"></a>
-<span class="sourceLineNo">020</span> *<a name="line.20"></a>
-<span class="sourceLineNo">021</span> * &lt;h5 class='section'&gt;Example:&lt;/h5&gt;<a name="line.21"></a>
-<span class="sourceLineNo">022</span> * &lt;p class='bcode'&gt;<a name="line.22"></a>
-<span class="sourceLineNo">023</span> *    &lt;jc&gt;// Instead of this...&lt;/jc&gt;<a name="line.23"></a>
-<span class="sourceLineNo">024</span> *    &lt;jk&gt;new&lt;/jk&gt; NameDescription(&lt;jk&gt;new&lt;/jk&gt; Link(&lt;js&gt;"httpTool"&lt;/js&gt;, uri + &lt;js&gt;"/httpTool"&lt;/js&gt;), &lt;js&gt;"HTTP request test client"&lt;/js&gt;);<a name="line.24"></a>
-<span class="sourceLineNo">025</span> *<a name="line.25"></a>
-<span class="sourceLineNo">026</span> *    &lt;jc&gt;// ...use this simpler equivalent...&lt;/jc&gt;<a name="line.26"></a>
-<span class="sourceLineNo">027</span> *    &lt;jk&gt;new&lt;/jk&gt; ResourceLink(uri, &lt;js&gt;"httpTool"&lt;/js&gt;, &lt;js&gt;"HTTP request test client"&lt;/js&gt;);<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * &lt;/p&gt;<a name="line.28"></a>
-<span class="sourceLineNo">029</span> */<a name="line.29"></a>
-<span class="sourceLineNo">030</span>public final class ResourceDescription extends NameDescription implements Comparable&lt;ResourceDescription&gt; {<a name="line.30"></a>
-<span class="sourceLineNo">031</span><a name="line.31"></a>
-<span class="sourceLineNo">032</span>   /**<a name="line.32"></a>
-<span class="sourceLineNo">033</span>    * Constructor.<a name="line.33"></a>
-<span class="sourceLineNo">034</span>    *<a name="line.34"></a>
-<span class="sourceLineNo">035</span>    * @param rootUrl The root URI of the child resource (e.g. the URI of the parent resource).<a name="line.35"></a>
-<span class="sourceLineNo">036</span>    * Must not end with &lt;js&gt;'/'&lt;/js&gt;.<a name="line.36"></a>
-<span class="sourceLineNo">037</span>    * Must be URL-Encoded.<a name="line.37"></a>
-<span class="sourceLineNo">038</span>    * @param name The name of the child resource.<a name="line.38"></a>
-<span class="sourceLineNo">039</span>    * This will be URL-encoded and appended onto the root URL to create the hyperlink for the resource.<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    * @param description The description of the child resource.<a name="line.40"></a>
-<span class="sourceLineNo">041</span>    */<a name="line.41"></a>
-<span class="sourceLineNo">042</span>   public ResourceDescription(String rootUrl, String name, String description) {<a name="line.42"></a>
-<span class="sourceLineNo">043</span>      super(new Link(name, (rootUrl.equals("/") || rootUrl.isEmpty() ? "/" : rootUrl + "/") + RestUtils.encode(name)), description);<a name="line.43"></a>
-<span class="sourceLineNo">044</span>   }<a name="line.44"></a>
-<span class="sourceLineNo">045</span><a name="line.45"></a>
-<span class="sourceLineNo">046</span>   /**<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    * Constructor for resources that are children of a REST resource.<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    *<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    * @param req The HTTP request.<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    * @param childPath The childPath The path of the child resource relative to the servlet.<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    * @param description The description of the child resource.<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    */<a name="line.52"></a>
-<span class="sourceLineNo">053</span>   public ResourceDescription(RestRequest req, String childPath, String description) {<a name="line.53"></a>
-<span class="sourceLineNo">054</span>      super(new Link(calcName(childPath), calcHref(req, childPath)), description);<a name="line.54"></a>
-<span class="sourceLineNo">055</span>   }<a name="line.55"></a>
-<span class="sourceLineNo">056</span><a name="line.56"></a>
-<span class="sourceLineNo">057</span>   private static String calcName(String childPath) {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>      return RestUtils.decode(childPath.indexOf('/') == -1 ? childPath : childPath.substring(childPath.lastIndexOf('/')+1));<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   }<a name="line.59"></a>
-<span class="sourceLineNo">060</span><a name="line.60"></a>
-<span class="sourceLineNo">061</span>   private static String calcHref(RestRequest req, String childPath) {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>      return req.getServletURIBuilder().append('/').append(childPath).toString();<a name="line.62"></a>
-<span class="sourceLineNo">063</span>   }<a name="line.63"></a>
-<span class="sourceLineNo">064</span><a name="line.64"></a>
-<span class="sourceLineNo">065</span>   /**<a name="line.65"></a>
-<span class="sourceLineNo">066</span>    * Constructor.<a name="line.66"></a>
-<span class="sourceLineNo">067</span>    *<a name="line.67"></a>
-<span class="sourceLineNo">068</span>    * @param name The name of the child resource.<a name="line.68"></a>
-<span class="sourceLineNo">069</span>    * @param description The description of the child resource.<a name="line.69"></a>
-<span class="sourceLineNo">070</span>    */<a name="line.70"></a>
-<span class="sourceLineNo">071</span>   public ResourceDescription(String name, String description) {<a name="line.71"></a>
-<span class="sourceLineNo">072</span>      super(new Link(name, name), description);<a name="line.72"></a>
-<span class="sourceLineNo">073</span>   }<a name="line.73"></a>
-<span class="sourceLineNo">074</span><a name="line.74"></a>
-<span class="sourceLineNo">075</span>   /** No-arg constructor.  Used for JUnit testing of OPTIONS pages. */<a name="line.75"></a>
-<span class="sourceLineNo">076</span>   public ResourceDescription() {}<a name="line.76"></a>
-<span class="sourceLineNo">077</span><a name="line.77"></a>
-<span class="sourceLineNo">078</span>   @Override /* NameDescription */<a name="line.78"></a>
-<span class="sourceLineNo">079</span>   public Link getName() {<a name="line.79"></a>
-<span class="sourceLineNo">080</span>      return (Link)super.getName();<a name="line.80"></a>
-<span class="sourceLineNo">081</span>   }<a name="line.81"></a>
-<span class="sourceLineNo">082</span><a name="line.82"></a>
-<span class="sourceLineNo">083</span>   /**<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    * Overridden setter.<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    *<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    * @param name The new name.<a name="line.86"></a>
-<span class="sourceLineNo">087</span>    */<a name="line.87"></a>
-<span class="sourceLineNo">088</span>   public void setName(Link name) {<a name="line.88"></a>
-<span class="sourceLineNo">089</span>      super.setName(name);<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   }<a name="line.90"></a>
-<span class="sourceLineNo">091</span><a name="line.91"></a>
-<span class="sourceLineNo">092</span>   @Override /* Comparable */<a name="line.92"></a>
-<span class="sourceLineNo">093</span>   public int compareTo(ResourceDescription o) {<a name="line.93"></a>
-<span class="sourceLineNo">094</span>      return getName().compareTo(o.getName());<a name="line.94"></a>
-<span class="sourceLineNo">095</span>   }<a name="line.95"></a>
-<span class="sourceLineNo">096</span><a name="line.96"></a>
-<span class="sourceLineNo">097</span>   @Override /* Object */<a name="line.97"></a>
-<span class="sourceLineNo">098</span>   public boolean equals(Object o) {<a name="line.98"></a>
-<span class="sourceLineNo">099</span>      return (o instanceof ResourceDescription) &amp;&amp; ((ResourceDescription)o).getName().equals(getName());<a name="line.99"></a>
-<span class="sourceLineNo">100</span>   }<a name="line.100"></a>
-<span class="sourceLineNo">101</span><a name="line.101"></a>
-<span class="sourceLineNo">102</span>   @Override /* Object */<a name="line.102"></a>
-<span class="sourceLineNo">103</span>   public int hashCode() {<a name="line.103"></a>
-<span class="sourceLineNo">104</span>      return getName().hashCode();<a name="line.104"></a>
-<span class="sourceLineNo">105</span>   }<a name="line.105"></a>
-<span class="sourceLineNo">106</span>}<a name="line.106"></a>
+<span class="sourceLineNo">015</span>import static org.apache.juneau.internal.StringUtils.*;<a name="line.15"></a>
+<span class="sourceLineNo">016</span><a name="line.16"></a>
+<span class="sourceLineNo">017</span>import org.apache.juneau.dto.*;<a name="line.17"></a>
+<span class="sourceLineNo">018</span>import org.apache.juneau.rest.*;<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>/**<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * Shortcut label for child resources.  Typically used in router resources.<a name="line.21"></a>
+<span class="sourceLineNo">022</span> *<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * &lt;h5 class='section'&gt;Example:&lt;/h5&gt;<a name="line.23"></a>
+<span class="sourceLineNo">024</span> * &lt;p class='bcode'&gt;<a name="line.24"></a>
+<span class="sourceLineNo">025</span> *    &lt;jc&gt;// Instead of this...&lt;/jc&gt;<a name="line.25"></a>
+<span class="sourceLineNo">026</span> *    &lt;jk&gt;new&lt;/jk&gt; NameDescription(&lt;jk&gt;new&lt;/jk&gt; Link(&lt;js&gt;"httpTool"&lt;/js&gt;, uri + &lt;js&gt;"/httpTool"&lt;/js&gt;), &lt;js&gt;"HTTP request test client"&lt;/js&gt;);<a name="line.26"></a>
+<span class="sourceLineNo">027</span> *<a name="line.27"></a>
+<span class="sourceLineNo">028</span> *    &lt;jc&gt;// ...use this simpler equivalent...&lt;/jc&gt;<a name="line.28"></a>
+<span class="sourceLineNo">029</span> *    &lt;jk&gt;new&lt;/jk&gt; ResourceLink(uri, &lt;js&gt;"httpTool"&lt;/js&gt;, &lt;js&gt;"HTTP request test client"&lt;/js&gt;);<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * &lt;/p&gt;<a name="line.30"></a>
+<span class="sourceLineNo">031</span> */<a name="line.31"></a>
+<span class="sourceLineNo">032</span>public final class ResourceDescription extends NameDescription implements Comparable&lt;ResourceDescription&gt; {<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>   /**<a name="line.34"></a>
+<span class="sourceLineNo">035</span>    * Constructor.<a name="line.35"></a>
+<span class="sourceLineNo">036</span>    *<a name="line.36"></a>
+<span class="sourceLineNo">037</span>    * @param rootUrl The root URI of the child resource (e.g. the URI of the parent resource).<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    * Must not end with &lt;js&gt;'/'&lt;/js&gt;.<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    * Must be URL-Encoded.<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    * @param name The name of the child resource.<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    * This will be URL-encoded and appended onto the root URL to create the hyperlink for the resource.<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    * @param description The description of the child resource.<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    */<a name="line.43"></a>
+<span class="sourceLineNo">044</span>   public ResourceDescription(String rootUrl, String name, String description) {<a name="line.44"></a>
+<span class="sourceLineNo">045</span>      super(new Link(name, (rootUrl.equals("/") || rootUrl.isEmpty() ? "/" : rootUrl + "/") + urlEncode(name)), description);<a name="line.45"></a>
+<span class="sourceLineNo">046</span>   }<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>   /**<a name="line.48"></a>
+<span class="sourceLineNo">049</span>    * Constructor for resources that are children of a REST resource.<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    *<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    * @param req The HTTP request.<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    * @param childPath The childPath The path of the child resource relative to the servlet.<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    * @param description The description of the child resource.<a name="line.53"></a>
+<span class="sourceLineNo">054</span>    */<a name="line.54"></a>
+<span class="sourceLineNo">055</span>   public ResourceDescription(RestRequest req, String childPath, String description) {<a name="line.55"></a>
+<span class="sourceLineNo">056</span>      super(new Link(calcName(childPath), calcHref(req, childPath)), description);<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   }<a name="line.57"></a>
+<span class="sourceLineNo">058</span><a name="line.58"></a>
+<span class="sourceLineNo">059</span>   private static String calcName(String childPath) {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>      return urlDecode(childPath.indexOf('/') == -1 ? childPath : childPath.substring(childPath.lastIndexOf('/')+1));<a name="line.60"></a>
+<span class="sourceLineNo">061</span>   }<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>   private static String calcHref(RestRequest req, String childPath) {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>      return req.getServletURIBuilder().append('/').append(childPath).toString();<a name="line.64"></a>
+<span class="sourceLineNo">065</span>   }<a name="line.65"></a>
+<span class="sourceLineNo">066</span><a name="line.66"></a>
+<span class="sourceLineNo">067</span>   /**<a name="line.67"></a>
+<span class="sourceLineNo">068</span>    * Constructor.<a name="line.68"></a>
+<span class="sourceLineNo">069</span>    *<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    * @param name The name of the child resource.<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    * @param description The description of the child resource.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    */<a name="line.72"></a>
+<span class="sourceLineNo">073</span>   public ResourceDescription(String name, String description) {<a name="line.73"></a>
+<span class="sourceLineNo">074</span>      super(new Link(name, name), description);<a name="line.74"></a>
+<span class="sourceLineNo">075</span>   }<a name="line.75"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
+<span class="sourceLineNo">077</span>   /** No-arg constructor.  Used for JUnit testing of OPTIONS pages. */<a name="line.77"></a>
+<span class="sourceLineNo">078</span>   public ResourceDescription() {}<a name="line.78"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
+<span class="sourceLineNo">080</span>   @Override /* NameDescription */<a name="line.80"></a>
+<span class="sourceLineNo">081</span>   public Link getName() {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>      return (Link)super.getName();<a name="line.82"></a>
+<span class="sourceLineNo">083</span>   }<a name="line.83"></a>
+<span class="sourceLineNo">084</span><a name="line.84"></a>
+<span class="sourceLineNo">085</span>   /**<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    * Overridden setter.<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    *<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    * @param name The new name.<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    */<a name="line.89"></a>
+<span class="sourceLineNo">090</span>   public void setName(Link name) {<a name="line.90"></a>
+<span class="sourceLineNo">091</span>      super.setName(name);<a name="line.91"></a>
+<span class="sourceLineNo">092</span>   }<a name="line.92"></a>
+<span class="sourceLineNo">093</span><a name="line.93"></a>
+<span class="sourceLineNo">094</span>   @Override /* Comparable */<a name="line.94"></a>
+<span class="sourceLineNo">095</span>   public int compareTo(ResourceDescription o) {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>      return getName().compareTo(o.getName());<a name="line.96"></a>
+<span class="sourceLineNo">097</span>   }<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span>   @Override /* Object */<a name="line.99"></a>
+<span class="sourceLineNo">100</span>   public boolean equals(Object o) {<a name="line.100"></a>
+<span class="sourceLineNo">101</span>      return (o instanceof ResourceDescription) &amp;&amp; ((ResourceDescription)o).getName().equals(getName());<a name="line.101"></a>
+<span class="sourceLineNo">102</span>   }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>   @Override /* Object */<a name="line.104"></a>
+<span class="sourceLineNo">105</span>   public int hashCode() {<a name="line.105"></a>
+<span class="sourceLineNo">106</span>      return getName().hashCode();<a name="line.106"></a>
+<span class="sourceLineNo">107</span>   }<a name="line.107"></a>
+<span class="sourceLineNo">108</span>}<a name="line.108"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceLink.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceLink.html b/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceLink.html
index 141e7ff..b1ef0e8 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceLink.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/labels/ResourceLink.html
@@ -20,58 +20,60 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.labels;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import java.text.*;<a name="line.15"></a>
+<span class="sourceLineNo">015</span>import static org.apache.juneau.internal.StringUtils.*;<a name="line.15"></a>
 <span class="sourceLineNo">016</span><a name="line.16"></a>
-<span class="sourceLineNo">017</span>import org.apache.juneau.dto.*;<a name="line.17"></a>
-<span class="sourceLineNo">018</span>import org.apache.juneau.rest.*;<a name="line.18"></a>
-<span class="sourceLineNo">019</span><a name="line.19"></a>
-<span class="sourceLineNo">020</span>/**<a name="line.20"></a>
-<span class="sourceLineNo">021</span> * A simple link to a child of a parent resource.<a name="line.21"></a>
-<span class="sourceLineNo">022</span> */<a name="line.22"></a>
-<span class="sourceLineNo">023</span>public class ResourceLink extends Link {<a name="line.23"></a>
-<span class="sourceLineNo">024</span><a name="line.24"></a>
-<span class="sourceLineNo">025</span>   /**<a name="line.25"></a>
-<span class="sourceLineNo">026</span>    * Constructor.<a name="line.26"></a>
-<span class="sourceLineNo">027</span>    *<a name="line.27"></a>
-<span class="sourceLineNo">028</span>    * @param req The HTTP request from the parent resource.<a name="line.28"></a>
-<span class="sourceLineNo">029</span>    * @param childPath The child resource path.<a name="line.29"></a>
-<span class="sourceLineNo">030</span>    * @param args Optional {@link MessageFormat}-style arguments.<a name="line.30"></a>
-<span class="sourceLineNo">031</span>    */<a name="line.31"></a>
-<span class="sourceLineNo">032</span>   public ResourceLink(RestRequest req, String childPath, Object...args) {<a name="line.32"></a>
-<span class="sourceLineNo">033</span>      super(getName(getPath(childPath,args)), getHref(req, getPath(childPath,args)));<a name="line.33"></a>
-<span class="sourceLineNo">034</span>   }<a name="line.34"></a>
-<span class="sourceLineNo">035</span><a name="line.35"></a>
-<span class="sourceLineNo">036</span>   /**<a name="line.36"></a>
-<span class="sourceLineNo">037</span>    * Constructor.<a name="line.37"></a>
-<span class="sourceLineNo">038</span>    *<a name="line.38"></a>
-<span class="sourceLineNo">039</span>    * @param label The label for the link.<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    * @param req The HTTP request from the parent resource.<a name="line.40"></a>
-<span class="sourceLineNo">041</span>    * @param childPath The child resource path.<a name="line.41"></a>
-<span class="sourceLineNo">042</span>    * @param args Optional {@link MessageFormat}-style arguments.<a name="line.42"></a>
-<span class="sourceLineNo">043</span>    */<a name="line.43"></a>
-<span class="sourceLineNo">044</span>   public ResourceLink(String label, RestRequest req, String childPath, Object...args) {<a name="line.44"></a>
-<span class="sourceLineNo">045</span>      super(label, getHref(req, getPath(childPath,args)));<a name="line.45"></a>
-<span class="sourceLineNo">046</span>   }<a name="line.46"></a>
-<span class="sourceLineNo">047</span><a name="line.47"></a>
-<span class="sourceLineNo">048</span>   private static String getName(String childPath) {<a name="line.48"></a>
-<span class="sourceLineNo">049</span>      String s = childPath;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>      if (childPath.indexOf('/') == -1)<a name="line.50"></a>
-<span class="sourceLineNo">051</span>         s = childPath;<a name="line.51"></a>
-<span class="sourceLineNo">052</span>      else<a name="line.52"></a>
-<span class="sourceLineNo">053</span>         s = childPath.substring(childPath.lastIndexOf('/')+1);<a name="line.53"></a>
-<span class="sourceLineNo">054</span>      return RestUtils.decode(s);<a name="line.54"></a>
-<span class="sourceLineNo">055</span>   }<a name="line.55"></a>
-<span class="sourceLineNo">056</span><a name="line.56"></a>
-<span class="sourceLineNo">057</span>   private static String getHref(RestRequest req, String childPath) {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>      return req.getServletURIBuilder().append('/').append(childPath).toString();<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   }<a name="line.59"></a>
-<span class="sourceLineNo">060</span><a name="line.60"></a>
-<span class="sourceLineNo">061</span>   private static String getPath(String childPath, Object...args) {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>      if (args.length &gt; 0)<a name="line.62"></a>
-<span class="sourceLineNo">063</span>         childPath = MessageFormat.format(childPath, args);<a name="line.63"></a>
-<span class="sourceLineNo">064</span>      return childPath;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>   }<a name="line.65"></a>
-<span class="sourceLineNo">066</span>}<a name="line.66"></a>
+<span class="sourceLineNo">017</span>import java.text.*;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import org.apache.juneau.dto.*;<a name="line.19"></a>
+<span class="sourceLineNo">020</span>import org.apache.juneau.rest.*;<a name="line.20"></a>
+<span class="sourceLineNo">021</span><a name="line.21"></a>
+<span class="sourceLineNo">022</span>/**<a name="line.22"></a>
+<span class="sourceLineNo">023</span> * A simple link to a child of a parent resource.<a name="line.23"></a>
+<span class="sourceLineNo">024</span> */<a name="line.24"></a>
+<span class="sourceLineNo">025</span>public class ResourceLink extends Link {<a name="line.25"></a>
+<span class="sourceLineNo">026</span><a name="line.26"></a>
+<span class="sourceLineNo">027</span>   /**<a name="line.27"></a>
+<span class="sourceLineNo">028</span>    * Constructor.<a name="line.28"></a>
+<span class="sourceLineNo">029</span>    *<a name="line.29"></a>
+<span class="sourceLineNo">030</span>    * @param req The HTTP request from the parent resource.<a name="line.30"></a>
+<span class="sourceLineNo">031</span>    * @param childPath The child resource path.<a name="line.31"></a>
+<span class="sourceLineNo">032</span>    * @param args Optional {@link MessageFormat}-style arguments.<a name="line.32"></a>
+<span class="sourceLineNo">033</span>    */<a name="line.33"></a>
+<span class="sourceLineNo">034</span>   public ResourceLink(RestRequest req, String childPath, Object...args) {<a name="line.34"></a>
+<span class="sourceLineNo">035</span>      super(getName(getPath(childPath,args)), getHref(req, getPath(childPath,args)));<a name="line.35"></a>
+<span class="sourceLineNo">036</span>   }<a name="line.36"></a>
+<span class="sourceLineNo">037</span><a name="line.37"></a>
+<span class="sourceLineNo">038</span>   /**<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    * Constructor.<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    *<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    * @param label The label for the link.<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    * @param req The HTTP request from the parent resource.<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    * @param childPath The child resource path.<a name="line.43"></a>
+<span class="sourceLineNo">044</span>    * @param args Optional {@link MessageFormat}-style arguments.<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    */<a name="line.45"></a>
+<span class="sourceLineNo">046</span>   public ResourceLink(String label, RestRequest req, String childPath, Object...args) {<a name="line.46"></a>
+<span class="sourceLineNo">047</span>      super(label, getHref(req, getPath(childPath,args)));<a name="line.47"></a>
+<span class="sourceLineNo">048</span>   }<a name="line.48"></a>
+<span class="sourceLineNo">049</span><a name="line.49"></a>
+<span class="sourceLineNo">050</span>   private static String getName(String childPath) {<a name="line.50"></a>
+<span class="sourceLineNo">051</span>      String s = childPath;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>      if (childPath.indexOf('/') == -1)<a name="line.52"></a>
+<span class="sourceLineNo">053</span>         s = childPath;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>      else<a name="line.54"></a>
+<span class="sourceLineNo">055</span>         s = childPath.substring(childPath.lastIndexOf('/')+1);<a name="line.55"></a>
+<span class="sourceLineNo">056</span>      return urlDecode(s);<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   }<a name="line.57"></a>
+<span class="sourceLineNo">058</span><a name="line.58"></a>
+<span class="sourceLineNo">059</span>   private static String getHref(RestRequest req, String childPath) {<a name="line.59"></a>
+<span class="sourceLineNo">060</span>      return req.getServletURIBuilder().append('/').append(childPath).toString();<a name="line.60"></a>
+<span class="sourceLineNo">061</span>   }<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>   private static String getPath(String childPath, Object...args) {<a name="line.63"></a>
+<span class="sourceLineNo">064</span>      if (args.length &gt; 0)<a name="line.64"></a>
+<span class="sourceLineNo">065</span>         childPath = MessageFormat.format(childPath, args);<a name="line.65"></a>
+<span class="sourceLineNo">066</span>      return childPath;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>   }<a name="line.67"></a>
+<span class="sourceLineNo">068</span>}<a name="line.68"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.html b/content/site/apidocs/src-html/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.html
index b2e6940..d08e473 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.html
@@ -20,7 +20,7 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.remoteable;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import org.apache.juneau.annotation.*;<a name="line.15"></a>
+<span class="sourceLineNo">015</span>import org.apache.juneau.remoteable.*;<a name="line.15"></a>
 <span class="sourceLineNo">016</span>import org.apache.juneau.rest.*;<a name="line.16"></a>
 <span class="sourceLineNo">017</span>import org.apache.juneau.rest.annotation.*;<a name="line.17"></a>
 <span class="sourceLineNo">018</span><a name="line.18"></a>

http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/80ff9b74/content/site/apidocs/src-html/org/apache/juneau/rest/vars/UrlEncodeVar.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/rest/vars/UrlEncodeVar.html b/content/site/apidocs/src-html/org/apache/juneau/rest/vars/UrlEncodeVar.html
index 4bbdd5f..3ce88ea 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/rest/vars/UrlEncodeVar.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/rest/vars/UrlEncodeVar.html
@@ -20,38 +20,40 @@
 <span class="sourceLineNo">012</span>// ***************************************************************************************************************************<a name="line.12"></a>
 <span class="sourceLineNo">013</span>package org.apache.juneau.rest.vars;<a name="line.13"></a>
 <span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import org.apache.juneau.rest.*;<a name="line.15"></a>
-<span class="sourceLineNo">016</span>import org.apache.juneau.svl.*;<a name="line.16"></a>
-<span class="sourceLineNo">017</span><a name="line.17"></a>
-<span class="sourceLineNo">018</span>/**<a name="line.18"></a>
-<span class="sourceLineNo">019</span> * URL-encoding variable resolver.<a name="line.19"></a>
-<span class="sourceLineNo">020</span> * &lt;p&gt;<a name="line.20"></a>
-<span class="sourceLineNo">021</span> * The format for this var is &lt;js&gt;"$UE{innerValue}"&lt;/js&gt;.<a name="line.21"></a>
+<span class="sourceLineNo">015</span>import static org.apache.juneau.internal.StringUtils.*;<a name="line.15"></a>
+<span class="sourceLineNo">016</span><a name="line.16"></a>
+<span class="sourceLineNo">017</span>import org.apache.juneau.internal.*;<a name="line.17"></a>
+<span class="sourceLineNo">018</span>import org.apache.juneau.svl.*;<a name="line.18"></a>
+<span class="sourceLineNo">019</span><a name="line.19"></a>
+<span class="sourceLineNo">020</span>/**<a name="line.20"></a>
+<span class="sourceLineNo">021</span> * URL-encoding variable resolver.<a name="line.21"></a>
 <span class="sourceLineNo">022</span> * &lt;p&gt;<a name="line.22"></a>
-<span class="sourceLineNo">023</span> * This variable takes the contents inside the variable and replaces it with a value returned by calling {@link RestUtils#encode(String)}).<a name="line.23"></a>
+<span class="sourceLineNo">023</span> * The format for this var is &lt;js&gt;"$UE{innerValue}"&lt;/js&gt;.<a name="line.23"></a>
 <span class="sourceLineNo">024</span> * &lt;p&gt;<a name="line.24"></a>
-<span class="sourceLineNo">025</span> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.<a name="line.25"></a>
-<span class="sourceLineNo">026</span> * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.<a name="line.26"></a>
-<span class="sourceLineNo">027</span> *<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * @see org.apache.juneau.svl<a name="line.28"></a>
-<span class="sourceLineNo">029</span> */<a name="line.29"></a>
-<span class="sourceLineNo">030</span>public class UrlEncodeVar extends SimpleVar {<a name="line.30"></a>
-<span class="sourceLineNo">031</span><a name="line.31"></a>
-<span class="sourceLineNo">032</span>   /** The name of this variable. */<a name="line.32"></a>
-<span class="sourceLineNo">033</span>   public static final String NAME = "UE";<a name="line.33"></a>
-<span class="sourceLineNo">034</span><a name="line.34"></a>
-<span class="sourceLineNo">035</span>   /**<a name="line.35"></a>
-<span class="sourceLineNo">036</span>    * Constructor.<a name="line.36"></a>
-<span class="sourceLineNo">037</span>    */<a name="line.37"></a>
-<span class="sourceLineNo">038</span>   public UrlEncodeVar() {<a name="line.38"></a>
-<span class="sourceLineNo">039</span>      super(NAME);<a name="line.39"></a>
-<span class="sourceLineNo">040</span>   }<a name="line.40"></a>
-<span class="sourceLineNo">041</span><a name="line.41"></a>
-<span class="sourceLineNo">042</span>   @Override /* Parameter */<a name="line.42"></a>
-<span class="sourceLineNo">043</span>   public String resolve(VarResolverSession session, String key) {<a name="line.43"></a>
-<span class="sourceLineNo">044</span>      return RestUtils.encode(key);<a name="line.44"></a>
-<span class="sourceLineNo">045</span>   }<a name="line.45"></a>
-<span class="sourceLineNo">046</span>}<a name="line.46"></a>
+<span class="sourceLineNo">025</span> * This variable takes the contents inside the variable and replaces it with a value returned by calling {@link StringUtils#urlEncode(String)}).<a name="line.25"></a>
+<span class="sourceLineNo">026</span> * &lt;p&gt;<a name="line.26"></a>
+<span class="sourceLineNo">027</span> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved.<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.<a name="line.28"></a>
+<span class="sourceLineNo">029</span> *<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * @see org.apache.juneau.svl<a name="line.30"></a>
+<span class="sourceLineNo">031</span> */<a name="line.31"></a>
+<span class="sourceLineNo">032</span>public class UrlEncodeVar extends SimpleVar {<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>   /** The name of this variable. */<a name="line.34"></a>
+<span class="sourceLineNo">035</span>   public static final String NAME = "UE";<a name="line.35"></a>
+<span class="sourceLineNo">036</span><a name="line.36"></a>
+<span class="sourceLineNo">037</span>   /**<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    * Constructor.<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>   public UrlEncodeVar() {<a name="line.40"></a>
+<span class="sourceLineNo">041</span>      super(NAME);<a name="line.41"></a>
+<span class="sourceLineNo">042</span>   }<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>   @Override /* Parameter */<a name="line.44"></a>
+<span class="sourceLineNo">045</span>   public String resolve(VarResolverSession session, String key) {<a name="line.45"></a>
+<span class="sourceLineNo">046</span>      return urlEncode(key);<a name="line.46"></a>
+<span class="sourceLineNo">047</span>   }<a name="line.47"></a>
+<span class="sourceLineNo">048</span>}<a name="line.48"></a>
 
 
 


Mime
View raw message