Package org.xwiki.extension.job
Class AbstractExtensionRequest
- java.lang.Object
-
- org.xwiki.job.AbstractRequest
-
- org.xwiki.extension.job.AbstractExtensionRequest
-
- All Implemented Interfaces:
Serializable
,ExtensionRequest
,org.xwiki.job.Request
- Direct Known Subclasses:
InstallRequest
,UninstallRequest
public abstract class AbstractExtensionRequest extends org.xwiki.job.AbstractRequest implements ExtensionRequest
Base class for extension manipulation relatedRequest
implementations.- Since:
- 4.0M1
- Version:
- $Id: 77523d8c45623635405411e9e8180d9e492ba869 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_COREEXTENSIONREPOSITORY
static String
PROPERTY_EXCLUDEDEXTENSIONS
static String
PROPERTY_EXTENSIONS
static String
PROPERTY_INSTALLEDIGNORED
static String
PROPERTY_NAMESPACES
static String
PROPERTY_REWRITER
static String
PROPERTY_ROOTMODIFICATIONSALLOWED
static String
PROPERTY_UNINSTALLALLOWED
-
Fields inherited from interface org.xwiki.extension.job.ExtensionRequest
JOBID_ACTION_PREFIX, JOBID_PLAN_PREFIX, JOBID_PREFIX
-
-
Constructor Summary
Constructors Constructor Description AbstractExtensionRequest()
Default constructor.AbstractExtensionRequest(org.xwiki.job.Request request)
-
Method Summary
-
Methods inherited from class org.xwiki.job.AbstractRequest
containsProperty, equals, getContext, getId, getProperties, getProperty, getProperty, getPropertyNames, hashCode, isInteractive, isRemote, isStatusLogIsolated, isStatusSerialized, isVerbose, removeProperty, setContext, setId, setId, setId, setInteractive, setProperty, setRemote, setStatusLogIsolated, setStatusSerialized, setVerbose
-
-
-
-
Field Detail
-
PROPERTY_EXTENSIONS
public static final String PROPERTY_EXTENSIONS
- See Also:
getExtensions()
, Constant Field Values
-
PROPERTY_EXCLUDEDEXTENSIONS
public static final String PROPERTY_EXCLUDEDEXTENSIONS
- See Also:
getExcludedExtensions()
, Constant Field Values
-
PROPERTY_NAMESPACES
public static final String PROPERTY_NAMESPACES
- See Also:
getNamespaces()
, Constant Field Values
-
PROPERTY_ROOTMODIFICATIONSALLOWED
public static final String PROPERTY_ROOTMODIFICATIONSALLOWED
-
PROPERTY_UNINSTALLALLOWED
public static final String PROPERTY_UNINSTALLALLOWED
- See Also:
isUninstallAllowed()
, Constant Field Values
-
PROPERTY_INSTALLEDIGNORED
@Unstable public static final String PROPERTY_INSTALLEDIGNORED
- Since:
- 15.0RC1
- See Also:
isInstalledIgnored()
, Constant Field Values
-
PROPERTY_REWRITER
public static final String PROPERTY_REWRITER
- See Also:
getRewriter()
, Constant Field Values
-
PROPERTY_COREEXTENSIONREPOSITORY
@Unstable public static final String PROPERTY_COREEXTENSIONREPOSITORY
- Since:
- 15.0RC1
- See Also:
getCoreExtensionRepository()
, Constant Field Values
-
-
Method Detail
-
getExtensions
public Collection<ExtensionId> getExtensions()
- Specified by:
getExtensions
in interfaceExtensionRequest
- Returns:
- the ids of the extensions on which to apply the task.
-
getExcludedExtensions
public Collection<ExtensionId> getExcludedExtensions()
- Returns:
- extensions to not take into account
-
getCoreExtensions
@Unstable public Collection<ExtensionId> getCoreExtensions()
- Returns:
- the extension to identify as core extensions
- Since:
- 15.0RC1
-
getNamespaces
public Collection<String> getNamespaces()
- Specified by:
getNamespaces
in interfaceExtensionRequest
- Returns:
- the namespaces on which to apply the task.
-
hasNamespaces
public boolean hasNamespaces()
- Specified by:
hasNamespaces
in interfaceExtensionRequest
- Returns:
- indicate if the request is applied on specific namespace or all of them
-
addExtension
public void addExtension(ExtensionId extensionId)
- Parameters:
extensionId
- the extension identifier
-
addExcludedExtension
public void addExcludedExtension(ExtensionId extensionId)
- Parameters:
extensionId
- the extension identifier
-
addCoreExtension
@Unstable public void addCoreExtension(ExtensionId extensionId)
- Parameters:
extensionId
- the extension identifier- Since:
- 15.0RC1
-
addNamespace
public void addNamespace(String namespace)
- Parameters:
namespace
- the namespace
-
isRootModificationsAllowed
public boolean isRootModificationsAllowed()
- Specified by:
isRootModificationsAllowed
in interfaceExtensionRequest
- Returns:
- indicate if it's allowed to do modifications on root namespace during the job execution (not taken into account if the target of the request is root namespace)
-
setRootModificationsAllowed
public void setRootModificationsAllowed(boolean allowed)
- Parameters:
allowed
- indicate if it's allowed to do modifications on root namespace during the job execution (not taken into account if the target of the request is root namespace)
-
setRewriter
public void setRewriter(ExtensionRewriter rewriter)
Allow modifying manipulatedExtension
s on the fly (change allowed namespaces, dependencies, etc.).- Parameters:
rewriter
- the filter- Since:
- 8.4.2, 9.0RC1
-
getRewriter
public ExtensionRewriter getRewriter()
Description copied from interface:ExtensionRequest
Allow modifying manipulatedExtension
s on the fly (change allowed namespaces, dependencies, etc.).- Specified by:
getRewriter
in interfaceExtensionRequest
- Returns:
- the filter
-
setCoreExtensionRepository
public void setCoreExtensionRepository(CoreExtensionRepository repository)
- Parameters:
repository
- the repository to use to find core extensions- Since:
- 15.0RC1
-
getCoreExtensionRepository
public CoreExtensionRepository getCoreExtensionRepository()
- Specified by:
getCoreExtensionRepository
in interfaceExtensionRequest
- Returns:
- the repository to use to find core extensions
-
isUninstallAllowed
public boolean isUninstallAllowed()
- Specified by:
isUninstallAllowed
in interfaceExtensionRequest
- Returns:
- true if it's allowed remove extension in conflict with the new extension(s)
-
setUninstallAllowed
public void setUninstallAllowed(boolean allowed)
- Parameters:
allowed
- true if it's allowed remove extension in conflict with the new extension(s)- Since:
- 9.1RC1
-
isInstalledIgnored
public boolean isInstalledIgnored()
- Specified by:
isInstalledIgnored
in interfaceExtensionRequest
- Returns:
- true true if already installed extensions should not be taken into account while resolving the install plan
-
setInstalledIgnored
public void setInstalledIgnored(boolean ignored)
- Parameters:
ignored
- true if already installed extensions should not be taken into account while resolving the install plan- Since:
- 15.0CR1
-
-