1 |
30053
|
michele.ar
|
package eu.dnetlib.functionality.modular.ui;
|
2 |
|
|
|
3 |
|
|
import java.util.List;
|
4 |
|
|
|
5 |
30191
|
michele.ar
|
import javax.annotation.Resource;
|
6 |
|
|
|
7 |
30053
|
michele.ar
|
import org.springframework.stereotype.Controller;
|
8 |
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
9 |
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
10 |
|
|
|
11 |
|
|
import eu.dnetlib.enabling.common.StoppableDetails;
|
12 |
30191
|
michele.ar
|
import eu.dnetlib.functionality.modular.ui.utils.ShutdownUtils;
|
13 |
30053
|
michele.ar
|
|
14 |
|
|
@Controller
|
15 |
|
|
public class PrepareShutdownInternalController {
|
16 |
|
|
|
17 |
30191
|
michele.ar
|
@Resource
|
18 |
|
|
private ShutdownUtils shutdownUtils;
|
19 |
30053
|
michele.ar
|
|
20 |
|
|
@RequestMapping("/ui/shutdown/listStoppableDetails.json")
|
21 |
|
|
public @ResponseBody List<StoppableDetails> listStoppableDetails() {
|
22 |
30191
|
michele.ar
|
return shutdownUtils.listStoppableDetails();
|
23 |
30053
|
michele.ar
|
}
|
24 |
|
|
|
25 |
|
|
@RequestMapping("/ui/shutdown/stopAll.do")
|
26 |
|
|
public @ResponseBody boolean stopAll() {
|
27 |
30191
|
michele.ar
|
shutdownUtils.stopAll();
|
28 |
30053
|
michele.ar
|
return true;
|
29 |
|
|
}
|
30 |
|
|
|
31 |
|
|
}
|