Package org.xwiki.extension
Interface ExtensionDependency
-
- All Known Implementing Classes:
AbstractExtensionDependency
,DefaultExtensionDependency
public interface ExtensionDependency
An extension dependency.- Since:
- 4.0M1
- Version:
- $Id: ffff9af070b09ce29f5716870242a75939886573 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Collection<ExtensionPattern>
getExclusions()
String
getId()
Map<String,Object>
getProperties()
ExtendsExtensionDependency
standard properties.Object
getProperty(String key)
<T> T
getProperty(String key, T def)
Get a property.Collection<ExtensionRepositoryDescriptor>
getRepositories()
VersionConstraint
getVersionConstraint()
default boolean
isCompatible(Extension extension)
Indicate if the passed extension is compatible with this dependency.default boolean
isCompatible(ExtensionId extensionId)
Indicate if the passed extension id is compatible with this dependency.default boolean
isOptional()
-
-
-
Method Detail
-
getId
String getId()
- Returns:
- the id (or feature) of the target extension
-
getVersionConstraint
VersionConstraint getVersionConstraint()
- Returns:
- the version constraint of the target extension
-
getExclusions
default Collection<ExtensionPattern> getExclusions()
- Returns:
- the exclusions patterns to apply to transitive dependencies
- Since:
- 12.2
-
getRepositories
Collection<ExtensionRepositoryDescriptor> getRepositories()
- Returns:
- the custom repositories provided by the extension (usually to resolve dependencies)
- Since:
- 7.3M1
-
getProperties
Map<String,Object> getProperties()
ExtendsExtensionDependency
standard properties.Theses are generally provided by specific repositories. For example a AETHER repository will provide AETHER Dependency representation to avoid conversion when searching for the dependency on a AETHER based repository.
- Returns:
- the properties
-
getProperty
Object getProperty(String key)
- Parameters:
key
- the property key- Returns:
- the property value
-
getProperty
<T> T getProperty(String key, T def)
Get a property.- Type Parameters:
T
- type of the property value- Parameters:
key
- the property keydef
- the value to return if no property is associated to the provided key- Returns:
- the property value or
default
of the property is not found - See Also:
getProperty(String)
-
isCompatible
default boolean isCompatible(Extension extension)
Indicate if the passed extension is compatible with this dependency.- Parameters:
extension
- the extension to check- Returns:
- true if the passed extension is compatible, false otherwise
- Since:
- 8.1M1
-
isCompatible
default boolean isCompatible(ExtensionId extensionId)
Indicate if the passed extension id is compatible with this dependency.- Parameters:
extensionId
- the extension to check- Returns:
- true if the passed extension id is compatible, false otherwise
- Since:
- 8.1M1
-
isOptional
default boolean isOptional()
- Returns:
- true if the dependency is not mandatory, usually meaning it will be installed (if valid) by default but can be uninstalled without uninstalling backward dependency
- Since:
- 9.6RC1
-
-