diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java index 871d84840..a486a9cd8 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java @@ -264,33 +264,6 @@ public final class AdHocCommandManager extends Manager { return serviceDiscoveryManager.discoverItems(jid, NAMESPACE); } - /** - * Publish the commands to an specific JID. - * - * @param jid the full JID to publish the commands to. - * @throws XMPPException if the operation failed for some reason. - * @throws SmackException if there was no response from the server. - * @throws InterruptedException - * @deprecated This method uses no longer existent XEP-0030 features and will be removed. - */ - @SuppressWarnings("deprecation") - @Deprecated - // TODO: Remove in Smack 4.4. - public void publishCommands(Jid jid) throws XMPPException, SmackException, InterruptedException { - // Collects the commands to publish as items - DiscoverItems discoverItems = new DiscoverItems(); - Collection xCommandsList = getRegisteredCommands(); - - for (AdHocCommandInfo info : xCommandsList) { - DiscoverItems.Item item = new DiscoverItems.Item(info.getOwnerJID()); - item.setName(info.getName()); - item.setNode(info.getNode()); - discoverItems.addItem(item); - } - - serviceDiscoveryManager.publishItems(jid, NAMESPACE, discoverItems); - } - /** * Returns a command that represents an instance of a command in a remote * host. It is used to execute remote commands. The concept is similar to diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java index eabc7773f..674e5ca9a 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java @@ -571,88 +571,6 @@ public final class ServiceDiscoveryManager extends Manager { return (DiscoverItems) result; } - /** - * Returns true if the server supports publishing of items. A client may wish to publish items - * to the server so that the server can provide items associated to the client. These items will - * be returned by the server whenever the server receives a disco request targeted to the bare - * address of the client (i.e. user@host.com). - * - * @param entityID the address of the XMPP entity. - * @return true if the server supports publishing of items. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe. - */ - @Deprecated - // TODO: Remove in Smack 4.4 - public boolean canPublishItems(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { - DiscoverInfo info = discoverInfo(entityID); - return canPublishItems(info); - } - - /** - * Returns true if the server supports publishing of items. A client may wish to publish items - * to the server so that the server can provide items associated to the client. These items will - * be returned by the server whenever the server receives a disco request targeted to the bare - * address of the client (i.e. user@host.com). - * - * @param info the discover info stanza to check. - * @return true if the server supports publishing of items. - * @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe. - */ - @Deprecated - // TODO: Remove in Smack 4.4 - public static boolean canPublishItems(DiscoverInfo info) { - return info.containsFeature("http://jabber.org/protocol/disco#publish"); - } - - /** - * Publishes new items to a parent entity. The item elements to publish MUST have at least - * a 'jid' attribute specifying the Entity ID of the item, and an action attribute which - * specifies the action being taken for that item. Possible action values are: "update" and - * "remove". - * - * @param entityID the address of the XMPP entity. - * @param discoverItems the DiscoveryItems to publish. - * @throws XMPPErrorException - * @throws NoResponseException - * @throws NotConnectedException - * @throws InterruptedException - * @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe. - */ - @Deprecated - // TODO: Remove in Smack 4.4 - public void publishItems(Jid entityID, DiscoverItems discoverItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { - publishItems(entityID, null, discoverItems); - } - - /** - * Publishes new items to a parent entity and node. The item elements to publish MUST have at - * least a 'jid' attribute specifying the Entity ID of the item, and an action attribute which - * specifies the action being taken for that item. Possible action values are: "update" and - * "remove". - * - * @param entityID the address of the XMPP entity. - * @param node the attribute that supplements the 'jid' attribute. - * @param discoverItems the DiscoveryItems to publish. - * @throws XMPPErrorException if the operation failed for some reason. - * @throws NoResponseException if there was no response from the server. - * @throws NotConnectedException - * @throws InterruptedException - * @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe. - */ - @Deprecated - // TODO: Remove in Smack 4.4 - public void publishItems(Jid entityID, String node, DiscoverItems discoverItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { - discoverItems.setType(IQ.Type.set); - discoverItems.setTo(entityID); - discoverItems.setNode(node); - - connection().createStanzaCollectorAndSend(discoverItems).nextResultOrThrow(); - } - /** * Returns true if the server supports the given feature. *