Package org.xwiki.extension.wrap
Class AbstractWrappingExtension<E extends Extension>
java.lang.Object
org.xwiki.script.wrap.AbstractWrappingObject<T>
org.xwiki.extension.wrap.AbstractWrappingObject<E>
org.xwiki.extension.wrap.AbstractWrappingExtension<E>
- Type Parameters:
E
- the extension type
- All Implemented Interfaces:
Comparable<Extension>
,Extension
- Direct Known Subclasses:
WrappingExtension
public abstract class AbstractWrappingExtension<E extends Extension>
extends AbstractWrappingObject<E>
implements Extension
Wrap an extension.
- Since:
- 12.9RC1
- Version:
- $Id: 43336ed1f8f9563ba965de96a1e629f9c18c67fc $
-
Field Summary
FieldsFields inherited from interface org.xwiki.extension.Extension
FIELD_ALLOWEDNAMESPACE, FIELD_ALLOWEDNAMESPACES, FIELD_AUTHOR, FIELD_AUTHORS, FIELD_CATEGORY, FIELD_COMPONENT, FIELD_COMPONENTS, FIELD_DEPENDENCIES, FIELD_DESCRIPTION, FIELD_EXTENSIONFEATURE, FIELD_EXTENSIONFEATURES, FIELD_FEATURE, FIELD_FEATURES, FIELD_ID, FIELD_ISSUEMANAGEMENT, FIELD_LICENSE, FIELD_LICENSES, FIELD_MANAGEDDEPENDENCIES, FIELD_NAME, FIELD_NAMESPACES, FIELD_PROPERTIES, FIELD_REPOSITORIES, FIELD_REPOSITORY, FIELD_SCM, FIELD_SUMMARY, FIELD_TYPE, FIELD_VERSION, FIELD_WEBSITE, IKEYPREFIX
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
A default constructor allowing to set the wrapped object later.AbstractWrappingExtension
(E extension) -
Method Summary
Modifier and TypeMethodDescriptionint
<T> T
Get an extension field (name, summary, id, etc.) by name.getExtensionFeature
(String featureId) Return theExtensionId
object that matches the passed feature id.Indicate in an extension a list of provided "functionalities".Deprecated.getFile()
Access the associated extension file content.getId()
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()
void
setOverwrite
(String key, Object value) Methods inherited from class org.xwiki.script.wrap.AbstractWrappingObject
equals, getWrapped, hashCode, resolveWrapped, toString
-
Field Details
-
overwrites
-
-
Constructor Details
-
AbstractWrappingExtension
- Parameters:
extension
- the wrapped extension
-
AbstractWrappingExtension
protected AbstractWrappingExtension()A default constructor allowing to set the wrapped object later.
-
-
Method Details
-
setOverwrite
- Parameters:
key
- the key associated to the Extension field (usually found inExtension
constants) to overwritevalue
- the value to overwrite- Since:
- 9.0RC1, 8.4.2
-
get
Description copied from interface:Extension
Get an extension field (name, summary, id, etc.) by name. Fallback on properties. -
getId
-
getFeatures
Deprecated.Description copied from interface:Extension
Indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.- Specified by:
getFeatures
in interfaceExtension
- Returns:
- the extension ids also provided by this extension, an empty collection if there is none
-
getExtensionFeatures
Description copied from interface:Extension
Indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies they can be matched in this list.- Specified by:
getExtensionFeatures
in interfaceExtension
- Returns:
- the
ExtensionId
s also provided by this extension, an empty collection if there is none
-
getExtensionFeature
Description copied from interface:Extension
Return theExtensionId
object that matches the passed feature id.- Specified by:
getExtensionFeature
in interfaceExtension
- Parameters:
featureId
- the id of the feature- Returns:
- the
ExtensionId
associated to the passed id
-
getType
-
getName
-
getLicenses
- Specified by:
getLicenses
in interfaceExtension
- Returns:
- the license of the extension, an empty collection if there is none
-
getSummary
- Specified by:
getSummary
in interfaceExtension
- Returns:
- a short description of the extension
-
getDescription
- Specified by:
getDescription
in interfaceExtension
- Returns:
- a description of the extension
-
getWebSite
- Specified by:
getWebSite
in interfaceExtension
- Returns:
- an URL for the extension website
-
getAuthors
- Specified by:
getAuthors
in interfaceExtension
- Returns:
- the extension authors, an empty collection if there is none
-
getComponents
- Specified by:
getComponents
in interfaceExtension
- Returns:
- the XWiki components provided by the extension
-
getAllowedNamespaces
- Specified by:
getAllowedNamespaces
in interfaceExtension
- Returns:
- the namespaces where it's allowed to install this extension
-
getDependencies
- Specified by:
getDependencies
in interfaceExtension
- Returns:
- the dependencies of the extension, an empty collection if there is none
-
getManagedDependencies
Description copied from interface:Extension
Managed dependencies are used to override transitive dependencies (usually the version of this transitive dependency).- Specified by:
getManagedDependencies
in interfaceExtension
- Returns:
- the managed dependencies, empty list if there is none
-
getFile
Description copied from interface:Extension
Access the associated extension file content. -
getRepository
- Specified by:
getRepository
in interfaceExtension
- Returns:
- the repository of the extension
-
getScm
-
getIssueManagement
- Specified by:
getIssueManagement
in interfaceExtension
- Returns:
- informations related to extension's issues management
-
getCategory
- Specified by:
getCategory
in interfaceExtension
- Returns:
- the category of the extension
-
getRepositories
- Specified by:
getRepositories
in interfaceExtension
- Returns:
- the custom repositories provided by the extension (usually to resolve dependencies)
-
getProperties
Description copied from interface:Extension
ExtendsExtension
standard properties.Theses are generally provided by specific repositories. For example a maven repository will provide group and artifacts ids.
- Specified by:
getProperties
in interfaceExtension
- Returns:
- the properties
-
getProperty
- Specified by:
getProperty
in interfaceExtension
- Type Parameters:
T
- type of the property value- Parameters:
key
- the property key- Returns:
- the property value
-
getProperty
Description copied from interface:Extension
Get a property.- Specified by:
getProperty
in interfaceExtension
- 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:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<E extends Extension>
-