1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.extension

File ExtensionManager.java

 

Code metrics

0
0
0
1
102
12
0
-
-
0
-

Classes

Class Line # Actions
ExtensionManager 32 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

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.extension;
21   
22    import org.xwiki.component.annotation.Role;
23    import org.xwiki.extension.repository.ExtensionRepository;
24   
25    /**
26    * Main entry point for some extensions management tasks.
27    *
28    * @version $Id: 85a02ad232c8af58ded7ad70938308ce00ae9017 $
29    * @since 4.0M1
30    */
31    @Role
 
32    public interface ExtensionManager
33    {
34    /**
35    * Search the provided extension among all repositories including core and local repositories.
36    * <p>
37    * The search is done in the following order:
38    * <ul>
39    * <li>Is it a core extension ?</li>
40    * <li>Is it a local extension ?</li>
41    * <li>Is it a remote extension in one of the configured remote repositories ?</li>
42    * </ul>
43    * The first one found is returned.
44    *
45    * @param extensionId the extension identifier
46    * @return the resolved extension
47    * @throws ResolveException error when trying to resolve extension
48    */
49    Extension resolveExtension(ExtensionId extensionId) throws ResolveException;
50   
51    /**
52    * Search the provided extension as a dependency of another extension among all repositories including core and
53    * local repositories.
54    * <p>
55    * The search is done in the following order:
56    * <ul>
57    * <li>Is it a core extension ?</li>
58    * <li>Is it a local extension ?</li>
59    * <li>Is it a remote extension in one of the configured remote repositories ?</li>
60    * </ul>
61    * The first one found is returned.
62    *
63    * @param extensionDependency the extension as dependency
64    * @return the resolved extension
65    * @throws ResolveException error when trying to resolve extension
66    * @deprecated since 5.3M1, use {@link #resolveExtension(ExtensionDependency, String)} instead
67    */
68    @Deprecated
69    Extension resolveExtension(ExtensionDependency extensionDependency) throws ResolveException;
70   
71    /**
72    * Search the provided extension as a dependency of another extension among all repositories including core and
73    * local repositories.
74    * <p>
75    * The search is done in the following order:
76    * <ul>
77    * <li>Is it a core extension ?</li>
78    * <li>Is it a local extension ?</li>
79    * <li>Is this feature installed in current namespace or parent ?</li>
80    * <li>Is it a remote extension in one of the configured remote repositories ?</li>
81    * </ul>
82    * The first one found is returned.
83    *
84    * @param extensionDependency the extension as dependency
85    * @param namespace the namespace where to search for the dependency
86    * @return the resolved extension
87    * @throws ResolveException error when trying to resolve extension
88    * @since 5.3M1
89    */
90    Extension resolveExtension(ExtensionDependency extensionDependency, String namespace) throws ResolveException;
91   
92    /**
93    * Return a repository based on its id.
94    * <p>
95    * This method also return <tt>local</tt>, <tt>installed</tt> and <tt>core</tt> repositories.
96    *
97    * @param repositoryId the id of the repository
98    * @return the repository
99    * @since 4.0M2
100    */
101    ExtensionRepository getRepository(String repositoryId);
102    }