Class ViewAttachmentsBean
- java.lang.Object
-
- com.atlassian.confluence.it.content.ViewAttachmentsBean
-
public class ViewAttachmentsBean extends Object
Represents a View Attachments page for a Page or BlogPost.
-
-
Field Summary
Fields Modifier and Type Field Description static StringVIEW_ATTACHMENTS_LINK_ID
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachFile(String filename, String content)voidattachFile(String filename, String content, String comment)voidattachFileFromPath(String path, String comment)booleancanRemove(String attachmentFilename)Returns true if the 'Remove' link is present for the given attachment name.booleancanRemoveVersion(String attachmentFilename, int version)Returns true if the 'Remove' link is present for the given attachment name and version.intcountVersions(String attachmentFilename)static StringcreateAttachmentScopedCssSelector(String attachmentFilename)static StringcreateCssSelector(String attachmentFilename, int version)static StringcreateVersionCssSelector(String attachmentFilename)voiddownloadAll()Clicks the 'Download All' link on the view attachments page.voiddownloadAttachment(String name)EditAttachmentsBeanedit(String attachmentFilename)Goes to the edit screen of the given attachment.StringgetComment(String attachmentFilename)StringgetCreator(String attachmentFilename)StringgetEditXPath(String attachmentFilename)intgetNumberOfAttachments()StringgetRemoveXPath(String attachmentFilename)StringgetVersionComment(String attachmentFilename, int version)StringgetVersionCreator(String attachmentFilename, int version)static StringgetViewAttachmentsPageTitle(Page page)booleanhasAttachment(String attachmentName)booleanhasVersion(String attachmentFilename, int version)PaginationBeanpages()voidremove(String attachmentFilename)Clicks the 'Remove' link on the view attachments page.RemoveAttachmentBeanremoveAttachments(long pageId, String attachmentFilename)RemoveAttachmentVersionBeanremoveAttachmentsVersion(long pageId, String attachmentFilename, int version)voidremoveVersion(String attachmentFilename, int version)voidrenameAttachment(String attachmentName, String newAttachmentName)static ViewAttachmentsBeanviewAttachments()Factory method to return a ViewAttachmentsBean from the current location of the web tester, by clicking on the 'Attachments' link on the page.static ViewAttachmentsBeanviewAttachments(long pageId)static ViewAttachmentsBeanviewAttachments(long pageId, net.sourceforge.jwebunit.junit.WebTester tester)static ViewAttachmentsBeanviewAttachments(Page page)static ViewAttachmentsBeanviewAttachments(Page page, net.sourceforge.jwebunit.junit.WebTester tester)static ViewAttachmentsBeanviewAttachments(net.sourceforge.jwebunit.junit.WebTester tester)static ViewAttachmentsBeanviewAttachmentsAndHighlight(Page page, String highlight)static ViewAttachmentsBeanviewAttachmentsAndHighlight(Page page, String highlight, net.sourceforge.jwebunit.junit.WebTester tester)static ViewAttachmentsBeanviewAttachmentsByKeyAndTitle(Page page)static ViewAttachmentsBeanviewAttachmentsByKeyAndTitle(Page page, net.sourceforge.jwebunit.junit.WebTester tester1)
-
-
-
Field Detail
-
VIEW_ATTACHMENTS_LINK_ID
public static final String VIEW_ATTACHMENTS_LINK_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
viewAttachments
public static ViewAttachmentsBean viewAttachments()
Factory method to return a ViewAttachmentsBean from the current location of the web tester, by clicking on the 'Attachments' link on the page.
-
viewAttachments
public static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester)
-
viewAttachments
public static ViewAttachmentsBean viewAttachments(long pageId)
-
removeAttachments
public RemoveAttachmentBean removeAttachments(long pageId, String attachmentFilename)
-
removeAttachmentsVersion
public RemoveAttachmentVersionBean removeAttachmentsVersion(long pageId, String attachmentFilename, int version)
-
viewAttachments
public static ViewAttachmentsBean viewAttachments(long pageId, net.sourceforge.jwebunit.junit.WebTester tester)
-
viewAttachmentsByKeyAndTitle
public static ViewAttachmentsBean viewAttachmentsByKeyAndTitle(Page page)
-
viewAttachmentsByKeyAndTitle
public static ViewAttachmentsBean viewAttachmentsByKeyAndTitle(Page page, net.sourceforge.jwebunit.junit.WebTester tester1)
-
viewAttachments
public static ViewAttachmentsBean viewAttachments(Page page)
-
viewAttachments
public static ViewAttachmentsBean viewAttachments(Page page, net.sourceforge.jwebunit.junit.WebTester tester)
-
viewAttachmentsAndHighlight
public static ViewAttachmentsBean viewAttachmentsAndHighlight(Page page, String highlight)
-
viewAttachmentsAndHighlight
public static ViewAttachmentsBean viewAttachmentsAndHighlight(Page page, String highlight, net.sourceforge.jwebunit.junit.WebTester tester)
-
downloadAll
public void downloadAll()
Clicks the 'Download All' link on the view attachments page.This method does not check if the link is present. (The link is not present when there is only one attachment).
-
downloadAttachment
public void downloadAttachment(String name)
-
edit
public EditAttachmentsBean edit(String attachmentFilename)
Goes to the edit screen of the given attachment.This method should really return a EditAttachmentsBean, but it has not been implemented yet.
- Parameters:
attachmentFilename- filename of the attachment to edit
-
remove
public void remove(String attachmentFilename)
Clicks the 'Remove' link on the view attachments page.- Parameters:
attachmentFilename- filename of the attachment to remove
-
canRemove
public boolean canRemove(String attachmentFilename)
Returns true if the 'Remove' link is present for the given attachment name.
-
removeVersion
public void removeVersion(String attachmentFilename, int version)
-
canRemoveVersion
public boolean canRemoveVersion(String attachmentFilename, int version)
Returns true if the 'Remove' link is present for the given attachment name and version.
-
getNumberOfAttachments
public int getNumberOfAttachments()
- Returns:
- the number of attachments on the page
-
countVersions
public int countVersions(String attachmentFilename)
- Returns:
- the number of attachment versions for the given file name
-
createAttachmentScopedCssSelector
public static String createAttachmentScopedCssSelector(String attachmentFilename)
-
hasVersion
public boolean hasVersion(String attachmentFilename, int version)
-
hasAttachment
public boolean hasAttachment(String attachmentName)
-
pages
public PaginationBean pages()
-
-