class SecurityServersApiController implements SecurityServersApi {

    @Override
    @PreAuthorize("hasAuthority('VIEW_SECURITY_SERVERS')")
    public ResponseEntity<List<SecurityServer>> getSecurityServers(Boolean currentServer) {
        boolean getOnlyCurrentServer = Boolean.TRUE.equals(currentServer);
        List<SecurityServer> securityServers = null;
        if (getOnlyCurrentServer) {
            SecurityServerId currentSecurityServerId = serverConfService.getSecurityServerId();
            SecurityServer currentSecurityServer = securityServerConverter.convert(currentSecurityServerId);
            securityServers = Collections.singletonList(currentSecurityServer);
        } else {
            List<SecurityServerId> securityServerIds = globalConfFacade.getSecurityServers();
            securityServers = securityServerConverter.convert(securityServerIds);
        }
        return new ResponseEntity<>(securityServers, HttpStatus.OK);
    }

    @Autowired public  SecurityServersApiController(GlobalConfService globalConfService, GlobalConfFacade globalConfFacade,
            SecurityServerConverter securityServerConverter, ServerConfService serverConfService);

}