From 0428bad04890da7335f82c9f68bb6f10706fa68e Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Tue, 2 Apr 2019 10:53:09 +0400 Subject: [PATCH] #57 created classes --- .../controller/ConferenceController.java | 19 +++++++++++++++++++ .../ru/ulstu/conference/model/Conference.java | 9 +++++++++ .../ulstu/conference/model/ConferenceDto.java | 4 ++++ .../conference/model/ConferenceFilterDto.java | 4 ++++ .../repository/ConferenceRepository.java | 7 +++++++ .../ConferenceNotificationService.java | 7 +++++++ .../conference/service/ConferenceService.java | 17 +++++++++++++++++ 7 files changed, 67 insertions(+) create mode 100644 src/main/java/ru/ulstu/conference/controller/ConferenceController.java create mode 100644 src/main/java/ru/ulstu/conference/model/Conference.java create mode 100644 src/main/java/ru/ulstu/conference/model/ConferenceDto.java create mode 100644 src/main/java/ru/ulstu/conference/model/ConferenceFilterDto.java create mode 100644 src/main/java/ru/ulstu/conference/repository/ConferenceRepository.java create mode 100644 src/main/java/ru/ulstu/conference/service/ConferenceNotificationService.java create mode 100644 src/main/java/ru/ulstu/conference/service/ConferenceService.java diff --git a/src/main/java/ru/ulstu/conference/controller/ConferenceController.java b/src/main/java/ru/ulstu/conference/controller/ConferenceController.java new file mode 100644 index 0000000..aa871ba --- /dev/null +++ b/src/main/java/ru/ulstu/conference/controller/ConferenceController.java @@ -0,0 +1,19 @@ +package ru.ulstu.conference.controller; + + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import ru.ulstu.conference.service.ConferenceService; +import springfox.documentation.annotations.ApiIgnore; + +@Controller() +@RequestMapping(value = "/conferences") +@ApiIgnore +public class ConferenceController { + + private final ConferenceService conferenceService; + + public ConferenceController(ConferenceService paperService) { + this.conferenceService = paperService; + } +} diff --git a/src/main/java/ru/ulstu/conference/model/Conference.java b/src/main/java/ru/ulstu/conference/model/Conference.java new file mode 100644 index 0000000..a65411c --- /dev/null +++ b/src/main/java/ru/ulstu/conference/model/Conference.java @@ -0,0 +1,9 @@ +package ru.ulstu.conference.model; + +import javax.persistence.Entity; +import javax.persistence.Table; + +@Entity +@Table(name = "conference") +public class Conference { +} diff --git a/src/main/java/ru/ulstu/conference/model/ConferenceDto.java b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java new file mode 100644 index 0000000..e3f757e --- /dev/null +++ b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java @@ -0,0 +1,4 @@ +package ru.ulstu.conference.model; + +public class ConferenceDto { +} diff --git a/src/main/java/ru/ulstu/conference/model/ConferenceFilterDto.java b/src/main/java/ru/ulstu/conference/model/ConferenceFilterDto.java new file mode 100644 index 0000000..379c8b6 --- /dev/null +++ b/src/main/java/ru/ulstu/conference/model/ConferenceFilterDto.java @@ -0,0 +1,4 @@ +package ru.ulstu.conference.model; + +public class ConferenceFilterDto { +} diff --git a/src/main/java/ru/ulstu/conference/repository/ConferenceRepository.java b/src/main/java/ru/ulstu/conference/repository/ConferenceRepository.java new file mode 100644 index 0000000..4325633 --- /dev/null +++ b/src/main/java/ru/ulstu/conference/repository/ConferenceRepository.java @@ -0,0 +1,7 @@ +package ru.ulstu.conference.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.conference.model.Conference; + +public interface ConferenceRepository extends JpaRepository { +} diff --git a/src/main/java/ru/ulstu/conference/service/ConferenceNotificationService.java b/src/main/java/ru/ulstu/conference/service/ConferenceNotificationService.java new file mode 100644 index 0000000..ff9f69a --- /dev/null +++ b/src/main/java/ru/ulstu/conference/service/ConferenceNotificationService.java @@ -0,0 +1,7 @@ +package ru.ulstu.conference.service; + +import org.springframework.stereotype.Service; + +@Service +public class ConferenceNotificationService { +} diff --git a/src/main/java/ru/ulstu/conference/service/ConferenceService.java b/src/main/java/ru/ulstu/conference/service/ConferenceService.java new file mode 100644 index 0000000..a8147c9 --- /dev/null +++ b/src/main/java/ru/ulstu/conference/service/ConferenceService.java @@ -0,0 +1,17 @@ +package ru.ulstu.conference.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.conference.repository.ConferenceRepository; +import ru.ulstu.deadline.service.DeadlineService; + +@Service +public class ConferenceService { + private final ConferenceRepository conferenceRepository; + private final DeadlineService deadlineService; + + public ConferenceService(ConferenceRepository conferenceRepository, + DeadlineService deadlineService) { + this.conferenceRepository = conferenceRepository; + this.deadlineService = deadlineService; + } +}