Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
FlavorManager | 38 | 1 | 0% | 1 | 2 |
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.platform.flavor; | |
21 | ||
22 | import java.util.Collection; | |
23 | import java.util.Collections; | |
24 | ||
25 | import org.xwiki.component.annotation.Role; | |
26 | import org.xwiki.extension.Extension; | |
27 | import org.xwiki.extension.ExtensionId; | |
28 | import org.xwiki.extension.repository.result.IterableResult; | |
29 | import org.xwiki.extension.repository.search.SearchException; | |
30 | ||
31 | /** | |
32 | * Find the flavors into the repositories, applying filters according to the configuration. | |
33 | * | |
34 | * @version $Id: de92bca5f3bb1741eaf4587f0eaf309d3ed002f8 $ | |
35 | * @since 7.1M2 | |
36 | */ | |
37 | @Role | |
38 | public interface FlavorManager | |
39 | { | |
40 | /** | |
41 | * Get all flavors matching a query. | |
42 | * | |
43 | * @param query query to execute | |
44 | * @return flavors matching the query | |
45 | * @throws SearchException error when trying to search provided query | |
46 | * @deprecated since 8.0RC1, use {@link #searchFlavors(FlavorQuery)} instead | |
47 | */ | |
48 | @Deprecated | |
49 | IterableResult<Extension> getFlavors(FlavorQuery query) throws SearchException; | |
50 | ||
51 | /** | |
52 | * Get all flavors matching a query. | |
53 | * | |
54 | * @param query query to execute | |
55 | * @return flavors matching the query | |
56 | * @throws SearchException error when trying to search provided query | |
57 | * @since 8.0RC1 | |
58 | */ | |
59 | IterableResult<Extension> searchFlavors(FlavorQuery query) throws SearchException; | |
60 | ||
61 | /** | |
62 | * Get the flavor installed on a given wiki. | |
63 | * | |
64 | * @param wikiId id of the wiki | |
65 | * @return the id of the flavor installed on the given wiki or null if there is no flavor installed | |
66 | */ | |
67 | ExtensionId getFlavorOfWiki(String wikiId); | |
68 | ||
69 | /** | |
70 | * Get the flavor know that the distribution. | |
71 | * <p> | |
72 | * Each {@link ExtensionId} always contains the flavor id but version might be null. | |
73 | * | |
74 | * @return the already known flavors | |
75 | * @since 8.1M1 | |
76 | */ | |
77 | 0 | ![]() |
78 | { | |
79 | 0 | return Collections.emptyList(); |
80 | } | |
81 | } |