2 * jFCPlib - ReceivedBookmarkFeed.java - Copyright © 2009–2016 David Roden
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package net.pterodactylus.fcp;
21 * Implementation of the “ReceivedBookmarkFeed” FCP message. This message
22 * notifies an FCP client that an update for a bookmark has been found.
24 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
26 public class ReceivedBookmarkFeed extends BaseMessage {
29 * Creates a new “ReceivedBookmarkFeed” message.
32 * The FCP message to get the fields from
34 public ReceivedBookmarkFeed(FcpMessage fcpMessage) {
39 * Returns the name of the bookmark.
41 * @return The bookmark’s name
43 public String getBookmarkName() {
44 return getField("Name");
48 * Returns the URI of the updated bookmark.
50 * @return The bookmark’s URI
52 public String getURI() {
53 return getField("URI");
57 * Returns whether the bookmark has an active link image.
59 * @return {@code true} if the bookmark has an active link image,
60 * {@code false} otherwise
62 public boolean hasActiveLink() {
63 return Boolean.parseBoolean(getField("HasAnActiveLink"));
67 * Returns the description of the bookmark. Note that the description may
68 * be {@code null} and if it is not, it is base64-encoded!
70 * @return The bookmark’s description, or {@code null} if the bookmark has
73 public String getDescription() {
74 return getField("Description");