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 related
Request
implementations.- Since:
- 4.0M1
- Version:
- $Id: 3933fc8de0a3da647184f28f281a2063225ba7a3 $
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface org.xwiki.extension.job.ExtensionRequest
JOBID_ACTION_PREFIX, JOBID_PLAN_PREFIX, JOBID_PREFIX
Fields inherited from interface org.xwiki.job.Request
PROPERTY_CONTEXT, PROPERTY_INTERACTIVE, PROPERTY_REMOTE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractExtensionRequest
(org.xwiki.job.Request request) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCoreExtension
(ExtensionId extensionId) void
addExcludedExtension
(ExtensionId extensionId) void
addExtension
(Extension extension) void
addExtension
(ExtensionId extensionId) void
addNamespace
(String namespace) Allow modifying manipulatedExtension
s on the fly (change allowed namespaces, dependencies, etc.).boolean
boolean
boolean
boolean
void
setCoreExtensionRepository
(CoreExtensionRepository repository) void
setInstalledIgnored
(boolean ignored) void
setRewriter
(ExtensionRewriter rewriter) Allow modifying manipulatedExtension
s on the fly (change allowed namespaces, dependencies, etc.).void
setRootModificationsAllowed
(boolean allowed) void
setUninstallAllowed
(boolean allowed) 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xwiki.job.Request
containsProperty, getContext, getId, getProperty, getProperty, getPropertyNames, isInteractive, isRemote, isStatusLogIsolated, isStatusSerialized, isVerbose, setContext
-
Field Details
-
PROPERTY_EXTENSIONS
- See Also:
-
PROPERTY_EXCLUDEDEXTENSIONS
- See Also:
-
PROPERTY_NAMESPACES
- See Also:
-
PROPERTY_ROOTMODIFICATIONSALLOWED
-
PROPERTY_UNINSTALLALLOWED
- See Also:
-
PROPERTY_INSTALLEDIGNORED
- Since:
- 15.0RC1
- See Also:
-
PROPERTY_REWRITER
- See Also:
-
PROPERTY_COREEXTENSIONREPOSITORY
- Since:
- 15.0RC1
- See Also:
-
-
Constructor Details
-
AbstractExtensionRequest
public AbstractExtensionRequest()Default constructor. -
AbstractExtensionRequest
public AbstractExtensionRequest(org.xwiki.job.Request request) - Parameters:
request
- the request to copy
-
-
Method Details
-
getExtensions
- Specified by:
getExtensions
in interfaceExtensionRequest
- Returns:
- the ids of the extensions on which to apply the task.
-
getExcludedExtensions
- Returns:
- extensions to not take into account
-
getCoreExtensions
- Returns:
- the extension to identify as core extensions
- Since:
- 15.0RC1
-
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
- Parameters:
extensionId
- the extension identifier
-
addExtension
- Parameters:
extension
- the extension to validate and for which to resolve dependencies- Since:
- 15.2RC1
-
addExcludedExtension
- Parameters:
extensionId
- the extension identifier
-
addCoreExtension
- Parameters:
extensionId
- the extension identifier- Since:
- 15.0RC1
-
addNamespace
- 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
Allow modifying manipulatedExtension
s on the fly (change allowed namespaces, dependencies, etc.).- Parameters:
rewriter
- the filter- Since:
- 8.4.2, 9.0RC1
-
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
- Parameters:
repository
- the repository to use to find core extensions- Since:
- 15.0RC1
-
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
-