Package com.restfb.types
Class Notification
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.Notification
-
- All Implemented Interfaces:
HasCreatedTime
,HasFrom
,Serializable
public class Notification extends FacebookType implements HasCreatedTime, HasFrom
Represents the Notification Graph API type.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description Notification()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Application
getApplication()
The app responsible for generating the notification.Date
getCreatedTime()
When the notification was created.NamedFacebookType
getFrom()
The entity (user, page, app, etc.) that 'sent', or is the source of the notification.String
getLink()
The URL that clicking on the notification would take someone.NamedFacebookType
getObject()
The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.String
getTitle()
The message text in the notification.NamedFacebookType
getTo()
The entity that received the notification.Integer
getUnread()
Indicates that the notification is unread.Date
getUpdatedTime()
When the notification was last updated.void
setApplication(Application application)
The app responsible for generating the notification.void
setCreatedTime(Date createdTime)
When the notification was created.void
setFrom(NamedFacebookType from)
The entity (user, page, app, etc.) that 'sent', or is the source of the notification.void
setLink(String link)
The URL that clicking on the notification would take someone.void
setObject(NamedFacebookType object)
The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.void
setTitle(String title)
The message text in the notification.void
setTo(NamedFacebookType to)
The entity that received the notification.void
setUnread(Integer unread)
Indicates that the notification is unread.void
setUpdatedTime(Date updatedTime)
When the notification was last updated.-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Notification
public Notification()
-
-
Method Detail
-
getFrom
public NamedFacebookType getFrom()
The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
-
setFrom
public void setFrom(NamedFacebookType from)
The entity (user, page, app, etc.) that 'sent', or is the source of the notification.
-
getTo
public NamedFacebookType getTo()
The entity that received the notification.- Returns:
- The entity that received the notification.
-
setTo
public void setTo(NamedFacebookType to)
The entity that received the notification.
-
getLink
public String getLink()
The URL that clicking on the notification would take someone.- Returns:
- The URL that clicking on the notification would take someone.
-
setLink
public void setLink(String link)
The URL that clicking on the notification would take someone.
-
getTitle
public String getTitle()
The message text in the notification.- Returns:
- The message text in the notification.
-
getApplication
public Application getApplication()
The app responsible for generating the notification. Some of the core Facebook features have their own app that shows up here, such as likes when someone likes another person's content.- Returns:
- The app responsible for generating the notification.
-
setApplication
public void setApplication(Application application)
The app responsible for generating the notification. Some of the core Facebook features have their own app that shows up here, such as likes when someone likes another person's content.
-
getUnread
public Integer getUnread()
Indicates that the notification is unread.Note that 'read' notifications will not be accessible.
- Returns:
- Indicates that the notification is unread.
-
setUnread
public void setUnread(Integer unread)
Indicates that the notification is unread.Note that 'read' notifications will not be accessible.
-
getObject
public NamedFacebookType getObject()
The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.- Returns:
- the object that was the subject of the notification.
-
setObject
public void setObject(NamedFacebookType object)
The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.
-
getUpdatedTime
public Date getUpdatedTime()
When the notification was last updated. When the notification was created.- Returns:
- When the notification was last updated.
-
setUpdatedTime
public void setUpdatedTime(Date updatedTime)
When the notification was last updated. When the notification was created.
-
getCreatedTime
public Date getCreatedTime()
When the notification was created.- Specified by:
getCreatedTime
in interfaceHasCreatedTime
- Returns:
- When the notification was created.
-
setCreatedTime
public void setCreatedTime(Date createdTime)
When the notification was created.
-
-