private String appendParam(String url, String name, Object value) { // TODO: Check the object type to do the appropriate cast or conversion // This currently assumes the value is a string if (name == null || value == null) { return url; } if (!(value instanceof String)) { return url; } String param = name + "=" + NetUtil.encode((String) value); return appendParams(url, param); }
public static String encodeSubject(Subject subject) { if (subject == null) { return null; } StringBuilder sb = new StringBuilder(); for (final Principal principal : subject.getPrincipals()) { sb.append(principal.getClass().getName()); sb.append("["); sb.append(NetUtil.encode(principal.getName())); sb.append("]"); } return sb.toString(); }
this.cutout = "CIRCLE=" + NetUtil.encode(daf.format(dvals.iterator())); } else if (dvals.size() >= 6) { this.cutout = "POLYGON=" + NetUtil.encode(daf.format(dvals.iterator())); } else if ("spectralinterval".equalsIgnoreCase(tokens[0])) { this.cutout = "BAND=" + NetUtil.encode(daf.format(dvals.iterator())); } else { this.requestFail = "invalid parameter: cutout=" + str;
path.append("/dn/").append(NetUtil.encode(dn));
String path = "/" + NetUtil.encode(userID) + "?idType=" + this .getIdType(principal) + "&detail=identity";
String path = "/" + targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType; URL groupsURL = lookupServiceURL(Standards.GMS_GROUPS_01); URL addUserMemberURL = new URL(groupsURL.toExternalForm() + path);
String path = "/" + targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType; URL groupsURL = lookupServiceURL(Standards.GMS_GROUPS_01); URL removeUserMemberURL = new URL(groupsURL.toExternalForm() + path);
sb.append("&runid=").append(NetUtil.encode(runID));
/** * Create a DataNode from the given file and * add it to the CommandQueue. * * @param file the file to add to the CommandQueue * @throws URISyntaxException For invalid URI characters. * @throws InterruptedException */ protected void queueDataNode(File file) throws URISyntaxException, InterruptedException { // Get the path starting from the root file. String path = getRelativePath(file); // Create a DataNode. String uriString = targetURI.toString() + path; // HACK: replace windows backslashes with forward slashes // (rt ticket 62652) uriString = uriString.replace("\\", "/"); final URI uri = URI.create(NetUtil.encode(uriString)); final DataNode node = new DataNode(new VOSURI(uri)); // Add node and InputStream from file. VOSpaceCommand command = new UploadFile(node, file); commandQueue.put(command); }
UserNotFoundException String id = NetUtil.encode(principal.getName()); String path = "/" + id + "?idType=" + AuthenticationUtil .getPrincipalType(principal);
URL getMembershipsURL = new URL(searchURL.toExternalForm() + "?ROLE=" + NetUtil.encode(roleString));
p = this.getNode(parentURI.getPath(), "detail=min&limit=1&uri=" + NetUtil.encode(node.getUri().toString())); else p = this.getNode(parentURI.getPath(), "detail=min&limit=0");
uriQueryParam = "uri=" + NetUtil.encode(uriQueryObj.toString()); cn = null;