/** * Returns filterURL property. * * @param pFilter parameter to set. * @return filterURL property. * @throws UnsupportedEncodingException - exception */ public static String getFilterURL(RepositoryItem pFilter) throws UnsupportedEncodingException { String name = (String) pFilter.getPropertyValue("tagTitle"); name = SEOUtils.prepareNameForURL(name); StringBuffer url = new StringBuffer(); url.append("/conseils-et-forums/") .append(name) .append('+') .append(pFilter.getRepositoryId()) .append(EXTENSION_HTML); return url.toString(); }
/** * Returns topicURL property. * * @param pTopic parameter to set. * @return topicURL property. * @throws UnsupportedEncodingException - exception */ public static String getTopicURL(RepositoryItem pTopic) throws UnsupportedEncodingException { String name = (String) pTopic.getPropertyValue(PROPERTY_TITLE); name = SEOUtils.prepareNameForURL(name); StringBuffer url = new StringBuffer(); url.append("/lancez-vous/") .append(name) .append('-') .append(pTopic.getRepositoryId()) .append(EXTENSION_HTML); return url.toString(); }
/** * Returns productURL property. * * @param pProduct parameter to set. * @return productURL property. * @throws UnsupportedEncodingException - exception */ public static String getProductURL(RepositoryItem pProduct) throws UnsupportedEncodingException { String name = (String) pProduct.getPropertyValue(PROPERTY_DISPLAY_NAME); name = SEOUtils.prepareNameForURL(name); StringBuffer url = new StringBuffer(); url.append('/') .append(name) .append('-') .append(pProduct.getRepositoryId()) .append(EXTENSION_HTML); return url.toString(); }
/** * Returns documentURL property. * * @param pDocument parameter to set. * @return documentURL property. * @throws UnsupportedEncodingException - exception */ public static String getDocumentURL(RepositoryItem pDocument) throws UnsupportedEncodingException { String externalURL = getNotEmptyDocExtURL(pDocument); if (externalURL != null) { return externalURL; } String name = (String) pDocument.getPropertyValue(PROPERTY_TITLE); name = SEOUtils.prepareNameForURL(name); StringBuffer url = new StringBuffer(); url.append("/doc/") .append(name) .append('-') .append(pDocument.getRepositoryId()) .append(EXTENSION_DOC); return url.toString(); }