Package com.atlassian.confluence.pages
Record Class AddressableAttachment
java.lang.Object
java.lang.Record
com.atlassian.confluence.pages.AddressableAttachment
- All Implemented Interfaces:
Addressable
- Since:
- 9.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe download path for an attachment is composed with this base, seegetDownloadPathWithoutEncoding()for an example. -
Constructor Summary
ConstructorsConstructorDescriptionAddressableAttachment(Attachment attachment) Creates an instance of aAddressableAttachmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentrecord component.final booleanIndicates whether some other object is "equal to" this one.getDownloadPath(String attachmentPath, boolean addVersionInfo) Returns the download path of the attachment for a given attachmentPath prefix.Returns the download path without any version info.Returns the download path without any version info or API revision.longgetId()final inthashCode()Returns a hash code value for this object.static AddressableAttachmentof(Attachment attachment) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DOWNLOAD_PATH_BASE
The download path for an attachment is composed with this base, seegetDownloadPathWithoutEncoding()for an example.- See Also:
-
-
Constructor Details
-
AddressableAttachment
Creates an instance of aAddressableAttachmentrecord class.- Parameters:
attachment- the value for theattachmentrecord component
-
-
Method Details
-
of
-
getId
public long getId()- Specified by:
getIdin interfaceAddressable
-
getDisplayTitle
- Specified by:
getDisplayTitlein interfaceAddressable- Returns:
- the title of the addressable object, suitable for display in a list
-
getUrlPath
- Specified by:
getUrlPathin interfaceAddressable
-
getDownloadPath
-
getDownloadPathWithoutVersion
Returns the download path without any version info. -
getDownloadPathWithoutVersionOrApiRevision
Returns the download path without any version info or API revision. -
getDownloadPath
Returns the download path of the attachment for a given attachmentPath prefix. It basically appends the filename and some meta info to form the path. -
getDownloadPathWithoutEncoding
-
getExportPath
-
getExportPathForThumbnail
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
attachment
Returns the value of theattachmentrecord component.- Returns:
- the value of the
attachmentrecord component
-