Package org.gcube.portal.databook.shared
Class Attachment
java.lang.Object
org.gcube.portal.databook.shared.Attachment
- All Implemented Interfaces:
Serializable
Represents an attachment (e.g., file or resource) associated with a post or feed.
Provides metadata such as URI, name, description, thumbnail, and MIME type.
Implements Serializable for GWT and Java serialization.
- Author:
- Massimiliano Assante, ISTI-CNR
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for JSON serialization of Attachment objects. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the description of the attachment.getId()Gets the ID of the attachment.Gets the MIME type of the attachment.getName()Gets the name of the attachment.Gets the thumbnail URL of the attachment.getUri()Gets the URI of the attachment.voidsetDescription(String description) Sets the description of the attachment.voidSets the ID of the attachment.voidsetMimeType(String mimeType) Sets the MIME type of the attachment.voidSets the name of the attachment.voidsetThumbnailURL(String thumbnailURL) Sets the thumbnail URL of the attachment.voidSets the URI of the attachment.toString()Returns a string representation of the attachment.
-
Constructor Details
-
Attachment
public Attachment()Default constructor. -
Attachment
public Attachment(String id, String uri, String name, String description, String thumbnailURL, String mimeType) Constructs an Attachment with the specified details.- Parameters:
id- the id in the Cassandra CF.uri- the URI where the file can be downloaded from.name- the name of the attached file.description- the description of the attached file.thumbnailURL- the URL of the image representing the attached file.mimeType- the MIME type of the file.
-
-
Method Details
-
getId
Gets the ID of the attachment.- Returns:
- the ID of the attachment.
-
setId
Sets the ID of the attachment.- Parameters:
id- the ID to set.
-
getUri
Gets the URI of the attachment.- Returns:
- the URI of the attachment.
-
setUri
Sets the URI of the attachment.- Parameters:
uri- the URI to set.
-
getName
Gets the name of the attachment.- Returns:
- the name of the attachment.
-
setName
Sets the name of the attachment.- Parameters:
name- the name to set.
-
getDescription
Gets the description of the attachment.- Returns:
- the description of the attachment.
-
setDescription
Sets the description of the attachment.- Parameters:
description- the description to set.
-
getThumbnailURL
Gets the thumbnail URL of the attachment.- Returns:
- the thumbnail URL of the attachment.
-
setThumbnailURL
Sets the thumbnail URL of the attachment.- Parameters:
thumbnailURL- the thumbnail URL to set.
-
getMimeType
Gets the MIME type of the attachment.- Returns:
- the MIME type of the attachment.
-
setMimeType
Sets the MIME type of the attachment.- Parameters:
mimeType- the MIME type to set.
-
toString
Returns a string representation of the attachment.
-