/** * Returns a link URL to the given Component TcmUri, when also specifying the source Page TcmUri. * * @param targetComponentURI String representing the TcmUri of the Component to resolve a link to * @param sourcePageURI String representing the TcmUri of the source Page (the current page) * @return String representing the URL of the link; or null, if the Component is not linked to */ @Override public String resolveComponentFromPage(String targetComponentURI, String sourcePageURI) { String link = getLinkAsString(sourcePageURI, targetComponentURI, Constants.TCM_ZERO_URI); if (StringUtils.isNotEmpty(link)) { return link; } return null; }
@Bean public BrokerLinkProvider linkProvider() { BrokerLinkProvider linkProvider = new BrokerLinkProvider(); linkProvider.setContentIsCompressed("false"); return linkProvider; }
/** * Returns a link URL to the given Component TcmUri, when also specifying the source Page TcmUri. * * @param targetComponentURI String representing the TcmUri of the Component to resolve a link to * @param sourcePageURI String representing the TcmUri of the source Page (the current page) * @return String representing the URL of the link; or null, if the Component is not linked to */ @Override public String resolveComponentFromPage(String targetComponentURI, String sourcePageURI) { String link = getLinkAsString(sourcePageURI, targetComponentURI, Constants.TCM_ZERO_URI); if (StringUtils.isNotEmpty(link)) { return link; } return null; }
/** * @param targetComponentUri String representing the TcmUri of the Component to resolve a link to * @param excludeComponentTemplateUri The Component Presentation to exclude * @return String representing the URL of the link; or null, if the Component is not linked to * @throws ItemNotFoundException * @throws SerializationException */ @Override public String resolveComponent(final String targetComponentUri, final String excludeComponentTemplateUri) throws ItemNotFoundException, SerializationException { String link = getLinkAsString(Constants.TCM_ZERO_URI, targetComponentUri, excludeComponentTemplateUri); if (StringUtils.isNotEmpty(link)) { return link; } return null; }
/** * @param targetComponentUri String representing the TcmUri of the Component to resolve a link to * @param excludeComponentTemplateUri The Component Presentation to exclude * @return String representing the URL of the link; or null, if the Component is not linked to * @throws ItemNotFoundException * @throws SerializationException */ @Override public String resolveComponent(final String targetComponentUri, final String excludeComponentTemplateUri) throws ItemNotFoundException, SerializationException { String link = getLinkAsString(Constants.TCM_ZERO_URI, targetComponentUri, excludeComponentTemplateUri); if (StringUtils.isNotEmpty(link)) { return link; } return null; }