Package org.xwiki.extension
Interface Extension
- All Superinterfaces:
Comparable<Extension>
- All Known Subinterfaces:
CoreExtension
,IndexedExtension
,InstalledExtension
,LocalExtension
,MutableExtension
,RatingExtension
,RemoteExtension
,RewritenExtension
- All Known Implementing Classes:
AbstractExtension
,AbstractRatingExtension
,AbstractRemoteExtension
,AbstractWrappingExtension
,WrappingCoreExtension
,WrappingExtension
,WrappingIndexedExtension
,WrappingInstalledExtension
,WrappingLocalExtension
,WrappingRatingExtension
,WrappingRemoteExtension
Represent an extension.
- Since:
- 4.0M1
- Version:
- $Id: 170937d450b7cdef09fb1d3d153c81ff27ea354f $
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
Deprecated.since 9.0RC1/8.4.2, useFIELD_EXTENSIONFEATURES
insteadstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Prefix to use for custom properties names in external systems (Maven, etc). -
Method Summary
Modifier and TypeMethodDescription<T> T
Get an extension field (name, summary, id, etc.) by name.default Collection<String>
default Collection<ExtensionComponent>
default ExtensionId
getExtensionFeature
(String featureId) Return theExtensionId
object that matches the passed feature id.default Collection<ExtensionId>
Indicate in an extension a list of provided "functionalities".Deprecated.since 8.0M1, usegetExtensionFeatures()
insteadgetFile()
Access the associated extension file content.getId()
default Collection<ExtensionDependency>
Managed dependencies are used to override transitive dependencies (usually the version of this transitive dependency).getName()
ExtendsExtension
standard properties.<T> T
getProperty
(String key) <T> T
getProperty
(String key, T def) Get a property.getScm()
getType()
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
FIELD_REPOSITORY
- Since:
- 7.0RC1
- See Also:
-
FIELD_ID
- Since:
- 7.0RC1
- See Also:
-
FIELD_VERSION
- Since:
- 7.0RC1
- See Also:
-
FIELD_FEATURE
Deprecated.since 9.0RC1/8.4.2, useFIELD_EXTENSIONFEATURE
instead- Since:
- 7.0RC1
- See Also:
-
FIELD_FEATURES
Deprecated.since 9.0RC1/8.4.2, useFIELD_EXTENSIONFEATURES
instead- Since:
- 7.0RC1
- See Also:
-
FIELD_EXTENSIONFEATURE
- Since:
- 9.0RC1, 8.4.2
- See Also:
-
FIELD_EXTENSIONFEATURES
- Since:
- 9.0RC1, 8.4.2
- See Also:
-
FIELD_SUMMARY
- Since:
- 7.0RC1
- See Also:
-
FIELD_DESCRIPTION
- Since:
- 7.0RC1
- See Also:
-
FIELD_AUTHOR
- Since:
- 7.0RC1
- See Also:
-
FIELD_AUTHORS
- Since:
- 7.0RC1
- See Also:
-
FIELD_CATEGORY
- Since:
- 7.0RC1
- See Also:
-
FIELD_LICENSE
- Since:
- 7.0RC1
- See Also:
-
FIELD_LICENSES
- Since:
- 7.0RC1
- See Also:
-
FIELD_NAME
- Since:
- 7.0RC1
- See Also:
-
FIELD_TYPE
- Since:
- 7.0RC1
- See Also:
-
FIELD_WEBSITE
- Since:
- 7.0RC1
- See Also:
-
FIELD_NAMESPACES
- Since:
- 8.3M1
- See Also:
-
FIELD_ALLOWEDNAMESPACE
- Since:
- 8.0M1
- See Also:
-
FIELD_ALLOWEDNAMESPACES
- Since:
- 8.0M1
- See Also:
-
FIELD_SCM
- Since:
- 7.0RC1
- See Also:
-
FIELD_REPOSITORIES
- Since:
- 7.3M1
- See Also:
-
FIELD_PROPERTIES
- Since:
- 7.4.3, 8.0.1, 8.1M1
- See Also:
-
FIELD_ISSUEMANAGEMENT
- Since:
- 9.0RC1, 8.4.2
- See Also:
-
FIELD_MANAGEDDEPENDENCIES
- Since:
- 9.0RC1, 8.4.2
- See Also:
-
FIELD_DEPENDENCIES
- Since:
- 9.0RC1, 8.4.2
- See Also:
-
FIELD_COMPONENT
- Since:
- 13.3RC1
- See Also:
-
FIELD_COMPONENTS
- Since:
- 13.3RC1
- See Also:
-
IKEYPREFIX
Prefix to use for custom properties names in external systems (Maven, etc).- Since:
- 8.3M1
- See Also:
-
-
Method Details
-
get
Get an extension field (name, summary, id, etc.) by name. Fallback on properties.- Type Parameters:
T
- type of the field value- Parameters:
fieldName
- the field name;- Returns:
- the field value or null if none could be found
- Since:
- 7.0RC1
-
getId
ExtensionId getId()- Returns:
- the id/version combination which makes the extension unique
-
getFeatures
Deprecated.since 8.0M1, usegetExtensionFeatures()
insteadIndicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.- Returns:
- the extension ids also provided by this extension, an empty collection if there is none
-
getExtensionFeatures
Indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.- Returns:
- the
ExtensionId
s also provided by this extension, an empty collection if there is none - Since:
- 8.0M1
-
getExtensionFeature
Return theExtensionId
object that matches the passed feature id.- Parameters:
featureId
- the id of the feature- Returns:
- the
ExtensionId
associated to the passed id - Since:
- 8.0M1
-
getType
String getType()- Returns:
- the type of the extension, null if the extension does not have any associated file
-
getName
String getName()- Returns:
- the display name of the extension
-
getLicenses
Collection<ExtensionLicense> getLicenses()- Returns:
- the license of the extension, an empty collection if there is none
-
getSummary
String getSummary()- Returns:
- a short description of the extension
-
getDescription
String getDescription()- Returns:
- a description of the extension
-
getWebSite
String getWebSite()- Returns:
- an URL for the extension website
-
getAuthors
Collection<ExtensionAuthor> getAuthors()- Returns:
- the extension authors, an empty collection if there is none
-
getAllowedNamespaces
- Returns:
- the namespaces where it's allowed to install this extension
- Since:
- 8.0M1
-
getDependencies
Collection<ExtensionDependency> getDependencies()- Returns:
- the dependencies of the extension, an empty collection if there is none
-
getManagedDependencies
Managed dependencies are used to override transitive dependencies (usually the version of this transitive dependency).- Returns:
- the managed dependencies, empty list if there is none
- Since:
- 8.1M1
-
getFile
ExtensionFile getFile()Access the associated extension file content.- Returns:
- the file of the extension
-
getRepository
ExtensionRepository getRepository()- Returns:
- the repository of the extension
-
getScm
ExtensionScm getScm()- Returns:
- informations related to extensions's source control management
- Since:
- 6.3M1
-
getIssueManagement
ExtensionIssueManagement getIssueManagement()- Returns:
- informations related to extension's issues management
- Since:
- 6.3M1
-
getCategory
String getCategory()- Returns:
- the category of the extension
- Since:
- 7.0M2
-
getRepositories
Collection<ExtensionRepositoryDescriptor> getRepositories()- Returns:
- the custom repositories provided by the extension (usually to resolve dependencies)
- Since:
- 7.3M1
-
getComponents
- Returns:
- the XWiki components provided by the extension
- Since:
- 13.3RC1
-
getProperties
ExtendsExtension
standard properties.Theses are generally provided by specific repositories. For example a maven repository will provide group and artifacts ids.
- Returns:
- the properties
-
getProperty
- Type Parameters:
T
- type of the property value- Parameters:
key
- the property key- Returns:
- the property value
-
getProperty
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:
-
FIELD_EXTENSIONFEATURE
instead