-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobjects.xml
261 lines (261 loc) · 8.82 KB
/
objects.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<chapter>
<title>Objects</title>
<para>
As the protocol is REST-based the base elements of it are objects.
</para>
<para>
There are several types of objects:
<glosslist>
<glossentry>
<glossterm>product</glossterm>
<glossdef>
<para>
A single program, library or package.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>component</glossterm>
<glossdef>
<para>
Part of program, library of package.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>bug</glossterm>
<glossdef>
<para>
A single problem.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>comment</glossterm>
<glossdef>
<para>
A comment about the bug.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>attachment</glossterm>
<glossdef>
<para>
A file attachment to bug.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>person</glossterm>
<glossdef>
<para>
A person (reporter, developer or administrator).
</para>
</glossdef>
</glossentry>
</glosslist>
</para>
<sect1>
<title>Elements common for all types of object</title>
<para>
There are several properties and actions shared among the objects
</para>
<sect2>
<title>Properties</title>
<para>
Each object has following properties:
<glosslist>
<glossentry>
<glossterm>uuid</glossterm>
<glossdef>
<para>
The uuid number which identifies single object. The uuid MUST be
unique. It MUST NOT change.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>name</glossterm>
<glossdef>
<para>
The human-readable name. The implementation SHOULD handle
urlencoded form as an equivalent of uuid if it identifies
the object (i.e. there are no duplicates of names).
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>link</glossterm>
<glossdef>
<para>
It indicates to which server the object belongs to.
It can occure in two cases:
<orderedlist>
<listitem>
<para>
The object is cached in server (for whatever reason) but
the most current version is pointed by the uri of this
property.
</para>
<para>
In this case the implementation MAY remove the object in
this case in future to save the disk space.
</para>
</listitem>
</orderedlist>
or
<orderedlist continuation="continues" >
<listitem>
<para>
The object has been moved in the specified address from
this bug tracker.
</para>
<para>
The implementation MUST NOT remove the object from it's
database.
</para>
</listitem>
</orderedlist>
</para>
<para>
In both cases the implementation MAY return the 302 (Found)
return code.
</para>
<para>
The client SHOULD update its inner reference.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>stored</glossterm>
<glossdef>
<para>
Used with the link property. If it set to true it indicates that
the object will be stored pernamently. If to false it may be
removed in future.
</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>history</glossterm>
<glossdef>
<para>
It is a special object denoting the history. It SHOULD NOT be
included in default response but after the /history action.
It indicates the changes of the bug.
</para>
</glossdef>
</glossentry>
</glosslist>
</para>
</sect2>
<sect2>
<title>Actions</title>
<para>
In this section there are described the actions which are not covered
by REST or the extensions to those actions.
</para>
<sect3>
<title>List (REST)</title>
<para>
This is standard REST action done by GET without UUID. However if
<userinput>propertyname=value1,value2</userinput> is added that only
records with those property should be listed.
</para>
<para>
The sorting is forced by <userinput>sort=property,dir</userinput>,
where dir can be eighter DESC (descending) or ASC (ascending).
</para>
</sect3>
<sect3>
<title>Show (REST)</title>
<para>
This is standard REST action done by GET with the object.
</para>
</sect3>
<sect3>
<title>Create (REST)</title>
<para>
This is standard REST action done by POST. As a result the redirection
to the new object is performed.
</para>
</sect3>
<sect3>
<title>Update (REST)</title>
<para>
The object is updated according to the data send.
</para>
</sect3>
<sect3>
<title>Move</title>
<para>
The basic concept of the NetBug is that the different bug-related
resources are on different servers. For varied reasons the object
is required to be moved.
</para>
<para>
The procedure consist of several steps performed on the both servers.
Please note that implementation SHOULD provide some security systems
- such as moderation and/or allowing only for the developers - not
covered by this document.
</para>
<orderedlist>
<listitem>
<para>
A move action is sended to server with the parameter
<parameter class="function">to</parameter>. I.e.
<userinput>
POST /object/uuid/move?to=https%3A%2F%2Fexample.com%2F
</userinput>
</para>
<para>
<userinput>/object/uuid/</userinput> is the current location of
object while <userinput>http%3A%2F%2Fexample.com%2F</userinput>
is urlencoded prefix of future location.
</para>
</listitem>
<listitem>
<para>
The 307 HTTP code is returned (Temporary Redirect) and client
is redirected to
<returnvalue>
to/object/receive?from=from/object/uuid&code=code
</returnvalue>
</para>
<para>
The <parameter class="function">to</parameter> is the new location
of object while <returnvalue>from/object/uuid</returnvalue> is
current location. <returnvalue>code</returnvalue> is a temporary
passphrase. It MUST be valid for at least 30 minutes.
</para>
<para>
Please note that the server MAY response by 403 or 401 error code
(Forbidden, Unauthorized) if the client has not logged into the
account with the permission to move the object.
</para>
</listitem>
<listitem>
<para>
The redirection by client is performed. The server sends the code
to orginal server:
<userinput>GET /object/uuid/export?code=code</userinput>.
On this request the original server MUST export the requested
object and all child objects (including its history) to XML.
Then it send it back.
</para>
<para>
The original server should set the location properly after the
process. If any attamp was made to modify any of those object
the 400 error code should be returned.
</para>
</listitem>
</orderedlist>
<para>
The implementation SHOULD try to connect by TLS/SSL if possible
falling back to plain http on fail.
</para>
</sect3>
</sect2>
</sect1>
</chapter>