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

File MutableExtension.java

 

Code metrics

0
0
0
1
206
38
0
-
-
0
-

Classes

Class Line # Actions
MutableExtension 35 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 java.util.Collection;
23    import java.util.Map;
24   
25    import org.xwiki.extension.repository.ExtensionRepositoryDescriptor;
26    import org.xwiki.stability.Unstable;
27   
28    /**
29    * Mutable version of {@link Extension}.
30    *
31    * @version $Id: f2a20af84217557bf1e7407d26e5375f19749664 $
32    * @since 8.4RC1
33    */
34    @Unstable
 
35    public interface MutableExtension extends Extension
36    {
37    /**
38    * Update optional informations based on the provided extension.
39    *
40    * @param extension the extension from which to get informations
41    */
42    void set(Extension extension);
43   
44    /**
45    * @param features the extension ids also provided by this extension
46    * @deprecated since 8.0M1, use {@link #setExtensionFeatures(Collection)} instead
47    */
48    @Deprecated
49    void setFeatures(Collection<String> features);
50   
51    /**
52    * Add a new feature to the extension.
53    *
54    * @param feature a feature name
55    * @deprecated since 8.0M1, use {@link #addExtensionFeature(ExtensionId)} instead
56    */
57    @Deprecated
58    void addFeature(String feature);
59   
60    /**
61    * @param features the {@link ExtensionId}s also provided by this extension
62    */
63    void setExtensionFeatures(Collection<ExtensionId> features);
64   
65    /**
66    * Add a new feature to the extension.
67    *
68    * @param feature a feature name
69    */
70    void addExtensionFeature(ExtensionId feature);
71   
72    /**
73    * @param name the display name of the extension
74    */
75    void setName(String name);
76   
77    /**
78    * @param licenses the licenses of the extension
79    */
80    void setLicenses(Collection<ExtensionLicense> licenses);
81   
82    /**
83    * Add a new license to the extension.
84    *
85    * @param license a license
86    */
87    void addLicense(ExtensionLicense license);
88   
89    /**
90    * @param summary a short description of the extension
91    */
92    void setSummary(String summary);
93   
94    /**
95    * @param description a description of the extension
96    */
97    void setDescription(String description);
98   
99    /**
100    * @param authors the authors of the extension
101    */
102    void setAuthors(Collection<? extends ExtensionAuthor> authors);
103   
104    /**
105    * Add a new author to the extension.
106    *
107    * @param author an author
108    */
109    void addAuthor(ExtensionAuthor author);
110   
111    /**
112    * @param website an URL for the extension website
113    */
114    void setWebsite(String website);
115   
116    /**
117    * Add a new allowed namespace to the extension.
118    *
119    * @param namespace a namespace
120    */
121    void addAllowedNamespace(String namespace);
122   
123    /**
124    * @param namespaces the namespaces where it's allowed to install this extension
125    */
126    void setAllowedNamespaces(Collection<String> namespaces);
127   
128    /**
129    * Add a new dependency to the extension.
130    *
131    * @param dependency a dependency
132    */
133    void addDependency(ExtensionDependency dependency);
134   
135    /**
136    * @param dependencies the dependencies of the extension
137    * @see #getDependencies()
138    */
139    void setDependencies(Collection<? extends ExtensionDependency> dependencies);
140   
141    /**
142    * Add a new managed dependency to the extension.
143    *
144    * @param managedDependency a managed dependency;
145    */
146    void addManagedDependency(ExtensionDependency managedDependency);
147   
148    /**
149    * @param managedDependencies the managed dependencies of the extension
150    * @see #getManagedDependencies()
151    */
152    void setManagedDependencies(Collection<? extends ExtensionDependency> managedDependencies);
153   
154    /**
155    * @param scm informations related to extensions's Source Control Management;
156    */
157    void setScm(ExtensionScm scm);
158   
159    /**
160    * @param issueManagement informations related to extension's issues management
161    */
162    void setIssueManagement(ExtensionIssueManagement issueManagement);
163   
164    /**
165    * @param categrory the category of the extension;
166    */
167    void setCategory(String categrory);
168   
169    /**
170    * @param repositories the custom repositories provided by the extension (usually to resolve dependencies)
171    */
172    void setRepositories(Collection<? extends ExtensionRepositoryDescriptor> repositories);
173   
174    /**
175    * Add a new repository to the extension.
176    *
177    * @param repository a repository descriptor;
178    */
179    void addRepository(ExtensionRepositoryDescriptor repository);
180   
181    /**
182    * Set a property.
183    *
184    * @param key the property key
185    * @param value the property value
186    * @see #getProperty(String)
187    */
188    void putProperty(String key, Object value);
189   
190    /**
191    * Replace existing properties with provided properties.
192    *
193    * @param properties the properties
194    */
195    void setProperties(Map<String, Object> properties);
196   
197    /**
198    * Remove the property associated to the passed key and return its value.
199    *
200    * @param <T> type of the property value
201    * @param key the property key
202    * @return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no mapping for
203    * <tt>key</tt>;
204    */
205    <T> T removeProperty(String key);
206    }