Repository: incubator-juneau Updated Branches: refs/heads/master 7f0e6812b -> 7139635d3
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceDescription.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceDescription.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceDescription.java index bbdf8cf..3f642e4 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceDescription.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceDescription.java @@ -12,6 +12,8 @@ // *************************************************************************************************************************** package org.apache.juneau.rest.labels; +import static org.apache.juneau.internal.StringUtils.*; + import org.apache.juneau.dto.*; import org.apache.juneau.rest.*; @@ -40,7 +42,7 @@ public final class ResourceDescription extends NameDescription implements Compar * @param description The description of the child resource. */ public ResourceDescription(String rootUrl, String name, String description) { - super(new Link(name, (rootUrl.equals("/") || rootUrl.isEmpty() ? "/" : rootUrl + "/") + RestUtils.encode(name)), description); + super(new Link(name, (rootUrl.equals("/") || rootUrl.isEmpty() ? "/" : rootUrl + "/") + urlEncode(name)), description); } /** @@ -55,7 +57,7 @@ public final class ResourceDescription extends NameDescription implements Compar } private static String calcName(String childPath) { - return RestUtils.decode(childPath.indexOf('/') == -1 ? childPath : childPath.substring(childPath.lastIndexOf('/')+1)); + return urlDecode(childPath.indexOf('/') == -1 ? childPath : childPath.substring(childPath.lastIndexOf('/')+1)); } private static String calcHref(RestRequest req, String childPath) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceLink.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceLink.java b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceLink.java index 2325fdd..68dd7aa 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceLink.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/labels/ResourceLink.java @@ -12,6 +12,8 @@ // *************************************************************************************************************************** package org.apache.juneau.rest.labels; +import static org.apache.juneau.internal.StringUtils.*; + import java.text.*; import org.apache.juneau.dto.*; @@ -51,7 +53,7 @@ public class ResourceLink extends Link { s = childPath; else s = childPath.substring(childPath.lastIndexOf('/')+1); - return RestUtils.decode(s); + return urlDecode(s); } private static String getHref(RestRequest req, String childPath) { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/package.html ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html index f6f9cb4..bfc3aa3 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html @@ -2062,7 +2062,7 @@ <tr> <td><ck>$UE{...}</ck></td> <td>URL-Encode the specified value. - <br>Takes the contents inside the varible and replaces it with the value returned by calling {@link org.apache.juneau.rest.RestUtils#encode(String)}. + <br>Takes the contents inside the varible and replaces it with a URL-encoded string. </td> </tr> </table> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java index 45104f6..b37a785 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/RemoteableServiceProperties.java @@ -12,7 +12,7 @@ // *************************************************************************************************************************** package org.apache.juneau.rest.remoteable; -import org.apache.juneau.annotation.*; +import org.apache.juneau.remoteable.*; import org.apache.juneau.rest.*; import org.apache.juneau.rest.annotation.*; http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html index 239ae95..661ab91 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/remoteable/package.html @@ -78,8 +78,6 @@ </p> <p> Proxy interfaces are retrieved using the {@link org.apache.juneau.rest.client.RestClient#getRemoteableProxy(Class)} method. - The {@link org.apache.juneau.rest.client.RestClientBuilder#remoteableServletUri(String)} method is used to specify the location - of the remoteable services servlet running on the server. The remoteable servlet is a specialized subclass of {@link org.apache.juneau.rest.RestServlet} that provides a full-blown REST interface for calling remoteable services (e.g. POJOs) remotely. </p> @@ -100,7 +98,7 @@ <p class='bcode'> <jc>// Create a RestClient using JSON for serialization, and point to the server-side remoteable servlet.</jc> RestClient client = <jk>new</jk> RestClientBuilder() - .remoteableServletUri(<js>"https://localhost:9080/juneau/sample/remoteable"</js>) + .rootUrl(<js>"https://localhost:9080/juneau/sample/remoteable"</js>) .build(); <jc>// Create a proxy interface.</jc> @@ -313,7 +311,7 @@ <div class='topic'> <p> What if you want fine-tuned control over which methods are exposed in an interface instead of just all public methods? - For this, the {@link org.apache.juneau.annotation.Remoteable @Remoteable} annotation is provided. + For this, the {@link org.apache.juneau.remoteable.Remoteable @Remoteable} annotation is provided. It can be applied to individual interface methods to only expose those methods through the remoteable servlet. </p> <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/7139635d/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java index cc7f4c8..6fa7f5f 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/vars/UrlEncodeVar.java @@ -12,7 +12,9 @@ // *************************************************************************************************************************** package org.apache.juneau.rest.vars; -import org.apache.juneau.rest.*; +import static org.apache.juneau.internal.StringUtils.*; + +import org.apache.juneau.internal.*; import org.apache.juneau.svl.*; /** @@ -20,7 +22,7 @@ import org.apache.juneau.svl.*; * <p> * The format for this var is <js>"$UE{innerValue}"</js>. * <p> - * This variable takes the contents inside the variable and replaces it with a value returned by calling {@link RestUtils#encode(String)}). + * This variable takes the contents inside the variable and replaces it with a value returned by calling {@link StringUtils#urlEncode(String)}). * <p> * Since this is a {@link SimpleVar}, any variables contained in the result will be recursively resolved. * Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var. @@ -41,6 +43,6 @@ public class UrlEncodeVar extends SimpleVar { @Override /* Parameter */ public String resolve(VarResolverSession session, String key) { - return RestUtils.encode(key); + return urlEncode(key); } } \ No newline at end of file
