summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMili Verma <mili.verma@isode.com>2012-01-06 15:00:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-01-09 15:54:52 (GMT)
commitcc760bfd15caadb56bfef477cb54dc94c25f7fa7 (patch)
tree05f5918b97488b05ca1266c0644a3874adb98129 /src/com/isode/stroke/serializer/xml/XMLTextNode.java
parent12b1d667965556002ea0fd300a71bcdf57634e90 (diff)
downloadstroke-cc760bfd15caadb56bfef477cb54dc94c25f7fa7.zip
stroke-cc760bfd15caadb56bfef477cb54dc94c25f7fa7.tar.bz2
Port Adhoc commands to Stroke
This patch ports the Adhoc commands from Swiften to Stroke. It also ports their unit tests. Test-information: Unit tests pass. MLC able to use the ad-hoc command fine.
Diffstat (limited to 'src/com/isode/stroke/serializer/xml/XMLTextNode.java')
-rw-r--r--src/com/isode/stroke/serializer/xml/XMLTextNode.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/isode/stroke/serializer/xml/XMLTextNode.java b/src/com/isode/stroke/serializer/xml/XMLTextNode.java
index ae5cd32..22a6785 100644
--- a/src/com/isode/stroke/serializer/xml/XMLTextNode.java
+++ b/src/com/isode/stroke/serializer/xml/XMLTextNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Isode Limited, London, England.
+ * Copyright (c) 2010-2012, Isode Limited, London, England.
* All rights reserved.
*/
/*
@@ -22,4 +22,15 @@ public class XMLTextNode implements XMLNode {
public String serialize() {
return text_;
}
+
+ /**
+ * Create new object.
+ *
+ * @param text Text to create object with, must not be null
+ *
+ * @return new object, will never be null
+ */
+ public static XMLTextNode create(String text) {
+ return new XMLTextNode(text);
+ }
}