public Page getPage() { if (null == page) page = pageManager.getPage(spaceKey, pageTitle); return page; }
public RemoteAttachment(Attachment attachment) { downloadUrl = attachment.getDownloadPath(); comment = attachment.getVersionComment(); name = attachment.getFileName(); size = attachment.getFileSize(); }
@Override public String apply(Comment comment) { return comment.getIdAsString(); } }
private void populateLinkFixer(LinkFixer linkFixer, ContentTree contentTree, Collection<Page> additionalInternalPages) { List<ContentNode> contentNodes = contentTree.getAllContentNodes(); for (ContentNode node : contentNodes) { Page p = node.getPage(); linkFixer.addPage(p.getIdAsString(), p.getTitle()); } additionalInternalPages.forEach(p -> linkFixer.addPage(p.getIdAsString(), p.getTitle())); }
public void execute() throws Exception { Page page = pageManager.getPage(getContainingPageId()); if (null != page) { Attachment attachment = attachmentManager.getAttachment(page, getFileName()); if (null != attachment) attachmentManager.removeAttachmentFromServer(attachment); } }
public Space getSpaceFromContentEntity(ContentEntityObject contentEntityObject) { if (contentEntityObject instanceof AbstractPage) return ((AbstractPage) contentEntityObject).getSpace(); if (contentEntityObject instanceof Comment) return getSpaceFromContentEntity(((Comment) contentEntityObject).getOwner()); return spaceManager.getSpace(((Draft) contentEntityObject).getDraftSpaceKey()); }
/** * For <a href="http://developer.atlassian.com/jira/browse/MARK-42">MARK-42</a> * * @return Returns a page ID so that suggested labels can be shown. */ @SuppressWarnings("unused") public long getPageId() { return null == page ? 0 : page.getId(); }
public String getName() { return attachment.getFileName(); }
private BlogPost getBlogPost() { if (null == blogPost) blogPost = pageManager.getBlogPost(spaceKey, blogTitle, publishedDate); return blogPost; }
public Date getModified() { return attachment.getLastModificationDate(); }
public String getDownloadPath() { return attachment.getDownloadPath(); }
void setBookmarkPageContent(Page bookmarkPage, String bookmarkPageContent) { // Since there is no way to build macro XHTML tags, we rely on this so the migration would be performed bookmarkPage.setContent(bookmarkPageContent); }
public int getVersion() { return attachment.getVersion(); }
private boolean prepareNext() { if (! haveNext) { if (page != null) { page = (AbstractPage) pageManager.getPreviousVersion(page); } haveNext = (page != null); } return haveNext; } };
public String getType() { return "attachment." + (attachment.isNew() ? "added" : "modified"); }
public boolean isRecentlyUpdatedFor( ContentEntityObject ceo, Object user ) { User realUser = (User) user; return ceo instanceof Page && pageManager.isPageRecentlyUpdatedForUser( (Page) ceo, realUser ); }
public ContentEntityObject getContentEntityObject() { if (null == page) page = pageManager.getPage(spaceKey, pageTitle); return page; }
protected Page getPage() { if (null == page) page = pageManager.getPage(spaceKey, pageTitle); return page; }
public ContentEntityObject getContentEntityObject() { return pageManager.getPage(spaceKey, pageTitle); }
public Page getPage() { return pageManager.getPage(spaceKey, pageTitle); }