public static void addLink( Element root, String searchURL, String rel, String keywords, int page, int itemsPerPage) { Element link = addElement(root, "link", DEFAULT_NAMESPACE); link.addAttribute("rel", rel); searchURL = HttpUtil.addParameter( searchURL, "keywords", URLCodec.encodeURL(keywords)); searchURL = HttpUtil.addParameter(searchURL, "p", page); searchURL = HttpUtil.addParameter(searchURL, "c", itemsPerPage); searchURL = HttpUtil.addParameter(searchURL, "format", "atom"); link.addAttribute("href", searchURL); link.addAttribute("type", "application/atom+xml"); }
params, requestContext); return HttpUtil.addParameter( HttpUtil.removeParameter(actualURL, "p_v_l_s_g_id"), "p_v_l_s_g_id", groupId);
protected String buildArticleURL( String articleURL, long groupId, long folderId, String articleId) { String portletId = PortletProviderUtil.getPortletId( JournalArticle.class.getName(), PortletProvider.Action.EDIT); String namespace = PortalUtil.getPortletNamespace(portletId); articleURL = HttpUtil.addParameter( articleURL, namespace + "groupId", groupId); articleURL = HttpUtil.addParameter( articleURL, namespace + "folderId", folderId); articleURL = HttpUtil.addParameter( articleURL, namespace + "articleId", articleId); return articleURL; }