@Component @Named(value="extension.history") @Singleton public class ExtensionHistoryScriptService extends AbstractExtensionScriptService
Modifier and Type | Class and Description |
---|---|
class |
ExtensionHistoryScriptService.ExtensionHistoryFilter
Utility class to build filters for the extension job history.
|
Modifier and Type | Field and Description |
---|---|
static String |
ID
The identifier of the sub extension
ScriptService . |
authorization, documentAccessBridge, execution, EXTENSIONERROR_KEY, jobExecutor, PROPERTY_CALLERREFERENCE, PROPERTY_CHECKRIGHTS, PROPERTY_CONTEXT_ACTION, PROPERTY_CONTEXT_WIKI, PROPERTY_USERREFERENCE, scriptProvider, WIKI_NAMESPACE_PREFIX, xcontextProvider
Constructor and Description |
---|
ExtensionHistoryScriptService() |
Modifier and Type | Method and Description |
---|---|
List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> |
createReplayPlan(List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> records,
boolean preserveUsers,
Collection<String> namespaces)
Prepares a list of history records for replay.
|
List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> |
deserialize(String serializedHistoryRecords)
Deserializes a list of history records.
|
ExtensionHistoryScriptService.ExtensionHistoryFilter |
getRecords() |
org.xwiki.extension.job.history.ReplayJobStatus |
getReplayJobStatus(String id) |
List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> |
read(InputStream inputStream)
Reads a list of history records from a given input stream (e.g.
|
org.xwiki.job.Job |
replay(List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> records)
Replay the given list of extension history records.
|
String |
serialize(org.xwiki.extension.job.history.ExtensionJobHistoryRecord record)
Serializes a history record.
|
contextualize, fromWikitoNamespace, getCallerDocument, getJobStatus, getLastError, safe, safeWrapError, setError, setRightsProperties, toWikiId, wrapError
public static final String ID
ScriptService
.public ExtensionHistoryScriptService.ExtensionHistoryFilter getRecords()
public String serialize(org.xwiki.extension.job.history.ExtensionJobHistoryRecord record)
record
- the history record to serializepublic List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> deserialize(String serializedHistoryRecords)
serializedHistoryRecords
- the serialized list of history recordspublic List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> read(InputStream inputStream)
inputStream
- an input stream that provides a list of serialized history recordspublic org.xwiki.job.Job replay(List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> records)
records
- the history records to replayJob
object that can be used to monitor the progress of the replay process, or null
in
case of failurepublic List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> createReplayPlan(List<org.xwiki.extension.job.history.ExtensionJobHistoryRecord> records, boolean preserveUsers, Collection<String> namespaces)
records
- the history records to prepare for replaypreserveUsers
- true
if the given history records should be replayed using their original users,
false
if the current user should be used insteadnamespaces
- the namespaces where to replay the given history records; pass null
or an empty
collection if you want to preserve the original namespacespublic org.xwiki.extension.job.history.ReplayJobStatus getReplayJobStatus(String id)
id
- identifies the replay jobCopyright © 2004–2021 XWiki. All rights reserved.