/** * Method to check whether a page exists in the Tridion Broker. * * @param url the Url to check * @param publicationId the publication Id * @return boolean indicating the page is present */ @Override public Boolean isPagePublished(String url, int publicationId) { LOG.debug("Enter isPagePublished with url: {} and publicationId: {}", url, publicationId); try { return pageProvider.checkPageExists(url, publicationId); } catch (ItemNotFoundException | SerializationException e) { LOG.error(e.getLocalizedMessage(), e); } return false; }
/** * Find the TCM Uri of a page by URL * * @param url the URL * @param publicationId the Publication Id * @return a TCMURI if found. * @throws FactoryException */ @Override public TCMURI findPageIdByUrl(final String url, final int publicationId) throws FactoryException { return pageProvider.getPageIdForUrl(url, publicationId); }
page = pageProvider.getPageContentByURL(url, publicationId);
pageSource = pageProvider.getPageContentById(tcmId); } catch (ParseException e) { LOG.error(e.getLocalizedMessage(), e);
try { tcmUri = new TCMURI(uri); resultItem = pageProvider.getPageById(tcmUri.getItemId(), tcmUri.getPublicationId()); pageSource = resultItem.getSourceContent();
if (cacheElement.isExpired() || cacheElement.getPayload() == null) { PageProviderResultItem<String> resultItem; resultItem = pageProvider.getPageByURL(url, publicationId); String pageSource = resultItem.getSourceContent();