Package org.xwiki.extension.wrap
Class WrappingInstalledExtension<E extends InstalledExtension>
java.lang.Object
org.xwiki.script.wrap.AbstractWrappingObject<T>
org.xwiki.extension.wrap.AbstractWrappingObject<E>
org.xwiki.extension.wrap.AbstractWrappingExtension<E>
org.xwiki.extension.wrap.WrappingExtension<T>
org.xwiki.extension.wrap.WrappingLocalExtension<E>
org.xwiki.extension.wrap.WrappingInstalledExtension<E>
- Type Parameters:
E
- the extension type
- All Implemented Interfaces:
Comparable<Extension>
,Extension
,InstalledExtension
,LocalExtension
public class WrappingInstalledExtension<E extends InstalledExtension>
extends WrappingLocalExtension<E>
implements InstalledExtension
Wrap an installed extension.
- Since:
- 4.0M2
- Version:
- $Id: 741acf10445b225f678159db85a19c190fa2f89c $
-
Field Summary
Fields inherited from class org.xwiki.extension.wrap.AbstractWrappingExtension
overwrites
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.InstalledExtension
FIELD_INSTALLED_NAMESPACES, PKEY_DEPENDENCY, PKEY_INSTALLED, PKEY_NAMESPACES, PKEY_NAMESPACES_DEPENDENCY, PKEY_NAMESPACES_NAMESPACE, PKEY_PREFIX
Fields inherited from interface org.xwiki.extension.LocalExtension
PKEY_FILE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInstallDate
(String namespace) getNamespaceProperty
(String key, String namespace) An installed extension can have different values for its properties depending on the namespace where it is installed.boolean
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
boolean
isInstalled
(String namespace) Indicate if the extension is installed in the provided namespace.boolean
Indicate if the extension is working.Methods inherited from class org.xwiki.extension.wrap.WrappingLocalExtension
getFile
Methods inherited from class org.xwiki.extension.wrap.AbstractWrappingExtension
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
Methods inherited from class org.xwiki.script.wrap.AbstractWrappingObject
equals, getWrapped, hashCode, resolveWrapped, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
-
Constructor Details
-
WrappingInstalledExtension
- Parameters:
installedExtension
- the wrapped installed extension
-
-
Method Details
-
getLocalExtension
- Specified by:
getLocalExtension
in interfaceInstalledExtension
- Returns:
- the actual extension
-
isInstalled
public boolean isInstalled()- Specified by:
isInstalled
in interfaceInstalledExtension
- Returns:
- indicate if the extension is installed
-
isValid
Description copied from interface:InstalledExtension
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.
- Specified by:
isValid
in interfaceInstalledExtension
- Parameters:
namespace
- the namespace to look at, if null it means the extension is installed on the root namespace- Returns:
- true is valid
-
isInstalled
Description copied from interface:InstalledExtension
Indicate if the extension is installed in the provided namespace.- Specified by:
isInstalled
in interfaceInstalledExtension
- 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
-
getNamespaces
- Specified by:
getNamespaces
in interfaceInstalledExtension
- Returns:
- the namespaces in which this extension is enabled. null means root namespace (i.e all namespaces).
-
isDependency
public boolean isDependency()Description copied from interface:InstalledExtension
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.
- Specified by:
isDependency
in interfaceInstalledExtension
- Returns:
- true if the the extension has been installed only because it was a dependency of another extension
-
isDependency
Description copied from interface:InstalledExtension
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.
- Specified by:
isDependency
in interfaceInstalledExtension
- 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
- Specified by:
getInstallDate
in interfaceInstalledExtension
- 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
-
getNamespaceProperty
Description copied from interface:InstalledExtension
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.- Specified by:
getNamespaceProperty
in interfaceInstalledExtension
- 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
-