@Deprecated public class Attachment extends Object implements TitledContent, LinkableContent, ContentConvertible, VersionedContent
Modifier and Type | Class and Description |
---|---|
static class |
Attachment.AttachmentBuilder
Deprecated.
Builds an
Attachment object |
Modifier and Type | Field and Description |
---|---|
static String |
GIF_TYPE
Deprecated.
|
static String |
MOV_TYPE
Deprecated.
|
static String |
PDF_TYPE
Deprecated.
|
static String |
PNG_TYPE
Deprecated.
|
static String |
SWF_TYPE
Deprecated.
|
static String |
TEXT_TYPE
Deprecated.
|
static String |
ZIP_TYPE
Deprecated.
|
Constructor and Description |
---|
Attachment(Attachment original,
String versionComment,
byte[] newData)
Deprecated.
Since 5.7. Use
instead |
Attachment(ContentEntity contentEntity,
Attachment other)
Deprecated.
Since 5.7. Use
instead |
Attachment(ContentEntity contentEntity,
File file,
String contentType)
Deprecated.
Since 5.7. Use
instead |
Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String classpathResource)
Deprecated.
Since 5.7. Use
instead |
Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String comment,
byte[] data)
Deprecated.
Since 5.7. Use
instead |
Attachment(ContentEntity contentEntity,
String filename,
String contentType,
String comment,
byte[] data,
boolean minorEdit)
Deprecated.
Since 5.7. Use
instead |
Modifier and Type | Method and Description |
---|---|
String |
getAbsoluteImageMarkup()
Deprecated.
Retrieves the wiki markup to embed this image from another page in another space.
|
String |
getComment()
Deprecated.
|
ContentId |
getContentId()
Deprecated.
|
String |
getContentType()
Deprecated.
|
ContentType |
getContentTypeObject()
Deprecated.
|
byte[] |
getData()
Deprecated.
|
String |
getDownloadUrl()
Deprecated.
|
String |
getDownloadUrl(String contextPath)
Deprecated.
The application context without any slashes at all.
|
String |
getEditUrl()
Deprecated.
|
String |
getEditUrl(boolean isFromPageView)
Deprecated.
|
Long |
getFileId()
Deprecated.
|
String |
getFilename()
Deprecated.
|
long |
getId()
Deprecated.
|
String |
getImageMarkup()
Deprecated.
Gets the wiki markup to insert this attachment, as an embedded imaged, on the page to which it's attached.
|
String |
getImageXpath()
Deprecated.
Returns xpath that will match the an embedded image.
|
ContentEntity |
getPage()
Deprecated.
|
String |
getPlaceholderXpath()
Deprecated.
Returns xpath that will match the "unidentified attachment" placeholder for
this image.
|
ContentSelector |
getSelector()
Deprecated.
|
String |
getThumbnailMarkup()
Deprecated.
|
String |
getThumbnailUrl()
Deprecated.
|
String |
getTitle()
Deprecated.
|
String |
getUrl()
Deprecated.
|
UrlBuilder |
getUrlBuilder()
Deprecated.
|
int |
getVersion()
Deprecated.
|
boolean |
isHidden()
Deprecated.
|
boolean |
isMinorEdit()
Deprecated.
|
void |
setFileId(Long fileId)
Deprecated.
|
void |
setId(long id)
Deprecated.
|
void |
setUrl(String url)
Deprecated.
|
void |
setVersion(int version)
Deprecated.
|
boolean |
shouldConvertToContent()
Deprecated.
|
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
public static final String ZIP_TYPE
@Deprecated public Attachment(ContentEntity contentEntity, String filename, String contentType, String comment, byte[] data, boolean minorEdit)
instead
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 contentminorEdit
- whether the attachment is a minor edit@Deprecated public Attachment(ContentEntity contentEntity, String filename, String contentType, String comment, byte[] data)
instead
@Deprecated public Attachment(Attachment original, String versionComment, byte[] newData)
instead
@Deprecated public Attachment(ContentEntity contentEntity, File file, String contentType)
instead
@Deprecated public Attachment(ContentEntity contentEntity, String filename, String contentType, String classpathResource)
instead
@Deprecated public Attachment(ContentEntity contentEntity, Attachment other)
instead
public ContentEntity getPage()
public String getFilename()
public String getContentType()
public ContentType getContentTypeObject()
getContentTypeObject
in interface ContentConvertible
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 getEditUrl(boolean isFromPageView)
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()
public ContentId getContentId()
getContentId
in interface ContentConvertible
public ContentSelector getSelector()
getSelector
in interface ContentConvertible
public boolean shouldConvertToContent()
shouldConvertToContent
in interface ContentConvertible
public int getVersion()
getVersion
in interface VersionedContent
public void setVersion(int version)
setVersion
in interface VersionedContent
public boolean isMinorEdit()
isMinorEdit
in interface VersionedContent
public boolean isHidden()
public Long getFileId()
public void setFileId(Long fileId)
Copyright © 2003–2016 Atlassian. All rights reserved.