Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
Resources | 28 | 0 | - | 0 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.repository; | |
21 | ||
22 | /** | |
23 | * Resources to use to access Extension Manager REST service. | |
24 | * | |
25 | * @version $Id: 7e8ef4e5ffbf9c0cda6fb0ac7612c199bf00f591 $ | |
26 | * @since 4.2M1 | |
27 | */ | |
28 | public interface Resources | |
29 | { | |
30 | /** | |
31 | * Version 1.0 of the protocol. | |
32 | * @since 7.0M2 | |
33 | */ | |
34 | String VERSION10 = "1.0"; | |
35 | ||
36 | /** | |
37 | * Version 1.1 of the protocol. | |
38 | * @since 7.0M2 | |
39 | */ | |
40 | String VERSION11 = "1.1"; | |
41 | ||
42 | /** | |
43 | * Version 1.2 of the protocol. | |
44 | * @since 8.3RC1 | |
45 | */ | |
46 | String VERSION12 = "1.2"; | |
47 | ||
48 | // Entry point | |
49 | ||
50 | /** | |
51 | * Entry point of XWiki Repository protocol. | |
52 | */ | |
53 | /** | |
54 | * | |
55 | */ | |
56 | String ENTRYPOINT = "/repository"; | |
57 | ||
58 | // Path parameters | |
59 | ||
60 | /** | |
61 | * Name of the parameter indication the id of the extension. | |
62 | */ | |
63 | String PPARAM_EXTENSIONID = "extensionId"; | |
64 | ||
65 | /** | |
66 | * Name of the parameter indication the version of the extension. | |
67 | */ | |
68 | String PPARAM_EXTENSIONVERSION = "extensionVersion"; | |
69 | ||
70 | // Extensions | |
71 | ||
72 | /** | |
73 | * Get extensions. | |
74 | */ | |
75 | String EXTENSIONS = ENTRYPOINT + "/extensions"; | |
76 | ||
77 | /** | |
78 | * Get extension informations. | |
79 | */ | |
80 | String EXTENSION = EXTENSIONS + '/' + '{' + PPARAM_EXTENSIONID + '}'; | |
81 | ||
82 | /** | |
83 | * Get extension versions. | |
84 | */ | |
85 | String EXTENSION_VERSIONS = EXTENSION + "/versions"; | |
86 | ||
87 | /** | |
88 | * Get extension version informations. | |
89 | */ | |
90 | String EXTENSION_VERSION = EXTENSION_VERSIONS + '/' + '{' + PPARAM_EXTENSIONVERSION + '}'; | |
91 | ||
92 | /** | |
93 | * Download extension file. | |
94 | */ | |
95 | String EXTENSION_VERSION_FILE = EXTENSION_VERSION + "/file"; | |
96 | ||
97 | // Search | |
98 | ||
99 | /** | |
100 | * Execute search query among extensions. | |
101 | */ | |
102 | String SEARCH = ENTRYPOINT + "/search"; | |
103 | ||
104 | // Query parameters | |
105 | ||
106 | /** | |
107 | * Language of the result to produce. | |
108 | */ | |
109 | String QPARAM_LANGUAGE = "language"; | |
110 | ||
111 | /** | |
112 | * Used to indicate versions ranges to filter versions request. | |
113 | */ | |
114 | String QPARAM_VERSIONS_RANGES = "versionRanges"; | |
115 | ||
116 | /** | |
117 | * The search query. | |
118 | */ | |
119 | String QPARAM_SEARCH_QUERY = "q"; | |
120 | ||
121 | /** | |
122 | * Offset from where the search start to return results. | |
123 | */ | |
124 | String QPARAM_LIST_START = "start"; | |
125 | ||
126 | /** | |
127 | * Indicate if we want to get the total number of possible result without limits in the result. Allow to speed up a | |
128 | * bit the query when we don't care since it generally mean one more query on server side. | |
129 | */ | |
130 | String QPARAM_LIST_REQUIRETOTALHITS = "requireTotalHits"; | |
131 | ||
132 | /** | |
133 | * Maximum number of results. | |
134 | */ | |
135 | String QPARAM_LIST_NUMBER = "number"; | |
136 | } |