E
- the extension typepublic class WrappingInstalledExtension<E extends InstalledExtension> extends WrappingLocalExtension<E> implements InstalledExtension
overwrites
PKEY_DEPENDENCY, PKEY_INSTALLED, PKEY_NAMESPACES, PKEY_NAMESPACES_DEPENDENCY, PKEY_NAMESPACES_NAMESPACE, PKEY_PREFIX
PKEY_FILE
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 and Description |
---|
WrappingInstalledExtension(E installedExtension) |
Modifier and Type | Method and 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()
Indicate if the extension as been installed as a dependency of another one.
|
boolean |
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.
|
getFile
compareTo, get, getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite, setOverwrite
equals, getWrapped, hashCode, resolveWrapped, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFile
get, getAllowedNamespaces, getAuthors, getCategory, getComponents, getDependencies, getDescription, getExtensionFeature, getExtensionFeatures, getFeatures, getId, getIssueManagement, getLicenses, getManagedDependencies, getName, getProperties, getProperty, getProperty, getRepositories, getRepository, getScm, getSummary, getType, getWebSite
compareTo
public WrappingInstalledExtension(E installedExtension)
installedExtension
- the wrapped installed extensionpublic LocalExtension getLocalExtension()
getLocalExtension
in interface InstalledExtension
public boolean isInstalled()
isInstalled
in interface InstalledExtension
public boolean isValid(String namespace)
InstalledExtension
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.
isValid
in interface InstalledExtension
namespace
- the namespace to look at, if null it means the extension is installed on the root namespacepublic boolean isInstalled(String namespace)
InstalledExtension
isInstalled
in interface InstalledExtension
namespace
- the namespace to look at, if null it means the extension is installed on the root namespacepublic Collection<String> getNamespaces()
getNamespaces
in interface InstalledExtension
public boolean isDependency()
InstalledExtension
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.
isDependency
in interface InstalledExtension
public boolean isDependency(String namespace)
InstalledExtension
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.
isDependency
in interface InstalledExtension
namespace
- the namespace to look at, null indicate the root namespacepublic Date getInstallDate(String namespace)
getInstallDate
in interface InstalledExtension
namespace
- the namespace to look at, null
indicates the root namespacenull
if the install
date is not available or if this extension is not installed on the specified namespacepublic Object getNamespaceProperty(String key, String namespace)
InstalledExtension
getNamespaceProperty
in interface InstalledExtension
key
- the name of the property to look fornamespace
- the namespace to look at, null
indicates the root namespaceCopyright © 2004–2021 XWiki. All rights reserved.