From 51d9de02265d6cc9d6045d79497d2a987ae2f7f7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 15 Nov 2016 14:21:27 +0300 Subject: core classes are now serializeable with JAXB (to use as babbler extension) --- .../com/juick/xmpp/extensions/JuickMessage.java | 36 +++++++++++----------- .../java/com/juick/xmpp/extensions/JuickUser.java | 12 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'juick-core/src/main/java/com/juick/xmpp') diff --git a/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java b/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java index d259bc43..2c3875c5 100644 --- a/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java +++ b/juick-core/src/main/java/com/juick/xmpp/extensions/JuickMessage.java @@ -60,19 +60,19 @@ public class JuickMessage extends com.juick.Message implements StanzaChild { final String sMID = parser.getAttributeValue(null, "mid"); if (sMID != null) { - jmsg.setMID(Integer.parseInt(sMID)); + jmsg.setMid(Integer.parseInt(sMID)); } final String sRID = parser.getAttributeValue(null, "rid"); if (sRID != null) { - jmsg.setRID(Integer.parseInt(sRID)); + jmsg.setRid(Integer.parseInt(sRID)); } final String sReplyTo = parser.getAttributeValue(null, "replyto"); if (sReplyTo != null) { - jmsg.ReplyTo = Integer.parseInt(sReplyTo); + jmsg.setReplyto(Integer.parseInt(sReplyTo)); } final String sPrivacy = parser.getAttributeValue(null, "privacy"); if (sPrivacy != null) { - jmsg.Privacy = Integer.parseInt(sPrivacy); + jmsg.setPrivacy(Integer.parseInt(sPrivacy)); } final String sFriendsOnly = parser.getAttributeValue(null, "friendsonly"); if (sFriendsOnly != null) { @@ -96,7 +96,7 @@ public class JuickMessage extends com.juick.Message implements StanzaChild { } else if (tag.equals(JuickUser.TagName) && xmlns != null && xmlns.equals(JuickUser.XMLNS)) { jmsg.setUser(new JuickUser().parse(parser)); } else if (tag.equals("tag")) { - jmsg.Tags.add(new Tag(XmlUtils.getTagText(parser))); + jmsg.getTags().add(new Tag(XmlUtils.getTagText(parser))); } else { XmlUtils.skip(parser); } @@ -109,16 +109,16 @@ public class JuickMessage extends com.juick.Message implements StanzaChild { String ret = ""; ret = "<" + TagName + " xmlns=\"" + XMLNS + "\""; - if (getMID() > 0) { - ret += " mid=\"" + getMID() + "\""; + if (getMid() > 0) { + ret += " mid=\"" + getMid() + "\""; } - if (getRID() > 0) { - ret += " rid=\"" + getRID() + "\""; + if (getRid() > 0) { + ret += " rid=\"" + getRid() + "\""; } - if (ReplyTo > 0) { - ret += " replyto=\"" + ReplyTo + "\""; + if (getReplyto() > 0) { + ret += " replyto=\"" + getReplyto() + "\""; } - ret += " privacy=\"" + Privacy + "\""; + ret += " privacy=\"" + getPrivacy() + "\""; if (FriendsOnly) { ret += " friendsonly=\"1\""; } @@ -138,7 +138,7 @@ public class JuickMessage extends com.juick.Message implements StanzaChild { if (getText() != null) { ret += "
" + XmlUtils.escape(getText()) + ""; } - for (com.juick.Tag Tag : Tags) { + for (com.juick.Tag Tag : getTags()) { ret += "