add ModifyPeerNote command
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 9 Apr 2008 14:31:42 +0000 (14:31 +0000)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 9 Apr 2008 14:31:42 +0000 (14:31 +0000)
git-svn-id: http://trooper/svn/projects/jSite/trunk@669 c3eda9e8-030b-0410-8277-bc7414b0a119

src/net/pterodactylus/util/fcp/ModifyPeerNote.java [new file with mode: 0644]

diff --git a/src/net/pterodactylus/util/fcp/ModifyPeerNote.java b/src/net/pterodactylus/util/fcp/ModifyPeerNote.java
new file mode 100644 (file)
index 0000000..452f0ea
--- /dev/null
@@ -0,0 +1,35 @@
+/**
+ * © 2008 INA Service GmbH
+ */
+package net.pterodactylus.util.fcp;
+
+/**
+ * The “ModifyPeerNote” command modifies a peer note.
+ * 
+ * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
+ * @version $Id$
+ */
+public class ModifyPeerNote extends FcpMessage {
+
+       /**
+        * Creates a new “ModifyPeerNote” request that changes peer note of the
+        * given type and node to the given text.
+        * 
+        * @see PeerNote
+        * @param nodeIdentifier
+        *            The identifier of the node, i.e. name, identity, or IP address
+        *            and port
+        * @param noteText
+        *            The base64-encoded text
+        * @param peerNoteType
+        *            The type of the note to change, possible values are only
+        *            {@link PeerNote#TYPE_PRIVATE_PEER_NOTE} at the moment
+        */
+       public ModifyPeerNote(String nodeIdentifier, String noteText, int peerNoteType) {
+               super("ModifyPeer");
+               setField("NodeIdentifier", nodeIdentifier);
+               setField("NoteText", noteText);
+               setField("PeerNoteType", String.valueOf(peerNoteType));
+       }
+
+}