| Modifier and Type | Field and Description |
|---|---|
protected List<ExtensionAuthor> |
authors |
protected String |
category |
protected List<ExtensionDependency> |
dependencies |
protected String |
description |
protected Set<String> |
features |
protected ExtensionFile |
file
The file of the extension.
|
protected ExtensionId |
id |
protected ExtensionIssueManagement |
issueManagement |
protected List<ExtensionLicense> |
licenses |
protected String |
name |
protected Map<String,Object> |
properties |
protected ExtensionRepository |
repository |
protected ExtensionScm |
scm |
protected String |
summary |
protected String |
type |
protected String |
website |
FIELD_AUTHOR, FIELD_AUTHORS, FIELD_CATEGORY, FIELD_DESCRIPTION, FIELD_FEATURE, FIELD_FEATURES, FIELD_ID, FIELD_LICENSE, FIELD_LICENSES, FIELD_NAME, FIELD_REPOSITORY, FIELD_SCM, FIELD_SUMMARY, FIELD_TYPE, FIELD_VERSION, FIELD_WEBSITE| Constructor and Description |
|---|
AbstractExtension(ExtensionRepository repository,
Extension extension)
Create new extension descriptor by copying provided one.
|
AbstractExtension(ExtensionRepository repository,
ExtensionId id,
String type) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthor(ExtensionAuthor author)
Add a new author to the extension.
|
void |
addDependency(ExtensionDependency dependency)
Add a new dependency to the extension.
|
void |
addFeature(String feature)
Add a new feature to the extension.
|
void |
addLicense(ExtensionLicense license)
Add a new license to the extension.
|
boolean |
equals(Object obj) |
<T> T |
get(String fieldName)
Get an extension field by name.
|
List<ExtensionAuthor> |
getAuthors() |
String |
getCategory() |
List<? extends ExtensionDependency> |
getDependencies() |
String |
getDescription() |
Collection<String> |
getFeatures()
The idea is to indicate in an extension a list of provided "functionalities".
|
ExtensionFile |
getFile()
Return extension file descriptor.
|
ExtensionId |
getId() |
ExtensionIssueManagement |
getIssueManagement() |
Collection<ExtensionLicense> |
getLicenses() |
String |
getName() |
Map<String,Object> |
getProperties()
Extends
Extension standard properties. |
<T> T |
getProperty(String key) |
<T> T |
getProperty(String key,
T def)
Get a property.
|
ExtensionRepository |
getRepository() |
ExtensionScm |
getScm() |
String |
getSummary() |
String |
getType() |
String |
getWebSite() |
int |
hashCode() |
void |
putProperty(String key,
Object value)
Set a property.
|
protected void |
set(Extension extension)
Update optional informations based on the provided extension.
|
void |
setAuthors(Collection<? extends ExtensionAuthor> authors) |
void |
setCategory(String categrory) |
void |
setDependencies(Collection<? extends ExtensionDependency> dependencies) |
void |
setDescription(String description) |
void |
setFeatures(Collection<String> features) |
protected void |
setFile(ExtensionFile file) |
protected void |
setId(ExtensionId id) |
void |
setIssueManagement(ExtensionIssueManagement issueManagement) |
void |
setLicenses(Collection<ExtensionLicense> licenses) |
void |
setName(String name) |
void |
setProperties(Map<String,Object> properties)
Replace existing properties with provided properties.
|
protected void |
setRepository(ExtensionRepository repository) |
void |
setScm(ExtensionScm scm) |
void |
setSummary(String summary) |
protected void |
setType(String type) |
void |
setWebsite(String website) |
String |
toString() |
protected ExtensionId id
getId()protected Set<String> features
getFeatures()protected List<ExtensionLicense> licenses
getLicenses()protected String summary
getSummary()protected String description
getDescription()protected List<ExtensionAuthor> authors
getAuthors()protected String website
getWebSite()protected ExtensionRepository repository
getRepository()protected Map<String,Object> properties
getProperties()protected List<ExtensionDependency> dependencies
getDependencies()protected ExtensionScm scm
getScm()protected ExtensionIssueManagement issueManagement
getIssueManagement()protected String category
getCategory()protected ExtensionFile file
public AbstractExtension(ExtensionRepository repository, ExtensionId id, String type)
repository - the repository where this extension comes fromid - the extension identifiertype - the extension typepublic AbstractExtension(ExtensionRepository repository, Extension extension)
repository - the repository where this extension comes fromextension - the extension to copyprotected void set(Extension extension)
extension - the extension from which to get informationspublic <T> T get(String fieldName)
public ExtensionId getId()
protected void setId(ExtensionId id)
id - the extension idgetId()public Collection<String> getFeatures()
ExtensiongetFeatures in interface Extensionpublic void setFeatures(Collection<String> features)
features - the extension ids also provided by this extensionpublic void addFeature(String feature)
feature - a feature namepublic String getType()
protected void setType(String type)
type - the type of the extensiongetType()public String getName()
public void setName(String name)
name - the display name of the extensionpublic Collection<ExtensionLicense> getLicenses()
getLicenses in interface Extensionpublic void setLicenses(Collection<ExtensionLicense> licenses)
licenses - the licenses of the extensionpublic void addLicense(ExtensionLicense license)
license - a licensepublic String getSummary()
getSummary in interface Extensionpublic void setSummary(String summary)
summary - a short description of the extensionpublic String getDescription()
getDescription in interface Extensionpublic void setDescription(String description)
description - a description of the extensionpublic List<ExtensionAuthor> getAuthors()
getAuthors in interface Extensionpublic void setAuthors(Collection<? extends ExtensionAuthor> authors)
authors - the authors of the extensionpublic void addAuthor(ExtensionAuthor author)
author - an authorpublic String getWebSite()
getWebSite in interface Extensionpublic void setWebsite(String website)
website - an URL for the extension websitepublic void addDependency(ExtensionDependency dependency)
dependency - a dependencypublic List<? extends ExtensionDependency> getDependencies()
getDependencies in interface Extensionpublic void setDependencies(Collection<? extends ExtensionDependency> dependencies)
dependencies - the dependencies of the extensiongetDependencies()public ExtensionRepository getRepository()
getRepository in interface Extensionprotected void setRepository(ExtensionRepository repository)
repository - the repository of the extensiongetRepository()public ExtensionScm getScm()
public void setScm(ExtensionScm scm)
scm - informations related to extensions's Source Control Managementpublic ExtensionIssueManagement getIssueManagement()
getIssueManagement in interface Extensionpublic void setIssueManagement(ExtensionIssueManagement issueManagement)
issueManagement - informations related to extension's issues managementpublic ExtensionFile getFile()
Extensionprotected void setFile(ExtensionFile file)
file - the file of the extensionpublic String getCategory()
getCategory in interface Extension@Unstable public void setCategory(String categrory)
categrory - the category of the extensionpublic Map<String,Object> getProperties()
ExtensionExtension standard properties.
Theses are generally provided by specific repositories. For example a maven repository will provide group and artifacts ids.
getProperties in interface Extensionpublic <T> T getProperty(String key)
getProperty in interface ExtensionT - type of the property valuekey - the property keypublic <T> T getProperty(String key, T def)
ExtensiongetProperty in interface ExtensionT - 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 foundExtension.getProperty(String)public void putProperty(String key, Object value)
key - the property keyvalue - the property valuegetProperty(String)public void setProperties(Map<String,Object> properties)
properties - the propertiesCopyright © 2004–2015 XWiki. All rights reserved.