Package org.xwiki.extension
Interface MutableExtension
-
- All Superinterfaces:
Comparable<Extension>,Extension
- All Known Implementing Classes:
AbstractExtension,AbstractRatingExtension,AbstractRemoteExtension
public interface MutableExtension extends Extension
Mutable version ofExtension.- Since:
- 8.4RC1
- Version:
- $Id: b7cbceb46c3997986874402350be5d4eff5a3f23 $
-
-
Field Summary
-
Fields inherited from interface org.xwiki.extension.Extension
FIELD_ALLOWEDNAMESPACE, FIELD_ALLOWEDNAMESPACES, FIELD_AUTHOR, FIELD_AUTHORS, FIELD_CATEGORY, FIELD_COMPONENT, FIELD_COMPONENTS, FIELD_DEPENDENCIES, FIELD_DESCRIPTION, FIELD_EXTENSIONFEATURE, FIELD_EXTENSIONFEATURES, FIELD_FEATURE, FIELD_FEATURES, FIELD_ID, FIELD_ISSUEMANAGEMENT, FIELD_LICENSE, FIELD_LICENSES, FIELD_MANAGEDDEPENDENCIES, FIELD_NAME, FIELD_NAMESPACES, FIELD_PROPERTIES, FIELD_REPOSITORIES, FIELD_REPOSITORY, FIELD_SCM, FIELD_SUMMARY, FIELD_TYPE, FIELD_VERSION, FIELD_WEBSITE, IKEYPREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddAllowedNamespace(String namespace)Add a new allowed namespace to the extension.voidaddAuthor(ExtensionAuthor author)Add a new author to the extension.default voidaddComponent(ExtensionComponent component)Add a new component to the extension.voidaddDependency(ExtensionDependency dependency)Add a new dependency to the extension.voidaddExtensionFeature(ExtensionId feature)Add a new feature to the extension.voidaddFeature(String feature)Deprecated.since 8.0M1, useaddExtensionFeature(ExtensionId)insteadvoidaddLicense(ExtensionLicense license)Add a new license to the extension.voidaddManagedDependency(ExtensionDependency managedDependency)Add a new managed dependency to the extension.voidaddRepository(ExtensionRepositoryDescriptor repository)Add a new repository to the extension.voidputProperty(String key, Object value)Set a property.<T> TremoveProperty(String key)Remove the property associated to the passed key and return its value.voidset(Extension extension)Update optional informations based on the provided extension.voidsetAllowedNamespaces(Collection<String> namespaces)voidsetAuthors(Collection<? extends ExtensionAuthor> authors)voidsetCategory(String categrory)default voidsetComponents(Collection<? extends ExtensionComponent> component)voidsetDependencies(Collection<? extends ExtensionDependency> dependencies)voidsetDescription(String description)voidsetExtensionFeatures(Collection<ExtensionId> features)voidsetFeatures(Collection<String> features)Deprecated.since 8.0M1, usesetExtensionFeatures(Collection)insteadvoidsetIssueManagement(ExtensionIssueManagement issueManagement)voidsetLicenses(Collection<ExtensionLicense> licenses)voidsetManagedDependencies(Collection<? extends ExtensionDependency> managedDependencies)voidsetName(String name)voidsetProperties(Map<String,Object> properties)Replace existing properties with provided properties.voidsetRepositories(Collection<? extends ExtensionRepositoryDescriptor> repositories)voidsetScm(ExtensionScm scm)voidsetSummary(String summary)voidsetWebsite(String website)-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.xwiki.extension.Extension
get, getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getFile, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite
-
-
-
-
Method Detail
-
set
void set(Extension extension)
Update optional informations based on the provided extension.- Parameters:
extension- the extension from which to get informations
-
setFeatures
@Deprecated void setFeatures(Collection<String> features)
Deprecated.since 8.0M1, usesetExtensionFeatures(Collection)instead- Parameters:
features- the extension ids also provided by this extension
-
addFeature
@Deprecated void addFeature(String feature)
Deprecated.since 8.0M1, useaddExtensionFeature(ExtensionId)insteadAdd a new feature to the extension.- Parameters:
feature- a feature name
-
setExtensionFeatures
void setExtensionFeatures(Collection<ExtensionId> features)
- Parameters:
features- theExtensionIds also provided by this extension
-
addExtensionFeature
void addExtensionFeature(ExtensionId feature)
Add a new feature to the extension.- Parameters:
feature- a feature name
-
setName
void setName(String name)
- Parameters:
name- the display name of the extension
-
setLicenses
void setLicenses(Collection<ExtensionLicense> licenses)
- Parameters:
licenses- the licenses of the extension
-
addLicense
void addLicense(ExtensionLicense license)
Add a new license to the extension.- Parameters:
license- a license
-
setSummary
void setSummary(String summary)
- Parameters:
summary- a short description of the extension
-
setDescription
void setDescription(String description)
- Parameters:
description- a description of the extension
-
setAuthors
void setAuthors(Collection<? extends ExtensionAuthor> authors)
- Parameters:
authors- the authors of the extension
-
addAuthor
void addAuthor(ExtensionAuthor author)
Add a new author to the extension.- Parameters:
author- an author
-
setComponents
default void setComponents(Collection<? extends ExtensionComponent> component)
- Parameters:
component- the components provided by the extension- Since:
- 13.3RC1
-
addComponent
default void addComponent(ExtensionComponent component)
Add a new component to the extension.- Parameters:
component- a component provided by the extension- Since:
- 13.3RC1
-
setWebsite
void setWebsite(String website)
- Parameters:
website- an URL for the extension website
-
addAllowedNamespace
void addAllowedNamespace(String namespace)
Add a new allowed namespace to the extension.- Parameters:
namespace- a namespace
-
setAllowedNamespaces
void setAllowedNamespaces(Collection<String> namespaces)
- Parameters:
namespaces- the namespaces where it's allowed to install this extension
-
addDependency
void addDependency(ExtensionDependency dependency)
Add a new dependency to the extension.- Parameters:
dependency- a dependency
-
setDependencies
void setDependencies(Collection<? extends ExtensionDependency> dependencies)
- Parameters:
dependencies- the dependencies of the extension- See Also:
Extension.getDependencies()
-
addManagedDependency
void addManagedDependency(ExtensionDependency managedDependency)
Add a new managed dependency to the extension.- Parameters:
managedDependency- a managed dependency;
-
setManagedDependencies
void setManagedDependencies(Collection<? extends ExtensionDependency> managedDependencies)
- Parameters:
managedDependencies- the managed dependencies of the extension- See Also:
Extension.getManagedDependencies()
-
setScm
void setScm(ExtensionScm scm)
- Parameters:
scm- informations related to extensions's Source Control Management;
-
setIssueManagement
void setIssueManagement(ExtensionIssueManagement issueManagement)
- Parameters:
issueManagement- informations related to extension's issues management
-
setCategory
void setCategory(String categrory)
- Parameters:
categrory- the category of the extension;
-
setRepositories
void setRepositories(Collection<? extends ExtensionRepositoryDescriptor> repositories)
- Parameters:
repositories- the custom repositories provided by the extension (usually to resolve dependencies)
-
addRepository
void addRepository(ExtensionRepositoryDescriptor repository)
Add a new repository to the extension.- Parameters:
repository- a repository descriptor;
-
putProperty
void putProperty(String key, Object value)
Set a property.- Parameters:
key- the property keyvalue- the property value- See Also:
Extension.getProperty(String)
-
setProperties
void setProperties(Map<String,Object> properties)
Replace existing properties with provided properties.- Parameters:
properties- the properties
-
removeProperty
<T> T removeProperty(String key)
Remove the property associated to the passed key and return its value.- Type Parameters:
T- type of the property value- Parameters:
key- the property key- Returns:
- the previous value associated with
key, ornullif there was no mapping forkey
-
-