Class AttachmentEntity
java.lang.Object
com.atlassian.confluence.plugins.rest.jackson2.entities.SearchResultEntity
com.atlassian.confluence.plugins.rest.jackson2.entities.AttachmentEntity
-
Field Summary
Fields inherited from class com.atlassian.confluence.plugins.rest.jackson2.entities.SearchResultEntity
id
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLink
(com.atlassian.plugins.rest.api.model.Link link) Add a link to the listboolean
Comment for the attachment.MIME type for the attached file, as reported by the browser when uploaded.Date this attachment was created.Returns the file extension of the attachment.Name of the file.long
Filesize in bytes.Date this attachment was last modified.List<com.atlassian.plugins.rest.api.model.Link>
getLinks()
Links to this attachment, should always contain "self".Human readable representation of the filesize such as 16kA nice type representation of the mime type such as "image" or "pdf"Id of the owner of this attachment.Content type of the parent of this attachmentDate path of the parent of this attachment (if parent is blog)Title of the parent of this attachment.getSpace()
Space where this attachment (and it's parent page if any) resides.int
com.atlassian.plugins.rest.api.model.Link
Link to a thumbnail representation of this attachment, only applicable to images.int
getTitle()
Title of the attachment.getType()
int
Version number for the attachment.Link to this attachment in wiki format.int
hashCode()
void
setComment
(String comment) Comment for the attachment.void
setContentType
(String contentType) MIME type for the attached file, as reported by the browser when uploaded.void
setCreatedDate
(DateEntity createdDate) Date this attachment was created.void
setFileName
(String fileName) Name of the file.void
setFileSize
(long fileSize) Filesize in bytes.void
setIconClass
(String iconClass) void
setLastModifiedDate
(DateEntity lastModifiedDate) Date this attachment was last modified.void
setNiceFileSize
(String niceFileSize) Human readable representation of the filesize such as 16kvoid
setNiceType
(String niceType) A nice type representation of the mime type such as "image" or "pdf"void
setOwnerId
(String ownerId) Id of the owner of this attachment.void
setParentContentType
(String parentContentType) Content type of the parent of this attachmentvoid
setParentDatePath
(String parentDatePath) Date path of the parent of this attachment (if parent is blog)void
setParentTitle
(String parentTitle) Title of the parent of this attachment.void
setSpace
(SpaceEntity space) Space where this attachment (and it's parent page if any) resides.void
setThumbnailHeight
(int thumbnailHeight) void
setThumbnailLink
(com.atlassian.plugins.rest.api.model.Link thumbnailLink) Link to a thumbnail representation of this attachment, only applicable to images.void
setThumbnailWidth
(int thumbnailWidth) void
Title of the attachment.void
setVersion
(int version) Version number for the attachment.void
setWikiLink
(String wikiLink) Link to this attachment in wiki format.toString()
Methods inherited from class com.atlassian.confluence.plugins.rest.jackson2.entities.SearchResultEntity
getId, getIdLong, setId
-
Constructor Details
-
AttachmentEntity
public AttachmentEntity()
-
-
Method Details
-
getType
- Returns:
- the type
-
getOwnerId
Id of the owner of this attachment.- Returns:
- the ownerId
-
setOwnerId
Id of the owner of this attachment.- Parameters:
ownerId
- the ownerId to set
-
getParentTitle
Title of the parent of this attachment.- Returns:
- the parentTitle
-
setParentTitle
Title of the parent of this attachment.- Parameters:
parentTitle
- the title to set
-
getParentContentType
Content type of the parent of this attachment- Returns:
- parentContentType
-
setParentContentType
Content type of the parent of this attachment- Parameters:
parentContentType
-
-
getParentDatePath
Date path of the parent of this attachment (if parent is blog)- Returns:
- parentDatePath
-
setParentDatePath
Date path of the parent of this attachment (if parent is blog)- Parameters:
parentDatePath
-
-
getFileName
Name of the file.- Returns:
- the fileName
-
getContentType
MIME type for the attached file, as reported by the browser when uploaded.- Returns:
- the contentType
-
setContentType
MIME type for the attached file, as reported by the browser when uploaded.- Parameters:
contentType
- the contentType to set
-
getFileSize
public long getFileSize()Filesize in bytes.- Returns:
- the fileSize
-
setFileSize
public void setFileSize(long fileSize) Filesize in bytes.- Parameters:
fileSize
- the fileSize to set
-
getNiceFileSize
Human readable representation of the filesize such as 16k- Returns:
- the niceFileSize
-
setNiceFileSize
Human readable representation of the filesize such as 16k- Parameters:
niceFileSize
- the niceFileSize to set
-
getComment
Comment for the attachment.- Returns:
- the comment
-
setComment
Comment for the attachment.- Parameters:
comment
- the comment to set
-
getVersion
public int getVersion()Version number for the attachment.- Returns:
- the version
-
setVersion
public void setVersion(int version) Version number for the attachment.- Parameters:
version
- the version to set
-
setNiceType
A nice type representation of the mime type such as "image" or "pdf"- Parameters:
niceType
- the niceType to set
-
getNiceType
A nice type representation of the mime type such as "image" or "pdf"- Returns:
- the niceType
-
getTitle
Title of the attachment.- Returns:
- the title
-
setTitle
Title of the attachment.- Parameters:
title
- the title to set
-
getThumbnailLink
public com.atlassian.plugins.rest.api.model.Link getThumbnailLink()Link to a thumbnail representation of this attachment, only applicable to images.- Returns:
- the thumbnailLink
-
setThumbnailLink
public void setThumbnailLink(com.atlassian.plugins.rest.api.model.Link thumbnailLink) Link to a thumbnail representation of this attachment, only applicable to images.- Parameters:
thumbnailLink
- the thumbnailLink to set
-
getThumbnailWidth
public int getThumbnailWidth() -
setThumbnailWidth
public void setThumbnailWidth(int thumbnailWidth) -
getThumbnailHeight
public int getThumbnailHeight() -
setThumbnailHeight
public void setThumbnailHeight(int thumbnailHeight) -
getWikiLink
Link to this attachment in wiki format.- Returns:
- the wikiLink
-
setWikiLink
Link to this attachment in wiki format.- Parameters:
wikiLink
- the wikiLink to set
-
getSpace
Space where this attachment (and it's parent page if any) resides.- Returns:
- the space
-
setSpace
Space where this attachment (and it's parent page if any) resides.- Parameters:
space
- the space to set
-
getLastModifiedDate
Date this attachment was last modified.- Returns:
- the lastModifiedDate
-
setLastModifiedDate
Date this attachment was last modified.- Parameters:
lastModifiedDate
- the lastModifiedDate to set
-
getCreatedDate
Date this attachment was created.- Returns:
- the createdDate
-
setCreatedDate
Date this attachment was created.- Parameters:
createdDate
- the createdDate to set
-
setFileName
Name of the file. Also sets the title to the fileName.- Parameters:
fileName
- the fileName to set
-
addLink
public void addLink(com.atlassian.plugins.rest.api.model.Link link) Add a link to the list- Parameters:
link
-
-
getLinks
Links to this attachment, should always contain "self".- Returns:
- the links
-
getIconClass
-
setIconClass
-
getFileExtension
Returns the file extension of the attachment. If there is no extension, an empty string is returned.- Returns:
- the file extension of the attachment in lower case
-
toString
- Overrides:
toString
in classSearchResultEntity
-
equals
- Overrides:
equals
in classSearchResultEntity
-
hashCode
public int hashCode()- Overrides:
hashCode
in classSearchResultEntity
-