org.xwiki.extension
Interface Extension

All Known Subinterfaces:
CoreExtension, InstalledExtension, LocalExtension
All Known Implementing Classes:
AbstractExtension, WrappingCoreExtension, WrappingExtension, WrappingInstalledExtension, WrappingLocalExtension

public interface Extension

Represent an extension.

Since:
4.0M1
Version:
$Id: fdde8535f32efde6616f10d76a8c602bf75077cd $

Method Summary
 Collection<ExtensionAuthor> getAuthors()
           
 Collection<? 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()
           
 Collection<ExtensionLicense> getLicenses()
           
 String getName()
           
 Map<String,Object> getProperties()
          Extends Extension standard properties.
 Object getProperty(String key)
           
<T> T
getProperty(String key, T def)
          Get a property.
 ExtensionRepository getRepository()
           
 String getSummary()
           
 String getType()
           
 String getWebSite()
           
 

Method Detail

getId

ExtensionId getId()
Returns:
the id/version combination which makes the extension unique

getFeatures

Collection<String> getFeatures()
The idea is to indicate in an extension a list of provided "functionalities". Then when resolving extensions dependencies the dependencies id could be matched in this list.

Returns:
the extension ids also provided by this extension, an empty collection if there is none

getType

String getType()
Returns:
the type of the extension

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

getDependencies

Collection<? extends ExtensionDependency> getDependencies()
Returns:
the dependencies of the extension, an empty collection if there is none

getFile

ExtensionFile getFile()
Return extension file descriptor. Also allows to get the content of the file.

Returns:
the file of the extension

getRepository

ExtensionRepository getRepository()
Returns:
the repository of the extension

getProperties

Map<String,Object> getProperties()
Extends Extension standard properties.

Theses are generally provided by specific repositories. For example a maven repository will provide group and artifacts ids.

Returns:
the properties

getProperty

Object getProperty(String key)
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 key
def - 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)


Copyright © 2004-2013 XWiki. All Rights Reserved.