@Override /* Parameter */ public String resolve(VarResolverSession session, String key) { return urlEncode(key); } }
@Override /* Parameter */ public String resolve(VarResolverSession session, String key) { return urlEncode(key); } }
@Override /* Parameter */ public String resolve(VarResolverSession session, String key) { return urlEncode(key); } }
public Set<FileResource> getFiles() { if (f.isFile() || ! includeChildren) return null; Set<FileResource> s = new TreeSet<>(FILE_COMPARATOR); for (File fc : f.listFiles(FILE_FILTER)) s.add(new FileResource(fc, (path != null ? (path + '/') : "") + urlEncode(fc.getName()), allowDeletes, false)); return s; }
public Set<FileResource> getFiles() { if (f.isFile() || ! includeChildren) return null; Set<FileResource> s = new TreeSet<>(FILE_COMPARATOR); for (File fc : f.listFiles(FILE_FILTER)) s.add(new FileResource(fc, (path != null ? (path + '/') : "") + urlEncode(fc.getName()), allowDeletes, false)); return s; }
/** * Converts this object to a query string. * * <p> * Returned query string does not start with <js>'?'</js>. * * @return A new query string, or an empty string if this object is empty. */ public String toQueryString() { StringBuilder sb = new StringBuilder(); for (Map.Entry<String,String[]> e : this.entrySet()) { for (int i = 0; i < e.getValue().length; i++) { if (sb.length() > 0) sb.append("&"); sb.append(urlEncode(e.getKey())).append('=').append(urlEncode(e.getValue()[i])); } } return sb.toString(); }
/** * Converts this object to a query string. * * <p> * Returned query string does not start with <js>'?'</js>. * * @return A new query string, or an empty string if this object is empty. */ public String toQueryString() { StringBuilder sb = new StringBuilder(); for (Map.Entry<String,String[]> e : this.entrySet()) { for (int i = 0; i < e.getValue().length; i++) { if (sb.length() > 0) sb.append("&"); sb.append(urlEncode(e.getKey())).append('=').append(urlEncode(e.getValue()[i])); } } return sb.toString(); }
/** * Converts this object to a query string. * * <p> * Returned query string does not start with <js>'?'</js>. * * @return A new query string, or an empty string if this object is empty. */ public String toQueryString() { StringBuilder sb = new StringBuilder(); for (Map.Entry<String,String[]> e : this.entrySet()) { for (int i = 0; i < e.getValue().length; i++) { if (sb.length() > 0) sb.append("&"); sb.append(urlEncode(e.getKey())).append('=').append(urlEncode(e.getValue()[i])); } } return sb.toString(); }
public Set<FileResource> getFiles() { if (f.isFile() || ! includeChildren) return null; Set<FileResource> s = new TreeSet<>(new FileResourceComparator()); for (File fc : f.listFiles()) s.add(new FileResource(fc, (path != null ? (path + '/') : "") + urlEncode(fc.getName()), false)); return s; } }
/** * Constructor. * * @param restUrl The absolute URL of the REST interface backing the interface proxy. * @param m The Java method. */ public RemoteInterfaceMethod(final String restUrl, Method m) { this.method = m; this.path = m.getName() + '/' + HttpUtils.getMethodArgsSignature(m, true); this.url = trimSlashes(restUrl) + '/' + urlEncode(path); }
@RestMethod( name=GET, path="/", summary="List of available remote interfaces", description="Shows a list of the interfaces registered with this remote interface servlet." ) public List<LinkString> getInterfaces() throws Exception { List<LinkString> l = new LinkedList<>(); for (Class<?> c : getServiceMap().keySet()) l.add(new LinkString(c.getName(), "servlet:/{0}", urlEncode(c.getName()))); return l; }
@RestMethod( name=GET, path="/", summary="List of available remote interfaces", description="Shows a list of the interfaces registered with this remote interface servlet." ) public List<LinkString> getInterfaces() throws Exception { List<LinkString> l = new LinkedList<>(); for (Class<?> c : getServiceMap().keySet()) l.add(new LinkString(c.getName(), "servlet:/{0}", urlEncode(c.getName()))); return l; }
@RestMethod( name=GET, path="/", summary="List of available remote interfaces", description="Shows a list of the interfaces registered with this remote interface servlet." ) public List<LinkString> getInterfaces() throws Exception { List<LinkString> l = new LinkedList<>(); for (Class<?> c : getServiceMap().keySet()) l.add(new LinkString(c.getName(), "servlet:/{0}", urlEncode(c.getName()))); return l; }
public Set<FileResource> getFiles() { if (f.isFile() || ! includeChildren) return null; Set<FileResource> s = new TreeSet<>(new FileResourceComparator()); for (File fc : f.listFiles()) s.add(new FileResource(fc, (path != null ? (path + '/') : "") + urlEncode(fc.getName()), false)); return s; } }
/** * Constructor. * * @param restUrl The absolute URL of the REST interface backing the interface proxy. * @param m The Java method. */ public RemoteInterfaceMethod(final String restUrl, Method m) { this.method = m; this.path = m.getName() + '/' + HttpUtils.getMethodArgsSignature(m, true); this.url = trimSlashes(restUrl) + '/' + urlEncode(path); }
/** * Constructor. * * @param restUrl The absolute URL of the REST interface backing the interface proxy. * @param m The Java method. */ public RemoteInterfaceMethod(final String restUrl, Method m) { this.method = m; this.path = m.getName() + '/' + HttpUtils.getMethodArgsSignature(m, true); this.url = trimSlashes(restUrl) + '/' + urlEncode(path); }
@RestMethod( name=GET, path="/{javaInterface}", summary="List of available methods on interface", description="Shows a list of all the exposed methods on an interface.", htmldoc=@HtmlDoc( nav="<h5>Interface: $RP{javaInterface}</h5>" ) ) public Collection<LinkString> listMethods( @Path(name="javaInterface", description="Java interface name", example="com.foo.MyInterface") String javaInterface ) throws Exception { List<LinkString> l = new ArrayList<>(); for (String s : getMethods(javaInterface).keySet()) l.add(new LinkString(s, "servlet:/{0}/{1}", urlEncode(javaInterface), urlEncode(s))); return l; }
@RestMethod( name=GET, path="/{javaInterface}", summary="List of available methods on interface", description="Shows a list of all the exposed methods on an interface.", htmldoc=@HtmlDoc( nav="<h5>Interface: $RP{javaInterface}</h5>" ) ) public Collection<LinkString> listMethods( @Path(name="javaInterface", description="Java interface name", example="com.foo.MyInterface") String javaInterface ) throws Exception { List<LinkString> l = new ArrayList<>(); for (String s : getMethods(javaInterface).keySet()) l.add(new LinkString(s, "servlet:/{0}/{1}", urlEncode(javaInterface), urlEncode(s))); return l; }
@RestMethod( name=GET, path="/{javaInterface}", summary="List of available methods on interface", description="Shows a list of all the exposed methods on an interface.", htmldoc=@HtmlDoc( nav="<h5>Interface: $RP{javaInterface}</h5>" ) ) public Collection<LinkString> listMethods( @Path(name="javaInterface", description="Java interface name", example="com.foo.MyInterface") String javaInterface ) throws Exception { List<LinkString> l = new ArrayList<>(); for (String s : getMethods(javaInterface).keySet()) l.add(new LinkString(s, "servlet:/{0}/{1}", urlEncode(javaInterface), urlEncode(s))); return l; }