Package org.gcube.portal.databook.shared
Class Post
java.lang.Object
org.gcube.portal.databook.shared.Post
- All Implemented Interfaces:
Serializable,Comparable<Post>
- Author:
- Massimiliano Assante, ISTI-CNR
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPost()Default constructor.Post(String key, PostType type, String entityId, Date time, String vreid, String uri, String uriThumbnail, String description, PrivacyLevel privacy, String fullName, String email, String thumbnailURL, String linkTitle, String linkDescription, String linkHost) Constructor for user feeds.Post(String key, PostType type, String entityId, Date time, String vreid, String uri, String uriThumbnail, String description, PrivacyLevel privacy, String fullName, String email, String thumbnailURL, String linkTitle, String linkDescription, String linkHost, boolean applicationFeed) Constructor for user and application profile feeds.Post(String key, PostType type, String entityId, Date time, String vreid, String uri, String uriThumbnail, String description, PrivacyLevel privacy, String fullName, String email, String thumbnailURL, String commentsNo, String likesNo, String linkTitle, String linkDescription, String linkHost, boolean applicationFeed, boolean multiFileUpload) Constructor for serialization purposes, including all fields. -
Method Summary
Modifier and TypeMethodDescriptionintCompares this post with another post based on their creation time.Gets the number of comments on the post.Gets the description or content of the post.getEmail()Gets the email of the entity that created the post.Gets the unique identifier of the user or application that created the post.Gets the full name of the entity (user/application) that created the post.getKey()Gets the unique identifier of the post.Gets the number of likes on the post.Gets the description of a shared link.Gets the host of a shared link.Gets the title of a shared link.Gets the privacy level of the post.Gets the URL of the thumbnail image for the entity (user/application).getTime()Gets the creation timestamp of the post.getType()Gets the type of the post.getUri()Gets the optional URI associated with the post.Gets the thumbnail URI for a shared link.getVreid()Gets the unique identifier of the VRE associated with this post.booleanChecks if this post is an application feed.booleanChecks if this post has multiple file uploads.voidsetApplicationFeed(boolean applicationFeed) voidsetCommentsNo(String commentsNo) voidsetDescription(String description) voidvoidsetEntityId(String entityId) Sets the unique identifier of the user or application that created the post.voidsetFullName(String fullName) voidvoidsetLikesNo(String likesNo) voidsetLinkDescription(String linkDescription) voidsetLinkHost(String linkHost) voidsetLinkTitle(String linkTitle) voidsetMultiFileUpload(boolean multiFileUpload) voidsetPrivacy(PrivacyLevel privacy) voidsetThumbnailURL(String thumbnailURL) voidvoidvoidvoidsetUriThumbnail(String uriThumbnail) voidtoString()
-
Constructor Details
-
Post
public Post()Default constructor.
-
-
Method Details
-
getKey
Gets the unique identifier of the post.- Returns:
- The post key (UUID).
-
setKey
-
getType
Gets the type of the post.- Returns:
- The post type.
-
getEntityId
Gets the unique identifier of the user or application that created the post.- Returns:
- The entity identifier (user or application ID).
-
setEntityId
Sets the unique identifier of the user or application that created the post.- Parameters:
entityId- The entity identifier (user or application ID).
-
getTime
Gets the creation timestamp of the post.- Returns:
- The creation time.
-
setTime
-
getVreid
Gets the unique identifier of the VRE associated with this post.- Returns:
- The VRE ID.
-
setVreid
-
getUri
Gets the optional URI associated with the post.- Returns:
- The URI.
-
setUri
-
getDescription
Gets the description or content of the post.- Returns:
- The post description.
-
setDescription
-
getPrivacy
Gets the privacy level of the post.- Returns:
- The privacy level.
-
getFullName
Gets the full name of the entity (user/application) that created the post.- Returns:
- The full name.
-
setFullName
-
getEmail
Gets the email of the entity that created the post.- Returns:
- The email address.
-
setEmail
-
getThumbnailURL
Gets the URL of the thumbnail image for the entity (user/application).- Returns:
- The thumbnail URL.
-
setThumbnailURL
-
getCommentsNo
Gets the number of comments on the post.- Returns:
- The number of comments as a String.
-
setCommentsNo
-
getLikesNo
Gets the number of likes on the post.- Returns:
- The number of likes as a String.
-
setLikesNo
-
getUriThumbnail
Gets the thumbnail URI for a shared link.- Returns:
- The URI of the link thumbnail.
-
setUriThumbnail
-
getLinkTitle
Gets the title of a shared link.- Returns:
- The link title.
-
setLinkTitle
-
getLinkDescription
Gets the description of a shared link.- Returns:
- The link description.
-
setLinkDescription
-
getLinkHost
Gets the host of a shared link.- Returns:
- The link host.
-
setLinkHost
-
isApplicationFeed
public boolean isApplicationFeed()Checks if this post is an application feed.- Returns:
- True if it is an application feed, false otherwise.
-
setApplicationFeed
public void setApplicationFeed(boolean applicationFeed) -
isMultiFileUpload
public boolean isMultiFileUpload()Checks if this post has multiple file uploads.- Returns:
- True if it has multiple file uploads, false otherwise.
-
setMultiFileUpload
public void setMultiFileUpload(boolean multiFileUpload) -
toString
-