|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.it.Attachment
public class Attachment
Field Summary | |
---|---|
static String |
GIF_TYPE
|
static String |
MOV_TYPE
|
static String |
PDF_TYPE
|
static String |
PNG_TYPE
|
static String |
SWF_TYPE
|
static String |
TEXT_TYPE
|
Constructor Summary | |
---|---|
Attachment(Attachment original,
String versionComment,
byte[] newData)
|
|
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. |
Method Summary | |
---|---|
String |
getAbsoluteImageMarkup()
Retrieves the wiki markup to embed this image from another page in another space. |
String |
getComment()
|
String |
getContentType()
|
byte[] |
getData()
|
String |
getDownloadUrl()
|
String |
getDownloadUrl(String contextPath)
The application context without any slashes at all. |
String |
getEditUrl()
|
String |
getFilename()
|
long |
getId()
|
String |
getImageMarkup()
Gets the wiki markup to insert this attachment, as an embedded imaged, on the page to which it's attached. |
String |
getImageXpath()
Returns xpath that will match the an embedded image. |
ContentEntity |
getPage()
|
String |
getPlaceholderXpath()
Returns xpath that will match the "unidentified attachment" placeholder for this image. |
String |
getThumbnailMarkup()
|
String |
getThumbnailUrl()
|
String |
getTitle()
|
String |
getUrl()
|
UrlBuilder |
getUrlBuilder()
|
void |
setId(long id)
|
void |
setUrl(String url)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GIF_TYPE
public static final String PNG_TYPE
public static final String PDF_TYPE
public static final String TEXT_TYPE
public static final String SWF_TYPE
public static final String MOV_TYPE
Constructor Detail |
---|
public Attachment(ContentEntity contentEntity, String filename, String contentType, String comment, byte[] data)
Example: Attachment attachment = new Attachment(TEST_PAGE, attachmentName, Attachment.TEXT_TYPE, "your upload comment", "foo".getBytes());
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 contentpublic Attachment(Attachment original, String versionComment, byte[] newData)
public Attachment(ContentEntity contentEntity, File file, String contentType)
public Attachment(ContentEntity contentEntity, String filename, String contentType, String classpathResource)
public Attachment(ContentEntity contentEntity, Attachment other)
Method Detail |
---|
public ContentEntity getPage()
public String getFilename()
public String getContentType()
public String getComment()
public long getId()
public void setId(long id)
public void setUrl(String url)
public byte[] getData()
public String getDownloadUrl()
public String getDownloadUrl(String contextPath)
public String getThumbnailUrl()
public String getEditUrl()
public String getImageMarkup()
public String getAbsoluteImageMarkup()
public String getThumbnailMarkup()
public String getTitle()
getTitle
in interface TitledContent
public String getUrl()
getUrl
in interface LinkableContent
public UrlBuilder getUrlBuilder()
getUrlBuilder
in interface LinkableContent
public String getPlaceholderXpath()
public String getImageXpath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |