public interface NewsMessage extends Message
An instance of NewsMessage
defines the headline text that provides a brief
description of a news story (see StoryMessage
).
An object implementing this interface cannot be instantiated directly, but can be constructed
using the
MessageFactory.createNewsMessage(String, String, String, String)
method of the MessageFactory
that is available on the
Publisher
interface.
If this NewsMessage
has a corresponding story for the headline, call the
setStoryReference(String)
method to uniquely identify that story. To record any keywords
that can be used to locate the story in a search result call getTags()
. This method
returns a reference to a list of the keywords (if any) in the NewsMessage
. You can
then add additional keywords to the list.
Modifier and Type | Method and Description |
---|---|
Field |
getField(java.lang.String fieldName)
Gets a custom field from a news message
|
java.lang.String |
getHeadline()
Gets the headline of the news message.
|
java.lang.String |
getNewsDateTime()
Gets the date and time that the headline was created.
|
java.lang.String |
getPermission()
Gets a permission string relating to this news message.
|
java.lang.String |
getStoryReference()
Gets a reference that identifies the story associated with the headline.
|
java.util.List<java.lang.String> |
getTags()
Gets a reference to the set of keywords or terms that describe the news item.
|
void |
setField(java.lang.String fieldName,
java.lang.String value)
Sets a custom field on this news message
|
void |
setPermission(java.lang.String permission)
Sets a permission string relating to this news message.
|
void |
setStoryReference(java.lang.String reference)
Sets a reference that identifies the story associated with the headline.
|
getSubject, isImage, setImage
java.util.List<java.lang.String> getTags()
java.lang.String getHeadline()
java.lang.String getStoryReference()
void setStoryReference(java.lang.String reference)
reference
- The reference.java.lang.String getNewsDateTime()
java.lang.String getPermission()
Gets a permission string relating to this news message.
Liberator can use the contents of this property to determine whether this headline should be sent to a client.
void setPermission(java.lang.String permission)
Sets a permission string relating to this news message.
Liberator can use the contents of this property to determine whether this headline should be sent to a client.
permission
- The permission string.void setField(java.lang.String fieldName, java.lang.String value)
Sets a custom field on this news message
fieldName
- the name of the field - does not need to be specified in fields.confvalue
- value for the fieldField getField(java.lang.String fieldName)
Gets a custom field from a news message
fieldName
- the name of the fieldPlease send bug reports and comments to Caplin support