Class Attachment
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Attachment
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Attachment>
@JsonObject("Attachment") public class Attachment extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Attachment>
Immutable value object representing an attachment.- Since:
- 1.22
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Attachment.AttachmentInitializer
-
Constructor Summary
Constructors Constructor Description Attachment(Attachment.AttachmentInitializer initializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Attachment o)
boolean
equals(java.lang.Object obj)
IObjectId
getAttachmentHolderId()
Returns the id of the entity holding this attachment.java.lang.String
getDescription()
Returns the description given by the user when uploading this attachment.java.lang.String
getDownloadLink()
Returns the download link.java.lang.String
getFileName()
Returns the file name of this attachment.EntityRegistrationDetails
getRegistrationDetails()
Return the registration details.java.lang.String
getTitle()
Returns the title given by the user when uploading this attachment.int
getVersion()
Returns the version of this attachment.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Attachment
public Attachment(Attachment.AttachmentInitializer initializer)
-
-
Method Detail
-
getAttachmentHolderId
public IObjectId getAttachmentHolderId()
Returns the id of the entity holding this attachment. This will be the id which has been used to retrieve this attachment.
-
getFileName
public java.lang.String getFileName()
Returns the file name of this attachment.
-
getVersion
public int getVersion()
Returns the version of this attachment. Starts with 1 and is increased by 1 whenever a user uploads a new version of the same file.
-
getTitle
public java.lang.String getTitle()
Returns the title given by the user when uploading this attachment.
-
getDescription
public java.lang.String getDescription()
Returns the description given by the user when uploading this attachment.
-
getRegistrationDetails
public EntityRegistrationDetails getRegistrationDetails()
Return the registration details.
-
getDownloadLink
public java.lang.String getDownloadLink()
Returns the download link. In combination with the basic URL (containing host name and port) it can be used to create a URL for downloading the attachment file.
-
compareTo
public int compareTo(Attachment o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Attachment>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-