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
public interface Extension extends Comparable<Extension>
Represent an extension.- Since:
- 4.0M1
- Version:
- $Id: 170937d450b7cdef09fb1d3d153c81ff27ea354f $
-
-
Field Summary
-
Method Summary
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
FIELD_REPOSITORY
static final String FIELD_REPOSITORY
- Since:
- 7.0RC1
- See Also:
getRepository()
, Constant Field Values
-
FIELD_ID
static final String FIELD_ID
- Since:
- 7.0RC1
- See Also:
getId()
, Constant Field Values
-
FIELD_VERSION
static final String FIELD_VERSION
- Since:
- 7.0RC1
- See Also:
getId()
, Constant Field Values
-
FIELD_FEATURE
static final String FIELD_FEATURE
Deprecated.since 9.0RC1/8.4.2, useFIELD_EXTENSIONFEATURE
instead- Since:
- 7.0RC1
- See Also:
getFeatures()
, Constant Field Values
-
FIELD_FEATURES
static final String FIELD_FEATURES
Deprecated.since 9.0RC1/8.4.2, useFIELD_EXTENSIONFEATURES
instead- Since:
- 7.0RC1
- See Also:
getFeatures()
, Constant Field Values
-
FIELD_EXTENSIONFEATURE
static final String FIELD_EXTENSIONFEATURE
- Since:
- 9.0RC1, 8.4.2
- See Also:
getExtensionFeatures()
, Constant Field Values
-
FIELD_EXTENSIONFEATURES
static final String FIELD_EXTENSIONFEATURES
- Since:
- 9.0RC1, 8.4.2
- See Also:
getExtensionFeatures()
, Constant Field Values
-
FIELD_SUMMARY
static final String FIELD_SUMMARY
- Since:
- 7.0RC1
- See Also:
getSummary()
, Constant Field Values
-
FIELD_DESCRIPTION
static final String FIELD_DESCRIPTION
- Since:
- 7.0RC1
- See Also:
getDescription()
, Constant Field Values
-
FIELD_AUTHOR
static final String FIELD_AUTHOR
- Since:
- 7.0RC1
- See Also:
getAuthors()
, Constant Field Values
-
FIELD_AUTHORS
static final String FIELD_AUTHORS
- Since:
- 7.0RC1
- See Also:
getAuthors()
, Constant Field Values
-
FIELD_CATEGORY
static final String FIELD_CATEGORY
- Since:
- 7.0RC1
- See Also:
getCategory()
, Constant Field Values
-
FIELD_LICENSE
static final String FIELD_LICENSE
- Since:
- 7.0RC1
- See Also:
getLicenses()
, Constant Field Values
-
FIELD_LICENSES
static final String FIELD_LICENSES
- Since:
- 7.0RC1
- See Also:
getLicenses()
, Constant Field Values
-
FIELD_NAME
static final String FIELD_NAME
- Since:
- 7.0RC1
- See Also:
getName()
, Constant Field Values
-
FIELD_TYPE
static final String FIELD_TYPE
- Since:
- 7.0RC1
- See Also:
getType()
, Constant Field Values
-
FIELD_WEBSITE
static final String FIELD_WEBSITE
- Since:
- 7.0RC1
- See Also:
getWebSite()
, Constant Field Values
-
FIELD_NAMESPACES
static final String FIELD_NAMESPACES
- Since:
- 8.3M1
- See Also:
getAllowedNamespaces()
, Constant Field Values
-
FIELD_ALLOWEDNAMESPACE
static final String FIELD_ALLOWEDNAMESPACE
- Since:
- 8.0M1
- See Also:
getAllowedNamespaces()
, Constant Field Values
-
FIELD_ALLOWEDNAMESPACES
static final String FIELD_ALLOWEDNAMESPACES
- Since:
- 8.0M1
- See Also:
getAllowedNamespaces()
, Constant Field Values
-
FIELD_SCM
static final String FIELD_SCM
- Since:
- 7.0RC1
- See Also:
getScm()
, Constant Field Values
-
FIELD_REPOSITORIES
static final String FIELD_REPOSITORIES
- Since:
- 7.3M1
- See Also:
getRepositories()
, Constant Field Values
-
FIELD_PROPERTIES
static final String FIELD_PROPERTIES
- Since:
- 7.4.3, 8.0.1, 8.1M1
- See Also:
getProperties()
, Constant Field Values
-
FIELD_ISSUEMANAGEMENT
static final String FIELD_ISSUEMANAGEMENT
- Since:
- 9.0RC1, 8.4.2
- See Also:
getIssueManagement()
, Constant Field Values
-
FIELD_MANAGEDDEPENDENCIES
static final String FIELD_MANAGEDDEPENDENCIES
- Since:
- 9.0RC1, 8.4.2
- See Also:
getManagedDependencies()
, Constant Field Values
-
FIELD_DEPENDENCIES
static final String FIELD_DEPENDENCIES
- Since:
- 9.0RC1, 8.4.2
- See Also:
getDependencies()
, Constant Field Values
-
FIELD_COMPONENT
static final String FIELD_COMPONENT
- Since:
- 13.3RC1
- See Also:
getComponents()
, Constant Field Values
-
FIELD_COMPONENTS
static final String FIELD_COMPONENTS
- Since:
- 13.3RC1
- See Also:
getComponents()
, Constant Field Values
-
IKEYPREFIX
static final String IKEYPREFIX
Prefix to use for custom properties names in external systems (Maven, etc).- Since:
- 8.3M1
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
<T> T get(String fieldName)
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 Collection<String> 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
default Collection<ExtensionId> 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
default ExtensionId getExtensionFeature(String featureId)
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
default Collection<String> 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
default Collection<ExtensionDependency> 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
default Collection<ExtensionComponent> getComponents()
- Returns:
- the XWiki components provided by the extension
- Since:
- 13.3RC1
-
getProperties
Map<String,Object> 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
<T> T getProperty(String key)
- Type Parameters:
T
- type of the property value- 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)
-
-