com.atlassian.confluence.it.content
Class ViewAttachmentsBean

java.lang.Object
  extended by com.atlassian.confluence.it.content.ViewAttachmentsBean

public class ViewAttachmentsBean
extends java.lang.Object

Represents a View Attachments page for a Page or BlogPost.


Field Summary
static java.lang.String VIEW_ATTACHMENTS_LINK_ID
           
 
Method Summary
 void attachFile(java.lang.String filename, java.lang.String content)
           
 void attachFile(java.lang.String filename, java.lang.String content, java.lang.String comment)
           
 boolean canRemove(java.lang.String attachmentFilename)
          Returns true if the 'Remove' link is present for the given attachment name.
 void downloadAll()
          Clicks the 'Download All' link on the view attachments page.
 void downloadAttachment(java.lang.String name)
           
 void edit(java.lang.String attachmentFilename)
          Goes to the edit screen of the given attachment.
 java.lang.String getEditXPath(java.lang.String attachmentFilename)
           
 int getNumberOfAttachments()
           
 java.lang.String getRemoveXPath(java.lang.String attachmentFilename)
           
 boolean hasAttachment(java.lang.String attachmentName)
           
 void remove(java.lang.String attachmentFilename)
          Clicks the 'Remove' link on the view attachments page.
 void renameAttachment(java.lang.String attachmentName, java.lang.String newAttachmentName)
           
static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester)
          Factory method to return a ViewAttachmentsBean from the current location of the web tester, by clicking on the 'Attachments' link on the page.
static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester, long pageId)
           
static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester, Page page)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW_ATTACHMENTS_LINK_ID

public static final java.lang.String VIEW_ATTACHMENTS_LINK_ID
See Also:
Constant Field Values
Method Detail

viewAttachments

public static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester)
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,
                                                  long pageId)

viewAttachments

public static ViewAttachmentsBean viewAttachments(net.sourceforge.jwebunit.junit.WebTester tester,
                                                  Page page)

getNumberOfAttachments

public int getNumberOfAttachments()

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(java.lang.String name)

edit

public void edit(java.lang.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

getEditXPath

public java.lang.String getEditXPath(java.lang.String attachmentFilename)

remove

public void remove(java.lang.String attachmentFilename)
Clicks the 'Remove' link on the view attachments page.

Parameters:
attachmentFilename - filename of the attachment to remove

canRemove

public boolean canRemove(java.lang.String attachmentFilename)
Returns true if the 'Remove' link is present for the given attachment name.


getRemoveXPath

public java.lang.String getRemoveXPath(java.lang.String attachmentFilename)

attachFile

public void attachFile(java.lang.String filename,
                       java.lang.String content)

attachFile

public void attachFile(java.lang.String filename,
                       java.lang.String content,
                       java.lang.String comment)

renameAttachment

public void renameAttachment(java.lang.String attachmentName,
                             java.lang.String newAttachmentName)

hasAttachment

public boolean hasAttachment(java.lang.String attachmentName)


Copyright © 2003-2011 Atlassian. All Rights Reserved.