@Override public String getPageContentById(final String tcmUri) throws ItemNotFoundException, ParseException, SerializationException { final TCMURI uri = new TCMURI(tcmUri); return getPageContentById(uri.getItemId(), uri.getPublicationId()); }
@Override public String getPageContentById(final String tcmUri) throws ItemNotFoundException, ParseException, SerializationException { TCMURI uri = new TCMURI(tcmUri); return getPageContentById(uri.getItemId(), uri.getPublicationId()); }
/** * Retrieves content of a Page by looking the page up by its URL. * * @param url String representing the path part of the page URL * @param publication int representing the Publication id of the page * @return String representing the content of the Page * @throws SerializationException if something goes wrong deserializing * @throws ItemNotFoundException if the requested page does not exist */ @Override public String getPageContentByURL(String url, int publication) throws ItemNotFoundException, SerializationException { final PageMeta meta = getPageMetaByURL(url, publication); return getPageContentById(meta.getId(), meta.getPublicationId()); }
/** * Retrieves content of a Page by looking the page up by its URL. * * @param url String representing the path part of the page URL * @param publication int representing the Publication id of the page * @return String representing the content of the Page * @throws SerializationException if the character stream cannot be read * @throws ItemNotFoundException if the requested page does not exist */ @Override public String getPageContentByURL(String url, int publication) throws ItemNotFoundException, SerializationException { PageMeta meta = getPageMetaByURL(url, publication); return getPageContentById(meta.getItemId(), meta.getPublicationId()); }
@Override public PageProviderResultItem<String> getPageById(final int id, final int publication) throws IOException, ItemNotFoundException, SerializationException { final PageMeta pageMeta = getPageMetaById(id, publication); PageProviderResultItem<String> pageResult = new PageResultItemImpl(pageMeta.getPublicationId(), pageMeta .getId(), pageMeta.getURLPath()); pageResult.setLastPublishDate(pageMeta.getLastPublicationDate()); pageResult.setRevisionDate(pageMeta.getModificationDate()); pageResult.setContentSource(getPageContentById(id, publication)); return pageResult; }
@Override public PageProviderResultItem<String> getPageByURL(final String url, final int publication) throws ItemNotFoundException, SerializationException { final PageMeta pageMeta = getPageMetaByURL(url, publication); PageProviderResultItem<String> pageResult = new PageResultItemImpl(pageMeta.getPublicationId(), pageMeta .getId(), pageMeta.getURLPath()); pageResult.setLastPublishDate(pageMeta.getLastPublicationDate()); pageResult.setRevisionDate(pageMeta.getModificationDate()); pageResult.setContentSource(getPageContentById(pageMeta.getId(), pageMeta.getPublicationId())); return pageResult; }
@Override public PageProviderResultItem<String> getPageById(final int id, final int publication) throws IOException, ItemNotFoundException, SerializationException { final PageMeta pageMeta = getPageMetaById(id, publication); if (pageMeta == null) { throw new ItemNotFoundException("Unable to find page meta by id '" + id + "' and publication '" + publication + "'."); } PageProviderResultItem<String> pageResult = new PageResultItemImpl(pageMeta.getPublicationId(), pageMeta .getItemId(), pageMeta.getUrl()); pageResult.setLastPublishDate(pageMeta.getLastPublishDate()); pageResult.setRevisionDate(pageMeta.getModificationDate()); pageResult.setContentSource(getPageContentById(id, publication)); return pageResult; }
@Override public PageProviderResultItem<String> getPageByURL(final String url, final int publication) throws ItemNotFoundException, SerializationException { PageMeta pageMeta = getPageMetaByURL(url, publication); if (pageMeta == null) { throw new ItemNotFoundException("Unable to find page meta by url '" + url + "' and publication '" + publication + "'."); } PageProviderResultItem<String> pageResult = new PageResultItemImpl(pageMeta.getPublicationId(), pageMeta .getItemId(), pageMeta.getUrl()); pageResult.setLastPublishDate(pageMeta.getLastPublishDate()); pageResult.setRevisionDate(pageMeta.getModificationDate()); pageResult.setContentSource(getPageContentById(pageMeta.getItemId(), pageMeta.getPublicationId())); return pageResult; }