Esempio n. 1
0
 /**
  * Returns a configuration form, from which you can create an answer form to be submitted via the
  * {@link #sendConfigurationForm(Form)}.
  *
  * @return the configuration form
  * @throws XMPPErrorException
  * @throws NoResponseException
  * @throws NotConnectedException
  */
 public ConfigureForm getNodeConfiguration()
     throws NoResponseException, XMPPErrorException, NotConnectedException {
   Packet reply =
       sendPubsubPacket(
           Type.get,
           new NodeExtension(PubSubElementType.CONFIGURE_OWNER, getId()),
           PubSubNamespace.OWNER);
   return NodeUtils.getFormFromPacket(reply, PubSubElementType.CONFIGURE_OWNER);
 }
Esempio n. 2
0
 /**
  * Returns the default settings for Node configuration.
  *
  * @return configuration form containing the default settings.
  */
 public ConfigureForm getDefaultConfiguration() throws XMPPException {
   // Errors will cause exceptions in getReply, so it only returns
   // on success.
   PubSub reply =
       (PubSub)
           sendPubsubPacket(
               Type.GET,
               new NodeExtension(PubSubElementType.DEFAULT),
               PubSubElementType.DEFAULT.getNamespace());
   return NodeUtils.getFormFromPacket(reply, PubSubElementType.DEFAULT);
 }