class DatabaseBackupRestoreService {

    public void validate(Long workspaceId, NameOrCrn nameOrCrn, String location, String backupId) {
        Stack stack = stackService.getByNameOrCrnInWorkspace(nameOrCrn, workspaceId);
        ValidationResult validationResult = requestValidator.validate(stack, location, backupId);
        if (validationResult.hasError()) {
            throw new BadRequestException(validationResult.getFormattedErrors());
        }
    }

}