summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun Gupta <tarun1995gupta@gmail.com>2015-06-26 08:20:59 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-07-06 13:52:48 (GMT)
commitfcdff3f162995170469833a82f607903e660812d (patch)
treee9d3cc18c8454b43ebdc1e9b9568d1f4456b59eb /src/com/isode/stroke/elements/UnblockPayload.java
parent79b532d8b6702a5599e7a3eac1416f562405668e (diff)
downloadstroke-fcdff3f162995170469833a82f607903e660812d.zip
stroke-fcdff3f162995170469833a82f607903e660812d.tar.bz2
Minor Fixes for Elements.
Adds Block Element, BlockList, and Unblock Element. Updates some Elements just for consistency. Updates Last Element, its Parser and Serializer for consistency with Swiften. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: None. Change-Id: If40c2516b944b1939db08721bb4de4554c3264f6
Diffstat (limited to 'src/com/isode/stroke/elements/UnblockPayload.java')
-rw-r--r--src/com/isode/stroke/elements/UnblockPayload.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/UnblockPayload.java b/src/com/isode/stroke/elements/UnblockPayload.java
new file mode 100644
index 0000000..5a5c709
--- /dev/null
+++ b/src/com/isode/stroke/elements/UnblockPayload.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2011-2015 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+/*
+ * Copyright (c) 2015 Tarun Gupta.
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+package com.isode.stroke.elements;
+
+import com.isode.stroke.elements.Payload;
+import com.isode.stroke.jid.JID;
+import com.isode.stroke.base.NotNull;
+import java.util.Vector;
+
+public class UnblockPayload extends Payload {
+
+ private Vector<JID> items = new Vector<JID>();
+
+ public UnblockPayload() {
+
+ }
+
+ /**
+ * Parameterized Constructor.
+ * @param items, Not NUll.
+ */
+ public UnblockPayload(Vector<JID> items) {
+ NotNull.exceptIfNull(items, "items");
+ this.items = items;
+ }
+
+ /**
+ * @param item, Not Null.
+ */
+ public void addItem(JID item) {
+ NotNull.exceptIfNull(item, "item");
+ items.add(item);
+ }
+
+ /**
+ * @return items, Not Null.
+ */
+ public Vector<JID> getItems() {
+ return items;
+ }
+} \ No newline at end of file