Package org.xwiki.extension
Interface InstalledExtension
-
- All Superinterfaces:
Comparable<Extension>
,Extension
,LocalExtension
- All Known Implementing Classes:
WrappingInstalledExtension
public interface InstalledExtension extends LocalExtension
Represent a local extension.An installed extension.
- Since:
- 4.0M2
- Version:
- $Id: cf2a4ef3005bbb7302a6b69ac6296f758cd08d83 $
-
-
Field Summary
Fields Modifier and Type Field Description static String
FIELD_INSTALLED_NAMESPACES
static String
PKEY_DEPENDENCY
Custom property key containingisDependency(String)
withnull
namespace.static String
PKEY_INSTALLED
Custom property key containingisInstalled()
.static String
PKEY_NAMESPACES
Custom property key containinggetNamespaces()
.static String
PKEY_NAMESPACES_DEPENDENCY
Custom property key containingisDependency(String)
.static String
PKEY_NAMESPACES_NAMESPACE
Custom property key containing the namespace.static String
PKEY_PREFIX
The prefix that should be used by all custom extension properties that are specific to installed extensions.-
Fields 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
-
Fields inherited from interface org.xwiki.extension.LocalExtension
PKEY_FILE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Date
getInstallDate(String namespace)
LocalExtension
getLocalExtension()
Object
getNamespaceProperty(String key, String namespace)
An installed extension can have different values for its properties depending on the namespace where it is installed.Collection<String>
getNamespaces()
boolean
isDependency()
Deprecated.since 4.3M1 useisDependency(String)
withnull
namespace insteadboolean
isDependency(String namespace)
Indicate if the extension as been installed as a dependency of another one.boolean
isInstalled()
boolean
isInstalled(String namespace)
Indicate if the extension is installed in the provided namespace.boolean
isValid(String namespace)
Indicate if the extension is working.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.xwiki.extension.Extension
get, getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite
-
Methods inherited from interface org.xwiki.extension.LocalExtension
getFile
-
-
-
-
Field Detail
-
PKEY_PREFIX
static final String PKEY_PREFIX
The prefix that should be used by all custom extension properties that are specific to installed extensions.- Since:
- 7.0M2
- See Also:
- Constant Field Values
-
PKEY_INSTALLED
static final String PKEY_INSTALLED
Custom property key containingisInstalled()
.- See Also:
- Constant Field Values
-
PKEY_NAMESPACES
static final String PKEY_NAMESPACES
Custom property key containinggetNamespaces()
.Since 4.3M1 it's a
Map<String, Object>
.- See Also:
- Constant Field Values
-
PKEY_NAMESPACES_NAMESPACE
static final String PKEY_NAMESPACES_NAMESPACE
Custom property key containing the namespace.- See Also:
- Constant Field Values
-
PKEY_NAMESPACES_DEPENDENCY
static final String PKEY_NAMESPACES_DEPENDENCY
Custom property key containingisDependency(String)
.- See Also:
- Constant Field Values
-
PKEY_DEPENDENCY
static final String PKEY_DEPENDENCY
Custom property key containingisDependency(String)
withnull
namespace.- See Also:
- Constant Field Values
-
FIELD_INSTALLED_NAMESPACES
static final String FIELD_INSTALLED_NAMESPACES
- Since:
- 14.0RC1
- See Also:
getNamespaces()
, Constant Field Values
-
-
Method Detail
-
getLocalExtension
LocalExtension getLocalExtension()
- Returns:
- the actual extension
-
isInstalled
boolean isInstalled()
- Returns:
- indicate if the extension is installed
-
isInstalled
boolean isInstalled(String namespace)
Indicate if the extension is installed in the provided namespace.- Parameters:
namespace
- the namespace to look at, if null it means the extension is installed on the root namespace- Returns:
- true if the extension is installed in the provided namespace
-
isValid
boolean isValid(String namespace)
Indicate if the extension is working.An installed extension can be invalid for example when one of the core extensions has been changed and is now incompatible with this installed extension.
- Parameters:
namespace
- the namespace to look at, if null it means the extension is installed on the root namespace- Returns:
- true is valid
- Since:
- 4.2M1
-
getNamespaces
Collection<String> getNamespaces()
- Returns:
- the namespaces in which this extension is enabled. null means root namespace (i.e all namespaces).
-
isDependency
boolean isDependency(String namespace)
Indicate if the extension as been installed as a dependency of another one.The idea is to be able to make the difference between extension specifically installed by a user so that it's possible to know which extension are not really required anymore.
- Parameters:
namespace
- the namespace to look at, null indicate the root namespace- Returns:
- true if the the extension has been installed only because it was a dependency of another extension
-
getInstallDate
Date getInstallDate(String namespace)
- Parameters:
namespace
- the namespace to look at,null
indicates the root namespace- Returns:
- the date when this extension has been installed on the specified namespace,
null
if the install date is not available or if this extension is not installed on the specified namespace - Since:
- 7.0M2
-
getNamespaceProperty
Object getNamespaceProperty(String key, String namespace)
An installed extension can have different values for its properties depending on the namespace where it is installed. This method allows us to access the value of a specific extension property on a given namespace.- Parameters:
key
- the name of the property to look fornamespace
- the namespace to look at,null
indicates the root namespace- Returns:
- the value of the specified extension property on the given namespace
- Since:
- 7.0M2
-
isDependency
@Deprecated boolean isDependency()
Deprecated.since 4.3M1 useisDependency(String)
withnull
namespace insteadIndicate if the extension as been installed as a dependency of another one.The idea is to be able to make the difference between extension specifically installed by a user so that it's possible to know which extension are not really required anymore.
- Returns:
- true if the the extension has been installed only because it was a dependency of another extension
-
-