diff --git a/buisnesslogic/src/main/java/com/plannaplan/App.java b/buisnesslogic/src/main/java/com/plannaplan/App.java deleted file mode 100644 index dbfe26e..0000000 --- a/buisnesslogic/src/main/java/com/plannaplan/App.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.plannaplan; - -/** - * Hello world! - * - */ -public class App -{ - public static void main( String[] args ) - { - System.out.println( "Hello World!" ); - } -} diff --git a/buisnesslogic/src/main/java/com/plannaplan/Assigner.java b/buisnesslogic/src/main/java/com/plannaplan/Assigner.java new file mode 100644 index 0000000..3dd98a2 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/Assigner.java @@ -0,0 +1,26 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.Historable; +import com.plannaplan.interfaces.ProtectedAction; + +public class Assigner implements Historable, ProtectedAction { + + public Assigner() { + } + + public void assing() { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + + @Override + public void addActionToHistory() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/Book.java b/buisnesslogic/src/main/java/com/plannaplan/Book.java deleted file mode 100644 index 5440913..0000000 --- a/buisnesslogic/src/main/java/com/plannaplan/Book.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.plannaplan; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -@Entity -public class Book { - - @Id - @GeneratedValue - private Long id; - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - // standard constructors - - // standard getters and setters -} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/BookRepository.java b/buisnesslogic/src/main/java/com/plannaplan/BookRepository.java deleted file mode 100644 index d57bb7a..0000000 --- a/buisnesslogic/src/main/java/com/plannaplan/BookRepository.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.plannaplan; - -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface BookRepository extends JpaRepository { -} diff --git a/buisnesslogic/src/main/java/com/plannaplan/BookService.java b/buisnesslogic/src/main/java/com/plannaplan/BookService.java deleted file mode 100644 index c433d5d..0000000 --- a/buisnesslogic/src/main/java/com/plannaplan/BookService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.plannaplan; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class BookService { - - @Autowired - private BookRepository bookRepository; - - public List list() { - return bookRepository.findAll(); - } -} diff --git a/buisnesslogic/src/main/java/com/plannaplan/Configurator.java b/buisnesslogic/src/main/java/com/plannaplan/Configurator.java new file mode 100644 index 0000000..1d131d6 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/Configurator.java @@ -0,0 +1,20 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.ProtectedAction; +import com.plannaplan.models.ConfigData; + +public class Configurator implements ProtectedAction { + + public Configurator() { + } + + public void config(ConfigData data) { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/Controller.java b/buisnesslogic/src/main/java/com/plannaplan/Controller.java new file mode 100644 index 0000000..e9384ea --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/Controller.java @@ -0,0 +1,30 @@ +package com.plannaplan; + +public class Controller { + public Controller() { + } + + public void startApp() { + } + + public void assignCourse() { + } + + public void addUnavailibility() { + } + + public void addGroup() { + } + + public void editGroup() { + } + + public void getHistoryAtPoint() { + } + + public void config() { + } + + public void createTransfer() { + } +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/GroupAdder.java b/buisnesslogic/src/main/java/com/plannaplan/GroupAdder.java new file mode 100644 index 0000000..552d980 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/GroupAdder.java @@ -0,0 +1,26 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.Historable; +import com.plannaplan.interfaces.ProtectedAction; + +public class GroupAdder implements Historable, ProtectedAction { + + public GroupAdder() { + } + + public void addGroup() { + } + + @Override + public void addActionToHistory() { + // TODO Auto-generated method stub + + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/GroupEditor.java b/buisnesslogic/src/main/java/com/plannaplan/GroupEditor.java new file mode 100644 index 0000000..79705f0 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/GroupEditor.java @@ -0,0 +1,19 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.ProtectedAction; + +public class GroupEditor implements ProtectedAction { + + public GroupEditor() { + } + + public void setNewCapacity(int capaity) { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/HistoryResolver.java b/buisnesslogic/src/main/java/com/plannaplan/HistoryResolver.java new file mode 100644 index 0000000..fa71368 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/HistoryResolver.java @@ -0,0 +1,22 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.ProtectedAction; + +public class HistoryResolver implements ProtectedAction { + + public HistoryResolver() { + } + + public void getHistoryAtPoint() { + } + + public void reproduce() { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/SampleClass.java b/buisnesslogic/src/main/java/com/plannaplan/SampleClass.java deleted file mode 100644 index 3bfb020..0000000 --- a/buisnesslogic/src/main/java/com/plannaplan/SampleClass.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.plannaplan; - -public class SampleClass { - private String xd; - - public SampleClass(String xd) { - this.setXd(xd); - } - - public String getXd() { - return xd; - } - - public void setXd(String xd) { - this.xd = xd; - } - -} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/TransferCreator.java b/buisnesslogic/src/main/java/com/plannaplan/TransferCreator.java new file mode 100644 index 0000000..56d5606 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/TransferCreator.java @@ -0,0 +1,26 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.Historable; +import com.plannaplan.interfaces.ProtectedAction; + +public class TransferCreator implements Historable, ProtectedAction { + + public TransferCreator() { + } + + public void createTransfer() { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + + @Override + public void addActionToHistory() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/UnavailabilityAdder.java b/buisnesslogic/src/main/java/com/plannaplan/UnavailabilityAdder.java new file mode 100644 index 0000000..5412709 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/UnavailabilityAdder.java @@ -0,0 +1,26 @@ +package com.plannaplan; + +import com.plannaplan.interfaces.Historable; +import com.plannaplan.interfaces.ProtectedAction; + +public class UnavailabilityAdder implements Historable, ProtectedAction { + + public UnavailabilityAdder() { + } + + public void add() { + } + + @Override + public void validateAction() { + // TODO Auto-generated method stub + + } + + @Override + public void addActionToHistory() { + // TODO Auto-generated method stub + + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java b/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java new file mode 100644 index 0000000..a19a5eb --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java @@ -0,0 +1,12 @@ +package com.plannaplan.configutils; + +import java.io.File; + +public class FileToDatabaseMigrator { + public FileToDatabaseMigrator() { + } + + public void migrate(File file) { + + } +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java b/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java new file mode 100644 index 0000000..c617b23 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java @@ -0,0 +1,52 @@ +package com.plannaplan.entities; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class Groups { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + private Long courseId; + private int time; + private String room; + private int capacity; + + public Groups() { + } + + public int getCapacity() { + return capacity; + } + + public void setCapacity(int capacity) { + this.capacity = capacity; + } + + public String getRoom() { + return room; + } + + public void setRoom(String room) { + this.room = room; + } + + public int getTime() { + return time; + } + + public void setTime(int time) { + this.time = time; + } + + public Long getCourseId() { + return courseId; + } + + public void setCourseId(Long courseId) { + this.courseId = courseId; + } +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/interfaces/EventCreator.java b/buisnesslogic/src/main/java/com/plannaplan/interfaces/EventCreator.java new file mode 100644 index 0000000..3d1cd32 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/interfaces/EventCreator.java @@ -0,0 +1,5 @@ +package com.plannaplan.interfaces; + +public interface EventCreator { + void update(); +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/interfaces/Historable.java b/buisnesslogic/src/main/java/com/plannaplan/interfaces/Historable.java new file mode 100644 index 0000000..db1ea92 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/interfaces/Historable.java @@ -0,0 +1,5 @@ +package com.plannaplan.interfaces; + +public interface Historable { + void addActionToHistory(); +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/interfaces/ProtectedAction.java b/buisnesslogic/src/main/java/com/plannaplan/interfaces/ProtectedAction.java new file mode 100644 index 0000000..707e0e7 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/interfaces/ProtectedAction.java @@ -0,0 +1,5 @@ +package com.plannaplan.interfaces; + +public interface ProtectedAction { + void validateAction(); +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/models/ConfigData.java b/buisnesslogic/src/main/java/com/plannaplan/models/ConfigData.java new file mode 100644 index 0000000..15be230 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/models/ConfigData.java @@ -0,0 +1,29 @@ +package com.plannaplan.models; + +import java.io.File; +import java.util.Date; + +public class ConfigData { + private Date start; + private Date end; + private File file; + + public ConfigData(Date start, Date end, File file) { + this.start = start; + this.end = end; + this.file = file; + } + + public File getFile() { + return file; + } + + public Date getEnd() { + return end; + } + + public Date getStart() { + return start; + } + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/repositories/GroupRepository.java b/buisnesslogic/src/main/java/com/plannaplan/repositories/GroupRepository.java new file mode 100644 index 0000000..060685f --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/repositories/GroupRepository.java @@ -0,0 +1,11 @@ +package com.plannaplan.repositories; + +import com.plannaplan.entities.Groups; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface GroupRepository extends JpaRepository { + +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/services/GroupService.java b/buisnesslogic/src/main/java/com/plannaplan/services/GroupService.java new file mode 100644 index 0000000..5c61643 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/services/GroupService.java @@ -0,0 +1,12 @@ +package com.plannaplan.services; + +import com.plannaplan.repositories.GroupRepository; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class GroupService { + @Autowired + private GroupRepository repo; +} \ No newline at end of file diff --git a/buisnesslogic/src/main/java/com/plannaplan/statisticutils/Statistics.java b/buisnesslogic/src/main/java/com/plannaplan/statisticutils/Statistics.java new file mode 100644 index 0000000..ac75813 --- /dev/null +++ b/buisnesslogic/src/main/java/com/plannaplan/statisticutils/Statistics.java @@ -0,0 +1,10 @@ +package com.plannaplan.statisticutils; + +public class Statistics { + + public Statistics() { + } + + public void getAll() { + } +} \ No newline at end of file diff --git a/buisnesslogic/src/test/java/com/plannaplan/AppTest.java b/buisnesslogic/src/test/java/com/plannaplan/AppTest.java deleted file mode 100644 index eceee4c..0000000 --- a/buisnesslogic/src/test/java/com/plannaplan/AppTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.plannaplan; - -import java.util.List; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.Ignore; -import org.springframework.beans.factory.annotation.Autowired; - -/** - * Unit test for simple App. - */ -public class AppTest { - @Autowired - private BookService bookService; - - @Ignore - @Test - public void whenApplicationStarts_thenHibernateCreatesInitialRecords() { - List books = bookService.list(); - - Assert.assertEquals(books.size(), 1); - } -} diff --git a/restservice/src/main/resources/application.properties b/restservice/src/main/resources/application.properties index c2bcd3d..ea42903 100644 --- a/restservice/src/main/resources/application.properties +++ b/restservice/src/main/resources/application.properties @@ -1,8 +1,10 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect -spring.datasource.url=jdbc:mysql://172.20.0.2:3306/test +spring.datasource.url=jdbc:mysql://172.20.0.3:3306/test?useUnicode=yes&characterEncoding=UTF-8 spring.datasource.username=root spring.datasource.password=example spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.jpa.open-in-view=true spring.jpa.hibernate.ddl-auto=create +spring.jackson.serialization.fail-on-empty-beans=false server.port=1285 \ No newline at end of file