|
||||||||||
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 java.lang.String |
GIF_TYPE
|
static java.lang.String |
MOV_TYPE
|
static java.lang.String |
PDF_TYPE
|
static java.lang.String |
PNG_TYPE
|
static java.lang.String |
SWF_TYPE
|
static java.lang.String |
TEXT_TYPE
|
Constructor Summary | |
---|---|
Attachment(Attachment original,
java.lang.String versionComment,
byte[] newData)
|
|
Attachment(ContentEntity contentEntity,
Attachment other)
Copy constructor -- put the provided attachment on another page. |
|
Attachment(ContentEntity contentEntity,
java.io.File file,
java.lang.String contentType)
|
|
Attachment(ContentEntity contentEntity,
java.lang.String filename,
java.lang.String contentType,
java.lang.String classpathResource)
|
|
Attachment(ContentEntity contentEntity,
java.lang.String filename,
java.lang.String contentType,
java.lang.String comment,
byte[] data)
Creates an Attachment object of an intended file. |
Method Summary | |
---|---|
java.lang.String |
getAbsoluteImageMarkup()
Retrieves the wiki markup to embed this image from another page in another space. |
java.lang.String |
getComment()
|
java.lang.String |
getContentType()
|
byte[] |
getData()
|
java.lang.String |
getDownloadUrl()
|
java.lang.String |
getDownloadUrl(java.lang.String contextPath)
The application context without any slashes at all. |
java.lang.String |
getEditUrl()
|
java.lang.String |
getEditUrl(boolean isFromPageView)
|
java.lang.String |
getFilename()
|
long |
getId()
|
java.lang.String |
getImageMarkup()
Gets the wiki markup to insert this attachment, as an embedded imaged, on the page to which it's attached. |
java.lang.String |
getImageXpath()
Returns xpath that will match the an embedded image. |
ContentEntity |
getPage()
|
java.lang.String |
getPlaceholderXpath()
Returns xpath that will match the "unidentified attachment" placeholder for this image. |
java.lang.String |
getThumbnailMarkup()
|
java.lang.String |
getThumbnailUrl()
|
java.lang.String |
getTitle()
|
java.lang.String |
getUrl()
|
UrlBuilder |
getUrlBuilder()
|
void |
setId(long id)
|
void |
setUrl(java.lang.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 java.lang.String GIF_TYPE
public static final java.lang.String PNG_TYPE
public static final java.lang.String PDF_TYPE
public static final java.lang.String TEXT_TYPE
public static final java.lang.String SWF_TYPE
public static final java.lang.String MOV_TYPE
Constructor Detail |
---|
public Attachment(ContentEntity contentEntity, java.lang.String filename, java.lang.String contentType, java.lang.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, java.lang.String versionComment, byte[] newData)
public Attachment(ContentEntity contentEntity, java.io.File file, java.lang.String contentType)
public Attachment(ContentEntity contentEntity, java.lang.String filename, java.lang.String contentType, java.lang.String classpathResource)
public Attachment(ContentEntity contentEntity, Attachment other)
Method Detail |
---|
public ContentEntity getPage()
public java.lang.String getFilename()
public java.lang.String getContentType()
public java.lang.String getComment()
public long getId()
public void setId(long id)
public void setUrl(java.lang.String url)
public byte[] getData()
public java.lang.String getDownloadUrl()
public java.lang.String getDownloadUrl(java.lang.String contextPath)
public java.lang.String getThumbnailUrl()
public java.lang.String getEditUrl()
public java.lang.String getEditUrl(boolean isFromPageView)
public java.lang.String getImageMarkup()
public java.lang.String getAbsoluteImageMarkup()
public java.lang.String getThumbnailMarkup()
public java.lang.String getTitle()
getTitle
in interface TitledContent
public java.lang.String getUrl()
getUrl
in interface LinkableContent
public UrlBuilder getUrlBuilder()
getUrlBuilder
in interface LinkableContent
public java.lang.String getPlaceholderXpath()
public java.lang.String getImageXpath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |