private void startEndpoint(String method, String path, String description) { String url = RestServices.getAbsoluteUrl(def.getName()) + path; if (isHTML) { String link = "<small>" + RestServices.getBaseUrl() + "</small>" + StringUtils.HTMLEncode(url.substring(RestServices.getBaseUrl().length())); if ("GET".equals(method)) link = "<a href='" + url + "'>" + link + "</a>"; rsr.write("<h2>" + method + "» " + link + "</h2>") .write("<p>" + description + "</p>") .write("<table><tr><th>Parameter</th><th>Description</th></tr>"); } else rsr.datawriter .object() .key("path") .value(method + " " + url) .key("description") .value(description) .key("params") .array(); }
@Override public String executeAction() throws Exception { // BEGIN USER CODE return StringUtils.base64Encode(value); // END USER CODE }
@Override public String executeAction() throws Exception { // BEGIN USER CODE return StringUtils.XSSSanitize(html, policy); // END USER CODE }