use of org.xwiki.refactoring.job.RestoreRequest in project xwiki-platform by xwiki.
the class RestoreJob method runInternal.
@Override
protected void runInternal() throws Exception {
RestoreRequest request = getRequest();
initializeContext(request);
boolean checkRights = request.isCheckRights();
this.progressManager.pushLevelProgress(2, this);
this.progressManager.startStep(this);
// Read the request and build the final list of IDs to restore.
List<Long> idsToRestore = getIdsToRestore(request);
this.progressManager.startStep(this);
// Process each ID and try to restore it.
restoreDocuments(idsToRestore, checkRights);
this.progressManager.popLevelProgress(this);
}
use of org.xwiki.refactoring.job.RestoreRequest in project xwiki-platform by xwiki.
the class RefactoringScriptService method initializeRestoreRequest.
private RestoreRequest initializeRestoreRequest() {
RestoreRequest request = new RestoreRequest();
request.setId(generateJobId(RefactoringJobs.RESTORE));
request.setCheckRights(true);
request.setUserReference(this.documentAccessBridge.getCurrentUserReference());
request.setWikiReference(getCurrentWikiReference());
return request;
}
Aggregations