/** * @See org.springframework.extensions.surf.util.URLEncoder.encodeUriComponent(s) */ public static String encode(String s) { return encode(s, false); }
/** * <p>Build the REST URl to use to retrieve the metadata for the supplied user</p> * * @param context RequestContext * @param userId String * @param endpointId String * @return String */ protected String buildUserMetadataRestUrl(RequestContext context, String userId, String endpointId) { return DEFAULT_USER_URL_PREFIX + URLEncoder.encode(userId); }
/** * <p>Build the REST URl to use to retrieve the metadata for the supplied user</p> * * @param context RequestContext * @param userId String * @param endpointId String * @return String */ protected String buildUserMetadataRestUrl(RequestContext context, String userId, String endpointId) { return DEFAULT_USER_URL_PREFIX + URLEncoder.encode(userId); }
private String buildUrlParamString(Map<String, String> properties) { StringBuilder params = new StringBuilder("?inviteId="); params.append(properties.get(WF_INSTANCE_ID)); params.append("&inviteeUserName="); params.append(URLEncoder.encode(properties.get(wfVarInviteeUserName))); params.append("&siteShortName="); params.append(properties.get(wfVarResourceName)); params.append("&inviteTicket="); params.append(properties.get(wfVarInviteTicket)); return params.toString(); }
private String buildUrlParamString(Map<String, String> properties) { StringBuilder params = new StringBuilder("?inviteId="); params.append(properties.get(WF_INSTANCE_ID)); params.append("&inviteeUserName="); params.append(URLEncoder.encode(properties.get(wfVarInviteeUserName))); params.append("&siteShortName="); params.append(properties.get(wfVarResourceName)); params.append("&inviteTicket="); params.append(properties.get(wfVarInviteTicket)); return params.toString(); }
@ScriptMethod ( help="Encodes input string using URLEncoder", output="Processed string" ) public String urlEncode(@ScriptParameter(help="Input string") String s) { return URLEncoder.encode(s); }
@ScriptMethod ( help="Encodes input string using URLEncoder", output="Processed string" ) public String urlEncode(@ScriptParameter(help="Input string") String s) { return URLEncoder.encode(s); }
@ScriptMethod ( help="Encodes input string using URLEncoder", output="Processed string" ) public String urlEncode(@ScriptParameter(help="Input string") String s) { return URLEncoder.encode(s); }
public Person(String name) { this.name = name; String encName = URLEncoder.encode(name); this.email = encName + "@test.com"; this.node = new NodeRef(testStore, encName); }
/** * @return download URL to the content for a document item only */ public String getDownloadUrl() { if (getIsDocument() == true) { return MessageFormat.format(CONTENT_DOWNLOAD_PROP_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId(), URLEncoder.encode(getName()), URLEncoder.encode(property.toString()) }); } else { return ""; } }
/** * @return Returns the URL to the content stream for the frozen state of the node from * the default content property (@see ContentModel.PROP_CONTENT) */ @Override public String getUrl() { NodeRef nodeRef = this.version.getFrozenStateNodeRef(); return MessageFormat.format(parent.CONTENT_GET_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId(), URLEncoder.encode(getName()) } ); } }
/** * @return Returns the URL to the content stream for the frozen state of the node from * the default content property (@see ContentModel.PROP_CONTENT) */ @Override public String getUrl() { NodeRef nodeRef = this.version.getFrozenStateNodeRef(); return MessageFormat.format(parent.CONTENT_GET_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId(), URLEncoder.encode(getName()) } ); } }
private String buildUrl(String format) { return MessageFormat.format(format, new Object[] { getNodeRef().getStoreRef().getProtocol(), getNodeRef().getStoreRef().getIdentifier(), getNodeRef().getId(), URLEncoder.encode(getName()) } ); }
/** * @return For a content document, this method returns the download URL to the content for * the default content property (@see ContentModel.PROP_CONTENT) * <p> * For a container node, this method returns an empty string */ public String getDownloadUrl() { if (getIsDocument() == true) { return MessageFormat.format(CONTENT_DOWNLOAD_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId(), URLEncoder.encode(getName()) }); } else { return ""; } }
private String buildUrl(String format) { return MessageFormat.format(format, new Object[] { getNodeRef().getStoreRef().getProtocol(), getNodeRef().getStoreRef().getIdentifier(), getNodeRef().getId(), URLEncoder.encode(getName()) } ); }
/** * @return For a content document, this method returns the URL to the content stream for the default content * property (@see ContentModel.PROP_CONTENT) * <p> * For a container node, this method return the URL to browse to the folder in the web-client */ public String getUrl() { if (getIsDocument() == true) { return MessageFormat.format(CONTENT_DEFAULT_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId(), URLEncoder.encode(getName())}); } else { return MessageFormat.format(FOLDER_BROWSE_URL, new Object[] { nodeRef.getStoreRef().getProtocol(), nodeRef.getStoreRef().getIdentifier(), nodeRef.getId() }); } }