|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.extension.AbstractExtensionDependency
public abstract class AbstractExtensionDependency
Base class for ExtensionDependency implementations.
| Field Summary | |
|---|---|
protected String |
id
|
protected Map<String,Object> |
properties
|
protected VersionConstraint |
versionConstraint
|
| Constructor Summary | |
|---|---|
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)
|
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
String |
getId()
|
|
Map<String,Object> |
getProperties()
Extends ExtensionDependency standard properties. |
|
Object |
getProperty(String key)
|
|
|
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()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String id
getId()protected VersionConstraint versionConstraint
getVersionConstraint()protected Map<String,Object> properties
getProperties()| Constructor Detail |
|---|
public AbstractExtensionDependency(ExtensionDependency dependency,
VersionConstraint versionConstraint)
dependency - the extension dependency to copyversionConstraint - the version constraint to set
public AbstractExtensionDependency(String id,
VersionConstraint versionConstraint)
id - the id (or feature) of the extension dependencyversionConstraint - the version constraint of the extension dependency
public 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 dependency| Method Detail |
|---|
public String getId()
getId in interface ExtensionDependencypublic void setId(String id)
id - the extension idgetId()public 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 key
protected void putProperty(String key,
Object value)
key - the property keyvalue - the property valuegetProperty(String)public void setProperties(Map<String,Object> properties)
properties - the properties
public <T> T getProperty(String key,
T def)
ExtensionDependency
getProperty in interface ExtensionDependencyT - type of the property valuekey - the property keydef - the value to return if no property is associated to the provided key
default of the property is not foundExtensionDependency.getProperty(String)public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||