Skip to content

Commit

Permalink
restore formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Sep 27, 2024
1 parent de3c78f commit 47ecd0c
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 12,003 deletions.
3 changes: 1 addition & 2 deletions src/main/java/ch/puzzle/eft/ExamFeedbackToolApplication.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package ch.puzzle.eft;

import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import nz.net.ultraq.thymeleaf.layoutdialect.LayoutDialect;

@SpringBootApplication
public class ExamFeedbackToolApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@


import ch.puzzle.eft.model.ErrorModel;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -15,9 +16,6 @@
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.servlet.resource.NoResourceFoundException;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;

@ControllerAdvice
@Controller
public class ExceptionController implements ErrorController {
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/ch/puzzle/eft/controller/SiteController.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package ch.puzzle.eft.controller;

import java.util.Objects;

import ch.puzzle.eft.model.ExamNumberForm;
import ch.puzzle.eft.service.ExamService;

import jakarta.validation.Valid;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.server.ResponseStatusException;

import jakarta.validation.Valid;
import java.util.Objects;

@Controller
public class SiteController {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/puzzle/eft/model/ExamModel.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ch.puzzle.eft.model;

import java.io.File;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.server.ResponseStatusException;

import java.io.File;

public class ExamModel {
private final File file;
private static final Logger logger = LoggerFactory.getLogger(ExamModel.class);
Expand Down
17 changes: 8 additions & 9 deletions src/main/java/ch/puzzle/eft/service/ExamService.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package ch.puzzle.eft.service;

import ch.puzzle.eft.model.ExamModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.server.ResponseStatusException;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
Expand All @@ -9,15 +17,6 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import ch.puzzle.eft.model.ExamModel;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import org.springframework.web.server.ResponseStatusException;

@Service
public class ExamService {
private static final Logger logger = LoggerFactory.getLogger(ExamService.class);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/puzzle/eft/service/ValidationService.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ch.puzzle.eft.service;

import org.springframework.stereotype.Service;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.springframework.stereotype.Service;

@Service
public class ValidationService {
private static final Pattern EXAM_NUMBER_PATTERN = Pattern.compile("^\\d{5}$");
Expand Down
Loading

0 comments on commit 47ecd0c

Please sign in to comment.