riddl 0.99.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/AUTHORS +1 -0
- data/COPYING +165 -0
- data/INSTALL +24 -0
- data/README.rdoc +2 -0
- data/Rakefile +17 -0
- data/TODO +17 -0
- data/contrib/riddl.jpg +0 -0
- data/contrib/riddl.png +0 -0
- data/contrib/riddl.svg +138 -0
- data/lib/riddl/client.rb +423 -0
- data/lib/riddl/commonlogger.rb +16 -0
- data/lib/riddl/constants.rb +5 -0
- data/lib/riddl/error.rb +8 -0
- data/lib/riddl/handlers.rb +14 -0
- data/lib/riddl/handlers/oauth.rb +19 -0
- data/lib/riddl/handlers/plain-type.rb +21 -0
- data/lib/riddl/handlers/relaxng.rb +16 -0
- data/lib/riddl/handlers/xmlschema.rb +16 -0
- data/lib/riddl/header.rb +9 -0
- data/lib/riddl/implementation.rb +57 -0
- data/lib/riddl/ns/common-patterns/addon-security/request.xml +25 -0
- data/lib/riddl/ns/common-patterns/addon-security/response.xml +25 -0
- data/lib/riddl/ns/common-patterns/downloadify/1.0/downloadify.xml +18 -0
- data/lib/riddl/ns/common-patterns/notifications-consumer/1.0/consumer.xml +100 -0
- data/lib/riddl/ns/common-patterns/notifications-producer/1.0/producer.xml +204 -0
- data/lib/riddl/ns/common-patterns/properties/1.0/properties.schema.schema +140 -0
- data/lib/riddl/ns/common-patterns/properties/1.0/properties.schema.xsl +89 -0
- data/lib/riddl/ns/common-patterns/properties/1.0/properties.xml +150 -0
- data/lib/riddl/ns/common/datatypes-1_0.rng +79 -0
- data/lib/riddl/ns/common/relaxng-modular.rng +330 -0
- data/lib/riddl/ns/common/relaxng.rng +10 -0
- data/lib/riddl/ns/declaration/1.0/declaration.rng +114 -0
- data/lib/riddl/ns/description/1.0/description.rng +302 -0
- data/lib/riddl/option.rb +9 -0
- data/lib/riddl/parameter.rb +54 -0
- data/lib/riddl/protocols/http/generator.rb +121 -0
- data/lib/riddl/protocols/http/parser.rb +199 -0
- data/lib/riddl/protocols/websocket.rb +103 -0
- data/lib/riddl/protocols/xmpp/generator.rb +176 -0
- data/lib/riddl/protocols/xmpp/parser.rb +118 -0
- data/lib/riddl/roles.rb +15 -0
- data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Faccess_token.rb +30 -0
- data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb +22 -0
- data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Frequest_token.rb +30 -0
- data/lib/riddl/roles/http%3A%2F%2Foauth.net%2F1.0/base.rb +67 -0
- data/lib/riddl/server.rb +519 -0
- data/lib/riddl/utils/description.rb +29 -0
- data/lib/riddl/utils/downloadify.rb +14 -0
- data/lib/riddl/utils/erbserve.rb +23 -0
- data/lib/riddl/utils/fileserve.rb +31 -0
- data/lib/riddl/utils/notifications_producer.rb +310 -0
- data/lib/riddl/utils/properties.rb +474 -0
- data/lib/riddl/utils/xsloverlay.rb +21 -0
- data/lib/riddl/wrapper.rb +280 -0
- data/lib/riddl/wrapper/declaration.rb +103 -0
- data/lib/riddl/wrapper/declaration/facade.rb +94 -0
- data/lib/riddl/wrapper/declaration/interface.rb +34 -0
- data/lib/riddl/wrapper/declaration/tile.rb +107 -0
- data/lib/riddl/wrapper/description.rb +69 -0
- data/lib/riddl/wrapper/description/access.rb +108 -0
- data/lib/riddl/wrapper/description/message_and_transformation.rb +131 -0
- data/lib/riddl/wrapper/description/resource.rb +271 -0
- data/lib/riddl/wrapper/layerchecker.rb +33 -0
- data/lib/riddl/wrapper/messageparser.rb +221 -0
- data/lib/riddl/wrapper/resourcechecker.rb +98 -0
- data/ns/common-patterns/addon-security/request.xml +25 -0
- data/ns/common-patterns/addon-security/response.xml +25 -0
- data/ns/common-patterns/downloadify/1.0/downloadify.xml +18 -0
- data/ns/common-patterns/notifications-consumer/1.0/consumer.xml +100 -0
- data/ns/common-patterns/notifications-producer/1.0/producer.xml +204 -0
- data/ns/common-patterns/properties/1.0/properties.schema.schema +140 -0
- data/ns/common-patterns/properties/1.0/properties.schema.xsl +89 -0
- data/ns/common-patterns/properties/1.0/properties.xml +150 -0
- data/ns/common/datatypes-1_0.rng +79 -0
- data/ns/common/relaxng-modular.rng +330 -0
- data/ns/common/relaxng.rng +10 -0
- data/ns/declaration/1.0/declaration.rng +114 -0
- data/ns/description/1.0/description.rng +302 -0
- data/riddl.gemspec +33 -0
- data/test/smartrunner.rb +48 -0
- data/test/tc_declaration-distributed.rb +79 -0
- data/test/tc_declaration-hybrid.rb +71 -0
- data/test/tc_declaration-local.rb +47 -0
- data/test/tc_helloworld.rb +17 -0
- data/test/tc_producer.rb +54 -0
- data/test/tc_properties.rb +72 -0
- data/tools/flash-policy-server.rb +12 -0
- data/tools/riddlcheck +36 -0
- data/tools/riddlcheck-1_0 +36 -0
- data/tools/riddlprocess +51 -0
- data/tools/riddlprocess-1_0 +51 -0
- metadata +291 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
module Riddl
|
2
|
+
class Wrapper
|
3
|
+
class ResourceChecker
|
4
|
+
def initialize(doc)
|
5
|
+
@doc = doc
|
6
|
+
end
|
7
|
+
|
8
|
+
def check
|
9
|
+
check_rec_resources(@doc.find("/des:description/des:resource"))
|
10
|
+
end
|
11
|
+
|
12
|
+
def check_rec_resources(res,path='')
|
13
|
+
#{{{
|
14
|
+
messages = []
|
15
|
+
res.each do |res|
|
16
|
+
tpath = if path == ''
|
17
|
+
'/'
|
18
|
+
else
|
19
|
+
res.attributes['relative'].nil? ? path + '{}/' : path + res.attributes['relative'] + '/'
|
20
|
+
end
|
21
|
+
|
22
|
+
h_ifield = {}; h_pfield = {}
|
23
|
+
h_ofield = {}; h_tfield = {}
|
24
|
+
h_cfield = {}
|
25
|
+
res.find("des:get|des:put|des:delete|des:post|des:request").each do |mt|
|
26
|
+
mn = (mt.attributes['type'].nil? ? mt.qname.to_s : mt.attributes['type'])
|
27
|
+
|
28
|
+
h_ifield[mn] ||= {}; h_pfield[mn] ||= {}
|
29
|
+
h_ofield[mn] ||= []; h_tfield[mn] ||= []
|
30
|
+
h_cfield[mn] ||= 0
|
31
|
+
|
32
|
+
a = mt.attributes
|
33
|
+
if !a['in'].nil? && a['in'] != '*'
|
34
|
+
h_ifield[mn][a['in']] ||= 0
|
35
|
+
h_ifield[mn][a['in']] += 1
|
36
|
+
end
|
37
|
+
if !a['pass'].nil? && a['pass'] != '*'
|
38
|
+
h_pfield[mn][a['pass']] ||= 0
|
39
|
+
h_pfield[mn][a['pass']] += 1
|
40
|
+
end
|
41
|
+
h_ofield[mn] << a['out'] unless a['out'].nil?
|
42
|
+
h_tfield[mn] << a['transformation'] unless a['transformation'].nil?
|
43
|
+
h_cfield[mn] += 1 if !a['transformation'].nil? || a['in'] == '*' || a['pass'] == '*'
|
44
|
+
end
|
45
|
+
|
46
|
+
h_ifield.each do |mn,ifield|
|
47
|
+
messages += check_multi_fields(ifield,"#{tpath} -> #{mn}","in")
|
48
|
+
end
|
49
|
+
h_pfield.each do |mn,pfield|
|
50
|
+
messages += check_multi_fields(pfield,"#{tpath} -> #{mn}","pass")
|
51
|
+
end
|
52
|
+
h_ofield.each do |mn,ofield|
|
53
|
+
messages += check_fields(ofield,"#{tpath} -> #{mn}","out","message")
|
54
|
+
end
|
55
|
+
h_tfield.each do |mn,tfield|
|
56
|
+
messages += check_fields(tfield,"#{tpath} -> #{mn}","transformation","transformation")
|
57
|
+
end
|
58
|
+
h_cfield.each do |mn,cfield|
|
59
|
+
messages << "#{tpath} -> #{mn}: more than one catchall (*) operation is not allowed." if cfield > 1
|
60
|
+
end
|
61
|
+
messages += check_rec_resources(res.find("des:resource"),tpath)
|
62
|
+
end
|
63
|
+
messages
|
64
|
+
#}}}
|
65
|
+
end
|
66
|
+
private :check_rec_resources
|
67
|
+
|
68
|
+
def check_fields(field, what, name, sname)
|
69
|
+
#{{{
|
70
|
+
messages = []
|
71
|
+
field.compact.each do |k|
|
72
|
+
if @doc.find("/des:description/des:#{sname}[@name='#{k}']").empty?
|
73
|
+
messages << "#{what}: #{name} message '#{k}' not found."
|
74
|
+
end unless k == '*'
|
75
|
+
end
|
76
|
+
messages
|
77
|
+
#}}}
|
78
|
+
end
|
79
|
+
private :check_fields
|
80
|
+
|
81
|
+
def check_multi_fields(field, what, name)
|
82
|
+
#{{{
|
83
|
+
messages = []
|
84
|
+
field.each do |k,v|
|
85
|
+
if @doc.find("/des:description/des:message[@name='#{k}']").empty?
|
86
|
+
messages << "#{what}: #{name} message '#{k}' not found."
|
87
|
+
end unless k == '*'
|
88
|
+
if v > 1
|
89
|
+
messages << "#{what}: #{name} message '#{k}' is allowed to occur only once."
|
90
|
+
end
|
91
|
+
end
|
92
|
+
messages
|
93
|
+
#}}}
|
94
|
+
end
|
95
|
+
private :check_multi_fields
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<!-- RAS - Riddl Addon Security -->
|
4
|
+
|
5
|
+
<transformation name="ras_request">
|
6
|
+
<add_as_last>
|
7
|
+
<parameter name="ras_own-public-key" type="string"/>
|
8
|
+
<parameter name="ras_fingerprint" type="string"/>
|
9
|
+
</add_as_last>
|
10
|
+
</transformation>
|
11
|
+
|
12
|
+
<!--
|
13
|
+
* fingerprint: hash all parameters, sign with own private key
|
14
|
+
* Append own public key of sender to message
|
15
|
+
* Append fingerprint to message
|
16
|
+
-->
|
17
|
+
|
18
|
+
<resource>
|
19
|
+
<get transformation="ras_request"/>
|
20
|
+
<post transformation="ras_request"/>
|
21
|
+
<put transformation="ras_request"/>
|
22
|
+
<delete transformation="ras_request"/>
|
23
|
+
</resource>
|
24
|
+
|
25
|
+
</description>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<!-- RAS - Riddl Addon Security -->
|
4
|
+
|
5
|
+
<transformation name="ras_response">
|
6
|
+
<remove_each name="ras_remote-public-key"/>
|
7
|
+
<remove_each name="ras_fingerprint"/>
|
8
|
+
</transformation>
|
9
|
+
|
10
|
+
<!--
|
11
|
+
All other parameters are encryped with 1) remote private key, then 2) own public key
|
12
|
+
* Decrypt all parameters with own private key
|
13
|
+
* Decrypt all parameters with remote public key
|
14
|
+
* hash all decrypted parameters plus remote public key
|
15
|
+
* compare to fingerprint
|
16
|
+
-->
|
17
|
+
|
18
|
+
<resource>
|
19
|
+
<get transformation="ras_response"/>
|
20
|
+
<post transformation="ras_response"/>
|
21
|
+
<put transformation="ras_response"/>
|
22
|
+
<delete transformation="ras_response"/>
|
23
|
+
</resource>
|
24
|
+
|
25
|
+
</description>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<message name="dfout">
|
4
|
+
<parameter name="content" mimetype="*"/>
|
5
|
+
</message>
|
6
|
+
<message name="dfin">
|
7
|
+
<parameter name="mimetype" type="string"/>
|
8
|
+
<parameter name="content" type="string"/>
|
9
|
+
</message>
|
10
|
+
|
11
|
+
<resource pattern="http://riddl.org/ns/common-patterns/downloadify/1.0">
|
12
|
+
<resource>
|
13
|
+
<get in="dfin" out="dfout"/>
|
14
|
+
<post in="dfin" out="dfout"/>
|
15
|
+
</resource>
|
16
|
+
</resource>
|
17
|
+
|
18
|
+
</description>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<message name="notification">
|
4
|
+
<parameter name="key" type="string"/>
|
5
|
+
<parameter name="topic" type="string"/>
|
6
|
+
<choice>
|
7
|
+
<parameter name="event" type="string">
|
8
|
+
<param name="pattern">[\w_]+</param>
|
9
|
+
</parameter>
|
10
|
+
<parameter name="vote" type="string">
|
11
|
+
<param name="pattern">[\w_]+</param>
|
12
|
+
</parameter>
|
13
|
+
</choice>
|
14
|
+
<parameter name="notification" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
15
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-consumer/1.0">
|
16
|
+
<start>
|
17
|
+
<element name="notification">
|
18
|
+
<zeroOrMore>
|
19
|
+
<ref name="header"/>
|
20
|
+
</zeroOrMore>
|
21
|
+
<zeroOrMore>
|
22
|
+
<ref name="parameter"/>
|
23
|
+
</zeroOrMore>
|
24
|
+
</element>
|
25
|
+
</start>
|
26
|
+
|
27
|
+
<define name="header">
|
28
|
+
<element name="header">
|
29
|
+
<attribute name="name">
|
30
|
+
<data type="string"/>
|
31
|
+
</attribute>
|
32
|
+
<optional>
|
33
|
+
<attribute name="type">
|
34
|
+
<data type="string"/>
|
35
|
+
</attribute>
|
36
|
+
</optional>
|
37
|
+
<data type="string"/>
|
38
|
+
</element>
|
39
|
+
</define>
|
40
|
+
|
41
|
+
<define name="parameter">
|
42
|
+
<element name="parameter">
|
43
|
+
<attribute name="name">
|
44
|
+
<data type="string"/>
|
45
|
+
</attribute>
|
46
|
+
<optional>
|
47
|
+
<choice>
|
48
|
+
<attribute name="type">
|
49
|
+
<data type="string"/>
|
50
|
+
</attribute>
|
51
|
+
<attribute name="mimetype">
|
52
|
+
<data type="string">
|
53
|
+
<param name="pattern">[\c]+/[\c\+]+|\*</param>
|
54
|
+
</data>
|
55
|
+
</attribute>
|
56
|
+
</choice>
|
57
|
+
</optional>
|
58
|
+
<ref name="any"/>
|
59
|
+
</element>
|
60
|
+
</define>
|
61
|
+
|
62
|
+
<define name="any">
|
63
|
+
<mixed>
|
64
|
+
<zeroOrMore>
|
65
|
+
<element>
|
66
|
+
<anyName/>
|
67
|
+
<zeroOrMore>
|
68
|
+
<choice>
|
69
|
+
<attribute>
|
70
|
+
<anyName/>
|
71
|
+
</attribute>
|
72
|
+
<text/>
|
73
|
+
<ref name="any"/>
|
74
|
+
</choice>
|
75
|
+
</zeroOrMore>
|
76
|
+
</element>
|
77
|
+
</zeroOrMore>
|
78
|
+
</mixed>
|
79
|
+
</define>
|
80
|
+
|
81
|
+
</grammar>
|
82
|
+
</parameter>
|
83
|
+
<parameter name="message-uid" type="string"/>
|
84
|
+
<parameter name="fingerprint-with-consumer-secret" type="string"/>
|
85
|
+
</message>
|
86
|
+
|
87
|
+
<message name="acknowledgment">
|
88
|
+
<header name="CPEE_CALLBACK" type="boolean"/>
|
89
|
+
<optional>
|
90
|
+
<parameter name="continue" type="boolean"/>
|
91
|
+
</optional>
|
92
|
+
<parameter name="message-uid" type="string"/>
|
93
|
+
<parameter name="fingerprint-with-consumer-secret" type="string"/>
|
94
|
+
</message>
|
95
|
+
|
96
|
+
<resource pattern="http://riddl.org/ns/common-patterns/notifications-consumer/1.0">
|
97
|
+
<post in="notification" out="acknowledgment"/>
|
98
|
+
</resource>
|
99
|
+
|
100
|
+
</description>
|
@@ -0,0 +1,204 @@
|
|
1
|
+
<description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
2
|
+
|
3
|
+
<message name="topics">
|
4
|
+
<parameter name="topics" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
5
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
6
|
+
<start>
|
7
|
+
<element name="topics">
|
8
|
+
<zeroOrMore>
|
9
|
+
<ref name="topic"/>
|
10
|
+
</zeroOrMore>
|
11
|
+
</element>
|
12
|
+
</start>
|
13
|
+
|
14
|
+
<define name="topic">
|
15
|
+
<element name="topic">
|
16
|
+
<attribute name="id">
|
17
|
+
<data type="string"/>
|
18
|
+
</attribute>
|
19
|
+
<zeroOrMore>
|
20
|
+
<element>
|
21
|
+
<choice>
|
22
|
+
<name>event</name>
|
23
|
+
<name>vote</name>
|
24
|
+
</choice>
|
25
|
+
<data type="string">
|
26
|
+
<param name="pattern">[\w-_]+</param>
|
27
|
+
</data>
|
28
|
+
</element>
|
29
|
+
</zeroOrMore>
|
30
|
+
</element>
|
31
|
+
</define>
|
32
|
+
|
33
|
+
</grammar>
|
34
|
+
</parameter>
|
35
|
+
</message>
|
36
|
+
|
37
|
+
<message name="subscriptions">
|
38
|
+
<parameter name="subscriptions" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
39
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
40
|
+
<start>
|
41
|
+
<element name="subscriptions">
|
42
|
+
<attribute name="details">
|
43
|
+
<choice>
|
44
|
+
<value>debug</value>
|
45
|
+
<value>production</value>
|
46
|
+
</choice>
|
47
|
+
</attribute>
|
48
|
+
<zeroOrMore>
|
49
|
+
<ref name="subscription"/>
|
50
|
+
</zeroOrMore>
|
51
|
+
</element>
|
52
|
+
</start>
|
53
|
+
|
54
|
+
<define name="subscription">
|
55
|
+
<element name="subscription">
|
56
|
+
<attribute name="id">
|
57
|
+
<data type="string"/>
|
58
|
+
</attribute>
|
59
|
+
<optional>
|
60
|
+
<attribute name="url">
|
61
|
+
<data type="string"/>
|
62
|
+
</attribute>
|
63
|
+
</optional>
|
64
|
+
</element>
|
65
|
+
</define>
|
66
|
+
|
67
|
+
</grammar>
|
68
|
+
</parameter>
|
69
|
+
</message>
|
70
|
+
|
71
|
+
<message name="subscription">
|
72
|
+
<parameter name="subscription" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
73
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
74
|
+
<start>
|
75
|
+
<element name="subscription">
|
76
|
+
<optional>
|
77
|
+
<attribute name="url">
|
78
|
+
<data type="string"/>
|
79
|
+
</attribute>
|
80
|
+
</optional>
|
81
|
+
<oneOrMore>
|
82
|
+
<element name="topic">
|
83
|
+
<attribute name="id">
|
84
|
+
<data type="string"/>
|
85
|
+
</attribute>
|
86
|
+
<oneOrMore>
|
87
|
+
<element>
|
88
|
+
<choice>
|
89
|
+
<name>event</name>
|
90
|
+
<name>vote</name>
|
91
|
+
</choice>
|
92
|
+
<data type="string">
|
93
|
+
<param name="pattern">[\w_]+</param>
|
94
|
+
</data>
|
95
|
+
</element>
|
96
|
+
</oneOrMore>
|
97
|
+
</element>
|
98
|
+
</oneOrMore>
|
99
|
+
</element>
|
100
|
+
</start>
|
101
|
+
</grammar>
|
102
|
+
</parameter>
|
103
|
+
<optional>
|
104
|
+
<parameter name="message-uid" type="string"/>
|
105
|
+
<parameter name="fingerprint-with-producer-secret" type="string"/>
|
106
|
+
</optional>
|
107
|
+
</message>
|
108
|
+
|
109
|
+
<message name="delete">
|
110
|
+
<optional>
|
111
|
+
<parameter name="message-uid" type="string"/>
|
112
|
+
<parameter name="fingerprint-with-producer-secret" type="string"/>
|
113
|
+
</optional>
|
114
|
+
</message>
|
115
|
+
<message name="request">
|
116
|
+
<optional>
|
117
|
+
<parameter name="message-uid" type="string"/>
|
118
|
+
<parameter name="fingerprint-with-producer-secret" type="string"/>
|
119
|
+
</optional>
|
120
|
+
</message>
|
121
|
+
|
122
|
+
<message name="subscribe">
|
123
|
+
<optional>
|
124
|
+
<parameter name="url" type="string"/>
|
125
|
+
<optional>
|
126
|
+
<parameter name="onbehalf" type="string"/>
|
127
|
+
</optional>
|
128
|
+
</optional>
|
129
|
+
<oneOrMore>
|
130
|
+
<parameter name="topic" type="string"/>
|
131
|
+
<choice>
|
132
|
+
<parameter name="votes" type="string">
|
133
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
134
|
+
</parameter>
|
135
|
+
<parameter name="events" type="string">
|
136
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
137
|
+
</parameter>
|
138
|
+
</choice>
|
139
|
+
</oneOrMore>
|
140
|
+
</message>
|
141
|
+
<message name="acknowledgment">
|
142
|
+
<parameter name="key" type="string"/>
|
143
|
+
<parameter name="producer-secret" type="string"/>
|
144
|
+
<parameter name="consumer-secret" type="string"/>
|
145
|
+
</message>
|
146
|
+
|
147
|
+
<message name="details">
|
148
|
+
<parameter name="message-uid" type="string"/>
|
149
|
+
<optional>
|
150
|
+
<parameter name="url" type="string"/>
|
151
|
+
</optional>
|
152
|
+
<oneOrMore>
|
153
|
+
<parameter name="topic" type="string"/>
|
154
|
+
<choice>
|
155
|
+
<parameter name="votes" type="string">
|
156
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
157
|
+
</parameter>
|
158
|
+
<parameter name="events" type="string">
|
159
|
+
<param name="pattern">([\w-_]+,)*([\w-_]+)</param>
|
160
|
+
</parameter>
|
161
|
+
</choice>
|
162
|
+
</oneOrMore>
|
163
|
+
<parameter name="fingerprint-with-producer-secret" type="string"/>
|
164
|
+
</message>
|
165
|
+
|
166
|
+
<message name="overview">
|
167
|
+
<parameter name="overview" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
168
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
169
|
+
<start>
|
170
|
+
<element name="overview">
|
171
|
+
<element name="topics">
|
172
|
+
<empty/>
|
173
|
+
</element>
|
174
|
+
<element name="subscriptions">
|
175
|
+
<empty/>
|
176
|
+
</element>
|
177
|
+
</element>
|
178
|
+
</start>
|
179
|
+
</grammar>
|
180
|
+
</parameter>
|
181
|
+
</message>
|
182
|
+
|
183
|
+
<resource pattern="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
184
|
+
<resource relative="notifications">
|
185
|
+
<get in="*" out="overview"/>
|
186
|
+
<resource relative="topics">
|
187
|
+
<get in="*" out="topics"/>
|
188
|
+
</resource>
|
189
|
+
<resource relative="subscriptions">
|
190
|
+
<get in="*" out="subscriptions"/>
|
191
|
+
<post in="subscribe" out="acknowledgment"/>
|
192
|
+
<resource>
|
193
|
+
<get in="request" out="subscription"/>
|
194
|
+
<put in="details"/>
|
195
|
+
<delete in="delete"/>
|
196
|
+
<resource relative="ws">
|
197
|
+
<websocket/>
|
198
|
+
</resource>
|
199
|
+
</resource>
|
200
|
+
</resource>
|
201
|
+
</resource>
|
202
|
+
</resource>
|
203
|
+
|
204
|
+
</description>
|