mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 19:13:18 +00:00
[DS-4390] fixed test failure and cleaned up ScriptRestRepository from DSpaceRunnable logic, moved to ScriptService instead
This commit is contained in:
@@ -8,8 +8,10 @@
|
||||
package org.dspace.scripts;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.scripts.service.ScriptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -28,4 +30,10 @@ public class ScriptServiceImpl implements ScriptService {
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DSpaceRunnable> getDSpaceRunnables(Context context) {
|
||||
return dSpaceRunnables.stream().filter(
|
||||
dSpaceRunnable -> dSpaceRunnable.isAllowedToExecute(context)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user