fix #493: add effective access matrix

This commit is contained in:
devmrko
2026-06-26 14:14:22 +09:00
parent 210e0bd4d0
commit c8326f954d
12 changed files with 805 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package com.cloudhandson.vpdbackoffice.web;
import com.cloudhandson.vpdbackoffice.domain.effective.EffectiveMatrixView;
import com.cloudhandson.vpdbackoffice.service.EffectiveMatrixService;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class EffectiveMatrixController {
private final EffectiveMatrixService matrixService;
public EffectiveMatrixController(EffectiveMatrixService matrixService) {
this.matrixService = matrixService;
}
@GetMapping("/effective-matrix")
public String matrix(Model model) {
try {
model.addAttribute("matrix", matrixService.matrix());
} catch (DataAccessException e) {
RuntimeErrorMessage message = RuntimeErrorMessages.dataAccess(e);
model.addAttribute("matrix", new EffectiveMatrixView(List.of(), List.of(), List.of(), 0));
model.addAttribute("runtimeError", message);
}
return "effective-matrix";
}
}