diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/xmpp/filetransfer/http/delete/DeleteSlotPacketParser.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/filetransfer/http/delete/DeleteSlotPacketParser.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/filetransfer/http/delete/DeleteSlotPacketParser.java deleted file mode 100644 index 7c011449..00000000 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/filetransfer/http/delete/DeleteSlotPacketParser.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.thedevstack.conversationsplus.xmpp.filetransfer.http.delete; - -import de.thedevstack.conversationsplus.xml.Element; -import de.thedevstack.conversationsplus.xmpp.IqPacketParser; -import de.thedevstack.conversationsplus.xmpp.exceptions.UnexpectedIqPacketTypeException; -import de.thedevstack.conversationsplus.xmpp.exceptions.XmppException; -import de.thedevstack.conversationsplus.xmpp.filetransfer.http.FileTransferHttp; -import de.thedevstack.conversationsplus.xmpp.stanzas.IqPacket; -import de.thedevstack.conversationsplus.xmpp.utils.ErrorIqPacketExceptionHelper; - -/** - * Created by steckbrief on 21.08.2016. - */ -public class DeleteSlotPacketParser extends IqPacketParser { - public static String parseDeleteToken(IqPacket packet) throws XmppException { - String deletetoken = null; - if (packet.getType() == IqPacket.TYPE.RESULT) { - Element slot = findRequiredChild(packet, "slot", FileTransferHttp.NAMESPACE); - - deletetoken = findRequiredChildContent(slot, "deletetoken"); - } else if (packet.getType() == IqPacket.TYPE.ERROR) { - ErrorIqPacketExceptionHelper.throwIqErrorException(packet); - } else { - throw new UnexpectedIqPacketTypeException(packet, packet.getType(), IqPacket.TYPE.RESULT, IqPacket.TYPE.ERROR); - } - - return deletetoken; - } -} |