mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
first version of publish-options
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1079 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
0c1a47748d
commit
e2dc80863b
125
xep-0060.xml
125
xep-0060.xml
@ -49,10 +49,10 @@
|
|||||||
&ralphm;
|
&ralphm;
|
||||||
|
|
||||||
<revision>
|
<revision>
|
||||||
<version>1.10pre1</version>
|
<version>1.10pre2</version>
|
||||||
<date>in progress, last updated 2007-05-30</date>
|
<date>in progress, last updated 2007-07-17</date>
|
||||||
<initials>psa</initials>
|
<initials>psa</initials>
|
||||||
<remark><p>In accordance with XMPP Council consensus, moved the auto-create, auto-subscribe, filtered-notifications, and last-published features from XEP-0163 to this specification and defined them more precisely; also defined one disco#info feature for each default access model.</p></remark>
|
<remark><p>In accordance with XMPP Council consensus, moved the auto-create, auto-subscribe, filtered-notifications, and last-published features from XEP-0163 to this specification and defined them more precisely; defined one disco#info feature for each default access model; added publish-options functionality.</p></remark>
|
||||||
</revision>
|
</revision>
|
||||||
|
|
||||||
<revision>
|
<revision>
|
||||||
@ -2504,6 +2504,86 @@ And by opposing end them?
|
|||||||
<section3 topic='Automatic Node Creation' anchor='publisher-publish-autocreate'>
|
<section3 topic='Automatic Node Creation' anchor='publisher-publish-autocreate'>
|
||||||
<p>A pubsub service MAY automatically create a node when it receives a publish request sent to a node that does not exist (instead of returning an ¬found; error). When doing so, the service SHOULD apply the default node configuration. If a service supports this functionality, it MUST advertise that fact by including a feature of "http://jabber.org/protocol/pubsub#auto-create" in its disco#info responses.</p>
|
<p>A pubsub service MAY automatically create a node when it receives a publish request sent to a node that does not exist (instead of returning an ¬found; error). When doing so, the service SHOULD apply the default node configuration. If a service supports this functionality, it MUST advertise that fact by including a feature of "http://jabber.org/protocol/pubsub#auto-create" in its disco#info responses.</p>
|
||||||
</section3>
|
</section3>
|
||||||
|
<section3 topic='Publishing Options' anchor='publisher-publish-options'>
|
||||||
|
<p>A pubsub service MAY support the ability to specify options along with a publish request. Here is an example:</p>
|
||||||
|
<example caption='Publishing with options'><![CDATA[
|
||||||
|
<iq type='set'
|
||||||
|
from='hamlet@denmark.lit/blogbot'
|
||||||
|
to='pubsub.shakespeare.lit'
|
||||||
|
id='pub1'>
|
||||||
|
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
|
||||||
|
<publish node='princely_musings'>
|
||||||
|
<item id='ae890ac52d0df67ed7cfdf51b644e901'>
|
||||||
|
<entry xmlns='http://www.w3.org/2005/Atom'>
|
||||||
|
<title>Soliloquy</title>
|
||||||
|
<summary>
|
||||||
|
To be, or not to be: that is the question:
|
||||||
|
Whether 'tis nobler in the mind to suffer
|
||||||
|
The slings and arrows of outrageous fortune,
|
||||||
|
Or to take arms against a sea of troubles,
|
||||||
|
And by opposing end them?
|
||||||
|
</summary>
|
||||||
|
<link rel='alternate' type='text/html'
|
||||||
|
href='http://denmark.lit/2003/12/13/atom03'/>
|
||||||
|
<id>tag:denmark.lit,2003:entry-32397</id>
|
||||||
|
<published>2003-12-13T18:30:02Z</published>
|
||||||
|
<updated>2003-12-13T18:30:02Z</updated>
|
||||||
|
</entry>
|
||||||
|
</item>
|
||||||
|
</publish>
|
||||||
|
<publish-options>
|
||||||
|
<x xmlns='jabber:x:data' type='submit'>
|
||||||
|
<field var='FORM_TYPE' type='hidden'>
|
||||||
|
<value>http://jabber.org/protocol/pubsub#publish-options</value>
|
||||||
|
</field>
|
||||||
|
<field var='pubsub#access_model'>
|
||||||
|
<value>presence</value>
|
||||||
|
</field>
|
||||||
|
</x>
|
||||||
|
</publish-options>
|
||||||
|
</pubsub>
|
||||||
|
</iq>
|
||||||
|
]]></example>
|
||||||
|
<p>The following rules apply:</p>
|
||||||
|
<ol>
|
||||||
|
<li>The <publish-options/> element MUST contain a data form (see <cite>XEP-0004</cite>).</li>
|
||||||
|
<li>The FORM_TYPE of the data form MUST be "http://jabber.org/protocol/pubsub#publish-options" (see <cite>XEP-0068</cite>).</li>
|
||||||
|
<li>Fields registered with the XMPP Registrar for that FORM_TYPE MUST specify how they are to be handled by the form-processing entity.</li>
|
||||||
|
</ol>
|
||||||
|
<p>Specifically, the following field handling methods are defined:</p>
|
||||||
|
<ul>
|
||||||
|
<li>metadata -- the field specifies metadata that shall be attached to the item</li>
|
||||||
|
<li>override -- the field specifies an override of the node configuration only for this item</li>
|
||||||
|
<li>precondition -- the field specifies a precondition for publication of the item, which shall be checked against the node configuration</li>
|
||||||
|
</ul>
|
||||||
|
<p>These are defined more fully below.</p>
|
||||||
|
<section4 topic='Metadata Fields' anchor='publisher-publish-options-metadata'>
|
||||||
|
<p>A service shall handle metadata fields as follows:</p>
|
||||||
|
<ol>
|
||||||
|
<li>If the node exists, then the publish shall succeed and the service shall attach the metadata to the item.</li>
|
||||||
|
<li>If the node does not exist and the service supports the "auto-create" feature, then the service shall auto-create the node with default configuration and the publish shall succeed and the service shall attach the metadata to the item.</li>
|
||||||
|
<li>If the node does not exist and the service does not support the "auto-create" feature, then the publish shall fail.</li>
|
||||||
|
</ol>
|
||||||
|
</section4>
|
||||||
|
<section4 topic='Override Fields' anchor='publisher-publish-options-override'>
|
||||||
|
<p>A service shall handle override fields as follows:</p>
|
||||||
|
<ol>
|
||||||
|
<li>If the node exists and the override cannot be applied because the publisher lacks permissions to override the feature, then the publish shall fail with a &forbidden; error condition and a pubsub-specific condition of <override-forbidden/>.</li>
|
||||||
|
<li>If the node exists and the override can be applied, then the publish shall succeed.</li>
|
||||||
|
<li>If the node does not exist and the service supports the "auto-create" feature, then the service shall auto-create the node with default configuration but apply the override to the item, and the publish shall succeed.</li>
|
||||||
|
<li>If the node does not exist and the service does not support the "auto-create" feature, then the publish shall fail.</li>
|
||||||
|
</ol>
|
||||||
|
</section4>
|
||||||
|
<section4 topic='Precondition Fields' anchor='publisher-publish-options-precondition'>
|
||||||
|
<p>A service shall handle precondition fields as follows:</p>
|
||||||
|
<ol>
|
||||||
|
<li>If the node exists and the precondition is not met, then the publish shall fail with a &conflict; error condition and a pubsub-specific condition of <precondition-not-met/>.</li>
|
||||||
|
<li>If the node exists and the precondition is met, then the publish succeeds.</li>
|
||||||
|
<li>If the node does not exist and the service supports the "auto-create" feature, then the service shall auto-create the node with default configuration in all respects except those specified in the preconditions, and the publish succeeds.</li>
|
||||||
|
<li>If the node does not exist and the service does not support the "auto-create" feature, then the publish shall fail.</li>
|
||||||
|
</ol>
|
||||||
|
</section4>
|
||||||
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
|
|
||||||
<section2 topic='Delete an Item from a Node' anchor='publisher-delete'>
|
<section2 topic='Delete an Item from a Node' anchor='publisher-delete'>
|
||||||
@ -5686,6 +5766,11 @@ O, what a rogue and peasant slave am I!
|
|||||||
<desc>Publishing items is supported.</desc>
|
<desc>Publishing items is supported.</desc>
|
||||||
<doc>XEP-0060</doc>
|
<doc>XEP-0060</doc>
|
||||||
</var>
|
</var>
|
||||||
|
<var>
|
||||||
|
<name>http://jabber.org/protocol/pubsub#publish-options</name>
|
||||||
|
<desc>Publication with publish options is supported.</desc>
|
||||||
|
<doc>XEP-0060</doc>
|
||||||
|
</var>
|
||||||
<var>
|
<var>
|
||||||
<name>http://jabber.org/protocol/pubsub#publisher-affiliation</name>
|
<name>http://jabber.org/protocol/pubsub#publisher-affiliation</name>
|
||||||
<desc>The publisher affiliation is supported.</desc>
|
<desc>The publisher affiliation is supported.</desc>
|
||||||
@ -5775,7 +5860,7 @@ O, what a rogue and peasant slave am I!
|
|||||||
</form_type>
|
</form_type>
|
||||||
]]></code>
|
]]></code>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='pubsub#subscribe_options FORM_TYPE' anchor='registrar-formtypes-options'>
|
<section3 topic='pubsub#subscribe_options FORM_TYPE' anchor='registrar-formtypes-subscribe'>
|
||||||
<code><![CDATA[
|
<code><![CDATA[
|
||||||
<form_type>
|
<form_type>
|
||||||
<name>http://jabber.org/protocol/pubsub#subscribe_options</name>
|
<name>http://jabber.org/protocol/pubsub#subscribe_options</name>
|
||||||
@ -6046,6 +6131,38 @@ O, what a rogue and peasant slave am I!
|
|||||||
type='text-single'
|
type='text-single'
|
||||||
label='Payload type'/>
|
label='Payload type'/>
|
||||||
</field>
|
</field>
|
||||||
|
</form_type>
|
||||||
|
]]></code>
|
||||||
|
</section3>
|
||||||
|
<section3 topic='pubsub#publish-options FORM_TYPE' anchor='registrar-formtypes-publish'>
|
||||||
|
<code><![CDATA[
|
||||||
|
<form_type>
|
||||||
|
<name>http://jabber.org/protocol/pubsub#publish-options</name>
|
||||||
|
<doc>XEP-0060</doc>
|
||||||
|
<desc>
|
||||||
|
Forms enabling publication with options; each field must specify whether it
|
||||||
|
defines METADATA to be attached to the item, a per-item OVERRIDE of the node
|
||||||
|
configuration, or a PRECONDITION to be checked against the node configuration.
|
||||||
|
</desc>
|
||||||
|
<field var='pubsub#access_model'
|
||||||
|
type='list-single'
|
||||||
|
label='Precondition: node configuration with the specified access model'>
|
||||||
|
<option label='Access model of authorize'>
|
||||||
|
<value>authorize</value>
|
||||||
|
</option>
|
||||||
|
<option label='Access model of open'>
|
||||||
|
<value>open</value>
|
||||||
|
</option>
|
||||||
|
<option label='Access model of presence'>
|
||||||
|
<value>presence</value>
|
||||||
|
</option>
|
||||||
|
<option label='Access model of roster'>
|
||||||
|
<value>roster</value>
|
||||||
|
</option>
|
||||||
|
<option label='Access model of whitelist'>
|
||||||
|
<value>whitelist</value>
|
||||||
|
</option>
|
||||||
|
</field>
|
||||||
</form_type>
|
</form_type>
|
||||||
]]></code>
|
]]></code>
|
||||||
</section3>
|
</section3>
|
||||||
|
Loading…
Reference in New Issue
Block a user