com.atlassian.confluence.it
Class Attachment
java.lang.Object
com.atlassian.confluence.it.Attachment
- All Implemented Interfaces:
- LinkableContent, TitledContent
public class Attachment
- extends Object
- implements TitledContent, LinkableContent
Constructor Summary |
Attachment(ContentEntity contentEntity,
Attachment other)
Copy constructor -- put the provided attachment on another page. |
Attachment(ContentEntity contentEntity,
File file,
String contentType)
|
Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String classpathResource)
|
Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String comment,
byte[] data)
Creates an Attachment object of an intended file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GIF_TYPE
public static final String GIF_TYPE
- See Also:
- Constant Field Values
PNG_TYPE
public static final String PNG_TYPE
- See Also:
- Constant Field Values
PDF_TYPE
public static final String PDF_TYPE
- See Also:
- Constant Field Values
TEXT_TYPE
public static final String TEXT_TYPE
- See Also:
- Constant Field Values
SWF_TYPE
public static final String SWF_TYPE
- See Also:
- Constant Field Values
MOV_TYPE
public static final String MOV_TYPE
- See Also:
- Constant Field Values
Attachment
public Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String comment,
byte[] data)
- Creates an Attachment object of an intended file.
Example:
Attachment attachment = new Attachment(TEST_PAGE, attachmentName, Attachment.TEXT_TYPE, "your upload comment", "foo".getBytes());
- Parameters:
contentEntity
- the page or blog where the attachment will residefilename
- the attachment filecontentType
- mime type of the attachmentcomment
- comment associated with the attachment, which can be nulldata
- byte array of the attachment content
Attachment
public Attachment(ContentEntity contentEntity,
File file,
String contentType)
Attachment
public Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String classpathResource)
Attachment
public Attachment(ContentEntity contentEntity,
Attachment other)
- Copy constructor -- put the provided attachment on another page.
getPage
public ContentEntity getPage()
getFilename
public String getFilename()
getContentType
public String getContentType()
getComment
public String getComment()
getId
public long getId()
setId
public void setId(long id)
getData
public byte[] getData()
getDownloadUrl
public String getDownloadUrl()
getThumbnailUrl
public String getThumbnailUrl()
getEditUrl
public String getEditUrl()
getImageMarkup
public String getImageMarkup()
getThumbnailMarkup
public String getThumbnailMarkup()
getTitle
public String getTitle()
- Specified by:
getTitle
in interface TitledContent
getUrl
public String getUrl()
- Specified by:
getUrl
in interface LinkableContent
Copyright © 2003-2011 Atlassian. All Rights Reserved.