Configure a Node (XEP-0060 8.2) ------------------------------- Key: VYSPER-153 URL: https://issues.apache.org/jira/browse/VYSPER-153 Project: VYSPER Issue Type: Improvement Components: XEP0060 PubSub Reporter: Michael Jakl
Configuration of a node is a recommendet feature and is a four step procedure: Client: Request configuration form Server: Send form Client: Send completed form Server: Apply configuration and confirm it Request: Example 129. Owner requests configuration form <iq type='get' from='ham...@denmark.lit/elsinore' to='pubsub.shakespeare.lit' id='config1'> <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> <configure node='princely_musings'/> </pubsub> </iq> Answer: <iq type='result' from='pubsub.shakespeare.lit' to='ham...@denmark.lit/elsinore' id='config1'> <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> <configure node='princely_musings'> <x xmlns='jabber:x:data' type='form'> <field var='FORM_TYPE' type='hidden'> <value>http://jabber.org/protocol/pubsub#node_config</value> </field> <field var='pubsub#title' type='text-single' label='A friendly name for the node'/> <field var='pubsub#deliver_notifications' type='boolean' label='Whether to deliver event notifications'> <value>true</value> </field> <field var='pubsub#deliver_payloads' type='boolean' label='Whether to deliver payloads with event notifications'> <value>true</value> </field> <field var='pubsub#notify_config' type='boolean' label='Notify subscribers when the node configuration changes'> <value>0</value> </field> <field var='pubsub#notify_delete' type='boolean' label='Notify subscribers when the node is deleted'> <value>false</value> </field> <field var='pubsub#notify_retract' type='boolean' label='Notify subscribers when items are removed from the node'> <value>false</value> </field> <field var='pubsub#notify_sub' type='boolean' label='Notify owners about new subscribers and unsubscribes'> <value>0</value> </field> <field var='pubsub#persist_items' type='boolean' label='Persist items to storage'> <value>1</value> </field> <field var='pubsub#max_items' type='text-single' label='Max # of items to persist'> <value>10</value> </field> <field var='pubsub#subscribe' type='boolean' label='Whether to allow subscriptions'> <value>1</value> </field> <field var='pubsub#access_model' type='list-single' label='Specify the subscriber model'> <option><value>authorize</value></option> <option><value>open</value></option> <option><value>presence</value></option> <option><value>roster</value></option> <option><value>whitelist</value></option> <value>open</value> </field> <field var='pubsub#roster_groups_allowed' type='list-multi' label='Roster groups allowed to subscribe'> <option><value>friends</value></option> <option><value>courtiers</value></option> <option><value>servants</value></option> <option><value>enemies</value></option> </field> <field var='pubsub#publish_model' type='list-single' label='Specify the publisher model'> <option><value>publishers</value></option> <option><value>subscribers</value></option> <option><value>open</value></option> <value>publishers</value> </field> <field var='pubsub#max_payload_size' type='text-single' label='Max Payload size in bytes'> <value>1028</value> </field> <field var='pubsub#send_last_published_item' type='list-single' label='When to send the last published item'> <option label='Never'><value>never</value></option> <option label='When a new subscription is processed'><value>on_sub</value></option> <option label='When a new subscription is processed and whenever a subscriber comes online'> <value>on_sub_and_presence</value> </option> <value>never</value> </field> <field var='pubsub#presence_based_delivery' type='boolean' label='Deliver notifications only to available users'> <value>0</value> </field> <field var='pubsub#type' type='text-single' label='Specify the type of payload data to be provided at this node'> <value>http://www.w3.org/2005/Atom</value> </field> <field var='pubsub#dataform_xslt' type='text-single' label='Payload XSLT'/> </x> </configure> </pubsub> </iq> Filled form: <iq type='set' from='ham...@denmark.lit/elsinore' to='pubsub.shakespeare.lit' id='config2'> <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> <configure node='princely_musings'> <x xmlns='jabber:x:data' type='submit'> <field var='FORM_TYPE' type='hidden'> <value>http://jabber.org/protocol/pubsub#node_config</value> </field> <field var='pubsub#title'><value>Princely Musings (Atom)</value></field> <field var='pubsub#deliver_notifications'><value>1</value></field> <field var='pubsub#deliver_payloads'><value>1</value></field> <field var='pubsub#persist_items'><value>1</value></field> <field var='pubsub#max_items'><value>10</value></field> <field var='pubsub#access_model'><value>roster</value></field> <field var='pubsub#roster_groups_allowed'> <value>friends</value> <value>servants</value> <value>courtiers</value> </field> <field var='pubsub#publish_model'><value>publishers</value></field> <field var='pubsub#send_last_published_item'><value>never</value></field> <field var='pubsub#presence_based_delivery'><value>false</value></field> <field var='pubsub#notify_config'><value>0</value></field> <field var='pubsub#notify_delete'><value>0</value></field> <field var='pubsub#notify_retract'><value>0</value></field> <field var='pubsub#notify_sub'><value>0</value></field> <field var='pubsub#max_payload_size'><value>1028</value></field> <field var='pubsub#type'><value>http://www.w3.org/2005/Atom</value></field> <field var='pubsub#body_xslt'> <value>http://jabxslt.jabberstudio.org/atom_body.xslt</value> </field> </x> </configure> </pubsub> </iq> or cancelling: <iq type='set' from='ham...@denmark.lit/elsinore' to='pubsub.shakespeare.lit' id='config2'> <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> <configure node='princely_musings'> <x xmlns='jabber:x:data' type='cancel'/> </configure> </pubsub> </iq> Application and confirmation: <iq type='result' from='pubsub.shakespeare.lit' to='ham...@denmark.lit/elsinore' id='config2'/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.