org.xwiki.extension
Interface InstalledExtension

All Superinterfaces:
Extension, LocalExtension
All Known Implementing Classes:
WrappingInstalledExtension

public interface InstalledExtension
extends LocalExtension

Represent a local extension.

An installed extension.

Since:
4.0M2
Version:
$Id: bb12a9520ecb0773b60f732a4a2cc96bc5a60118 $

Field Summary
static String PKEY_DEPENDENCY
          Custom property key containing isDependency(String) with null namespace.
static String PKEY_INSTALLED
          Custom property key containing isInstalled().
static String PKEY_NAMESPACES
          Custom property key containing getNamespaces().
static String PKEY_NAMESPACES_DEPENDENCY
          Custom property key containing isInstalled(String).
static String PKEY_NAMESPACES_NAMESPACE
          Custom property key containing getNamespaces().
 
Fields inherited from interface org.xwiki.extension.LocalExtension
PKEY_FILE
 
Method Summary
 LocalExtension getLocalExtension()
           
 Collection<String> getNamespaces()
           
 boolean isDependency()
          Deprecated. since 4.3M1 use isDependency(String) with null namespace instead
 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.
 
Methods inherited from interface org.xwiki.extension.LocalExtension
getFile
 
Methods inherited from interface org.xwiki.extension.Extension
getAuthors, getDependencies, getDescription, getFeatures, getId, getLicenses, getName, getProperties, getProperty, getProperty, getRepository, getSummary, getType, getWebSite
 

Field Detail

PKEY_INSTALLED

static final String PKEY_INSTALLED
Custom property key containing isInstalled().

See Also:
Constant Field Values

PKEY_NAMESPACES

static final String PKEY_NAMESPACES
Custom property key containing getNamespaces().

Since 4.3M1 it's a Map.

See Also:
Constant Field Values

PKEY_NAMESPACES_NAMESPACE

static final String PKEY_NAMESPACES_NAMESPACE
Custom property key containing getNamespaces().

See Also:
Constant Field Values

PKEY_NAMESPACES_DEPENDENCY

static final String PKEY_NAMESPACES_DEPENDENCY
Custom property key containing isInstalled(String).

See Also:
Constant Field Values

PKEY_DEPENDENCY

static final String PKEY_DEPENDENCY
Custom property key containing isDependency(String) with null namespace.

See Also:
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

@Deprecated
boolean isDependency()
Deprecated. since 4.3M1 use isDependency(String) with null namespace instead

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.

Returns:
true if the the extension has been installed only because it was a dependency of another extension

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


Copyright © 2004-2013 XWiki. All Rights Reserved.