2 * jFCPlib - ReceivedBookmarkFeed.java - Copyright © 2009 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 2 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, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package net.pterodactylus.fcp;
22 * Implementation of the “ReceivedBookmarkFeed” FCP message. This message
23 * notifies an FCP client that an update for a bookmark has been found.
25 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
27 public class ReceivedBookmarkFeed extends BaseMessage {
30 * Creates a new “ReceivedBookmarkFeed” message.
33 * The FCP message to get the fields from
35 public ReceivedBookmarkFeed(FcpMessage fcpMessage) {
40 * Returns the name of the bookmark.
42 * @return The bookmark’s name
44 public String getBookmarkName() {
45 return getField("Name");
49 * Returns the URI of the updated bookmark.
51 * @return The bookmark’s URI
53 public String getURI() {
54 return getField("URI");
58 * Returns whether the bookmark has an active link image.
60 * @return {@code true} if the bookmark has an active link image,
61 * {@code false} otherwise
63 public boolean hasActiveLink() {
64 return Boolean.parseBoolean(getField("HasAnActiveLink"));
68 * Returns the description of the bookmark. Note that the description may
69 * be {@code null} and if it is not, it is base64-encoded!
71 * @return The bookmark’s description, or {@code null} if the bookmark has
74 public String getDescription() {
75 return getField("Description");