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 String
The download path for an attachment is composed with this base, seegetDownloadPathWithoutEncoding()
for an example. -
Constructor Summary
ConstructorsConstructorDescriptionAddressableAttachment
(Attachment attachment) Creates an instance of aAddressableAttachment
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachment
record component.final boolean
Indicates 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.long
getId()
final int
hashCode()
Returns a hash code value for this object.static AddressableAttachment
of
(Attachment attachment) final String
toString()
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 aAddressableAttachment
record class.- Parameters:
attachment
- the value for theattachment
record component
-
-
Method Details
-
of
-
getId
public long getId()- Specified by:
getId
in interfaceAddressable
-
getDisplayTitle
- Specified by:
getDisplayTitle
in interfaceAddressable
- Returns:
- the title of the addressable object, suitable for display in a list
-
getUrlPath
- Specified by:
getUrlPath
in 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 theattachment
record component.- Returns:
- the value of the
attachment
record component
-