public abstract class AbstractExtensionDependency extends Object implements ExtensionDependency
ExtensionDependency implementations.| Modifier and Type | Field and Description |
|---|---|
protected String |
id |
protected Map<String,Object> |
properties |
protected VersionConstraint |
versionConstraint |
| Constructor and Description |
|---|
AbstractExtensionDependency(ExtensionDependency dependency,
VersionConstraint versionConstraint)
Create new instance by cloning the provided one with different version constraint.
|
AbstractExtensionDependency(String id,
VersionConstraint versionConstraint) |
AbstractExtensionDependency(String id,
VersionConstraint versionConstraint,
Map<String,Object> properties) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getId() |
Map<String,Object> |
getProperties()
Extends
ExtensionDependency standard properties. |
Object |
getProperty(String key) |
<T> T |
getProperty(String key,
T def)
Get a property.
|
VersionConstraint |
getVersionConstraint() |
int |
hashCode() |
protected void |
putProperty(String key,
Object value)
Set a property.
|
void |
setId(String id) |
void |
setProperties(Map<String,Object> properties)
Replace existing properties with provided properties.
|
void |
setVersionConstraint(VersionConstraint versionConstraint) |
String |
toString() |
protected VersionConstraint versionConstraint
getVersionConstraint()protected Map<String,Object> properties
getProperties()public AbstractExtensionDependency(ExtensionDependency dependency, VersionConstraint versionConstraint)
dependency - the extension dependency to copyversionConstraint - the version constraint to setpublic AbstractExtensionDependency(String id, VersionConstraint versionConstraint)
id - the id (or feature) of the extension dependencyversionConstraint - the version constraint of the extension dependencypublic AbstractExtensionDependency(String id, VersionConstraint versionConstraint, Map<String,Object> properties)
id - the id (or feature) of the extension dependencyversionConstraint - the version constraint of the extension dependencyproperties - the custom properties of the extension dependencypublic String getId()
getId in interface ExtensionDependencypublic VersionConstraint getVersionConstraint()
getVersionConstraint in interface ExtensionDependencypublic void setVersionConstraint(VersionConstraint versionConstraint)
versionConstraint - the version constraint of the target extensionpublic Map<String,Object> getProperties()
ExtensionDependencyExtensionDependency 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.
getProperties in interface ExtensionDependencypublic Object getProperty(String key)
getProperty in interface ExtensionDependencykey - the property keyprotected void putProperty(String key, Object value)
key - the property keyvalue - the property valuegetProperty(String)public void setProperties(Map<String,Object> properties)
properties - the propertiespublic <T> T getProperty(String key, T def)
ExtensionDependencygetProperty in interface ExtensionDependencyT - type of the property valuekey - the property keydef - the value to return if no property is associated to the provided keydefault of the property is not foundExtensionDependency.getProperty(String)Copyright © 2004–2015 XWiki. All rights reserved.