commit e9a96fd881d28920aaf2bf937f6735452acf5555
Author: Hrabikv <hrabikv@students.zcu.cz>
Date:   Sat Oct 14 15:18:10 2023 +0200

    https://kivprogrammers.atlassian.net/browse/TSP2-23 soubory Bp Adama Šmucra do SPADE

diff --git a/pom.xml b/pom.xml
index 614ee0d..79c7729 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,12 @@
 	</dependencyManagement>
 
 	<dependencies>
-
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<version>1.18.30</version>
+			<scope>provided</scope>
+		</dependency>
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter</artifactId>
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/AppController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/AppController.java
index 8cf99a1..e8503e8 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/AppController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/AppController.java
@@ -3,12 +3,16 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.controller;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.AntiPatternManager;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Query;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResult;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.ConfigurationService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.UserAccountService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.ClassToDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.ProjectToDto;
 import org.jsoup.Jsoup;
 import org.jsoup.safety.Safelist;
 import org.slf4j.Logger;
@@ -55,9 +59,11 @@ public class AppController {
     @Autowired
     private ConfigurationService configurationService;
 
+    private final ClassToDto<Project, ProjectDto> classToDto = new ProjectToDto();
+
     @GetMapping("/")
     public String mainPage(Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         return "main-page";
     }
 
@@ -71,7 +77,7 @@ public class AppController {
      */
     @GetMapping("/detect")
     public String index(Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         LOGGER.info("@GetMapping(\"/\") - Accessing main page");
         return "index";
     }
@@ -85,7 +91,7 @@ public class AppController {
      */
     @GetMapping("/projects/{id}")
     public String getProjectById(@PathVariable Long id, Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("project", projectService.getProjectById(id));
         LOGGER.info("@GetMapping(\"projects/" + id + ")");
         return "project";
@@ -97,7 +103,7 @@ public class AppController {
      */
     @GetMapping("/anti-patterns")
     public @ResponseBody List<AntiPattern> getAllAntiPatterns(Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         LOGGER.info("GetMapping(\"/anti-patterns\") and obtaining all APs.");
         return antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns());
     }
@@ -112,7 +118,7 @@ public class AppController {
     @GetMapping("/anti-patterns/{id}")
     public String getAntiPatternById(@PathVariable Long id, Model model, HttpSession session) {
         String currentConfigurationName = configurationGetFromSession(session);
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("antiPattern", antiPatternService.getAntiPatternById(id).getAntiPatternModel());
         model.addAttribute("description", antiPatternService.getDescriptionFromCatalogue(id));
         model.addAttribute("operationalizationText", antiPatternService.getOperationalizationText(antiPatternService.getAntiPatternById(id).getAntiPatternModel().getName()));
@@ -140,14 +146,14 @@ public class AppController {
 
         if (currentConfigurationName == null) {
             model.addAttribute("errorMessage", "No configuration was found!");
-            model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+            model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
             return "index";
         }
 
         if (selectedProjects == null) {
             model.addAttribute("errorMessage", "No project selected." +
                     " Select at least one project.");
-            model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+            model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
             LOGGER.warn("@PostMapping(\"/analyze\") - Processing requirements for analyzing selected projects and AP with an error. " +
                     "selectedProjects are null!");
             return "index";
@@ -156,7 +162,7 @@ public class AppController {
         if (selectedAntiPatterns == null) {
             model.addAttribute("errorMessage", "No anti-pattern selected." +
                     " Select at least one anti-pattern.");
-            model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+            model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
             LOGGER.warn("@PostMapping(\"/analyze\") - Processing requirements for analyzing selected projects and AP with an error. " +
                     "selectedAntiPatterns are null!");
             return "index";
@@ -170,7 +176,7 @@ public class AppController {
         antiPatternService.saveResults(results);
         antiPatternService.setConfigurationChanged(false);
 
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("queryResults", results);
         model.addAttribute("recalculationTime", DateTimeFormatter.ofPattern("HH:mm:ss").format(LocalTime.now()));
 
@@ -192,7 +198,7 @@ public class AppController {
         }
         antiPatternService.setConfigurationChanged(false);
 
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("queryResults", antiPatternService.getResults());
         model.addAttribute("recalculationTime", DateTimeFormatter.ofPattern("HH:mm:ss").format(LocalTime.now()));
 
@@ -207,7 +213,7 @@ public class AppController {
      */
     @GetMapping("/about")
     public String about(Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         LOGGER.info("@GetMapping(\"/about\") - Accessing about page");
         return "about";
     }
@@ -220,7 +226,7 @@ public class AppController {
      */
     @GetMapping("/configuration")
     public String configuration(Model model, HttpSession session) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("antiPatterns", antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
 
         String currentConfigurationName = configurationGetFromSession(session);
@@ -245,7 +251,7 @@ public class AppController {
 
         String currentConfigurationName = configurationGetFromSession(session);
 
-        Query query = new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
+        Query query = new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
 
         List<String> wrongParameters = configurationService.saveNewConfiguration(query.getAntiPatterns(), currentConfigurationName, antiPatternNames, thresholdNames, thresholdValues, true);
 
@@ -283,7 +289,7 @@ public class AppController {
                                     @RequestParam(value = "configuration-save-as-input") String newConfigName,
                                     HttpSession session, RedirectAttributes redirectAttributes) {
 
-        Query query = new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
+        Query query = new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
         String currentConfigurationName = configurationGetFromSession(session);
 
         List<String> allConfigurationNames = configurationService.getAllConfigurationNames();
@@ -439,7 +445,7 @@ public class AppController {
      */
     @GetMapping("/login")
     public String login(Model model) {
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         return "login";
     }
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/EnumController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/EnumController.java
new file mode 100644
index 0000000..832bb56
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/EnumController.java
@@ -0,0 +1,270 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.FormObject;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.util.Pair;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpSession;
+import java.util.*;
+
+/**
+ * This class contains all endpoints of enums.html
+ */
+@Controller
+public class EnumController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(EnumController.class);
+
+    @Autowired
+    private PriorityService priorityService;
+
+    @Autowired
+    private SeverityService severityService;
+
+    @Autowired
+    private RelationService  relationService;
+
+    @Autowired
+    private ResolutionService resolutionService;
+
+    @Autowired
+    private RoleService roleService;
+
+    @Autowired
+    private StatusService statusService;
+
+    @Autowired
+    private WuTypeService wuTypeService;
+
+    @Autowired
+    private PriorityClassificationService priorityClassificationService;
+
+    @Autowired
+    private SeverityClassificationService severityClassificationService;
+
+    @Autowired
+    private StatusClassificationService statusClassificationService;
+
+    @Autowired
+    private RoleClassificationService roleClassificationService;
+
+    @Autowired
+    private ResolutionClassificationService resolutionClassificationService;
+
+    @Autowired
+    private WuTypeClassificationService wuTypeClassificationService;
+
+    @Autowired
+    private RelationClassificationService relationClassificationService;
+
+    @Autowired
+    private ProjectService projectService;
+
+    private Map<String, Pair<Service, EnumService>> services;
+
+    /**
+     * Method initializing map of enum
+     * services and their classifications
+     */
+    @PostConstruct
+    private void initializeMap() {
+        services = Map.ofEntries(
+                Map.entry("Priority", Pair.of(priorityClassificationService, priorityService)),
+                Map.entry("Severity", Pair.of(severityClassificationService, severityService)),
+                Map.entry("Status", Pair.of(statusClassificationService, statusService)),
+                Map.entry("Role", Pair.of(roleClassificationService, roleService)),
+                Map.entry("Resolution", Pair.of(resolutionClassificationService, resolutionService)),
+                Map.entry("WuType", Pair.of(wuTypeClassificationService, wuTypeService)),
+                Map.entry("Relation", Pair.of(relationClassificationService, relationService))
+        );
+    }
+
+    /**
+     * Method for showing enums in tabs
+     * @param model         Object for passing data to the UI
+     * @param project       Selected project for showing enums
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @GetMapping("/management/enums")
+    public String changeTab(Model model,
+                            @RequestParam(value = "selectedProject", required = false) Long project,
+                            RedirectAttributes redirectAttrs,
+                            HttpSession session) {
+
+        // First open in session
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/enums\") - Accessing page");
+            return "management/enums";
+        }
+
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+            Utils.sessionRecreate(session);
+        }
+
+        project = (long) session.getAttribute("project");
+
+        Project foundedProject = projectService.getProjectById(project);
+        if(foundedProject == null) {
+            if(!Objects.equals(project, Constants.DEFAULT_ID)) {
+                redirectAttrs.addFlashAttribute("errorMessage", "Project not found");
+                LOGGER.info("@GetMapping(\"/management/enums\")- Project not found");
+            } else {
+                LOGGER.info("@GetMapping(\"/management/enums\") - Accessing page");
+            }
+            model.addAttribute("projects", projectService.getAllProjects());
+            return "management/enums";
+        }
+
+        // For each project instance of project, get all enums
+        for(Map.Entry<String, Pair<Service, EnumService>> entry : services.entrySet()) {
+
+            Set<EnumType> enums = new HashSet<>(); // Enums of current enum type
+            Service service = entry.getValue().getFirst(); // Service for current enum type
+
+            // For each project instance, get all enums for current enum type
+            for(ProjectInstance projectInstance : foundedProject.getProjectInstances()) {
+                Set<EnumType> enumsByName = (Set<EnumType>) projectInstance.getEnumsByName(entry.getKey());
+                if(enumsByName != null) {
+                    enums.addAll(enumsByName);
+                }
+            }
+
+            // Create classification pairs with enums
+            List<Pair<Classification, List<EnumType>>> pairs = createClassPairs(service, enums);
+
+            //Calculate rowspan for superclasses
+            List<Integer> superClassSpan = calculateSpan(pairs);
+
+            model.addAttribute(entry.getKey(), pairs);
+            model.addAttribute(entry.getKey() + "All", service.getAllClasses());
+            model.addAttribute(entry.getKey() + "Super", superClassSpan);
+        }
+
+        model.addAttribute("projects", projectService.getAllProjects());
+        model.addAttribute("result", new FormObject());
+        return "management/enums";
+    }
+
+    /**
+     * Method for changing enum class for selected enums
+     * @param model         Object for passing data to the UI
+     * @param selectedEnums Selected enums for change of their class
+     * @param selectedClass Selected class for enums
+     * @param enumName      Name of the current selected tab
+     * @param redirectAttrs Attributes for redirection
+     * @return              Html template
+     */
+    @PostMapping(value = "/changeEnums")
+    public String changeEnums(Model model,
+                              @RequestParam(value = "selectedEnums", required = false) List<Long> selectedEnums,
+                              @RequestParam(value = "selectedClass", required = false) Long selectedClass,
+                              @RequestParam(value = "enumName", required = false) String enumName,
+                              RedirectAttributes redirectAttrs) {
+
+        if(selectedEnums == null || selectedEnums.isEmpty()) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected");
+            LOGGER.info("@PostMapping(\"/management/enums\") - Nothing was selected");
+            return "redirect:/management/enums";
+        }
+
+        for(Long id : selectedEnums) {
+            Pair<Service, EnumService> pair = services.get(enumName);
+            if(pair != null) {
+                Service service = pair.getFirst();
+                EnumService enumService = pair.getSecond();
+
+                EnumType enumType = enumService.getEnumById(id);
+                enumType.setClassId(service.getClassById(selectedClass));
+                enumService.saveEnum(enumType);
+            }
+        }
+
+        redirectAttrs.addFlashAttribute("successMessage", "All selected enums (" + selectedEnums.size() + ") were successfully assigned");
+        redirectAttrs.addFlashAttribute("activeTab", enumName);
+        return "redirect:/management/enums";
+    }
+
+    /**
+     * Method creating pairs with enum type
+     * classification and list of relevant enums
+     * @param service   Enum service
+     * @param enums     Set of enums in specific project
+     * @return          List of pairs with enum class and relevant enums
+     */
+    private List<Pair<Classification, List<EnumType>>> createClassPairs(Service service, Set<EnumType> enums) {
+
+        List<Pair<Classification, List<EnumType>>> pairs = new ArrayList<>(); // List with enum types classes and their enums
+        for(Classification enumClass : service.getAllClasses()) {
+            Set<EnumType> enumSet = new HashSet<>(); // For each enum classification create new list for enums
+
+            //If enum class is equal to current class, add enum into list
+            for(EnumType e : enums) {
+                if(Objects.equals(e.getClassId().getId(), enumClass.getId())) {
+                    enumSet.add(e);
+                }
+            }
+
+            //If enum set has some enums in it, add pair to the final list
+            if(!enumSet.isEmpty()) {
+                List<EnumType> enumTypes = new ArrayList<>(enumSet);
+                Collections.sort(enumTypes, Comparator.comparing(EnumType::getName, String.CASE_INSENSITIVE_ORDER));
+                Pair<Classification, List<EnumType>> newPair = Pair.of(enumClass, enumTypes);
+                pairs.add(newPair);
+            }
+        }
+        return pairs;
+    }
+
+    /**
+     * Method calculating rowspan for superclasses
+     * @param pairs     Classification and list with enums
+     * @return          List with sizes of rowspan for each classification
+     */
+    private List<Integer> calculateSpan(List<Pair<Classification, List<EnumType>>> pairs) {
+        List<Integer> superClassSpan = new ArrayList<>(); // Superclass rowspan for current enum type
+        String preSuperClass = null;
+        int preListSize = 0;
+        int lastI = 0;
+        for(int i = 0; i < pairs.size(); i++) {
+            Pair<Classification, List<EnumType>> currentPair = pairs.get(i);
+            String currentSuperClass = currentPair.getFirst().getSuperClass();
+            int currentListSize = currentPair.getSecond().size();
+            if(preSuperClass == null || !currentSuperClass.contentEquals(preSuperClass)) {
+                superClassSpan.add(i, currentListSize);
+                lastI = i;
+            } else if(currentSuperClass.contentEquals(preSuperClass)) {
+                superClassSpan.set(lastI, preListSize + currentListSize);
+                superClassSpan.add(i, 0);
+                preListSize = preListSize + currentListSize;
+                continue;
+            }
+            preSuperClass = currentSuperClass;
+            preListSize = currentListSize;
+        }
+
+        return superClassSpan;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/PersonController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/PersonController.java
new file mode 100644
index 0000000..ec3c904
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/PersonController.java
@@ -0,0 +1,158 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Person;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.PersonService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpSession;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * This class contains all endpoints of person.html
+ */
+@Controller
+public class PersonController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(PersonController.class);
+
+    @Autowired
+    private PersonService personService;
+
+    @Autowired
+    private ProjectService projectService;
+
+    /**
+     * Method for showing people and their identities
+     * @param model         Object for passing data to the UI
+     * @param project       Selected project for showing people
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    //[JT] vyhodit http session
+    @GetMapping("/management/person")
+    public String people(Model model,
+                         @RequestParam(value = "selectedProject", required = false) Long project,
+                         RedirectAttributes redirectAttrs,
+                         HttpSession session) {
+
+        // [JT] tohle taky hodit pryc
+        //session pro nas neni platna - posilat v body requestu z klienta
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/person\") - Accessing page");
+            //[JT] prepsat do reactu
+            return "management/person";
+        }
+        //[JT] tohle pryc
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+            Utils.sessionRecreate(session);
+        }
+        //[JT] nerozumim
+        project = (long) session.getAttribute("project");
+
+        Project foundedProject = projectService.getProjectById(project);
+        //[JT] logika do service
+        if(foundedProject == null) {
+            if(!Objects.equals(project, Constants.DEFAULT_ID)) {
+                redirectAttrs.addFlashAttribute("errorMessage", "Project not found");
+                LOGGER.info("@GetMapping(\"/management/person\")- Project not found");
+            } else {
+                LOGGER.info("@GetMapping(\"/management/person\") - Accessing page");
+            }
+            //[JT] do reactu
+            model.addAttribute("projects", projectService.getAllProjects());
+            return "management/person";
+        }
+
+        List<Person> people = foundedProject.getPeople();
+        Collections.sort(people, Comparator.comparing(Person::getName, String.CASE_INSENSITIVE_ORDER));
+        //[JT] hodit do json response body
+        model.addAttribute("people", people);
+        model.addAttribute("projects", projectService.getAllProjects());
+        LOGGER.info("@GetMapping(\"/management/person\") - Accessing page");
+
+        return "management/person";
+    }
+
+    /**
+     * Method for merging people in same project
+     * @param model                 Object for passing data to the UI
+     * @param selectedPeople        People selected by user for merge
+     * @param personName            Name of the new person for merge
+     * @param redirectAttrs         Attributes for redirection
+     * @return                      HTML template
+     */
+    @PostMapping(value = "/changeIdentities")
+    public String mergeIdentities(Model model,
+                                  @RequestParam(value = "selectedBox", required = false) List<Person> selectedPeople,
+                                  @RequestParam(value = "personName", required = false) List<String> personName,
+                                  @RequestParam(value = "radioBtn", required = false) Integer radioBtn,
+                                  @RequestParam(value = "submitId", required = false) Long submitId,
+                                  RedirectAttributes redirectAttrs) {
+
+        // Nothing was selected
+        if(selectedPeople == null || selectedPeople.isEmpty()) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected");
+            LOGGER.info("@PostMapping(\"/management/person\") - Nothing was selected or name was empty");
+
+        } else {
+
+            Person newPerson;
+            if(Objects.equals(submitId, Constants.DEFAULT_ID)) { // Creating new person
+
+                if(personName == null || personName.isEmpty() || radioBtn == null || personName.get(radioBtn).isEmpty()) { // Person name is not set
+                    redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Name of the new person is empty");
+                    LOGGER.info("@PostMapping(\"/management/person\") - Name of the new person is empty");
+                    return "redirect:/management/person";
+                }
+
+                Person createdPerson = new Person(personName.get(radioBtn), selectedPeople.get(0).getProject());
+                newPerson = personService.savePerson(createdPerson);
+
+            } else { // Merging to existing person
+                newPerson = personService.getPersonById(submitId);
+            }
+
+            if(newPerson != null) { // Person was found in database
+
+                if(selectedPeople.contains(newPerson)) {
+                    redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Person cannot be merged with itself");
+                    LOGGER.info("@PostMapping(\"/management/person\") - Person cannot be merged with itself");
+                    return "redirect:/management/person";
+                }
+
+                for(Person person : selectedPeople) { // Relation update for every selected person
+                    personService.updatePersonRelations(person.getId(), newPerson.getId());
+                    personService.deletePerson(person.getId());
+                }
+
+                redirectAttrs.addFlashAttribute("successMessage", "All identities of selected person were merged to person " + newPerson.getName());
+                LOGGER.info("@PostMapping(\"/management/person\") - Selected identities were merged to person with id " + submitId);
+
+            } else {
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Selected person was not found");
+                LOGGER.info("@PostMapping(\"/management/person\") - Selected person with id " + submitId + " was not found");
+            }
+
+        }
+        return "redirect:/management/person";
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ProjectController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ProjectController.java
new file mode 100644
index 0000000..955c8f2
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ProjectController.java
@@ -0,0 +1,160 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.types.Node;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * This class contains all endpoints of projects.html
+ */
+@Controller
+public class ProjectController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(ProjectController.class);
+
+    @Autowired
+    private ProjectService projectService;
+
+    /**
+     * Method for visualization of project hierarchy
+     * @param model     Object for passing data to the UI
+     * @return          HTML template
+     */
+    @GetMapping("/management/projects")
+    public String projects(Model model) {
+        List<Node> parents = new ArrayList<>();
+        List<Project> parentProjects = projectService.getParentProjects();
+        for(Project parentProject : parentProjects) {
+            Node n = new Node();
+            n.project = parentProject;
+            n.children = new ArrayList<>();
+            parents.add(n);
+        }
+
+        for(Node n : parents) {
+            n.children = calculate(n.project);
+        }
+
+        model.addAttribute("parents", parents);
+        LOGGER.info("@GetMapping(\"/management/projects\") - Accessing page");
+        return "management/projects";
+    }
+
+    /**
+     * Method for changing superproject of selected projects
+     * @param model                 Object for passing data to the UI
+     * @param selectedProjects      Selected projects for changing their parent project
+     * @param selectedSuperProject  Selected project for being parent project
+     * @param projectName           Name of new created project that will take a place as parent project
+     * @param redirectAttrs         Redirect attributes
+     * @return                      HTML template
+     */
+    @PostMapping(value = "/superProjectChange")
+    public String projectChange(Model model,
+                                @RequestParam(value = "selectedBox", required = false) List<Project> selectedProjects,
+                                @RequestParam(value = "submitId", required = false) Long selectedSuperProject,
+                                @RequestParam(value = "projectName", required = false) String projectName,
+                                RedirectAttributes redirectAttrs) {
+
+        // Validity check
+        if(selectedProjects == null) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected before submission");
+            LOGGER.warn("@PostMapping(\"/management/projects\") - Cannot proceed: Submission went wrong");
+
+        } else if(projectService.getProjectById(selectedSuperProject) == null && !Objects.equals(selectedSuperProject, Constants.DEFAULT_ID)) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Superproject was not found");
+            LOGGER.warn("@PostMapping(\"/management/projects\") - Cannot proceed: Submission went wrong");
+
+        } else if(!Objects.equals(selectedSuperProject, Constants.DEFAULT_ID) && selectedProjects.contains(projectService.getProjectById(selectedSuperProject))) {
+            if(selectedProjects.size() == 1) {
+                selectedProjects.get(0).setSuperProject(null);
+                projectService.saveProject(selectedProjects.get(0));
+                redirectAttrs.addFlashAttribute("successMessage", "The project was set up as a parent project");
+            } else {
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Project cannot be superproject for self");
+                LOGGER.warn("@PostMapping(\"/management/projects\") - Cannot proceed: Submission went wrong");
+            }
+
+        } else {
+            // User creating new superproject
+            if(Objects.equals(selectedSuperProject, Constants.DEFAULT_ID)) {
+                if(projectName == null || projectName.isEmpty()) {
+                    redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Name was not found");
+                    LOGGER.warn("@PostMapping(\"/management/projects\") - Cannot proceed: Submission went wrong");
+                } else {
+                    Project project = new Project(projectName);
+                    Project newProject = projectService.saveProject(project);
+                    for(Project subProject : selectedProjects) {
+                        subProject.setSuperProject(newProject);
+                        projectService.saveProject(subProject);
+                    }
+                    redirectAttrs.addFlashAttribute("successMessage", "Selected projects (" + selectedProjects.size() + ") were assign to " + newProject.getName());
+                }
+                return "redirect:/management/projects/";
+            }
+
+            // Check if there is no cycle
+            List<Project> childProjects = new ArrayList<>();
+            for(Project project : selectedProjects) {
+                addChildProject(project, childProjects);
+            }
+            if(childProjects.contains(projectService.getProjectById(selectedSuperProject))) {
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Some selected projects cannot be assign - Selected superproject cannot be superior to its parent");
+                LOGGER.warn("@PostMapping(\"/management/projects\") - Cannot proceed: Submission went wrong");
+                return "redirect:/management/projects/";
+            }
+
+            // Changing superproject of all selected projects
+            for(Project project : selectedProjects) {
+                project.setSuperProject(projectService.getProjectById(selectedSuperProject));
+                projectService.saveProject(project);
+            }
+            redirectAttrs.addFlashAttribute("successMessage", "Selected projects (" + selectedProjects.size() + ") were assign to " + projectService.getProjectById(selectedSuperProject).getName());
+        }
+
+        return "redirect:/management/projects/";
+    }
+
+    /**
+     * Method for searching all subordinate projects of selected project
+     * @param project       Project for which the search will be done
+     * @param childProjects Collection of all subordinate projects
+     */
+    private void addChildProject(Project project, List<Project> childProjects) {
+        for(Project childProject : projectService.getSubordinateProjectsTo(project.getId())) {
+            childProjects.add(childProject);
+            addChildProject(childProject, childProjects);
+        }
+    }
+
+    /**
+     * Method creating the hierarchy of projects by recursion
+     * @param p Project for which the hierarchy will be generated
+     * @return  List of project's children with their hierarchy
+     */
+    private ArrayList<Node> calculate(Project p) {
+        ArrayList<Node> nodes = new ArrayList<>();
+        List<Project> projects = projectService.getSubordinateProjectsTo(p.getId());
+        for(Project project : projects) {
+            Node n = new Node();
+            n.project = project;
+            n.children = calculate(project);
+            nodes.add(n);
+        }
+        return nodes;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ReleaseController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ReleaseController.java
new file mode 100644
index 0000000..28b0846
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/ReleaseController.java
@@ -0,0 +1,165 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Commit;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.CommitRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.ConfigurationPersonRelationRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.BranchService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.CommitService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpSession;
+
+/**
+ * This class contains all endpoints of release.html
+ */
+@Controller
+public class ReleaseController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(ReleaseController.class);
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private CommitService commitService;
+
+    @Autowired
+    private BranchService branchService;
+
+    @Autowired
+    private CommitRepository commitRepository;
+
+    @Autowired
+    private ConfigurationPersonRelationRepository configurationPersonRelationRepository;
+
+    /**
+     * Method for visualization of released configurations
+     * @param model     Object for passing data to the UI
+     * @param project   Selected project for showing releases
+     * @param session   Session with attributes
+     * @return          HTML template
+     */
+    @GetMapping("/management/release")
+    public String releases(Model model,
+                           @RequestParam(value = "selectedProject", required = false) Long project,
+                           HttpSession session) {
+
+        // First open in session
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/release\") - Accessing page");
+            return "management/release";
+        }
+
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+            Utils.sessionRecreate(session);
+        }
+
+        project = (long) session.getAttribute("project");
+        model.addAttribute("projectId", project);
+
+        model.addAttribute("projects", projectService.getAllProjects());
+        model.addAttribute("commits", commitRepository.getReleasedCommitsByProject(project));
+        return "management/release";
+    }
+
+    /**
+     * Method opening specific commit based on identifier
+     * @param model         Object for passing data to the UI
+     * @param identifier    Identifier of commit for visualisation
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping(value = "/openCommit")
+    public String openCommit(Model model,
+                             @RequestParam(value = "identifier", required = false) String identifier,
+                             RedirectAttributes redirectAttrs,
+                             HttpSession session) {
+
+        Commit commit = commitService.getCommitByIdentifier((long) session.getAttribute("project"), identifier);
+        if(commit == null) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Commit doesn't exist");
+            LOGGER.info("@PostMapping(\"/management/release/\") - Commit not found");
+            return "redirect:/management/release";
+        }
+
+        model.addAttribute("selectedCommit", commit);
+        model.addAttribute("committedBy", configurationPersonRelationRepository.getCommittedRelation(commit.getId()));
+        return "management/commit";
+    }
+
+    /**
+     * Method changing release attribute of specific commit
+     * @param model         Object for passing data to the UI
+     * @param identifier    Identifier of commit for attribute change
+     * @param release       Value of attribute release
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping(value = "/changeRelease")
+    public String changeRelease(Model model,
+                                @RequestParam(value = "identifier", required = false) String identifier,
+                                @RequestParam(value = "release", required = false) boolean release,
+                                RedirectAttributes redirectAttrs,
+                                HttpSession session) {
+
+        Commit commit = commitService.getCommitByIdentifier((long) session.getAttribute("project"), identifier);
+        if(commit == null) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Commit doesn't exist");
+            LOGGER.info("@PostMapping(\"/management/release/\") - Commit not found");
+            return "redirect:/management/release";
+        }
+
+        if(release != commit.isRelease()) {
+            commit.setRelease(release);
+            commitService.saveCommit(commit);
+        }
+
+        LOGGER.info("@PostMapping(\"/management/person\") - Commit " + commit.getIdentifier() + " were unreleased");
+        model.addAttribute("selectedCommit", commit);
+        model.addAttribute("committedBy", configurationPersonRelationRepository.getCommittedRelation(commit.getId()));
+        return "management/commit";
+    }
+
+    /**
+     * Method for marking commit as not released
+     * @param model         Object for passing data to the UI
+     * @param submitId      ID of commit for unreleasing
+     * @param redirectAttrs Attributes for redirection
+     * @return
+     */
+    @PostMapping(value = "/unRelease")
+    public String unRelease(Model model,
+                            @RequestParam(value = "submitId", required = false) Long submitId,
+                            RedirectAttributes redirectAttrs) {
+
+        Commit commit = commitService.getCommitById(submitId);
+        if(commit == null) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Submitted commit id doesn't exists");
+            LOGGER.info("@PostMapping(\"/management/release/\") - Commit not found");
+            return "redirect:/management/release";
+        }
+
+        commit.setRelease(false);
+        commitService.saveCommit(commit);
+
+        redirectAttrs.addFlashAttribute("successMessage", "Commit " + commit.getIdentifier() + " were unreleased");
+        LOGGER.info("@PostMapping(\"/management/person\") - Commit " + commit.getIdentifier() + " were unreleased");
+        return "redirect:/management/release";
+    }
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentActivityController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentActivityController.java
new file mode 100644
index 0000000..c473740
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentActivityController.java
@@ -0,0 +1,396 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Activity;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Category;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkUnit;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.ActivityRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.WorkUnitRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.ActivityService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.CategoryService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.WorkUnitService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums.WuTypeService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpSession;
+import java.util.*;
+
+/**
+ * This class contains all endpoints of segment-activity.html
+ */
+@Controller
+public class SegmentActivityController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(SegmentActivityController.class);
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private ActivityService activityService;
+
+    @Autowired
+    private WorkUnitService workUnitService;
+
+    @Autowired
+    private CategoryService categoryService;
+
+    @Autowired
+    private WuTypeService wuTypeService;
+
+    @Autowired
+    private ActivityRepository activityRepository;
+
+    @Autowired
+    private WorkUnitRepository workUnitRepository;
+
+    /**
+     * Method for visualization of activities and work units
+     * @param model         Object for passing data to the UI
+     * @param project       Selected project for showing workunits and activities
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @GetMapping("/management/segment-activity")
+    public String changeProject(Model model,
+                                @RequestParam(value = "selectedProject", required = false) Long project,
+                                RedirectAttributes redirectAttrs,
+                                HttpSession session) {
+
+        // Remove activity if different project selected
+        if(project != null && session.getAttribute("project") != project) {
+            Utils.sessionRecreate(session);
+        }
+
+        // First open in session
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/segment-activity\") - Accessing page");
+            return "management/segment-activity";
+        }
+
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+        }
+
+        project = (long) session.getAttribute("project");
+
+        Project foundedProject = projectService.getProjectById(project);
+
+        if(foundedProject == null) {
+            if(!Objects.equals(project, Constants.DEFAULT_ID)) {
+                redirectAttrs.addFlashAttribute("errorMessage", "Project not found");
+                LOGGER.info("@GetMapping(\"/management/segment-activity\")- Project not found");
+            } else {
+                session.removeAttribute("activity");
+                LOGGER.info("@GetMapping(\"/management/segment-activity\") - Accessing page");
+            }
+            model.addAttribute("projects", projectService.getAllProjects());
+            return "management/segment-activity";
+        }
+
+        applyFilter(model, foundedProject, session);
+
+        model.addAttribute("activities", foundedProject.getActivities());
+        model.addAttribute("projects", projectService.getAllProjects());
+        return "management/segment-activity";
+    }
+
+    /**
+     * Method for selection of activity
+     * @param model         Object for passing data to the UI
+     * @param activityId    Selected activity for assigning
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping("/selectActivity")
+    public String selectActivity(Model model,
+                                 @RequestParam(value = "submitId", required = false) Long activityId,
+                                 RedirectAttributes redirectAttrs,
+                                 HttpSession session) {
+
+        Activity activity = activityService.getActivityById(activityId);
+        if(activity == null) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Activity not found");
+            LOGGER.info("@GetMapping(\"/management/segment-activity\")- Activity not found");
+            return "redirect:/management/segment-activity";
+        }
+
+        session.setAttribute("activity", activity);
+        LOGGER.info("@GetMapping(\"/management/segment-activity\") - Accessing page");
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method for reselection of activity (removing activity from session)
+     * @param session   Session with attributes
+     * @return          HTML template
+     */
+    @PostMapping("/reselectActivity")
+    public String reselectActivity(HttpSession session) {
+        session.removeAttribute("activity");
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method adding category to the filter for current work units
+     * @param model         Object for passing data to the UI
+     * @param categoryId    Identifier of type that will be added
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping("/addCategoryFilter")
+    public String addCategory(Model model,
+                              @RequestParam(value = "selectedCategory", required = false) Long categoryId,
+                              HttpSession session) {
+
+        List<Category> categoryFilter = (List<Category>) session.getAttribute("categoryFilter");
+        if(categoryFilter == null) {
+            categoryFilter = new ArrayList<>();
+        }
+
+        Category category = categoryService.getCategoryById(categoryId);
+        if(category != null) {
+            categoryFilter.add(category);
+        }
+        session.setAttribute("categoryFilter", categoryFilter);
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method removing category from filter for current work units
+     * @param model         Object for passing data to the UI
+     * @param categoryId    Identifier of category that will be removed
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping("/removeCategoryFilter")
+    public String removeCategory(Model model,
+                                 @RequestParam(value = "selectedCategory", required = false) Long categoryId,
+                                 HttpSession session) {
+
+
+        List<Category> categoryFilter = (List<Category>) session.getAttribute("categoryFilter");
+        if(categoryFilter == null) {
+            return "redirect:/management/segment-activity";
+        }
+
+        Category category = categoryService.getCategoryById(categoryId);
+        if(category != null) {
+            categoryFilter.remove(category);
+        }
+        session.setAttribute("categoryFilter", categoryFilter);
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method adding type to the filter for current work units
+     * @param model     Object for passing data to the UI
+     * @param typeId    Identifier of type that will be added
+     * @param session   Session with attributes
+     * @return          HTML template
+     */
+    @PostMapping("/addTypeFilter")
+    public String addType(Model model,
+                          @RequestParam(value = "selectedType", required = false) Long typeId,
+                          HttpSession session) {
+
+        List<WuType> typeFilter = (List<WuType>) session.getAttribute("typeFilter");
+        if(typeFilter == null) {
+            typeFilter = new ArrayList<>();
+        }
+
+        WuType wuType = wuTypeService.getWuTypeById(typeId);
+        if(wuType != null) {
+            typeFilter.add(wuType);
+        }
+        session.setAttribute("typeFilter", typeFilter);
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method removing type from filter for current work units
+     * @param model     Object for passing data to the UI
+     * @param typeId    Identifier of type that will be removed
+     * @param session   Session with attributes
+     * @return          HTML template
+     */
+    @PostMapping("/removeTypeFilter")
+    public String removeType(Model model,
+                             @RequestParam(value = "selectedType", required = false) Long typeId,
+                             HttpSession session) {
+
+        List<WuType> typeFilter = (List<WuType>) session.getAttribute("typeFilter");
+        if(typeFilter == null) {
+            return "redirect:/management/segment-activity";
+        }
+
+        WuType wuType = wuTypeService.getWuTypeById(typeId);
+        if(wuType != null) {
+            typeFilter.remove(wuType);
+        }
+        session.setAttribute("typeFilter", typeFilter);
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method assigning activity to selected work units
+     * @param model         Object for passing data to the UI
+     * @param selectedUnits Selected work units
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping("/assignActivity")
+    public String assignActivity(Model model,
+                                 @RequestParam(value = "selectedUnits", required = false) List<WorkUnit> selectedUnits,
+                                 RedirectAttributes redirectAttrs,
+                                 HttpSession session) {
+
+        if(selectedUnits == null || selectedUnits.isEmpty()) {
+            selectedUnits = (List<WorkUnit>) session.getAttribute("selectedWU");
+            session.removeAttribute("selectedWU");
+            if(selectedUnits == null || selectedUnits.isEmpty()) {
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected");
+                LOGGER.info("@PostMapping(\"/management/segment-activity\" - Nothing was selected");
+                return "redirect:/management/segment-activity";
+            }
+        }
+
+        Activity activity = (Activity) session.getAttribute("activity");
+        if(activity != null) {
+
+            for(WorkUnit workUnit : selectedUnits) {
+                workUnit.setActivity(activity);
+                workUnitService.saveWorkUnit(workUnit);
+            }
+
+        } else {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Error occurred while getting selected activity");
+            LOGGER.info("@PostMapping(\"/management/segment-activity\" - Session has problem with activity extract");
+            return "redirect:/management/segment-activity";
+        }
+
+        redirectAttrs.addFlashAttribute("successMessage", "Activity was assigned to all selected work units (" + selectedUnits.size() + ")");
+        LOGGER.info("@PostMapping(\"/management/segment-activity\" - Activity was assigned to all selected work units");
+        return "redirect:/management/segment-activity";
+    }
+
+    /**
+     * Method testing if there are some work units with activities
+     * @param model         Object for passing data to the UI
+     * @param selectedUnits Selected work units
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @PostMapping("/testWU")
+    public String testWU(Model model,
+                         @RequestParam(value = "selectedUnits", required = false) List<WorkUnit> selectedUnits,
+                         RedirectAttributes redirectAttrs,
+                         HttpSession session) {
+
+        if(selectedUnits == null || selectedUnits.isEmpty()) {
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected");
+            LOGGER.info("@PostMapping(\"/management/segment-activity\" - Nothing was selected");
+            return "redirect:/management/segment-activity";
+        }
+
+        List<Long> ids = new ArrayList<>();
+        boolean notEmpty = false;
+        for(WorkUnit workUnit : selectedUnits) {
+            ids.add(workUnit.getId());
+            if(workUnit.getActivity() != null) {
+                notEmpty = true;
+            }
+        }
+
+        if(notEmpty) {
+            session.setAttribute("selectedWU", selectedUnits);
+            redirectAttrs.addFlashAttribute("selectedWU", selectedUnits);
+            redirectAttrs.addFlashAttribute("selectedIds", ids);
+            return "redirect:/management/segment-activity";
+        }
+
+        return assignActivity(model, selectedUnits, redirectAttrs, session);
+    }
+
+    /**
+     * Method for applying filters defined by user into model
+     * @param model             Object for passing data to the UI
+     * @param foundedProject    Selected project for showing template
+     * @param session           Session with attributes
+     */
+    private void applyFilter(Model model,
+                             Project foundedProject,
+                             HttpSession session) {
+
+        Set<Category> categories = new HashSet<>();
+        Set<WuType> types = new HashSet<>();
+        for(ProjectInstance instance : foundedProject.getProjectInstances()) {
+            categories.addAll(instance.getCategories());
+            types.addAll(instance.getWuTypes());
+        }
+
+        //Remove categories in filter
+        List<Category> categoryList = new ArrayList<>(categories);
+        List<Category> categoryFilter = (List<Category>) session.getAttribute("categoryFilter");
+        if(categoryFilter != null) {
+            categoryFilter.forEach(categoryList::remove);
+        }
+
+        List<WuType> wuTypeList = new ArrayList<>(types);
+        List<WuType> wuTypeFilter = (List<WuType>) session.getAttribute("typeFilter");
+        if(wuTypeFilter != null) {
+            wuTypeFilter.forEach(wuTypeList::remove);
+        }
+
+        //Sort categories and types
+        Collections.sort(categoryList, Comparator.comparing(Category::getName, String.CASE_INSENSITIVE_ORDER));
+        Collections.sort(wuTypeList, Comparator.comparing(WuType::getName, String.CASE_INSENSITIVE_ORDER));
+
+        List<Long> categoryFilterId = new ArrayList<>();
+        List<Long> wuTypeFilterId = new ArrayList<>();
+
+        if(categoryFilter != null) {
+            for(Category category : categoryFilter) {
+                categoryFilterId.add(category.getId());
+            }
+        }
+
+        if(wuTypeFilter != null) {
+            for(WuType type : wuTypeFilter) {
+                wuTypeFilterId.add(type.getId());
+            }
+        }
+
+        if(session.getAttribute("categoryFilter") != null && !categoryFilter.isEmpty() && session.getAttribute("typeFilter") != null && !wuTypeFilter.isEmpty()) {
+            model.addAttribute("workunits", workUnitRepository.getFiltredWorkUnits(foundedProject.getId(), categoryFilterId, wuTypeFilterId, categoryFilterId.size()));
+        } else if(session.getAttribute("categoryFilter") != null && !categoryFilter.isEmpty()) {
+            model.addAttribute("workunits", workUnitRepository.getCategoryFiltredWorkUnits(foundedProject.getId(), categoryFilterId, categoryFilterId.size()));
+        } else if(session.getAttribute("typeFilter") != null && !wuTypeFilter.isEmpty()) {
+            model.addAttribute("workunits", workUnitRepository.getTypeFiltredWorkUnits(foundedProject.getId(), wuTypeFilterId));
+        } else {
+            model.addAttribute("workunits", foundedProject.getWorkUnits());
+        }
+
+        model.addAttribute("categories", categoryList);
+        model.addAttribute("types", wuTypeList);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentCategoryController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentCategoryController.java
new file mode 100644
index 0000000..e103bc3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentCategoryController.java
@@ -0,0 +1,303 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.util.Pair;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpSession;
+import java.util.*;
+
+/**
+ * This class contains all endpoints of segment-category.html
+ */
+@Controller
+public class SegmentCategoryController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(SegmentCategoryController.class);
+
+    @Autowired
+    private CategoryService categoryService;
+
+    @Autowired
+    private IterationService iterationService;
+
+    @Autowired
+    private PhaseService phaseService;
+
+    @Autowired
+    private ActivityService activityService;
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private ProjectInstanceService projectInstanceService;
+
+    @Autowired
+    private WorkUnitService workUnitService;
+
+    /**
+     * Method for showing category page for specific project
+     * @param model         Object for passing data to the UI
+     * @param project       Selected project for showing categories
+     * @param redirectAttrs Attributes for redirection
+     * @return              HTML template
+     */
+    @GetMapping("/management/segment-category")
+    public String category(Model model,
+                                @RequestParam(value = "selectedProject", required = false) Long project,
+                                RedirectAttributes redirectAttrs,
+                                HttpSession session) {
+
+        // First open in session
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/segment-category\") - Accessing page");
+            return "management/segment-category";
+        }
+
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+            Utils.sessionRecreate(session);
+        }
+
+        project = (long) session.getAttribute("project");
+
+        Project foundedProject = projectService.getProjectById(project);
+        if(foundedProject == null) {
+            if(!Objects.equals(project, Constants.DEFAULT_ID)) {
+                redirectAttrs.addFlashAttribute("errorMessage", "Project not found");
+                LOGGER.info("@GetMapping(\"/management/segment-category/\") - Project not found");
+            } else {
+                LOGGER.info("@GetMapping(\"/management/segment-category/\") - Accessing page");
+            }
+            model.addAttribute("projects", projectService.getAllProjects());
+            return "management/segment-category";
+        }
+
+        //Add all categories into model
+        List<Category> categories = new ArrayList<>();
+        for(ProjectInstance projectInstance : foundedProject.getProjectInstances()) {
+            categories.addAll(projectInstance.getCategories());
+        }
+        Collections.sort(categories, Comparator.comparing(Category::getName, String.CASE_INSENSITIVE_ORDER));
+
+        model.addAttribute("categories", categories);
+        model.addAttribute("projects", projectService.getAllProjects());
+        LOGGER.info("@GetMapping(\"/management/segment-category/\") - Accessing page");
+
+        return "/management/segment-category";
+    }
+
+    /**
+     * Method preparing selected categories for transformation into defined type
+     * @param model                 Object for passing data to the UI
+     * @param selectedCategories    List of selected categories
+     * @param submitType            Type of required attribute (1 - Iteration, 2 - Phase, 3 - Activity)
+     * @param submitId              String with type of required attribute and id of one selected category
+     * @param redirectAttrs         Attributes for redirection
+     * @return                      HTML template
+     */
+    @PostMapping(value = "/categoryChange")
+    public String categoryChange(Model model,
+                                 @RequestParam(value = "selectedBox", required = false) List<Category> selectedCategories,
+                                 @RequestParam(value = "submitType", required = false) Integer submitType,
+                                 @RequestParam(value = "submitId", required = false) String submitId,
+                                 RedirectAttributes redirectAttrs) {
+
+        if(selectedCategories != null && submitType != null) { // Selected submit
+
+            if(submitType <= 0 || submitType > Constants.SUBMIT_TYPES) { // ERROR: Unknown submitType
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Application error occurred");
+                LOGGER.warn("@PostMapping(\"/management/segment-category\") - Cannot proceed: Unknown submitType " + submitType);
+                return "redirect:/management/segment-category";
+            }
+
+        } else if(submitId != null) { //Inline submit
+
+            Pair<Integer, Long> resultPair = extractTypeAndId(submitId);
+            if(resultPair == null) { // Cannot be extracted
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Application error occurred");
+                LOGGER.warn("@PostMapping(\"/management/segment-category\") - Cannot proceed: Unknown submitId " + submitId);
+                return "redirect:/management/segment-category";
+            }
+
+            // Add one category into new list
+            submitType = resultPair.getFirst();
+            Long id = resultPair.getSecond();
+            selectedCategories = new ArrayList<>();
+            selectedCategories.add(categoryService.getCategoryById(id));
+
+        } else { //Unspecific error
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected before submission");
+            LOGGER.warn("@PostMapping(\"/management/segment-category\") - Cannot proceed: Submission went wrong");
+            return "redirect:/management/segment-category";
+        }
+
+        // Process all selected categories
+        Pair<String, Boolean> result = processSelectedCategories(submitType, selectedCategories);
+        if(!result.getSecond()) {
+            redirectAttrs.addFlashAttribute("successMessage", "All selected categories (" + selectedCategories.size() + ") were assign");
+        } else {
+            redirectAttrs.addFlashAttribute("informMessage", "Some categories cannot be assign, look at the log for more information");
+        }
+        redirectAttrs.addFlashAttribute("message", result.getFirst());
+
+        return "redirect:/management/segment-category";
+    }
+
+    /**
+     * Method for transforming selected categories into defined attribute type
+     * @param submitType            Type of required attribute (1 - Iteration, 2 - Phase, 3 - Activity)
+     * @param selectedCategories    Selected categories for transformation
+     * @return                      Log message about transformation
+     */
+    private Pair<String, Boolean> processSelectedCategories(Integer submitType, List<Category> selectedCategories) {
+
+        boolean errorOccurred = false;
+        StringBuilder message = new StringBuilder();
+        for(Category category : selectedCategories) {
+            message.append("Category: ").append(category.getName()).append(System.getProperty("line.separator"));
+
+            if(category.getWorkUnits().size() == 0) { //Inform user that there aren't any WorkUnits
+                errorOccurred = true;
+                message.append(Constants.INDENT)
+                        .append("cannot be assigned due to non-existent work unit")
+                        .append(System.getProperty("line.separator"))
+                        .append(System.getProperty("line.separator"));
+                continue;
+            }
+
+            DatabaseObject object = getNewObject(category.getWorkUnits(), submitType, category);
+
+            for(WorkUnit workUnit : category.getWorkUnits()) {
+
+                boolean hasAttr = true;
+                switch (submitType) {
+                    case 1:
+                        if(workUnit.getIteration() == null) {
+                            hasAttr = false;
+                            workUnit.setIteration((Iteration) object);
+                            workUnitService.saveWorkUnit(workUnit);
+                        }
+                        break;
+                    case 2:
+                        if(workUnit.getPhase() == null) {
+                            hasAttr = false;
+                            workUnit.setPhase((Phase) object);
+                            workUnitService.saveWorkUnit(workUnit);
+                        }
+                        break;
+                    case 3:
+                        if(workUnit.getActivity() == null) {
+                            hasAttr = false;
+                            workUnit.setActivity((Activity) object);
+                            workUnitService.saveWorkUnit(workUnit);
+                        }
+                        break;
+                }
+
+                if(!hasAttr) { // Transformation of selected category was done
+
+                    message.append(Constants.INDENT)
+                            .append("successfully assigned to WU with id ").append(workUnit.getId())
+                            .append(System.getProperty("line.separator"));
+
+                } else { // WorkUnit already has iteration, inform user
+
+                    errorOccurred = true;
+                    message.append(Constants.INDENT)
+                            .append("cannot be assigned to WU with id ").append(workUnit.getId())
+                            .append(" as it already exists with ").append(workUnit.getIteration().getName())
+                            .append(System.getProperty("line.separator"));
+                }
+            }
+            message.append(System.getProperty("line.separator"));
+        }
+        return Pair.of(message.toString(), errorOccurred);
+    }
+
+    /**
+     * Method for checking, if any work units in set has empty attribute of submitType
+     * If any of them is empty, method create and return that new attribute type
+     * @param workUnits     Set of work units, where test will be done
+     * @param submitType    Type of required attribute (1 - Iteration, 2 - Phase, 3 - Activity)
+     * @param category      Category that should be transformed into the new attribute
+     * @return              New attribute for transformation of category, if there is at least one WU with empty attribute
+     *                      or NULL if there aren't any empty attribute
+     */
+    private DatabaseObject getNewObject(Set<WorkUnit> workUnits, Integer submitType, Category category) {
+
+        switch (submitType) {
+            case 1:
+                for(WorkUnit workUnit : workUnits) {
+                    if(workUnit.getIteration() == null) {
+                        Iteration iteration = new Iteration(category.getExternalId(),
+                                                category.getName(),
+                                                category.getDescription(),
+                                                category.getProjectInstance().getProjectId());
+                        return iterationService.saveIteration(iteration);
+                    }
+                }
+                break;
+            case 2:
+                for(WorkUnit workUnit : workUnits) {
+                    if(workUnit.getPhase() == null) {
+                        Phase phase = new Phase(category.getExternalId(),
+                                    category.getName(),
+                                    category.getDescription(),
+                                    category.getProjectInstance().getProjectId());
+                        return phaseService.savePhase(phase);
+                    }
+                }
+                break;
+            case 3:
+                for(WorkUnit workUnit : workUnits) {
+                    if(workUnit.getActivity() == null) {
+                        Activity activity = new Activity(category.getExternalId(),
+                                    category.getName(),
+                                    category.getDescription(),
+                                    category.getProjectInstance().getProjectId());
+                        return activityService.saveActivity(activity);
+                    }
+                }
+                break;
+        }
+        return null;
+    }
+
+    /**
+     * Method for parsing type of submission and id of category
+     * @param submitId  String with type and category id
+     * @return          Pair of type and id
+     */
+    private Pair<Integer, Long> extractTypeAndId(String submitId) {
+        String[] parts = submitId.split(Constants.HTML_DELIMITER);
+        //Project ahoj = Project.builder().projectName("").projectName2("das").build();
+
+        try {
+            Integer type = Integer.parseInt(parts[0]);
+            Long id = Long.parseLong(parts[1]);
+            return Pair.of(type, id);
+
+        } catch (NumberFormatException e) {
+            return null;
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentIterationPhaseController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentIterationPhaseController.java
new file mode 100644
index 0000000..a91f006
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/controller/management/SegmentIterationPhaseController.java
@@ -0,0 +1,279 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.controller.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.Constants;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Iteration;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Phase;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkUnit;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.IterationService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.PhaseService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.WorkUnitService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpSession;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * This class contains all endpoints of segment-iteration-phase.html
+ */
+@Controller
+public class SegmentIterationPhaseController {
+
+    private final Logger LOGGER = LoggerFactory.getLogger(SegmentIterationPhaseController.class);
+
+    @Autowired
+    private IterationService iterationService;
+
+    @Autowired
+    private PhaseService phaseService;
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private WorkUnitService workUnitService;
+
+    /**
+     * Method for showing iteration and phase page for specific project
+     * @param model         Object for passing data to the UI
+     * @param project       Selected project for showing categories
+     * @param redirectAttrs Attributes for redirection
+     * @param session       Session with attributes
+     * @return              HTML template
+     */
+    @GetMapping("/management/segment-iteration-phase")
+    public String changeProject(Model model,
+                                @RequestParam(value = "selectedProject", required = false) Long project,
+                                RedirectAttributes redirectAttrs,
+                                HttpSession session) {
+
+        // First open in session
+        if(project == null && session.getAttribute("project") == null) {
+            model.addAttribute("projects", projectService.getAllProjects());
+            LOGGER.info("@GetMapping(\"/management/segment-iteration-phase\") - Accessing page");
+            return "management/segment-iteration-phase";
+        }
+
+        // Project selected
+        if(project != null) {
+            session.setAttribute("project", project);
+            Utils.sessionRecreate(session);
+        }
+
+        project = (long) session.getAttribute("project");
+
+        Project foundedProject = projectService.getProjectById(project);
+        if(foundedProject == null) {
+            if(!Objects.equals(project, Constants.DEFAULT_ID)) {
+                redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Project not found");
+                LOGGER.info("@GetMapping(\"/management/segment-iteration-phase\")- Project not found");
+            } else {
+                LOGGER.info("@GetMapping(\"/management/segment-iteration-phase\") - Accessing page");
+            }
+            model.addAttribute("projects", projectService.getAllProjects());
+            return "management/segment-iteration-phase";
+        }
+
+        List<Iteration> iterations = foundedProject.getIterations();
+        List<Phase> phases = foundedProject.getPhases();
+        Collections.sort(iterations, Comparator.comparing(Iteration::getName, String.CASE_INSENSITIVE_ORDER));
+        Collections.sort(phases, Comparator.comparing(Phase::getName, String.CASE_INSENSITIVE_ORDER));
+
+        model.addAttribute("iterations", iterations);
+        model.addAttribute("phases", phases);
+        model.addAttribute("projects", projectService.getAllProjects());
+        LOGGER.info("@GetMapping(\"/management/segment-iteration-phase\") - Accessing page");
+
+        return "/management/segment-iteration-phase";
+    }
+
+    /**
+     * Method for changing iteration to phase
+     * @param model                 Object for passing data to the UI
+     * @param selectedIterations    Iterations selected by user for change
+     * @param redirectAttrs         Attributes for redirection
+     * @return                      HTML template
+     */
+    @PostMapping(value = "/changeIteration")
+    public String changeToPhase(Model model,
+                                @RequestParam(value = "selectedIterations", required = false) List<Iteration> selectedIterations,
+                                RedirectAttributes redirectAttrs) {
+
+        if(selectedIterations == null || selectedIterations.isEmpty()) {
+
+            model.addAttribute("iterations", iterationService.getAllIterations());
+            model.addAttribute("phases", phaseService.getAllPhases());
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected before submission");
+            LOGGER.info("@PostMapping(\"/management/segment-iteration-phase\") - Cannot proceed: Submission went wrong");
+
+        } else {
+
+            StringBuilder message = new StringBuilder();
+            int errors = 0;
+
+            for(Iteration iteration : selectedIterations) {
+                message.append("Iteration: ").append(iteration.getName()).append(System.getProperty("line.separator"));
+
+                if(iteration.getWorkUnits().size() == 0) {
+                    errors += 1;
+                    message.append(Constants.INDENT)
+                            .append("cannot be changed to Phase due to non-existent work unit")
+                            .append(System.getProperty("line.separator"))
+                            .append(System.getProperty("line.separator"));
+                    continue;
+                }
+
+                Phase phase = null;
+                for(WorkUnit workUnit : iteration.getWorkUnits()) { // If exists WorkUnit with empty Phase - create Phase from Iteration
+                    if(workUnit.getPhase() == null) {
+                        phase = new Phase(iteration.getExternalId(),
+                                iteration.getName(),
+                                iteration.getDescription(),
+                                iteration.getEndDate(),
+                                iteration.getStartDate(),
+                                iteration.getCreated(),
+                                iteration.getSuperProjectId());
+                        phaseService.savePhase(phase);
+                        break;
+                    }
+                }
+
+                for(WorkUnit workUnit : iteration.getWorkUnits()) { // For every WorkUnit with empty Phase - assign created Phase
+                    if(workUnit.getPhase() == null) {
+                        workUnit.setPhase(phase);
+                        message.append(Constants.INDENT)
+                                .append("successfully assigned to WU with id ").append(workUnit.getId())
+                                .append(System.getProperty("line.separator"));
+                    } else {
+                        errors += 1;
+                        message.append(Constants.INDENT)
+                                .append("cannot be assigned to WU with id ").append(workUnit.getId())
+                                .append(" as it already exists with Phase ").append(workUnit.getPhase().getName())
+                                .append(System.getProperty("line.separator"));
+                    }
+                    if(phase != null) {
+                        workUnit.setIteration(null);
+                    }
+                    workUnitService.saveWorkUnit(workUnit);
+                }
+                message.append(System.getProperty("line.separator"));
+                if(phase != null) {
+                    iteration.setWorkUnits(null);
+                    iterationService.deleteIteration(iteration);
+                }
+            }
+
+            if(errors == 0) {
+                redirectAttrs.addFlashAttribute("successMessage", "All selected iterations (" + selectedIterations.size() + ") were transformed to phases");
+            } else {
+                redirectAttrs.addFlashAttribute("informMessage", "Some iterations cannot be assign, look at the log for more information");
+            }
+            redirectAttrs.addFlashAttribute("message", message);
+            LOGGER.info("@PostMapping(\"/management/segment-iteration-phase\") - Iterations were changed");
+        }
+
+        return "redirect:/management/segment-iteration-phase";
+    }
+
+    /**
+     * Method for changing phase to iteration
+     * @param model                 Object for passing data to the UI
+     * @param selectedPhases        Phases selected by user for change
+     * @param redirectAttrs         Attributes for redirection
+     * @return                      HTML template
+     */
+    @PostMapping(value = "/changePhase")
+    public String changeToIteration(Model model,
+                                    @RequestParam(value = "selectedPhases", required = false) List<Phase> selectedPhases,
+                                    RedirectAttributes redirectAttrs) {
+
+        if(selectedPhases == null || selectedPhases.isEmpty()) {
+
+            model.addAttribute("iterations", iterationService.getAllIterations());
+            model.addAttribute("phases", phaseService.getAllPhases());
+            redirectAttrs.addFlashAttribute("errorMessage", "ERROR: Nothing was selected before submission");
+            LOGGER.info("@PostMapping(\"/management/segment-iteration-phase\") - Cannot proceed: Submission went wrong");
+
+        } else {
+
+            StringBuilder message = new StringBuilder();
+            int errors = 0;
+
+            for(Phase phase : selectedPhases) {
+                message.append("Phase: ").append(phase.getName()).append(System.getProperty("line.separator"));
+
+                if(phase.getWorkUnits().size() == 0) {
+                    errors += 1;
+                    message.append(Constants.INDENT)
+                            .append("cannot be changed to Phase due to non-existent work unit")
+                            .append(System.getProperty("line.separator"))
+                            .append(System.getProperty("line.separator"));
+                    continue;
+                }
+
+                Iteration iteration = null;
+                for(WorkUnit workUnit : phase.getWorkUnits()) { // If exists WorkUnit with empty Phase - create Phase from Iteration
+                    if(workUnit.getIteration() == null) {
+                        iteration = new Iteration(phase.getExternalId(),
+                                phase.getName(),
+                                phase.getDescription(),
+                                phase.getEndDate(),
+                                phase.getStartDate(),
+                                phase.getCreated(),
+                                phase.getSuperProjectId());
+                        iterationService.saveIteration(iteration);
+                        break;
+                    }
+                }
+
+                for(WorkUnit workUnit : phase.getWorkUnits()) { // For every WorkUnit with empty Phase - assign created Phase
+                    if(workUnit.getIteration() == null) {
+                        workUnit.setIteration(iteration);
+                        workUnitService.saveWorkUnit(workUnit);
+                        message.append(Constants.INDENT)
+                                .append("successfully assigned to WU with id ").append(workUnit.getId())
+                                .append(System.getProperty("line.separator"));
+                    } else {
+                        errors += 1;
+                        message.append(Constants.INDENT)
+                                .append("cannot be assigned to WU with id ").append(workUnit.getId())
+                                .append(" as it already exists with Iteration ").append(workUnit.getIteration().getName())
+                                .append(System.getProperty("line.separator"));
+                    }
+                    if(iteration != null) {
+                        workUnit.setPhase(null);
+                    }
+                    workUnitService.saveWorkUnit(workUnit);
+                }
+                message.append(System.getProperty("line.separator"));
+                if(iteration != null) {
+                    phase.setWorkUnits(null);
+                    phaseService.deletePhase(phase);
+                }
+            }
+
+            if(errors == 0) {
+                redirectAttrs.addFlashAttribute("successMessage", "All selected phases (" + selectedPhases.size() + ") were transformed to iterations");
+            } else {
+                redirectAttrs.addFlashAttribute("informMessage", "Some phases cannot be assign, look at the log for more information");
+            }
+            redirectAttrs.addFlashAttribute("message", message);
+            LOGGER.info("@PostMapping(\"/management/segment-iteration-phase\") - Phases were changed");
+        }
+
+        return "redirect:/management/segment-iteration-phase";
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/AntiPatternManagerImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/AntiPatternManagerImpl.java
index 3a9e5e3..a58c3e6 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/AntiPatternManagerImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/AntiPatternManagerImpl.java
@@ -8,6 +8,7 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResultItem;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.ProjectToDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -51,7 +52,8 @@ public class AntiPatternManagerImpl implements AntiPatternManager {
 
         for (Project project : projects) {
             QueryResult queryResult = new QueryResult();
-            queryResult.setProject(project);
+            ProjectToDto projectToDto = new ProjectToDto();
+            queryResult.setProject(projectToDto.convert(project));
             List<QueryResultItem> queryResultItems = new ArrayList<>();
 
             for (AntiPatternDetector antiPattern : antiPatternDetectors) {
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/BusinessAsUsualDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/BusinessAsUsualDetectorImpl.java
index d2ef02f..2cb47f2 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/BusinessAsUsualDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/BusinessAsUsualDetectorImpl.java
@@ -4,7 +4,6 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/LongOrNonExistentFeedbackLoopsDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/LongOrNonExistentFeedbackLoopsDetectorImpl.java
index 18e0ed7..ccd6652 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/LongOrNonExistentFeedbackLoopsDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/LongOrNonExistentFeedbackLoopsDetectorImpl.java
@@ -4,8 +4,6 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveFloat;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/NinetyNinetyRuleDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/NinetyNinetyRuleDetectorImpl.java
index 9f89f13..70230ab 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/NinetyNinetyRuleDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/NinetyNinetyRuleDetectorImpl.java
@@ -2,11 +2,8 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveFloat;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveInteger;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/RoadToNowhereDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/RoadToNowhereDetectorImpl.java
index a094ff9..1d9b8a5 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/RoadToNowhereDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/RoadToNowhereDetectorImpl.java
@@ -2,11 +2,7 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveFloat;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveInteger;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/SpecifyNothingDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/SpecifyNothingDetectorImpl.java
index 5fcbf44..143b835 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/SpecifyNothingDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/SpecifyNothingDetectorImpl.java
@@ -3,8 +3,6 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors;
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveInteger;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/TooLongSprintDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/TooLongSprintDetectorImpl.java
index 3781682..ead40be 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/TooLongSprintDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/TooLongSprintDetectorImpl.java
@@ -3,8 +3,6 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors;
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveInteger;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/UnknownPosterDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/UnknownPosterDetectorImpl.java
index 01b92bd..837ea23 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/UnknownPosterDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/UnknownPosterDetectorImpl.java
@@ -5,13 +5,10 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResultItem;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.ResultDetail;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.*;
 
 public class UnknownPosterDetectorImpl implements AntiPatternDetector {
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/VaryingSprintLengthDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/VaryingSprintLengthDetectorImpl.java
index 5e5bc85..94d6cc6 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/VaryingSprintLengthDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/VaryingSprintLengthDetectorImpl.java
@@ -3,8 +3,6 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors;
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.DatabaseConnection;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.PositiveInteger;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternServiceImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/YetAnotherProgrammerDetectorImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/YetAnotherProgrammerDetectorImpl.java
index 9e4a968..326475e 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/YetAnotherProgrammerDetectorImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/YetAnotherProgrammerDetectorImpl.java
@@ -5,11 +5,9 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResultItem;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.ResultDetail;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.types.Percentage;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.Utils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.thymeleaf.spring5.processor.SpringTextareaFieldTagProcessor;
 
 import java.time.LocalDate;
 import java.time.LocalDateTime;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/exception/CustomErrorController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/exception/CustomErrorController.java
index 6a9ea63..8446077 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/exception/CustomErrorController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/exception/CustomErrorController.java
@@ -1,8 +1,12 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.exception;
 
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Query;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.ClassToDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters.ProjectToDto;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,7 +53,8 @@ public class CustomErrorController implements ErrorController {
             }
         }
 
-        model.addAttribute("query", new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
+        ClassToDto<Project, ProjectDto> classToDto = new ProjectToDto();
+        model.addAttribute("query", new Query(classToDto.convert(projectService.getAllProjects()), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns())));
         model.addAttribute("antiPatterns", antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
 
         if (exception != null) {
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Project.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Project.java
index 15610ff..af024ee 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Project.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Project.java
@@ -1,9 +1,12 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.model;
 
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.*;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
 
 /**
  * Model class for project. This is Entity class that is loaded from db.
@@ -13,13 +16,87 @@ public class Project {
 
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
     private Long id;
+
+    @Column(name="name")
     private String name;
+
+    @Column(name="description")
     private String description;
 
+    @ManyToOne
+    @JoinColumn(name = "superprojectid")
+    private Project superProject;
+
+    @OneToMany(mappedBy = "project", orphanRemoval = true)
+    private List<Person> people = new ArrayList<>();
+
+    @OneToMany(mappedBy = "projectId", orphanRemoval = true)
+    private List<ProjectInstance> projectInstances = new ArrayList<>();
+
+    @OneToMany(mappedBy = "superProjectId", orphanRemoval = true)
+    private List<Iteration> iterations = new ArrayList<>();
+
+    @OneToMany(mappedBy = "superProjectId", orphanRemoval = true)
+    private List<Phase> phases = new ArrayList<>();
+
+    @OneToMany(mappedBy = "superProjectId", orphanRemoval = true)
+    private List<Activity> activities = new ArrayList<>();
+
+    @OneToMany(mappedBy = "project", orphanRemoval = true)
+    private Set<Configuration> configurations = new LinkedHashSet<>();
+
+    @OneToMany(mappedBy = "project", orphanRemoval = true)
+    private List<WorkUnit> workUnits = new ArrayList<>();
+
+    public Set<Configuration> getConfigurations() {
+        return configurations;
+    }
+
+    public void setConfigurations(Set<Configuration> configurations) {
+        this.configurations = configurations;
+    }
+
+    public Project getSuperProject() {
+        return superProject;
+    }
+
+    public void setSuperProject(Project superProject) {
+        this.superProject = superProject;
+    }
+
+    public List<Activity> getActivities() {
+        return activities;
+    }
+
+    public void setActivities(List<Activity> activities) {
+        this.activities = activities;
+    }
+
+    public List<Phase> getPhases() {
+        return phases;
+    }
+
+    public void setPhases(List<Phase> phases) {
+        this.phases = phases;
+    }
+
+    public List<Iteration> getIterations() {
+        return iterations;
+    }
+
+    public void setIterations(List<Iteration> iterations) {
+        this.iterations = iterations;
+    }
+
     public Project() {
     }
 
+    public Project(String name) {
+        this.name = name;
+    }
+
     public Project(String name, String description) {
         this.name = name;
         this.description = description;
@@ -49,6 +126,30 @@ public class Project {
         this.description = description;
     }
 
+    public List<Person> getPeople() {
+        return people;
+    }
+
+    public void setPeople(List<Person> people) {
+        this.people = people;
+    }
+
+    public List<ProjectInstance> getProjectInstances() {
+        return projectInstances;
+    }
+
+    public void setProjectInstances(List<ProjectInstance> projectInstances) {
+        this.projectInstances = projectInstances;
+    }
+
+    public List<WorkUnit> getWorkUnits() {
+        return workUnits;
+    }
+
+    public void setWorkUnits(List<WorkUnit> workUnits) {
+        this.workUnits = workUnits;
+    }
+
     @Override
     public String toString() {
         return "Project{" +
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Query.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Query.java
index 180b3bd..c9f8cb3 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Query.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/Query.java
@@ -1,24 +1,26 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.model;
 
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+
 import java.util.List;
 
 /**
  * Model class for query.
  */
 public class Query {
-    private List<Project> projects;
+    private List<ProjectDto> projects;
     private List<AntiPattern> antiPatterns;
 
-    public Query(List<Project> projects, List<AntiPattern> antiPatterns) {
+    public Query(List<ProjectDto> projects, List<AntiPattern> antiPatterns) {
         this.projects = projects;
         this.antiPatterns = antiPatterns;
     }
 
-    public List<Project> getProjects() {
+    public List<ProjectDto> getProjects() {
         return projects;
     }
 
-    public void setProjects(List<Project> projects) {
+    public void setProjects(List<ProjectDto> projects) {
         this.projects = projects;
     }
 
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/QueryResult.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/QueryResult.java
index 3c1d236..f5dcf8c 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/QueryResult.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/QueryResult.java
@@ -1,5 +1,7 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.model;
 
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+
 import java.util.List;
 
 /**
@@ -9,14 +11,14 @@ import java.util.List;
  * queryResultItems: all analyzed anti-patterns with results and results details
  */
 public class QueryResult {
-    private Project project;
+    private ProjectDto project;
     private List<QueryResultItem> queryResultItems;
 
-    public Project getProject() {
+    public ProjectDto getProject() {
         return project;
     }
 
-    public void setProject(Project project) {
+    public void setProject(ProjectDto project) {
         this.project = project;
     }
 
@@ -31,7 +33,7 @@ public class QueryResult {
     public QueryResult() {
     }
 
-    public QueryResult(Project project, List<QueryResultItem> queryResultItems) {
+    public QueryResult(ProjectDto project, List<QueryResultItem> queryResultItems) {
         this.project = project;
         this.queryResultItems = queryResultItems;
     }
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Activity.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Activity.java
new file mode 100644
index 0000000..84f94dc
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Activity.java
@@ -0,0 +1,161 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for category. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Activity implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name="startdate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp startDate;
+
+    @Column(name="enddate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp endDate;
+
+    @ManyToOne
+    @JoinColumn(name = "superprojectid")
+    private Project superProjectId;
+
+    @OneToMany(mappedBy = "activity", orphanRemoval = true)
+    private List<WorkUnit> workUnits = new ArrayList<>();
+
+    /**
+     * Default constructor for Activity
+     */
+    public Activity() {}
+
+    /**
+     * Constructor for new Activity
+     * @param externalId    External id from ALM tool
+     * @param name          Name of the activity
+     * @param description   Description of the activity
+     */
+    public Activity(String externalId, String name, String description) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+    }
+
+    /**
+     * Constructor for new activity with project relation
+     * @param externalId        External id from ALM tool
+     * @param name              Name of the activity
+     * @param description       Description of the activity
+     * @param superProjectId    Project belonging to activity
+     */
+    public Activity(String externalId, String name, String description, Project superProjectId) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+        this.superProjectId = superProjectId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public Project getSuperProjectId() {
+        return superProjectId;
+    }
+
+    public void setSuperProjectId(Project superProjectId) {
+        this.superProjectId = superProjectId;
+    }
+
+    public List<WorkUnit> getWorkUnits() {
+        return workUnits;
+    }
+
+    public void setWorkUnits(List<WorkUnit> workUnits) {
+        this.workUnits = workUnits;
+    }
+
+    public Timestamp getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Timestamp startDate) {
+        this.startDate = startDate;
+    }
+
+    public Timestamp getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Timestamp endDate) {
+        this.endDate = endDate;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "activity";
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("description") == 0) {
+            return getDescription();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else {
+            return "";
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Branch.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Branch.java
new file mode 100644
index 0000000..347feaa
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Branch.java
@@ -0,0 +1,72 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import javax.persistence.*;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * Model class for branches. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Branch {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="ismain")
+    private boolean isMain;
+
+    @ManyToMany
+    @JoinTable(name = "configuration_branch",
+            joinColumns = @JoinColumn(name = "branchid"),
+            inverseJoinColumns = @JoinColumn(name = "configurationid"))
+    private Set<Commit> commits = new LinkedHashSet<>();
+
+    public Set<Commit> getCommits() {
+        return commits;
+    }
+
+    public void setCommits(Set<Commit> commits) {
+        this.commits = commits;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public boolean isMain() {
+        return isMain;
+    }
+
+    public void setMain(boolean main) {
+        isMain = main;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Category.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Category.java
new file mode 100644
index 0000000..d7d957e
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Category.java
@@ -0,0 +1,112 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+
+import javax.persistence.*;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * Model class for category. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Category implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    @ManyToMany(mappedBy = "categories")
+    private Set<WorkUnit> workUnits = new LinkedHashSet<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+
+    public Set<WorkUnit> getWorkUnits() {
+        return workUnits;
+    }
+
+    public void setWorkUnits(Set<WorkUnit> workUnits) {
+        this.workUnits = workUnits;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "category";
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("description") == 0) {
+            return getDescription();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else {
+            return "";
+        }
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if(!(o instanceof Category)) {
+            return false;
+        }
+        Category category = (Category) o;
+        return category.getId().equals(getId());
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Commit.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Commit.java
new file mode 100644
index 0000000..650e1ad
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Commit.java
@@ -0,0 +1,121 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import javax.persistence.*;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * Model class for commit. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Commit {
+
+    @OneToOne
+    @JoinColumn(name = "id")
+    @MapsId
+    private CommittedConfiguration committedConfiguration;
+
+    @OneToOne
+    @JoinColumn(name = "id")
+    @MapsId
+    private Configuration configuration;
+
+    @OneToOne
+    @JoinColumn(name = "id")
+    @MapsId
+    private WorkItem workItem;
+
+    @Id
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name = "isrelease", nullable = false)
+    private boolean isRelease;
+
+    @Column(name = "identifier", nullable = true)
+    private String identifier;
+
+    @ManyToMany
+    @JoinTable(name = "configuration_branch",
+            joinColumns = @JoinColumn(name = "configurationid"),
+            inverseJoinColumns = @JoinColumn(name = "branchid"))
+    private Set<Branch> branches = new LinkedHashSet<>();
+
+    @OneToMany(mappedBy = "configuration", orphanRemoval = true)
+    private Set<Tag> tags = new LinkedHashSet<>();
+
+    @OneToMany(mappedBy = "commit", orphanRemoval = true)
+    private Set<ConfigurationPersonRelation> personRelation = new LinkedHashSet<>();
+
+    public Set<ConfigurationPersonRelation> getPersonRelation() {
+        return personRelation;
+    }
+
+    public void setPersonRelation(Set<ConfigurationPersonRelation> personRelation) {
+        this.personRelation = personRelation;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public boolean isRelease() {
+        return isRelease;
+    }
+
+    public void setRelease(boolean release) {
+        isRelease = release;
+    }
+
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+
+    public Set<Branch> getBranches() {
+        return branches;
+    }
+
+    public void setBranches(Set<Branch> branches) {
+        this.branches = branches;
+    }
+
+    public Set<Tag> getTags() {
+        return tags;
+    }
+
+    public void setTags(Set<Tag> tags) {
+        this.tags = tags;
+    }
+
+    public CommittedConfiguration getCommittedConfiguration() {
+        return committedConfiguration;
+    }
+
+    public void setCommittedConfiguration(CommittedConfiguration committedConfiguration) {
+        this.committedConfiguration = committedConfiguration;
+    }
+
+    public Configuration getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    public WorkItem getWorkItem() {
+        return workItem;
+    }
+
+    public void setWorkItem(WorkItem workItem) {
+        this.workItem = workItem;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/CommittedConfiguration.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/CommittedConfiguration.java
new file mode 100644
index 0000000..c43f467
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/CommittedConfiguration.java
@@ -0,0 +1,61 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+
+/**
+ * Model class for configurations. This is Entity class that is loaded from db.
+ */
+@Entity
+public class CommittedConfiguration {
+
+    @OneToOne
+    @JoinColumn(name = "id")
+    @MapsId
+    private Configuration configuration;
+
+    @Id
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name = "committed")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp committed;
+
+    @OneToOne(mappedBy = "committedConfiguration")
+    private Commit commit;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Timestamp getCommitted() {
+        return committed;
+    }
+
+    public void setCommitted(Timestamp committed) {
+        this.committed = committed;
+    }
+
+    public Commit getCommit() {
+        return commit;
+    }
+
+    public void setCommit(Commit commit) {
+        this.commit = commit;
+    }
+
+    public Configuration getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(Configuration configuration) {
+        this.configuration = configuration;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Configuration.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Configuration.java
new file mode 100644
index 0000000..b8fae47
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Configuration.java
@@ -0,0 +1,59 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+
+import javax.persistence.*;
+
+/**
+ * Model class for configurations. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Configuration {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @ManyToOne
+    @JoinColumn(name = "projectid")
+    private Project project;
+
+    @OneToOne(mappedBy = "configuration")
+    private CommittedConfiguration committedConfiguration;
+
+    @OneToOne(mappedBy = "configuration")
+    private Commit commit;
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public CommittedConfiguration getCommittedConfiguration() {
+        return committedConfiguration;
+    }
+
+    public void setCommittedConfiguration(CommittedConfiguration committedConfiguration) {
+        this.committedConfiguration = committedConfiguration;
+    }
+
+    public Commit getCommit() {
+        return commit;
+    }
+
+    public void setCommit(Commit commit) {
+        this.commit = commit;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ConfigurationPersonRelation.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ConfigurationPersonRelation.java
new file mode 100644
index 0000000..c5a200d
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ConfigurationPersonRelation.java
@@ -0,0 +1,57 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import javax.persistence.*;
+
+/**
+ * Model class for configuration person relation. This is Entity class that is loaded from db.
+ */
+@Entity
+public class ConfigurationPersonRelation {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "personid")
+    private Person person;
+
+    @ManyToOne
+    @JoinColumn(name = "configurationid")
+    private Commit commit;
+
+    public Commit getCommit() {
+        return commit;
+    }
+
+    public void setCommit(Commit commit) {
+        this.commit = commit;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Person getPerson() {
+        return person;
+    }
+
+    public void setPerson(Person person) {
+        this.person = person;
+    }
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/FormObject.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/FormObject.java
new file mode 100644
index 0000000..0367df8
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/FormObject.java
@@ -0,0 +1,16 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import java.util.List;
+
+public class FormObject {
+
+    List<Long> selected;
+
+    public List<Long> getSelected() {
+        return selected;
+    }
+
+    public void setSelected(List<Long> selected) {
+        this.selected = selected;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Identity.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Identity.java
new file mode 100644
index 0000000..68f52a3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Identity.java
@@ -0,0 +1,105 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+
+import javax.persistence.*;
+
+/**
+ * Model class for identities. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Identity implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name="email")
+    private String email;
+
+    @ManyToOne
+    @JoinColumn(name = "personid")
+    private Person person;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public Person getPerson() {
+        return person;
+    }
+
+    public void setPerson(Person person) {
+        this.person = person;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "identity";
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("description") == 0) {
+            return getDescription();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else if (attr.compareTo("email") == 0) {
+            return getEmail();
+        } else if (attr.compareTo("personId") == 0) {
+            return getPerson().toString();
+        } else {
+            return "";
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Iteration.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Iteration.java
new file mode 100644
index 0000000..0b97fb8
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Iteration.java
@@ -0,0 +1,197 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+
+import javax.persistence.*;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for iteration. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Iteration implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name="enddate")
+    private Date endDate;
+
+    @Column(name="startdate")
+    private Date startDate;
+
+    @Column(name="created")
+    private Timestamp created;
+
+    @ManyToOne
+    @JoinColumn(name = "superprojectid")
+    private Project superProjectId;
+
+    @OneToMany(mappedBy = "iteration", orphanRemoval = true)
+    private List<WorkUnit> workUnits = new ArrayList<>();
+
+    /**
+     * Default constructor for Iteration
+     */
+    public Iteration() {}
+
+    /**
+     * Constructor for Iteration
+     * @param externalId    External ID from ALM tool
+     * @param name          Name of the Iteration
+     * @param description   Description of the Iteration
+     */
+    public Iteration(String externalId, String name, String description) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+    }
+
+    /**
+     * Constructor for Iteration with project relation
+     * @param externalId        External ID from ALM tool
+     * @param name              Name of the Iteration
+     * @param description       Description of the Iteration
+     * @param superProjectId    Project belonging to Iteration
+     */
+    public Iteration(String externalId, String name, String description, Project superProjectId) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+        this.superProjectId = superProjectId;
+    }
+
+    /**
+     * Constructor for Iteration with all attributes
+     * @param externalId        External ID from ALM tool
+     * @param name              Name of the Iteration
+     * @param description       Description of the Iteration
+     * @param endDate           End date of Iteration
+     * @param startDate         Start date of Iteration
+     * @param created           Created date of Iteration
+     * @param superProjectId    Project belonging to Iteration
+     */
+    public Iteration(String externalId, String name, String description, Date endDate,
+                     Date startDate, Timestamp created, Project superProjectId) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+        this.endDate = endDate;
+        this.startDate = startDate;
+        this.created = created;
+        this.superProjectId = superProjectId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Timestamp getCreated() {
+        return created;
+    }
+
+    public void setCreated(Timestamp created) {
+        this.created = created;
+    }
+
+    public Project getSuperProjectId() {
+        return superProjectId;
+    }
+
+    public void setSuperProjectId(Project superProjectId) {
+        this.superProjectId = superProjectId;
+    }
+
+    public List<WorkUnit> getWorkUnits() {
+        return workUnits;
+    }
+
+    public void setWorkUnits(List<WorkUnit> workUnits) {
+        this.workUnits = workUnits;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "iteration";
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("description") == 0) {
+            return getDescription();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else if (attr.compareTo("endDate") == 0) {
+            return getEndDate().toString();
+        } else if (attr.compareTo("startDate") == 0) {
+            return getStartDate().toString();
+        } else if (attr.compareTo("created") == 0) {
+            return getCreated().toString();
+        } else {
+            return "";
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Person.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Person.java
new file mode 100644
index 0000000..af889dd
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Person.java
@@ -0,0 +1,136 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Model class for people. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Person implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @OneToMany(mappedBy = "person", orphanRemoval = true)
+    private List<Identity> identities = new ArrayList<>();
+
+    @ManyToOne
+    @JoinColumn(name = "projectid")
+    private Project project;
+
+    @OneToMany(mappedBy = "author", orphanRemoval = true)
+    private Set<WorkItem> workItems = new LinkedHashSet<>();
+
+    public Set<WorkItem> getWorkItems() {
+        return workItems;
+    }
+
+    public void setWorkItems(Set<WorkItem> workItems) {
+        this.workItems = workItems;
+    }
+
+    /**
+     * Default constructor for Person
+     */
+    public Person() {}
+
+    /**
+     * Constructor for Person
+     * @param name      Name of the Person
+     * @param project   Project belonging to person
+     */
+    public Person(String name, Project project) {
+        this.name = name;
+        this.project = project;
+    }
+
+    /**
+     * Method adding new identity to person
+     * @param identity  Identity of person
+     */
+    public void addIdentity(Identity identity) {
+        this.identities.add(identity);
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Identity> getIdentities() {
+        return identities;
+    }
+
+    public void setIdentities(List<Identity> identities) {
+        this.identities = identities;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "person";
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if(!(o instanceof Person)) {
+            return false;
+        }
+        Person person = (Person) o;
+        return person.getId().equals(getId());
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else {
+            return "";
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Phase.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Phase.java
new file mode 100644
index 0000000..1dba14b
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Phase.java
@@ -0,0 +1,196 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.DatabaseObject;
+
+import javax.persistence.*;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for phases. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Phase implements DatabaseObject {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name="enddate")
+    private Date endDate;
+
+    @Column(name="startdate")
+    private Date startDate;
+
+    @Column(name="created")
+    private Timestamp created;
+
+    @ManyToOne
+    @JoinColumn(name = "superprojectid")
+    private Project superProjectId;
+
+    @OneToMany(mappedBy = "phase", orphanRemoval = true)
+    private List<WorkUnit> workUnits = new ArrayList<>();
+
+    /**
+     * Default constructor for Phase
+     */
+    public Phase() {}
+
+    /**
+     * Constructor for Phase
+     * @param externalId    External ID from ALM tool
+     * @param name          Name of the Phase
+     * @param description   Description of the Phase
+     */
+    public Phase(String externalId, String name, String description) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+    }
+
+    /**
+     * Constructor for Phase with project relation
+     * @param externalId        External ID from ALM tool
+     * @param name              Name of the Phase
+     * @param description       Description of the Phase
+     * @param superProjectId    Project belonging to phase
+     */
+    public Phase(String externalId, String name, String description, Project superProjectId) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+        this.superProjectId = superProjectId;
+    }
+
+    /**
+     * Constructor for Phase with all attributes
+     * @param externalId        External ID from ALM tool
+     * @param name              Name of the Phase
+     * @param description       Description of the Phase
+     * @param endDate           End date of Phase
+     * @param startDate         Start date of Phase
+     * @param created           Created date of Phase
+     * @param superProjectId    Project belonging to phase
+     */
+    public Phase(String externalId, String name, String description, Date endDate, Date startDate, Timestamp created, Project superProjectId) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+        this.endDate = endDate;
+        this.startDate = startDate;
+        this.created = created;
+        this.superProjectId = superProjectId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Timestamp getCreated() {
+        return created;
+    }
+
+    public void setCreated(Timestamp created) {
+        this.created = created;
+    }
+
+    public Project getSuperProjectId() {
+        return superProjectId;
+    }
+
+    public void setSuperProjectId(Project superProjectId) {
+        this.superProjectId = superProjectId;
+    }
+
+    public List<WorkUnit> getWorkUnits() {
+        return workUnits;
+    }
+
+    public void setWorkUnits(List<WorkUnit> workUnits) {
+        this.workUnits = workUnits;
+    }
+
+    @Override
+    public String getObjectName() {
+        return "phase";
+    }
+
+    @Override
+    public String getAttributeValue(String attr) {
+        if(attr.compareTo("id") == 0) {
+            return getId().toString();
+        } else if(attr.compareTo("name") == 0) {
+            return getName();
+        } else if (attr.compareTo("description") == 0) {
+            return getDescription();
+        } else if (attr.compareTo("externalId") == 0) {
+            return getExternalId();
+        } else if (attr.compareTo("endDate") == 0) {
+            return getEndDate().toString();
+        } else if (attr.compareTo("startDate") == 0) {
+            return getStartDate().toString();
+        } else if (attr.compareTo("created") == 0) {
+            return getCreated().toString();
+        } else {
+            return "";
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ProjectInstance.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ProjectInstance.java
new file mode 100644
index 0000000..96fe9cc
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/ProjectInstance.java
@@ -0,0 +1,196 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Model class for project instances. This is Entity class that is loaded from db.
+ */
+@Entity
+public class ProjectInstance {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name="url")
+    private String url;
+
+    @ManyToOne
+    @JoinColumn(name = "projectid")
+    private Project projectId;
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private List<Category> categories = new ArrayList<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Priority> priorities = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Severity> severities = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Status> statuses = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Role> roles = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Resolution> resolutions = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<WuType> wuTypes = new HashSet<>();
+
+    @OneToMany(mappedBy = "projectInstance", orphanRemoval = true)
+    private Set<Relation> relations = new HashSet<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public Project getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(Project projectId) {
+        this.projectId = projectId;
+    }
+
+    public List<Category> getCategories() {
+        return categories;
+    }
+
+    public void setCategories(List<Category> categories) {
+        this.categories = categories;
+    }
+
+    public Set<Priority> getPriorities() {
+        return priorities;
+    }
+
+    public void setPriorities(Set<Priority> priorities) {
+        this.priorities = priorities;
+    }
+
+    public Set<Severity> getSeverities() {
+        return severities;
+    }
+
+    public void setSeverities(Set<Severity> severities) {
+        this.severities = severities;
+    }
+
+    public Set<Status> getStatuses() {
+        return statuses;
+    }
+
+    public void setStatuses(Set<Status> statuses) {
+        this.statuses = statuses;
+    }
+
+    public Set<Role> getRoles() {
+        return roles;
+    }
+
+    public void setRoles(Set<Role> roles) {
+        this.roles = roles;
+    }
+
+    public Set<Resolution> getResolutions() {
+        return resolutions;
+    }
+
+    public void setResolutions(Set<Resolution> resolutions) {
+        this.resolutions = resolutions;
+    }
+
+    public Set<WuType> getWuTypes() {
+        return wuTypes;
+    }
+
+    public void setWuTypes(Set<WuType> wuTypes) {
+        this.wuTypes = wuTypes;
+    }
+
+    public Set<Relation> getRelations() {
+        return relations;
+    }
+
+    public void setRelations(Set<Relation> relations) {
+        this.relations = relations;
+    }
+
+    public Set<? extends EnumType> getEnumsByName(String enumName) {
+
+        if(enumName.contentEquals("Priority")) {
+            return getPriorities();
+        } else if(enumName.contentEquals("Severity")) {
+            return getSeverities();
+        } else if(enumName.contentEquals("Status")) {
+            return getStatuses();
+        } else if(enumName.contentEquals("Role")) {
+            return getRoles();
+        } else if(enumName.contentEquals("Resolution")) {
+            return getResolutions();
+        } else if(enumName.contentEquals("WuType")) {
+            return getWuTypes();
+        } else if(enumName.contentEquals("Relation")) {
+            return getRelations();
+        } else {
+            return null;
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Tag.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Tag.java
new file mode 100644
index 0000000..8c5562a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/Tag.java
@@ -0,0 +1,68 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import javax.persistence.*;
+
+/**
+ * Model class for tags. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Tag {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "configurationid")
+    private Commit configuration;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Commit getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(Commit configuration) {
+        this.configuration = configuration;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkItem.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkItem.java
new file mode 100644
index 0000000..493e28b
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkItem.java
@@ -0,0 +1,94 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+
+/**
+ * Model class for workitems. This is Entity class that is loaded from db.
+ */
+@Entity
+public class WorkItem {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @Column(name = "created")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp created;
+
+    @ManyToOne
+    @JoinColumn(name = "authorid")
+    private Person author;
+
+    @OneToOne(mappedBy = "workItem")
+    private Commit commit;
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Timestamp getCreated() {
+        return created;
+    }
+
+    public void setCreated(Timestamp created) {
+        this.created = created;
+    }
+
+    public Person getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(Person author) {
+        this.author = author;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Commit getCommit() {
+        return commit;
+    }
+
+    public void setCommit(Commit commit) {
+        this.commit = commit;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkUnit.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkUnit.java
new file mode 100644
index 0000000..6e9a3e2
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/WorkUnit.java
@@ -0,0 +1,151 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuType;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * Model class for work units. This is Entity class that is loaded from db.
+ */
+@Entity
+public class WorkUnit {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name = "number")
+    private Integer number;
+
+    @Column(name = "startdate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp startDate;
+
+    @Column(name = "duedate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Timestamp dueDate;
+
+    @ManyToOne
+    @JoinColumn(name = "assigneeid")
+    private Person assignee;
+
+    @ManyToOne
+    @JoinColumn(name = "wutypeid")
+    private WuType type;
+
+    @ManyToOne
+    @JoinColumn(name = "activityid")
+    private Activity activity;
+
+    @ManyToOne
+    @JoinColumn(name = "iterationid")
+    private Iteration iteration;
+
+    @ManyToOne
+    @JoinColumn(name = "phaseid")
+    private Phase phase;
+
+    @ManyToOne
+    @JoinColumn(name = "projectid")
+    private Project project;
+
+    @ManyToMany
+    @JoinTable(name = "WorkUnitCategory",
+            joinColumns = @JoinColumn(name = "workunitid"),
+            inverseJoinColumns = @JoinColumn(name = "categoryid"))
+    private Set<Category> categories = new LinkedHashSet<>();
+
+    public WuType getType() {
+        return type;
+    }
+
+    public void setType(WuType type) {
+        this.type = type;
+    }
+
+    public Person getAssignee() {
+        return assignee;
+    }
+
+    public void setAssignee(Person assignee) {
+        this.assignee = assignee;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Activity getActivity() {
+        return activity;
+    }
+
+    public void setActivity(Activity activity) {
+        this.activity = activity;
+    }
+
+    public Iteration getIteration() {
+        return iteration;
+    }
+
+    public void setIteration(Iteration iteration) {
+        this.iteration = iteration;
+    }
+
+    public Phase getPhase() {
+        return phase;
+    }
+
+    public void setPhase(Phase phase) {
+        this.phase = phase;
+    }
+
+    public Set<Category> getCategories() {
+        return categories;
+    }
+
+    public void setCategories(Set<Category> categories) {
+        this.categories = categories;
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+    }
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    public Timestamp getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Timestamp startDate) {
+        this.startDate = startDate;
+    }
+
+    public Timestamp getDueDate() {
+        return dueDate;
+    }
+
+    public void setDueDate(Timestamp dueDate) {
+        this.dueDate = dueDate;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Priority.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Priority.java
new file mode 100644
index 0000000..e5cffd8
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Priority.java
@@ -0,0 +1,97 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for priority. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Priority implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private PriorityClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Priority() {}
+
+    public Priority(String externalId, String name, String description) {
+        this.externalId = externalId;
+        this.name = name;
+        this.description = description;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public PriorityClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((PriorityClassification) classId);
+    }
+
+    public void setClassId(PriorityClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/PriorityClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/PriorityClassification.java
new file mode 100644
index 0000000..e256e46
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/PriorityClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for priority classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class PriorityClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Priority> priorities = new ArrayList<>();
+
+    public String getName() {
+        return name;
+    }
+
+    public void setClassification(String classification) {
+        this.name = classification;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public List<Priority> getPriorities() {
+        return priorities;
+    }
+
+    public void setPriorities(List<Priority> priorities) {
+        this.priorities = priorities;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Relation.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Relation.java
new file mode 100644
index 0000000..276b5b1
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Relation.java
@@ -0,0 +1,89 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for relations. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Relation implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private RelationClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public RelationClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((RelationClassification) classId);
+    }
+
+    public void setClassId(RelationClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RelationClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RelationClassification.java
new file mode 100644
index 0000000..7c9e420
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RelationClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for relation classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class RelationClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Relation> relations = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public List<Relation> getRelations() {
+        return relations;
+    }
+
+    public void setRelations(List<Relation> relations) {
+        this.relations = relations;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Resolution.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Resolution.java
new file mode 100644
index 0000000..d5340ee
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Resolution.java
@@ -0,0 +1,89 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for resolution. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Resolution implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private ResolutionClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public ResolutionClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((ResolutionClassification) classId);
+    }
+
+    public void setClassId(ResolutionClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/ResolutionClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/ResolutionClassification.java
new file mode 100644
index 0000000..d0e9edf
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/ResolutionClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for resolution classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class ResolutionClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Resolution> resolutions = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public List<Resolution> getResolutions() {
+        return resolutions;
+    }
+
+    public void setResolutions(List<Resolution> resolutions) {
+        this.resolutions = resolutions;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Role.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Role.java
new file mode 100644
index 0000000..811ef59
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Role.java
@@ -0,0 +1,90 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for role. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Role implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private RoleClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public RoleClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((RoleClassification) classId);
+    }
+
+    public void setClassId(RoleClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RoleClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RoleClassification.java
new file mode 100644
index 0000000..ae204c1
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/RoleClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for role classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class RoleClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Role> roles = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public List<Role> getRoles() {
+        return roles;
+    }
+
+    public void setRoles(List<Role> roles) {
+        this.roles = roles;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Severity.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Severity.java
new file mode 100644
index 0000000..0c50c18
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Severity.java
@@ -0,0 +1,89 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for severity. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Severity implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private SeverityClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public SeverityClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((SeverityClassification) classId);
+    }
+
+    public void setClassId(SeverityClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/SeverityClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/SeverityClassification.java
new file mode 100644
index 0000000..31e5f03
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/SeverityClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for severity classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class SeverityClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Severity> severities = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public List<Severity> getSeverities() {
+        return severities;
+    }
+
+    public void setSeverities(List<Severity> severities) {
+        this.severities = severities;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Status.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Status.java
new file mode 100644
index 0000000..2e375cc
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/Status.java
@@ -0,0 +1,89 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for statuses. This is Entity class that is loaded from db.
+ */
+@Entity
+public class Status implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private StatusClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public StatusClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((StatusClassification) classId);
+    }
+
+    public void setClassId(StatusClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/StatusClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/StatusClassification.java
new file mode 100644
index 0000000..6827fb7
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/StatusClassification.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for status classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class StatusClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @Column(name="superclass")
+    private String superClass;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<Status> statuses = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSuperClass() {
+        return superClass;
+    }
+
+    public void setSuperClass(String superClass) {
+        this.superClass = superClass;
+    }
+
+    public List<Status> getStatuses() {
+        return statuses;
+    }
+
+    public void setStatuses(List<Status> statuses) {
+        this.statuses = statuses;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuType.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuType.java
new file mode 100644
index 0000000..a27a68f
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuType.java
@@ -0,0 +1,98 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+import javax.persistence.*;
+
+/**
+ * Model class for work unit types. This is Entity class that is loaded from db.
+ */
+@Entity
+public class WuType implements EnumType {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="externalid")
+    private String externalId;
+
+    @Column(name="name")
+    private String name;
+
+    @Column(name="description")
+    private String description;
+
+    @ManyToOne
+    @JoinColumn(name = "classid")
+    private WuTypeClassification classId;
+
+    @ManyToOne
+    @JoinColumn(name = "projectinstanceid")
+    private ProjectInstance projectInstance;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getExternalId() {
+        return externalId;
+    }
+
+    public void setExternalId(String externalId) {
+        this.externalId = externalId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public WuTypeClassification getClassId() {
+        return classId;
+    }
+
+    @Override
+    public void setClassId(Classification classId) {
+        setClassId((WuTypeClassification) classId);
+    }
+
+    public void setClassId(WuTypeClassification classId) {
+        this.classId = classId;
+    }
+
+    public ProjectInstance getProjectInstance() {
+        return projectInstance;
+    }
+
+    public void setProjectInstance(ProjectInstance projectInstance) {
+        this.projectInstance = projectInstance;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if(!(o instanceof WuType)) {
+            return false;
+        }
+        WuType wuType = (WuType) o;
+        return wuType.getId().equals(getId());
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuTypeClassification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuTypeClassification.java
new file mode 100644
index 0000000..f29c5cd
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/enums/WuTypeClassification.java
@@ -0,0 +1,54 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model class for work unit types classes. This is Entity class that is loaded from db.
+ */
+@Entity
+public class WuTypeClassification implements Classification {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    @Column(name = "id", nullable = false)
+    private Long id;
+
+    @Column(name="class")
+    private String name;
+
+    @OneToMany(mappedBy = "classId", orphanRemoval = true)
+    private List<WuType> wuTypes = new ArrayList<>();
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getSuperClass() {
+        return null;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<WuType> getWuTypes() {
+        return wuTypes;
+    }
+
+    public void setWuTypes(List<WuType> wuTypes) {
+        this.wuTypes = wuTypes;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/Classification.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/Classification.java
new file mode 100644
index 0000000..3b2fa1a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/Classification.java
@@ -0,0 +1,22 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces;
+
+public interface Classification {
+
+    /**
+     * Method getting ID of class
+     * @return  Classification ID
+     */
+    Long getId();
+
+    /**
+     * Method getting name of class
+     * @return  Classification name
+     */
+    String getName();
+
+    /**
+     * Method getting super class name
+     * @return  Superclass name
+     */
+    String getSuperClass();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/DatabaseObject.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/DatabaseObject.java
new file mode 100644
index 0000000..5472e87
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/DatabaseObject.java
@@ -0,0 +1,8 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces;
+
+public interface DatabaseObject {
+
+    String getObjectName();
+
+    String getAttributeValue(String attr);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/EnumType.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/EnumType.java
new file mode 100644
index 0000000..18a5160
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/interfaces/EnumType.java
@@ -0,0 +1,28 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces;
+
+public interface EnumType {
+
+    /**
+     * Method getting ID of enum
+     * @return  ID of EnumType instance
+     */
+    Long getId();
+
+    /**
+     * Method getting name of enum
+     * @return  Name of EnumType instance
+     */
+    String getName();
+
+    /**
+     * Method getting class of enum
+     * @return  Classification of EnumType instance
+     */
+    Classification getClassId();
+
+    /**
+     * Method setting class of enum
+     * @param classId   New classification of EnumType instance
+     */
+    void setClassId(Classification classId);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/types/Node.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/types/Node.java
new file mode 100644
index 0000000..1401a96
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/model/management/types/Node.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.model.management.types;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+
+import java.util.ArrayList;
+
+public class Node {
+    public Project project;
+    public ArrayList<Node> children;
+}
\ No newline at end of file
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
index 354d92a..72e03f7 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/AntiPatternRepository.java
@@ -3,7 +3,6 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.repository;
 import com.fasterxml.jackson.databind.JsonNode;
 import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.detectors.AntiPatternDetector;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Threshold;
 import cz.zcu.fav.kiv.antipatterndetectionapp.utils.JsonParser;
 import org.reflections.Reflections;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/ProjectRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/ProjectRepository.java
index dd67def..6c7d457 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/ProjectRepository.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/ProjectRepository.java
@@ -2,9 +2,18 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.repository;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.List;
 
 /**
  * Simple class that is implements JPA for easy loading project from DB.
  */
 public interface ProjectRepository extends JpaRepository<Project, Long> {
+
+    @Query(value = "SELECT * FROM project WHERE superProjectId IS NULL", nativeQuery = true)
+    List<Project> getParentProjects();
+
+    @Query(value = "SELECT * FROM project WHERE superProjectId = :superProjectId", nativeQuery = true)
+    List<Project> getSubordinateProjectsTo(Long superProjectId);
 }
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ActivityRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ActivityRepository.java
new file mode 100644
index 0000000..c1e8898
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ActivityRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Activity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface ActivityRepository extends JpaRepository<Activity, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/BranchRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/BranchRepository.java
new file mode 100644
index 0000000..9f5e5ab
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/BranchRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Branch;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface BranchRepository extends JpaRepository<Branch, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CategoryRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CategoryRepository.java
new file mode 100644
index 0000000..6103926
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CategoryRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Category;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface CategoryRepository extends JpaRepository<Category, Long> {
+}
\ No newline at end of file
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommitRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommitRepository.java
new file mode 100644
index 0000000..3d12535
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommitRepository.java
@@ -0,0 +1,20 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Commit;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.List;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface CommitRepository extends JpaRepository<Commit, Long> {
+
+//    @Query(value = "SELECT * FROM commit INNER JOIN configuration ON commit.id = configuration.id WHERE configuration.projectId = ?1", nativeQuery = true)
+    @Query(value = "SELECT * FROM commit INNER JOIN configuration ON commit.id = configuration.id WHERE configuration.projectId = ?1 AND commit.isRelease = 1", nativeQuery = true)
+    List<Commit> getReleasedCommitsByProject(Long projectId);
+
+    @Query(value = "SELECT * FROM commit INNER JOIN configuration ON commit.id = configuration.id WHERE configuration.projectId = ?1 AND commit.identifier = ?2", nativeQuery = true)
+    Commit getCommitByIdentifier(Long projectId, String identifier);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommittedConfigurationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommittedConfigurationRepository.java
new file mode 100644
index 0000000..0f6c671
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/CommittedConfigurationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.CommittedConfiguration;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface CommittedConfigurationRepository extends JpaRepository<CommittedConfiguration, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ConfigurationPersonRelationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ConfigurationPersonRelationRepository.java
new file mode 100644
index 0000000..e2649f2
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ConfigurationPersonRelationRepository.java
@@ -0,0 +1,11 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ConfigurationPersonRelation;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+public interface ConfigurationPersonRelationRepository extends JpaRepository<ConfigurationPersonRelation, Long> {
+
+    @Query(value = "SELECT * FROM configuration_person_relation INNER JOIN person ON configuration_person_relation.personId = person.id WHERE configuration_person_relation.configurationId = 1 AND configuration_person_relation.name = 'Committed-by'", nativeQuery = true)
+    ConfigurationPersonRelation getCommittedRelation(Long projectId);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/EntityConfigurationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/EntityConfigurationRepository.java
new file mode 100644
index 0000000..e1d9d70
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/EntityConfigurationRepository.java
@@ -0,0 +1,11 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Configuration;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface EntityConfigurationRepository extends JpaRepository<Configuration, Long> {
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IdentityRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IdentityRepository.java
new file mode 100644
index 0000000..56edfc4
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IdentityRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Identity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface IdentityRepository extends JpaRepository<Identity, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IterationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IterationRepository.java
new file mode 100644
index 0000000..11436da
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/IterationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Iteration;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface IterationRepository extends JpaRepository<Iteration, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PersonRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PersonRepository.java
new file mode 100644
index 0000000..0875894
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PersonRepository.java
@@ -0,0 +1,48 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Person;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface PersonRepository extends JpaRepository<Person, Long> {
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE work_unit SET assigneeId = :newPersonId WHERE assigneeId = :personId", nativeQuery = true)
+    void updatePersonUnits(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE work_item SET authorId = :newPersonId WHERE authorId = :personId", nativeQuery = true)
+    void updatePersonItems(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE configuration_person_relation SET personId = :newPersonId WHERE personId = :personId", nativeQuery = true)
+    void updatePersonConfigurationRelation(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE person_role SET personId = :newPersonId WHERE personId = :personId", nativeQuery = true)
+    void updatePersonRole(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE identity SET personId = :newPersonId WHERE personId = :personId", nativeQuery = true)
+    void updatePersonIdentities(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE person_competency SET personId = :newPersonId WHERE personId = :personId", nativeQuery = true)
+    void updatePersonCompetencies(Long personId, Long newPersonId);
+
+    @Modifying
+    @Transactional
+    @Query(value = "UPDATE group_member SET memberId = :newPersonId WHERE memberId = :personId", nativeQuery = true)
+    void updatePersonGroups(Long personId, Long newPersonId);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PhaseRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PhaseRepository.java
new file mode 100644
index 0000000..3c38409
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/PhaseRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Phase;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface PhaseRepository extends JpaRepository<Phase, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ProjectInstanceRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ProjectInstanceRepository.java
new file mode 100644
index 0000000..555f3d7
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/ProjectInstanceRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface ProjectInstanceRepository extends JpaRepository<ProjectInstance, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/TagRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/TagRepository.java
new file mode 100644
index 0000000..9b26ac3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/TagRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Tag;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface TagRepository extends JpaRepository<Tag, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkItemRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkItemRepository.java
new file mode 100644
index 0000000..bf57fc0
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkItemRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkItem;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface WorkItemRepository extends JpaRepository<WorkItem, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkUnitRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkUnitRepository.java
new file mode 100644
index 0000000..6b8c0a6
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/WorkUnitRepository.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkUnit;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface WorkUnitRepository extends JpaRepository<WorkUnit, Long> {
+
+    @Query(value = "SELECT * FROM work_unit " +
+            "JOIN work_unit_category ON work_unit.id = work_unit_category.workUnitId " +
+            "JOIN category ON category.id = work_unit_category.categoryId " +
+            "WHERE category.id IN :categories " +
+            "AND work_unit.wuTypeId IN :types " +
+            "AND work_unit.projectId = :projectId " +
+            "GROUP BY work_unit.id " +
+            "HAVING COUNT(DISTINCT category.id) = :size", nativeQuery = true)
+    List<WorkUnit> getFiltredWorkUnits(Long projectId, Collection<Long> categories, Collection<Long> types, Integer size);
+
+    @Query(value = "SELECT DISTINCT * FROM work_unit " +
+            "JOIN work_unit_category ON work_unit.id = work_unit_category.workUnitId " +
+            "JOIN category ON category.id = work_unit_category.categoryId " +
+            "WHERE category.id IN :categories " +
+            "AND work_unit.projectId = :projectId " +
+            "GROUP BY work_unit.id " +
+            "HAVING COUNT(DISTINCT category.id) = :size", nativeQuery = true)
+    List<WorkUnit> getCategoryFiltredWorkUnits(Long projectId, Collection<Long> categories, Integer size);
+
+    @Query(value = "SELECT DISTINCT * FROM work_unit " +
+            "WHERE work_unit.wuTypeId IN :types " +
+            "AND work_unit.projectId = :projectId", nativeQuery = true)
+    List<WorkUnit> getTypeFiltredWorkUnits(Long projectId, Collection<Long> types);
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityClassificationRepository.java
new file mode 100644
index 0000000..3f9c796
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.PriorityClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface PriorityClassificationRepository extends JpaRepository<PriorityClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityRepository.java
new file mode 100644
index 0000000..afae7bf
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/PriorityRepository.java
@@ -0,0 +1,11 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Priority;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface PriorityRepository extends JpaRepository<Priority, Long> {
+}
+
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationClassificationRepository.java
new file mode 100644
index 0000000..022fbc0
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RelationClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface RelationClassificationRepository extends JpaRepository<RelationClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationRepository.java
new file mode 100644
index 0000000..72b7983
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RelationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Relation;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface RelationRepository extends JpaRepository<Relation, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionClassificationRepository.java
new file mode 100644
index 0000000..d42189c
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.ResolutionClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface ResolutionClassificationRepository extends JpaRepository<ResolutionClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionRepository.java
new file mode 100644
index 0000000..99d701a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/ResolutionRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Resolution;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface ResolutionRepository extends JpaRepository<Resolution, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleClassificationRepository.java
new file mode 100644
index 0000000..23c604d
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RoleClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface RoleClassificationRepository extends JpaRepository<RoleClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleRepository.java
new file mode 100644
index 0000000..558d04a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/RoleRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Role;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface RoleRepository extends JpaRepository<Role, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityClassificationRepository.java
new file mode 100644
index 0000000..cc909a8
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.SeverityClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface SeverityClassificationRepository extends JpaRepository<SeverityClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityRepository.java
new file mode 100644
index 0000000..0af5102
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/SeverityRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Severity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface SeverityRepository extends JpaRepository<Severity, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusClassificationRepository.java
new file mode 100644
index 0000000..975723a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.StatusClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface StatusClassificationRepository extends JpaRepository<StatusClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusRepository.java
new file mode 100644
index 0000000..5ae401c
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/StatusRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Status;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface StatusRepository extends JpaRepository<Status, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeClassificationRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeClassificationRepository.java
new file mode 100644
index 0000000..bc3b1e6
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeClassificationRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuTypeClassification;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface WuTypeClassificationRepository extends JpaRepository<WuTypeClassification, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeRepository.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeRepository.java
new file mode 100644
index 0000000..ce0bcee
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/repository/managment/enums/WuTypeRepository.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuType;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * Simple class that is implements JPA for easy loading project from DB.
+ */
+public interface WuTypeRepository extends JpaRepository<WuType, Long> {
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectService.java
index 75291a9..8c94cab 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectService.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectService.java
@@ -6,9 +6,44 @@ import java.util.List;
 
 public interface ProjectService {
 
+    /**
+     * Method obtaining all projects sorted by name
+     * @return  List of all existing projects
+     */
     List<Project> getAllProjects();
 
+    /**
+     * Method obtaining project based on id
+     * @param id    Identifier of project
+     * @return      Project for given id or null
+     */
     Project getProjectById(Long id);
 
+    /**
+     * Method obtaining projects for given ids
+     * @param ids   Array of project's identifiers
+     * @return      List of projects
+     */
     List<Project> getAllProjectsForGivenIds(Long[] ids);
+
+    /**
+     * Method saving project into database
+     * @param project   Project for saving
+     * @return          Saved project
+     */
+    Project saveProject(Project project);
+
+    /**
+     * Method obtaining all projects without superproject
+     * @return  List of parent projects
+     */
+    List<Project> getParentProjects();
+
+    /**
+     * Method obtaining all subordinate projects
+     * to project defined by identifier
+     * @param id    Identifier of project
+     * @return      List of subordinate projects
+     */
+    List<Project> getSubordinateProjectsTo(Long id);
 }
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectServiceImpl.java
index 044739f..d691c36 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectServiceImpl.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/ProjectServiceImpl.java
@@ -41,4 +41,21 @@ public class ProjectServiceImpl implements ProjectService {
         }
         return projects;
     }
+
+    @Override
+    public Project saveProject(Project project) {
+        Project newProject = projectRepository.save(project);
+        projectRepository.flush();
+        return newProject;
+    }
+
+    @Override
+    public List<Project> getParentProjects() {
+        return projectRepository.getParentProjects();
+    }
+
+    @Override
+    public List<Project> getSubordinateProjectsTo(Long id) {
+        return projectRepository.getSubordinateProjectsTo(id);
+    }
 }
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityService.java
new file mode 100644
index 0000000..67cd8f5
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityService.java
@@ -0,0 +1,28 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Activity;
+
+import java.util.List;
+
+public interface ActivityService {
+
+    /**
+     * Method getting all activities from database
+     * @return  List of all activities
+     */
+    List<Activity> getAllActivities();
+
+    /**
+     * Method saving activity into database
+     * @param activity  Activity tha will be safe
+     * @return          Activity saved in database
+     */
+    Activity saveActivity(Activity activity);
+
+    /**
+     * Method getting activity by id
+     * @param id    ID of activity
+     * @return      Activity with that ID
+     */
+    Activity getActivityById(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityServiceImpl.java
new file mode 100644
index 0000000..a94c66b
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ActivityServiceImpl.java
@@ -0,0 +1,44 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Activity;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.ActivityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class ActivityServiceImpl implements ActivityService {
+
+    @Autowired
+    private ActivityRepository activityRepository;
+
+    @Override
+    public List<Activity> getAllActivities() {
+        List<Activity> activities = activityRepository.findAll();
+        Collections.sort(activities, Comparator.comparing(Activity::getName, String.CASE_INSENSITIVE_ORDER));
+        return activities;
+    }
+
+    @Override
+    public Activity saveActivity(Activity activity) {
+        Activity newActivity = activityRepository.save(activity);
+        activityRepository.flush();
+        return newActivity;
+    }
+
+    @Override
+    public Activity getActivityById(Long id) {
+        Optional<Activity> result = activityRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchService.java
new file mode 100644
index 0000000..e0b5d39
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchService.java
@@ -0,0 +1,21 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Branch;
+
+import java.util.List;
+
+public interface BranchService {
+
+    /**
+     * Method for getting all branches from database
+     * @return  List of all branches in databse
+     */
+    List<Branch> getAllBranches();
+
+    /**
+     * Method getting branch by id
+     * @param id    ID of branch
+     * @return      Branch with that ID
+     */
+    Branch getBranchById(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchServiceImpl.java
new file mode 100644
index 0000000..90e5769
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/BranchServiceImpl.java
@@ -0,0 +1,37 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Branch;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.BranchRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class BranchServiceImpl implements BranchService {
+
+    @Autowired
+    private BranchRepository branchRepository;
+
+    @Override
+    public List<Branch> getAllBranches() {
+        List<Branch> branches = branchRepository.findAll();
+        Collections.sort(branches, Comparator.comparing(Branch::getName, String.CASE_INSENSITIVE_ORDER));
+        return branches;
+    }
+
+    @Override
+    public Branch getBranchById(Long id) {
+        Optional<Branch> result = branchRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryService.java
new file mode 100644
index 0000000..7745bcb
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryService.java
@@ -0,0 +1,27 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Category;
+
+import java.util.List;
+
+public interface CategoryService {
+
+    /**
+     * Method getting all categories from database
+     * @return  List of all categories in database
+     */
+    List<Category> getAllCategories();
+
+    /**
+     * Method getting category by ID
+     * @param id    ID of category
+     * @return      Category with that ID
+     */
+    Category getCategoryById(Long id);
+
+    /**
+     * Method for deleting categories from database
+     * @param categories    List of categories for deletion
+     */
+    void deleteCategories(List<Category> categories);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryServiceImpl.java
new file mode 100644
index 0000000..7cadf70
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CategoryServiceImpl.java
@@ -0,0 +1,42 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Category;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.CategoryRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class CategoryServiceImpl implements CategoryService {
+
+    @Autowired
+    private CategoryRepository categoryRepository;
+
+    @Override
+    public List<Category> getAllCategories() {
+        List<Category> categories = categoryRepository.findAll();
+        Collections.sort(categories, Comparator.comparing(Category::getName, String.CASE_INSENSITIVE_ORDER));
+        return categories;
+    }
+
+    @Override
+    public Category getCategoryById(Long id) {
+        Optional<Category> result = categoryRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+
+    @Override
+    public void deleteCategories(List<Category> categories) {
+        categoryRepository.deleteAll(categories);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitService.java
new file mode 100644
index 0000000..5d519c0
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitService.java
@@ -0,0 +1,43 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Commit;
+
+import java.util.List;
+
+public interface CommitService {
+
+    /**
+     * Method getting all commits from database
+     * @return  List of all commits in database
+     */
+    List<Commit> getAllCommits();
+
+    /**
+     * Method getting commit by ID
+     * @param id    ID of commit
+     * @return      Commit with that ID
+     */
+    Commit getCommitById(Long id);
+
+    /**
+     * Method saving commit into database
+     * @param commit    Commit tha will be safe
+     * @return          Commit saved in database
+     */
+    Commit saveCommit(Commit commit);
+
+    /**
+     * Method getting released commits by project ID
+     * @param id    Project's ID of released commits
+     * @return      List of released commits in project
+     */
+    List<Commit> getReleasedCommitsByProject(Long id);
+
+    /**
+     * Method getting commit by identifier
+     * @param projectId     Project ID
+     * @param identifier    Identifier of commit
+     * @return              Commit with that identifier
+     */
+    Commit getCommitByIdentifier(Long projectId, String identifier);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitServiceImpl.java
new file mode 100644
index 0000000..b1cda09
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/CommitServiceImpl.java
@@ -0,0 +1,63 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Commit;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.CommitRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.CommittedConfigurationRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.EntityConfigurationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class CommitServiceImpl implements CommitService {
+
+    @Autowired
+    private CommitRepository commitRepository;
+
+    @Autowired
+    private EntityConfigurationRepository configurationRepository;
+
+    @Autowired
+    private CommittedConfigurationRepository committedConfigurationRepository;
+
+    @Override
+    public List<Commit> getAllCommits() {
+        List<Commit> commits = commitRepository.findAll();
+        Collections.sort(commits, Comparator.comparing(Commit::getId));
+        return commits;
+    }
+
+    @Override
+    public Commit getCommitById(Long id) {
+        Optional<Commit> result = commitRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+
+    @Override
+    public Commit saveCommit(Commit commit) {
+        Commit newCommit = commitRepository.save(commit);
+        commitRepository.flush();
+        return newCommit;
+    }
+
+    @Override
+    public List<Commit> getReleasedCommitsByProject(Long id) {
+        return commitRepository.getReleasedCommitsByProject(id);
+    }
+
+    @Override
+    public Commit getCommitByIdentifier(Long projectId, String identifier) {
+        return commitRepository.getCommitByIdentifier(projectId, identifier);
+    }
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityService.java
new file mode 100644
index 0000000..a994a97
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityService.java
@@ -0,0 +1,28 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Identity;
+
+import java.util.List;
+
+public interface IdentityService {
+
+    /**
+     * Method getting all identities from database
+     * @return  List of all identities in database
+     */
+    List<Identity> getAllIdentities();
+
+    /**
+     * Method getting identity by ID
+     * @param id    ID of identity
+     * @return      Identity with that ID
+     */
+    Identity getIdentityById(Long id);
+
+    /**
+     * Method saving identity into database
+     * @param identity  Identity tha will be safe
+     * @return          Identity saved in database
+     */
+    Identity saveIdentity(Identity identity);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityServiceImpl.java
new file mode 100644
index 0000000..a6ef57c
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IdentityServiceImpl.java
@@ -0,0 +1,45 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Identity;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.IdentityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class IdentityServiceImpl implements IdentityService {
+
+    @Autowired
+    private IdentityRepository identityRepository;
+
+
+    @Override
+    public List<Identity> getAllIdentities() {
+        List<Identity> identities = identityRepository.findAll();
+        Collections.sort(identities, Comparator.comparing(Identity::getName, String.CASE_INSENSITIVE_ORDER));
+        return identities;
+    }
+
+    @Override
+    public Identity getIdentityById(Long id) {
+        Optional<Identity> result = identityRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+
+    @Override
+    public Identity saveIdentity(Identity identity) {
+        Identity newIdentity = identityRepository.save(identity);
+        identityRepository.flush();
+        return newIdentity;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationService.java
new file mode 100644
index 0000000..f8c9f23
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationService.java
@@ -0,0 +1,33 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Iteration;
+
+import java.util.List;
+
+public interface IterationService {
+
+    /**
+     * Method getting all iterations from database
+     * @return  List of all iterations in database
+     */
+    List<Iteration> getAllIterations();
+
+    /**
+     * Method saving iteration into database
+     * @param iteration Iteration tha will be safe
+     * @return          Iteration saved in database
+     */
+    Iteration saveIteration(Iteration iteration);
+
+    /**
+     * Method for deleting iterations from database
+     * @param iterations    List of iterations for deletion
+     */
+    void deleteIterations(List<Iteration> iterations);
+
+    /**
+     * Method for deleting iteration from database
+     * @param iteration    Iteration for deletion
+     */
+    void deleteIteration(Iteration iteration);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationServiceImpl.java
new file mode 100644
index 0000000..12d793e
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/IterationServiceImpl.java
@@ -0,0 +1,45 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Iteration;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.IterationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class IterationServiceImpl implements IterationService {
+
+    @Autowired
+    private IterationRepository iterationRepository;
+
+    @Override
+    public List<Iteration> getAllIterations() {
+        List<Iteration> iterations = iterationRepository.findAll();
+        Collections.sort(iterations, Comparator.comparing(Iteration::getName, String.CASE_INSENSITIVE_ORDER));
+        return iterations;
+    }
+
+    @Override
+    public Iteration saveIteration(Iteration iteration) {
+        Iteration newIteration = iterationRepository.save(iteration);
+        iterationRepository.flush();
+        return newIteration;
+    }
+
+    @Override
+    public void deleteIterations(List<Iteration> iterations) {
+        iterationRepository.deleteAll(iterations);
+    }
+
+    @Override
+    public void deleteIteration(Iteration iteration) {
+        iterationRepository.delete(iteration);
+    }
+
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonService.java
new file mode 100644
index 0000000..c8a2972
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonService.java
@@ -0,0 +1,42 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Person;
+
+import java.util.List;
+
+public interface PersonService {
+
+    /**
+     * Method obtaining all people sorted by name
+     * @return  List of all people from database
+     */
+    List<Person> getAllPeople();
+
+    /**
+     * Method obtaining person based on id
+     * @param id    Identifier of person
+     * @return      Person for given id or null
+     */
+    Person getPersonById(Long id);
+
+    /**
+     * Method saving person into database
+     * @param person    Person for saving
+     * @return          Saved person
+     */
+    Person savePerson(Person person);
+
+    /**
+     * Method for updating all relations with person
+     * from the old one to new one
+     * @param oldPersonId   Identifier of obsolete person
+     * @param newPersonId   Identifier of new person
+     */
+    void updatePersonRelations(Long oldPersonId, Long newPersonId);
+
+    /**
+     * Method for deleting person based on id
+     * @param id    Identifier of person
+     */
+    void deletePerson(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonServiceImpl.java
new file mode 100644
index 0000000..fa6e842
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PersonServiceImpl.java
@@ -0,0 +1,60 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Person;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.PersonRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class PersonServiceImpl implements PersonService {
+
+    @Autowired
+    private PersonRepository personRepository;
+
+    @Override
+    public List<Person> getAllPeople() {
+        List<Person> people = personRepository.findAll();
+        Collections.sort(people, Comparator.comparing(Person::getName, String.CASE_INSENSITIVE_ORDER));
+        return people;
+    }
+
+    @Override
+    public Person getPersonById(Long id) {
+        Optional<Person> result = personRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+
+    @Override
+    public Person savePerson(Person person) {
+        Person newPerson = personRepository.save(person);
+        personRepository.flush();
+        return newPerson;
+    }
+
+    @Override
+    public void updatePersonRelations(Long oldPersonId, Long newPersonId) {
+        personRepository.updatePersonUnits(oldPersonId, newPersonId);
+        personRepository.updatePersonItems(oldPersonId, newPersonId);
+        personRepository.updatePersonConfigurationRelation(oldPersonId, newPersonId);
+        personRepository.updatePersonRole(oldPersonId, newPersonId);
+        personRepository.updatePersonIdentities(oldPersonId, newPersonId);
+        personRepository.updatePersonCompetencies(oldPersonId, newPersonId);
+        personRepository.updatePersonGroups(oldPersonId, newPersonId);
+    }
+
+    @Override
+    public void deletePerson(Long id) {
+        personRepository.deleteById(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseService.java
new file mode 100644
index 0000000..24c2b03
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseService.java
@@ -0,0 +1,33 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Phase;
+
+import java.util.List;
+
+public interface PhaseService {
+
+    /**
+     * Method getting all phases from database
+     * @return  List of all phases in database
+     */
+    List<Phase> getAllPhases();
+
+    /**
+     * Method saving phase into database
+     * @param phase     Phase tha will be safe
+     * @return          Phase saved in database
+     */
+    Phase savePhase(Phase phase);
+
+    /**
+     * Method for deleting phases from database
+     * @param phases    List of phases for deletion
+     */
+    void deletePhases(List<Phase> phases);
+
+    /**
+     * Method for deleting phase from database
+     * @param phase    Phase for deletion
+     */
+    void deletePhase(Phase phase);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseServiceImpl.java
new file mode 100644
index 0000000..3dad7ed
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/PhaseServiceImpl.java
@@ -0,0 +1,43 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Phase;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.PhaseRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class PhaseServiceImpl implements PhaseService {
+
+    @Autowired
+    private PhaseRepository phaseRepository;
+
+    @Override
+    public List<Phase> getAllPhases() {
+        List<Phase> phases = phaseRepository.findAll();
+        Collections.sort(phases, Comparator.comparing(Phase::getName, String.CASE_INSENSITIVE_ORDER));
+        return phases;
+    }
+
+    @Override
+    public Phase savePhase(Phase phase) {
+        Phase newPhase = phaseRepository.save(phase);
+        phaseRepository.flush();
+        return newPhase;
+    }
+
+    @Override
+    public void deletePhases(List<Phase> phases) {
+        phaseRepository.deleteAll(phases);
+    }
+
+    @Override
+    public void deletePhase(Phase phase) {
+        phaseRepository.delete(phase);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceService.java
new file mode 100644
index 0000000..451f9c3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceService.java
@@ -0,0 +1,14 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+
+import java.util.List;
+
+public interface ProjectInstanceService {
+
+    /**
+     * Method getting all project instances from database
+     * @return  List of all project instances in database
+     */
+    List<ProjectInstance> getAllProjectInstances();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceServiceImpl.java
new file mode 100644
index 0000000..955563a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/ProjectInstanceServiceImpl.java
@@ -0,0 +1,26 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.ProjectInstance;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.ProjectInstanceRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class ProjectInstanceServiceImpl implements ProjectInstanceService {
+
+    @Autowired
+    private ProjectInstanceRepository projectInstanceRepository;
+
+    @Override
+    public List<ProjectInstance> getAllProjectInstances() {
+        List<ProjectInstance> instances = projectInstanceRepository.findAll();
+        Collections.sort(instances, Comparator.comparing(ProjectInstance::getName, String.CASE_INSENSITIVE_ORDER));
+        return instances;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/Service.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/Service.java
new file mode 100644
index 0000000..d5b0254
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/Service.java
@@ -0,0 +1,21 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+
+import java.util.List;
+
+public interface Service {
+
+    /**
+     * Method getting all classes of enum type
+     * @return  List of classifications
+     */
+    List<Classification> getAllClasses();
+
+    /**
+     * Method getting class by ID
+     * @param id    ID of classification
+     * @return      Classification with that ID
+     */
+    Classification getClassById(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagService.java
new file mode 100644
index 0000000..032e1a6
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagService.java
@@ -0,0 +1,21 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Tag;
+
+import java.util.List;
+
+public interface TagService {
+
+    /**
+     * Method getting all tags from database
+     * @return  List of all tags in database
+     */
+    List<Tag> getAllTags();
+
+    /**
+     * Method getting tag by ID
+     * @param id    ID of tag
+     * @return      Tag with that ID
+     */
+    Tag getTagById(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagServiceImpl.java
new file mode 100644
index 0000000..ddce625
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/TagServiceImpl.java
@@ -0,0 +1,38 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.Tag;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.TagRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class TagServiceImpl implements TagService {
+
+    @Autowired
+    private TagRepository tagRepository;
+
+
+    @Override
+    public List<Tag> getAllTags() {
+        List<Tag> tags = tagRepository.findAll();
+        Collections.sort(tags, Comparator.comparing(Tag::getId));
+        return tags;
+    }
+
+    @Override
+    public Tag getTagById(Long id) {
+        Optional<Tag> result = tagRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitService.java
new file mode 100644
index 0000000..8e1c3b8
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitService.java
@@ -0,0 +1,21 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkUnit;
+
+import java.util.List;
+
+public interface WorkUnitService {
+
+    /**
+     * Method getting all work units from database
+     * @return  List of all work units in database
+     */
+    List<WorkUnit> getAllProjects();
+
+    /**
+     * Method saving work unit into database
+     * @param workUnit  WorkUnit tha will be safe
+     * @return          WorkUnit saved in database
+     */
+    WorkUnit saveWorkUnit(WorkUnit workUnit);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitServiceImpl.java
new file mode 100644
index 0000000..910a215
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/WorkUnitServiceImpl.java
@@ -0,0 +1,34 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.WorkUnit;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.WorkUnitRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class WorkUnitServiceImpl implements WorkUnitService {
+
+    @Autowired
+    private WorkUnitRepository workUnitRepository;
+
+
+    @Override
+    public List<WorkUnit> getAllProjects() {
+        List<WorkUnit> workUnits = workUnitRepository.findAll();
+        Collections.sort(workUnits, Comparator.comparing(WorkUnit::getId));
+        return workUnits;
+    }
+
+    @Override
+    public WorkUnit saveWorkUnit(WorkUnit workUnit) {
+        WorkUnit newWorkUnit = workUnitRepository.save(workUnit);
+        workUnitRepository.flush();
+        return newWorkUnit;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/EnumService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/EnumService.java
new file mode 100644
index 0000000..ea1711f
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/EnumService.java
@@ -0,0 +1,20 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+
+public interface EnumService {
+
+    /**
+     * Method getting enum by ID
+     * @param id    ID of enum
+     * @return      EnumType instance
+     */
+    EnumType getEnumById(Long id);
+
+    /**
+     * Method saving EnumType instance
+     * @param enumType  Instance for save
+     * @return          Saved instance of EnumType
+     */
+    EnumType saveEnum(EnumType enumType);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationService.java
new file mode 100644
index 0000000..10d654e
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationService.java
@@ -0,0 +1,11 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.PriorityClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface PriorityClassificationService extends Service {
+
+    List<PriorityClassification> getAllPriorityClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationServiceImpl.java
new file mode 100644
index 0000000..1bd382d
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.PriorityClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.PriorityClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class PriorityClassificationServiceImpl implements PriorityClassificationService {
+
+    @Autowired
+    private PriorityClassificationRepository priorityClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<PriorityClassification> priorities = getAllPriorityClasses();
+        return new ArrayList<>(priorities);
+    }
+
+    @Override
+    public List<PriorityClassification> getAllPriorityClasses() {
+        List<PriorityClassification> priorities = priorityClassificationRepository.findAll();
+        Collections.sort(priorities, Comparator.comparing(PriorityClassification::getId));
+        return priorities;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return priorityClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityService.java
new file mode 100644
index 0000000..7426d17
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Priority;
+
+import java.util.List;
+
+public interface PriorityService extends EnumService {
+
+    List<Priority> getAllPriorities();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityServiceImpl.java
new file mode 100644
index 0000000..62c38ba
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/PriorityServiceImpl.java
@@ -0,0 +1,40 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Priority;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.PriorityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class PriorityServiceImpl implements PriorityService {
+
+    @Autowired
+    private PriorityRepository priorityRepository;
+
+    @Override
+    public List<Priority> getAllPriorities() {
+        List<Priority> priorities = priorityRepository.findAll();
+        Collections.sort(priorities, Comparator.comparing(Priority::getName, String.CASE_INSENSITIVE_ORDER));
+        return priorities;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return priorityRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Priority newEnum = priorityRepository.save((Priority) enumType);
+        priorityRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationService.java
new file mode 100644
index 0000000..cde103a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RelationClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface RelationClassificationService extends Service {
+    List<RelationClassification> getAllRelationClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationServiceImpl.java
new file mode 100644
index 0000000..bc31692
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationClassificationServiceImpl.java
@@ -0,0 +1,40 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RelationClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.RelationClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class RelationClassificationServiceImpl implements RelationClassificationService {
+
+    @Autowired
+    private RelationClassificationRepository relationClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<RelationClassification> relations = getAllRelationClasses();
+        Collections.sort(relations, Comparator.comparing(RelationClassification::getSuperClass, String.CASE_INSENSITIVE_ORDER));
+        return new ArrayList<>(relations);
+    }
+
+    @Override
+    public List<RelationClassification> getAllRelationClasses() {
+        List<RelationClassification> relations = relationClassificationRepository.findAll();
+        Collections.sort(relations, Comparator.comparing(RelationClassification::getId));
+        return relations;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return relationClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationService.java
new file mode 100644
index 0000000..95a24b1
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationService.java
@@ -0,0 +1,9 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Relation;
+
+import java.util.List;
+
+public interface RelationService extends EnumService {
+    List<Relation> getAllRelations();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationServiceImpl.java
new file mode 100644
index 0000000..59915b5
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RelationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Relation;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.RelationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class RelationServiceImpl implements RelationService {
+
+    @Autowired
+    private RelationRepository relationRepository;
+
+    @Override
+    public List<Relation> getAllRelations() {
+        List<Relation> relations = relationRepository.findAll();
+        Collections.sort(relations, Comparator.comparing(Relation::getName, String.CASE_INSENSITIVE_ORDER));
+        return relations;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return relationRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Relation newEnum = relationRepository.save((Relation) enumType);
+        relationRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationService.java
new file mode 100644
index 0000000..69f410a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.ResolutionClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface ResolutionClassificationService extends Service {
+    List<ResolutionClassification> getAllResolutionClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationServiceImpl.java
new file mode 100644
index 0000000..60c4344
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.ResolutionClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.ResolutionClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class ResolutionClassificationServiceImpl implements ResolutionClassificationService {
+
+    @Autowired
+    private ResolutionClassificationRepository resolutionClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<ResolutionClassification> resolutions = getAllResolutionClasses();
+        return new ArrayList<>(resolutions);
+    }
+
+    @Override
+    public List<ResolutionClassification> getAllResolutionClasses() {
+        List<ResolutionClassification> resolutions = resolutionClassificationRepository.findAll();
+        Collections.sort(resolutions, Comparator.comparing(ResolutionClassification::getId));
+        return resolutions;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return resolutionClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionService.java
new file mode 100644
index 0000000..8223789
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionService.java
@@ -0,0 +1,9 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Resolution;
+
+import java.util.List;
+
+public interface ResolutionService extends EnumService {
+    List<Resolution> getAllResolutions();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionServiceImpl.java
new file mode 100644
index 0000000..f16da3d
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/ResolutionServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Resolution;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.ResolutionRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class ResolutionServiceImpl implements ResolutionService {
+
+    @Autowired
+    private ResolutionRepository resolutionRepository;
+
+    @Override
+    public List<Resolution> getAllResolutions() {
+        List<Resolution> resolutions = resolutionRepository.findAll();
+        Collections.sort(resolutions, Comparator.comparing(Resolution::getName, String.CASE_INSENSITIVE_ORDER));
+        return resolutions;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return resolutionRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Resolution newEnum = resolutionRepository.save((Resolution) enumType);
+        resolutionRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationService.java
new file mode 100644
index 0000000..b3a39f3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RoleClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface RoleClassificationService extends Service {
+    List<RoleClassification> getAllRoleClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationServiceImpl.java
new file mode 100644
index 0000000..21736b5
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.RoleClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.RoleClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class RoleClassificationServiceImpl implements RoleClassificationService {
+
+    @Autowired
+    private RoleClassificationRepository roleClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<RoleClassification> roles = getAllRoleClasses();
+        return new ArrayList<>(roles);
+    }
+
+    @Override
+    public List<RoleClassification> getAllRoleClasses() {
+        List<RoleClassification> roles = roleClassificationRepository.findAll();
+        Collections.sort(roles, Comparator.comparing(RoleClassification::getId));
+        return roles;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return roleClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleService.java
new file mode 100644
index 0000000..0f7ce8c
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleService.java
@@ -0,0 +1,9 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Role;
+
+import java.util.List;
+
+public interface RoleService extends EnumService {
+    List<Role> getAllRoles();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleServiceImpl.java
new file mode 100644
index 0000000..6a0ae05
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/RoleServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Role;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.RoleRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class RoleServiceImpl implements RoleService {
+
+    @Autowired
+    private RoleRepository roleRepository;
+
+    @Override
+    public List<Role> getAllRoles() {
+        List<Role> roles = roleRepository.findAll();
+        Collections.sort(roles, Comparator.comparing(Role::getName, String.CASE_INSENSITIVE_ORDER));
+        return roles;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return roleRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Role newEnum = roleRepository.save((Role) enumType);
+        roleRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationService.java
new file mode 100644
index 0000000..528163b
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationService.java
@@ -0,0 +1,11 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.SeverityClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface SeverityClassificationService extends Service {
+
+    List<SeverityClassification> getAllSeverityClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationServiceImpl.java
new file mode 100644
index 0000000..94c4039
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.SeverityClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.SeverityClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class SeverityClassificationServiceImpl implements SeverityClassificationService{
+
+    @Autowired
+    private SeverityClassificationRepository severityClassificationRepository;
+
+    @Override
+    public List<SeverityClassification> getAllSeverityClasses() {
+        List<SeverityClassification> severities = severityClassificationRepository.findAll();
+        Collections.sort(severities, Comparator.comparing(SeverityClassification::getId));
+        return severities;
+    }
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<SeverityClassification> severities = getAllSeverityClasses();
+        return new ArrayList<>(severities);
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return severityClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityService.java
new file mode 100644
index 0000000..2a3019a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Severity;
+
+import java.util.List;
+
+public interface SeverityService extends EnumService {
+
+    List<Severity> getAllSeverities();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityServiceImpl.java
new file mode 100644
index 0000000..2fb3cb1
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/SeverityServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Severity;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.SeverityRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class SeverityServiceImpl implements SeverityService {
+
+    @Autowired
+    private SeverityRepository severityRepository;
+
+    @Override
+    public List<Severity> getAllSeverities() {
+        List<Severity> severities = severityRepository.findAll();
+        Collections.sort(severities, Comparator.comparing(Severity::getName, String.CASE_INSENSITIVE_ORDER));
+        return severities;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return severityRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Severity newEnum = severityRepository.save((Severity) enumType);
+        severityRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationService.java
new file mode 100644
index 0000000..d2d2f8a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.StatusClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface StatusClassificationService extends Service {
+    List<StatusClassification> getAllStatusClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationServiceImpl.java
new file mode 100644
index 0000000..02ea1a2
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.StatusClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.StatusClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class StatusClassificationServiceImpl implements StatusClassificationService {
+
+    @Autowired
+    private StatusClassificationRepository statusClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<StatusClassification> statuses = getAllStatusClasses();
+        return new ArrayList<>(statuses);
+    }
+
+    @Override
+    public List<StatusClassification> getAllStatusClasses() {
+        List<StatusClassification> statuses = statusClassificationRepository.findAll();
+        Collections.sort(statuses, Comparator.comparing(StatusClassification::getId));
+        return statuses;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return statusClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusService.java
new file mode 100644
index 0000000..8b5c4b3
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusService.java
@@ -0,0 +1,9 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Status;
+
+import java.util.List;
+
+public interface StatusService extends EnumService {
+    List<Status> getAllStatuses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusServiceImpl.java
new file mode 100644
index 0000000..f649277
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/StatusServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.Status;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.StatusRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class StatusServiceImpl implements StatusService {
+
+    @Autowired
+    private StatusRepository statusRepository;
+
+    @Override
+    public List<Status> getAllStatuses() {
+        List<Status> statuses = statusRepository.findAll();
+        Collections.sort(statuses, Comparator.comparing(Status::getName, String.CASE_INSENSITIVE_ORDER));
+        return statuses;
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return statusRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        Status newEnum = statusRepository.save((Status) enumType);
+        statusRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationService.java
new file mode 100644
index 0000000..ad74e47
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationService.java
@@ -0,0 +1,10 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuTypeClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.Service;
+
+import java.util.List;
+
+public interface WuTypeClassificationService extends Service {
+    List<WuTypeClassification> getAllWuTypeClasses();
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationServiceImpl.java
new file mode 100644
index 0000000..d5736b5
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeClassificationServiceImpl.java
@@ -0,0 +1,39 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuTypeClassification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.Classification;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.WuTypeClassificationRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+@Service
+@Transactional
+public class WuTypeClassificationServiceImpl implements WuTypeClassificationService {
+
+    @Autowired
+    private WuTypeClassificationRepository wuTypeClassificationRepository;
+
+    @Override
+    public List<Classification> getAllClasses() {
+        List<WuTypeClassification> wuTypes = getAllWuTypeClasses();
+        return new ArrayList<>(wuTypes);
+    }
+
+    @Override
+    public List<WuTypeClassification> getAllWuTypeClasses() {
+        List<WuTypeClassification> wuTypes = wuTypeClassificationRepository.findAll();
+        Collections.sort(wuTypes, Comparator.comparing(WuTypeClassification::getId));
+        return wuTypes;
+    }
+
+    @Override
+    public Classification getClassById(Long id) {
+        return wuTypeClassificationRepository.getOne(id);
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeService.java
new file mode 100644
index 0000000..073a180
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeService.java
@@ -0,0 +1,12 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuType;
+
+import java.util.List;
+
+public interface WuTypeService extends EnumService {
+
+    List<WuType> getAllWuTypes();
+
+    WuType getWuTypeById(Long id);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeServiceImpl.java
new file mode 100644
index 0000000..53256cf
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/service/managment/enums/WuTypeServiceImpl.java
@@ -0,0 +1,50 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.service.managment.enums;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.enums.WuType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.management.interfaces.EnumType;
+import cz.zcu.fav.kiv.antipatterndetectionapp.repository.managment.enums.WuTypeRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.transaction.Transactional;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Optional;
+
+@Service
+@Transactional
+public class WuTypeServiceImpl implements WuTypeService {
+
+    @Autowired
+    private WuTypeRepository wuTypeRepository;
+
+    @Override
+    public List<WuType> getAllWuTypes() {
+        List<WuType> wuTypes = wuTypeRepository.findAll();
+        Collections.sort(wuTypes, Comparator.comparing(WuType::getName, String.CASE_INSENSITIVE_ORDER));
+        return wuTypes;
+    }
+
+    @Override
+    public WuType getWuTypeById(Long id) {
+        Optional<WuType> result = wuTypeRepository.findById(id);
+        if (result.isEmpty()) {
+            return null;
+        } else {
+            return result.get();
+        }
+    }
+
+    @Override
+    public EnumType getEnumById(Long id) {
+        return wuTypeRepository.getOne(id);
+    }
+
+    @Override
+    public EnumType saveEnum(EnumType enumType) {
+        WuType newEnum = wuTypeRepository.save((WuType) enumType);
+        wuTypeRepository.flush();
+        return newEnum;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/utils/Utils.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/utils/Utils.java
index 8f78bcb..4ef1f9d 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/utils/Utils.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/utils/Utils.java
@@ -5,6 +5,7 @@ import cz.zcu.fav.kiv.antipatterndetectionapp.model.ResultDetail;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.servlet.http.HttpSession;
 import java.sql.Date;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
@@ -121,4 +122,10 @@ public class Utils {
 
         return true;
     }
+    //[JT] tohle taky hodit pryc - session neni validni
+    public static void sessionRecreate(HttpSession session) {
+        session.removeAttribute("activity");
+        session.removeAttribute("categoryFilter");
+        session.removeAttribute("typeFilter");
+    }
 }
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/AboutPageController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/AboutPageController.java
index 234712d..5557412 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/AboutPageController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/AboutPageController.java
@@ -3,7 +3,7 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.v2.controller;
 import com.google.gson.Gson;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.AboutPageDto;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Metadata;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.AboutPageService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.about.AboutPageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/ConfigurationController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/ConfigurationController.java
index 146590b..cc97875 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/ConfigurationController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/ConfigurationController.java
@@ -3,7 +3,7 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.v2.controller;
 import com.google.gson.Gson;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.ConfigurationControllerStatusCodes;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.*;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.ConfigService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.configuration.ConfigService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/DetectController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/DetectController.java
index ef9fb3d..1a14d1a 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/DetectController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/DetectController.java
@@ -1,18 +1,10 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.v2.controller;
 
 import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.AntiPatternManager;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.Query;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResult;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.ConfigurationService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.DetectionService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.detection.DetectionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/UserController.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/UserController.java
index ea14022..b36d8d6 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/UserController.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/controller/UserController.java
@@ -2,8 +2,8 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.v2.controller;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.OAuthService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.UserService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth.OAuthService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/model/ProjectDto.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/model/ProjectDto.java
new file mode 100644
index 0000000..2035743
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/model/ProjectDto.java
@@ -0,0 +1,19 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ProjectDto {
+    private Long id;
+    private String name;
+
+    private String description;
+
+    public static ProjectDtoBuilder builder() {return new ProjectDtoBuilder();}
+}
\ No newline at end of file
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/JwtAuthenticationFilter.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/JwtAuthenticationFilter.java
index ce6992b..3914200 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/JwtAuthenticationFilter.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/JwtAuthenticationFilter.java
@@ -1,11 +1,7 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.v2.security;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.config.SecurityBasics;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.httpExceptions.CustomExceptionHandler;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.OAuthService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
-import org.json.simple.JSONObject;
-import org.json.simple.parser.ParseException;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth.OAuthService;
 import org.springframework.http.*;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/WebSecurityConfig.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/WebSecurityConfig.java
index 0ab3b21..cb59ef2 100644
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/WebSecurityConfig.java
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/security/WebSecurityConfig.java
@@ -1,8 +1,8 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.v2.security;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.config.SecurityBasics;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.AuthProvider;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.OAuthService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth.AuthProvider;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth.OAuthService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.context.annotation.Bean;
@@ -15,8 +15,6 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
 import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
 import org.springframework.security.config.http.SessionCreationPolicy;
 import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.access.channel.ChannelProcessingFilter;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.cors.CorsConfiguration;
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageService.java
deleted file mode 100644
index 081f759..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Metadata;
-
-import java.util.List;
-
-/**
- * Interface used in the AboutPageServiceImpl
- *
- * @author Petr Urban
- * @since 2023-04-26
- * @version 1.0.0
- */
-public interface AboutPageService {
-
-    /**
-     * method in which it's a great time to call findAll to jdbc repository
-     * @return list of obtained rows from the database
-     */
-    List<Metadata> findAll();
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageServiceImpl.java
deleted file mode 100644
index 3383009..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AboutPageServiceImpl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Metadata;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.AboutPageRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * Implementation of service that processes data required from AboutPageController.java
- *
- * @author Petr Urban
- * @since 2023-04-26
- * @version 1.0.0
- */
-@Service
-public class AboutPageServiceImpl implements AboutPageService {
-
-    @Autowired
-    private AboutPageRepository repository;
-
-    @Override
-    public List<Metadata> findAll() {
-        return repository.findAll();
-    }
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AuthProvider.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AuthProvider.java
deleted file mode 100644
index 5cc53ce..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/AuthProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.authentication.AuthenticationProvider;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
-
-@Service
-public class AuthProvider implements AuthenticationProvider {
-
-    @Value("${auth.realm.authenticate}")
-    private String auth_url;
-
-    private RestTemplate template;
-
-    public AuthProvider(RestTemplate restTemplate){
-        this.template = restTemplate;
-    }
-
-
-    @Override
-    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
-
-        RestTemplate restTemplate = new RestTemplate();
-        String jwtToken = (String) authentication.getCredentials();
-
-        HttpHeaders headers = new HttpHeaders();
-        headers.setBearerAuth(jwtToken);
-        HttpEntity<String> entity = new HttpEntity<>(headers);
-
-        try {
-            ResponseEntity<UserDetails> responseEntity = restTemplate.exchange(
-                    auth_url,
-                    HttpMethod.POST,
-                    entity,
-                    UserDetails.class);
-
-            UserDetails userDetails = responseEntity.getBody();
-//            List<GrantedAuthority> authorities = new ArrayList<>();
-//            authorities.add(new SimpleGrantedAuthority(userDetails.getRole()));
-
-            if (userDetails != null && userDetails.getUsername() != null) {
-                return new UsernamePasswordAuthenticationToken(userDetails.getUsername(), jwtToken);
-            }
-
-            return new UsernamePasswordAuthenticationToken(null, null);
-
-        } catch (Exception e) {
-            throw new BadCredentialsException("Invalid JWT token");
-        }
-    }
-
-    @Override
-    public boolean supports(Class<?> authentication) {
-        return authentication.equals(UsernamePasswordAuthenticationToken.class);
-    }
-
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/ConfigurationServiceImplementation.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/ConfigurationServiceImplementation.java
deleted file mode 100644
index 44ee7b9..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/ConfigurationServiceImplementation.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.ConfigurationControllerStatusCodes;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.*;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.ConfigRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserConfigurationJoinRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.Crypto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Service
-public class ConfigurationServiceImplementation implements ConfigService {
-    //repository which represents connection to database and the configuration table in particular
-    @Autowired
-    private ConfigRepository configurationRepository;
-    //repository for Join table, necessary to add associations between users and configurations
-    @Autowired
-    private UserConfigurationJoinRepository userConfigurationJoinRepository;
-    //user service is also necessary for retrieving information about users (primarily database query for fetching id)
-    @Autowired
-    private UserService userService;
-    /**
-     * Saves configuration to database
-     * the configuration is default to everyone
-     * @param cfg Configuration - JSON format of configuration with antipatterns and thresholds
-     * @return ResponseEntity with status code and message with more information about operation
-     */
-    @Override
-    public ConfigurationControllerStatusCodes addConfiguration(Configuration cfg) {
-        return null;
-    }
-    /**
-     * Saves configuration to database
-     * the configuration is available to the user who sent the request
-     * @param cfg Configuration - JSON format of configuration with antipatterns and thresholds
-     * @return ResponseEntity with status code and message with more information about operation
-     */
-    @Override
-    public ConfigurationControllerStatusCodes addConfiguration(UserConfiguration cfg) {
-        User user = cfg.getUser();
-        Configuration configuration = cfg.getConfiguration();
-
-        String userName = user.getName();
-        //fetch the user from db because user in UserConfiguration does not contain id
-        user = this.userService.getUserByName(userName);
-        String configurationDefinition = configuration.getConfig();
-        //if the request is missing the configuration definition then we kill it
-        if(configurationDefinition == null) {
-            return ConfigurationControllerStatusCodes.EMPTY_CONFIGURATION_DEFINITION;
-        }
-        //create the hash of the configuration (w/o salting)
-        String configHash = Crypto.hashString(configurationDefinition);
-        Configuration existingConfiguration = this.configurationRepository.findConfigurationByConfigHash(configHash);
-        //configuration definition does not exist => upload the configuration into database
-        if(existingConfiguration == null){
-            configuration.setHash(configHash);
-            //save the configuration itself
-            Configuration tmp = this.configurationRepository.save(configuration);
-            //can only happen if db server fails or a constraint is breached
-            if(tmp == null){
-                return ConfigurationControllerStatusCodes.INSERT_FAILED;
-            }
-        }
-        //pair the configuration to the user
-        pairConfigurationWithUser(user,configuration);
-        return ConfigurationControllerStatusCodes.INSERT_SUCCESSFUL;
-
-
-    }
-
-    /**
-     * This method saves user and configuration id into join table
-     * creates association between user and configuration in the sense of: "User @param user owns configuration @param configuration"
-     * (Multiple users can own the same configuration but the configuration is not public)
-     * @param user User - user who will be associated with configuration @param configuration.
-     * @param configuration Configuration - the configuration that will be associated with user (just the id is necessary)
-     * @return ResponseEntity<String> - Http response with status code and message about the operation
-     */
-    @Override
-    public ConfigurationControllerStatusCodes pairConfigurationWithUser(User user, Configuration configuration) {
-        final UserConfigKey key = new UserConfigKey(user.getId(),configuration.getId());
-        boolean exists = this.userConfigurationJoinRepository.existsById(key);
-        //the configuration pairing already exists, we do not have to do anything
-        //request like this should not happen from client, something fishy might be going on
-        //or the request is a duplicate
-        if(exists) {
-            return ConfigurationControllerStatusCodes.CONFIGURATION_PAIRING_EXISTS;
-        }
-        //save the relation between user and configuration
-        this.userConfigurationJoinRepository.save(new UserConfigurationJoin(key,configuration.getConfigurationName()));
-        return ConfigurationControllerStatusCodes.CONFIGURATION_PAIRING_CREATED;
-    }
-
-
-    /**
-     * Method queries db to retrieve all configurations available to @param user
-     * if he/she does not have any of his/her (inclusive for netflix) only default configurations are returned
-     * @param user user querying configuration - ONLY username is valid in this object
-     * @return List<Configuration> list of available configurations
-     */
-    @Override
-    public List<Configuration> getUserConfigurations(User user) {
-        final String userName = user.getName();
-        if(userName == null){
-            return null;
-        }
-        //client can only send his name - he obviously does not know his id in db, we have to query that
-        User userInfo = this.userService.getUserByName(userName);
-        //fetch all configurations this particular user can see
-        //ie all public configs + configurations uploaded by this particular user
-        List<Object[]> configurations = this.configurationRepository.getAllUserConfigurations(userInfo.getId());
-        List<Configuration> configurationList = new ArrayList<>();
-        for (Object[] o : configurations) {
-            Configuration cof = (Configuration) (o[0]);
-            UserConfigurationJoin cofJoin = (UserConfigurationJoin) (o[1]);
-            if (cofJoin != null) {
-                cof.setConfigurationName(cofJoin.getConfigurationName());
-            }
-            configurationList.add(cof);
-        }
-        return configurationList;
-    }
-    //Wrappers around db connection to configuration table
-    @Override
-    public Configuration getConfigurationById(int id) {
-        return this.configurationRepository.findConfigurationById(id);
-    }
-
-    @Override
-    public String getConfigurationName(int userId, int configurationId) {
-        return this.configurationRepository.findConfigurationByCompoundKey(new UserConfigKey(userId, configurationId));
-    }
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionService.java
deleted file mode 100644
index fb85e8f..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionService.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.Query;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResult;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-public interface DetectionService {
-    Query getAllProjectsAndAntipatterns();
-    List<QueryResult> analyze(UserDetectionDto detectionRequest);
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImpl.java
deleted file mode 100644
index 4e30a23..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.AntiPatternManager;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.ConfigurationService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Configuration;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class DetectionServiceImpl implements DetectionService{
-    @Autowired
-    ConfigService configService;
-
-    @Autowired
-    private ProjectService projectService;
-
-    @Autowired
-    private AntiPatternService antiPatternService;
-
-    @Autowired
-    private AntiPatternManager antiPatternManager;
-
-    @Autowired
-    private UserService userService;
-
-    @Autowired
-    private ConfigurationService configurationService;
-
-    @Override
-    public Query getAllProjectsAndAntipatterns() {
-        Query q = new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
-        return q;
-    }
-
-    @Override
-    public List<QueryResult> analyze(UserDetectionDto detectionRequest) {
-        //User user = userService.getUserByName(detectionRequest.getUserName());
-        int configurationId = detectionRequest.getConfigurationId();
-        //String currentConfigurationName = this.configService.getConfigurationName(user.getId(), configurationId);
-        Configuration cfg = this.configService.getConfigurationById(configurationId);
-
-        //namapovat cfg do jsonu
-        Map<String, Map<String,String>> currentConfiguration = JSONBuilder.createMapFromString(cfg.getConfig());
-
-        String[] selectedProjects = detectionRequest.getSelectedProjects();
-        String[] selectedAntiPatterns = detectionRequest.getSelectedAntipatterns();
-        List<QueryResult> results = antiPatternManager.analyze(selectedProjects, selectedAntiPatterns, currentConfiguration);
-
-       /* List<QueryResultItem> i = new ArrayList<>();
-        Map<String,Threshold> thresholds = new HashMap<>();
-        thresholds.put("divisionOfIterationsWithRetrospective",new Threshold("divisionOfIterationsWithRetrospective","Division of iterations with retrospective","Minimum percentage of the total number of iterations with a retrospective (0,100)","Percentage must be float number between 0 and 100","Percentage"));
-        i.add(new QueryResultItem(new AntiPattern(3,"Business As Usual","BusinessAsUsual","Absence of a retrospective after individual iterations or after the completion project.")))
-        QueryResult q = new QueryResult(new Project("Rozšíření nástroje IMiGEr (KIV) - HKMM",""),new ArrayList<>());
-        */
-
-
-        return results;
-    }
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthService.java
deleted file mode 100644
index 08892f0..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthService.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-import org.springframework.http.HttpRequest;
-import org.springframework.http.ResponseEntity;
-
-import javax.servlet.http.HttpServletRequest;
-
-public interface OAuthService {
-    public ResponseEntity<String> authenticate(String token);
-    public ResponseEntity<String> loginUser(User user);
-    public ResponseEntity<String> logoutUser(User user);
-
-    ResponseEntity<String> refreshToken(String token);
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImpl.java
deleted file mode 100644
index bac00c9..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.RequestBuilder;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.stereotype.Service;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Service which communicate with OAuth application
- */
-@Service
-public class OAuthServiceImpl implements OAuthService, UserDetailsService {
-
-    /**
-     * URL path to authenticate endpoint of OAuth application
-     */
-//    @Value("${auth.realm.authenticate}")
-    private String AUTH_URL_AUTH = "http://localhost:8081/authenticate";
-
-    /**
-     * URL path to login endpoint of OAuth application
-     */
-//    @Value("${auth.realm.login}")
-    private String AUTH_URL_LOGIN = "http://localhost:8081/login";
-
-    /**
-     * URL path to logout endpoint of OAuth application
-     */
-//    @Value("${auth.realm.logout}")
-    private String AUTH_URL_LOGOUT = "http://localhost:8081/logout";
-
-    private String AUTH_URL_REFRESH = "http://localhost:8081/refresh";
-
-    @Autowired
-    private RequestBuilder requestBuilder;
-    /**
-     *
-     */
-    @Autowired
-    private UserService userService;
-
-
-    //private RequestBuilder requestBuilder = new RequestBuilder();
-
-    public ResponseEntity<String> authenticate(String token) {
-
-        return requestBuilder.sendRequestResponse(AUTH_URL_AUTH, token);
-    }
-
-    public ResponseEntity<String> loginUser(User user) {
-        final String userName = user.getName();
-
-        if(userName == null) {
-            return null;
-        }
-        //HttpURLConnection con = RequestBuilder.createConnection(AUTH_URL);
-        Map<String, Object> requestBody = new HashMap<>();
-
-        requestBody.put("name", userName);
-
-        return requestBuilder.sendRequestResponse(AUTH_URL_LOGIN, requestBody);
-    }
-
-    public ResponseEntity<String> logoutUser(User user) {
-        final String userName = user.getName();
-        final String token = user.getToken();
-
-        if(userName == null || token == null) {
-            return null;
-        }
-
-        //HttpURLConnection con = RequestBuilder.createConnection(AUTH_URL);
-        HashMap<String, Object> requestBody = new HashMap<>();
-
-        requestBody.put("name", userName);
-        requestBody.put("token", token);
-
-        return requestBuilder.sendRequestResponse(AUTH_URL_LOGOUT, requestBody);
-    }
-
-    @Override
-    public ResponseEntity<String> refreshToken(String token) {
-        return requestBuilder.sendRequestResponse(AUTH_URL_REFRESH, token, true);
-    }
-
-    @Override
-    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
-        final User user = this.userService.getUserByName(s);
-        return new org.springframework.security.core.userdetails.User(user.getName(), user.getPassword(),new ArrayList<>());
-    }
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserService.java
deleted file mode 100644
index 486777e..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-
-/**
- * Interface implemented by service(s) which are responsible for user management (registration, login, logout)
- * @version 1.0
- * @author Vaclav Hrabik, Jiri Trefil
- */
-public interface UserService {
-    /**
-     * Method attempts to register a user and returns status code indicating registration result
-     * @param user serialized JSON object representing user
-     * @return Integer - status code of the operation, ie 1 - successful, 0 - name taken, ...
-     */
-    public UserModelStatusCodes registerUser(User user);
-    /**
-     * Method attempts to log in a user and returns status code indicating login result
-     * @param user serialized JSON object representing user
-     * @return Integer - status code of the operation, ie 1 - successful, 0 - failed, ....
-     */
-    public UserModelStatusCodes verifyUser(User user);
-
-    public User getUserByName(String name);
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpl.java
deleted file mode 100644
index 100bce9..0000000
--- a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
-
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.Crypto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import java.util.regex.Pattern;
-
-/**
- * Service provides functionality for user login/register/logout
- * @author Vaclav Hrabik, Jiri Trefil
- */
-@Service
-public class UserServiceImpl implements UserService {
-
-    @Autowired
-    private UserRepository userRepository;
-
-    /**
-     * Method attempts to register a user
-     * @param user serialized JSON object representing user
-     * @return  Enum code UserModelStatusCodes.
-     *      INVALID_USER_ARGUMENTS      if user send invalid name, email or password
-     *      USER_EXISTS                 if user send name, which is already taken
-     *      HASH_FAILED                 if hash function failed
-     *      USER_CREATION_FAILED        if there is problem with database
-     *      USER_CREATED                if user were created (happy-day)
-     */
-    @Override
-    public UserModelStatusCodes registerUser(User user) {
-        final String email = user.getEmail();
-        final String name = user.getName();
-        final String password = user.getPassword();
-
-        if (!verifyUserParameters(name, email, password))
-            return UserModelStatusCodes.INVALID_USER_ARGUMENTS;
-
-        //if the username is taken, kill the request as well
-        if (userRepository.findByName(user.getName()) != null) {
-            return UserModelStatusCodes.USER_EXISTS;
-        }
-
-        String passwordHash = Crypto.hashString(password);
-        //server side fault
-        if (passwordHash == null) {
-            return UserModelStatusCodes.HASH_FAILED;
-        }
-        //save the user
-        User u = userRepository.save(new User(name, email, passwordHash));
-        //database insert failed for some reason
-        if(u == null) {
-            return UserModelStatusCodes.USER_CREATION_FAILED;
-        }
-
-        //return okay status code, the user was created
-        return UserModelStatusCodes.USER_CREATED;
-    }
-
-    /**
-     * @param email String - user email provided by client
-     * @param name String - username provided by client
-     * @return true if @param User is valid
-     */
-    private boolean verifyUserParameters(String name, String email, String password) {
-        //if client send somehow not whole register request.
-        if (email == null || name == null || password == null) {
-            return false;
-        }
-        //if client request violates constraints - kill the request. User will not be registered.
-        if (email.length() > User.getEmailConstraint() || name.length() > User.getNameConstraint()) {
-            return false;
-        }
-        //regex for email validation
-        String emailRegex = "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$";
-        final Pattern emailPattern = Pattern.compile(emailRegex);
-        //return true if email is valid (pattern wise)
-        return emailPattern.matcher(email).find();
-    }
-
-
-
-    /**
-     * Method
-     * @param user serialized JSON object representing user
-     * @return  Enum flag UserModelStatusCodes.
-     *      USER_LOGGED_IN     if user has right name and password
-     *      USER_LOGIN_FAILED  if user has wrong name or password
-     */
-
-    @Override
-    public UserModelStatusCodes verifyUser(User user) {
-        final String name = user.getName();
-        final String password = user.getPassword();
-        if(name == null || password == null) {
-            return UserModelStatusCodes.USER_LOGIN_FAILED;
-        }
-
-        User u = userRepository.findByName(user.getName());
-
-        if (u == null) {
-            return UserModelStatusCodes.USER_LOGIN_FAILED;
-        }
-        final boolean passwordMatches = Crypto.compareHashes(password, u.getPassword());
-
-        return (!passwordMatches ? UserModelStatusCodes.USER_LOGIN_FAILED : UserModelStatusCodes.USER_LOGGED_IN);
-    }
-
-
-
-    @Override
-    public User getUserByName(String name) {
-        return this.userRepository.findByName(name);
-    }
-
-
-}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageService.java
new file mode 100644
index 0000000..c2c1db7
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageService.java
@@ -0,0 +1,22 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.about;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Metadata;
+
+import java.util.List;
+
+/**
+ * Interface used in the AboutPageServiceImpl
+ *
+ * @author Petr Urban
+ * @since 2023-04-26
+ * @version 1.0.0
+ */
+public interface AboutPageService {
+
+    /**
+     * method in which it's a great time to call findAll to jdbc repository
+     * @return list of obtained rows from the database
+     */
+    List<Metadata> findAll();
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageServiceImpl.java
new file mode 100644
index 0000000..d23d17a
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/about/AboutPageServiceImpl.java
@@ -0,0 +1,28 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.about;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Metadata;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.AboutPageRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * Implementation of service that processes data required from AboutPageController.java
+ *
+ * @author Petr Urban
+ * @since 2023-04-26
+ * @version 1.0.0
+ */
+@Service
+public class AboutPageServiceImpl implements AboutPageService {
+
+    @Autowired
+    private AboutPageRepository repository;
+
+    @Override
+    public List<Metadata> findAll() {
+        return repository.findAll();
+    }
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/configuration/ConfigurationServiceImplementation.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/configuration/ConfigurationServiceImplementation.java
new file mode 100644
index 0000000..f8ce7a6
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/configuration/ConfigurationServiceImplementation.java
@@ -0,0 +1,137 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.ConfigurationControllerStatusCodes;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.ConfigRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserConfigurationJoinRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.Crypto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class ConfigurationServiceImplementation implements ConfigService {
+    //repository which represents connection to database and the configuration table in particular
+    @Autowired
+    private ConfigRepository configurationRepository;
+    //repository for Join table, necessary to add associations between users and configurations
+    @Autowired
+    private UserConfigurationJoinRepository userConfigurationJoinRepository;
+    //user service is also necessary for retrieving information about users (primarily database query for fetching id)
+    @Autowired
+    private UserService userService;
+    /**
+     * Saves configuration to database
+     * the configuration is default to everyone
+     * @param cfg Configuration - JSON format of configuration with antipatterns and thresholds
+     * @return ResponseEntity with status code and message with more information about operation
+     */
+    @Override
+    public ConfigurationControllerStatusCodes addConfiguration(Configuration cfg) {
+        return null;
+    }
+    /**
+     * Saves configuration to database
+     * the configuration is available to the user who sent the request
+     * @param cfg Configuration - JSON format of configuration with antipatterns and thresholds
+     * @return ResponseEntity with status code and message with more information about operation
+     */
+    @Override
+    public ConfigurationControllerStatusCodes addConfiguration(UserConfiguration cfg) {
+        User user = cfg.getUser();
+        Configuration configuration = cfg.getConfiguration();
+
+        String userName = user.getName();
+        //fetch the user from db because user in UserConfiguration does not contain id
+        user = this.userService.getUserByName(userName);
+        String configurationDefinition = configuration.getConfig();
+        //if the request is missing the configuration definition then we kill it
+        if(configurationDefinition == null) {
+            return ConfigurationControllerStatusCodes.EMPTY_CONFIGURATION_DEFINITION;
+        }
+        //create the hash of the configuration (w/o salting)
+        String configHash = Crypto.hashString(configurationDefinition);
+        Configuration existingConfiguration = this.configurationRepository.findConfigurationByConfigHash(configHash);
+        //configuration definition does not exist => upload the configuration into database
+        if(existingConfiguration == null){
+            configuration.setHash(configHash);
+            //save the configuration itself
+            Configuration tmp = this.configurationRepository.save(configuration);
+            //can only happen if db server fails or a constraint is breached
+            if(tmp == null){
+                return ConfigurationControllerStatusCodes.INSERT_FAILED;
+            }
+        }
+        //pair the configuration to the user
+        pairConfigurationWithUser(user,configuration);
+        return ConfigurationControllerStatusCodes.INSERT_SUCCESSFUL;
+
+
+    }
+
+    /**
+     * This method saves user and configuration id into join table
+     * creates association between user and configuration in the sense of: "User @param user owns configuration @param configuration"
+     * (Multiple users can own the same configuration but the configuration is not public)
+     * @param user User - user who will be associated with configuration @param configuration.
+     * @param configuration Configuration - the configuration that will be associated with user (just the id is necessary)
+     * @return ResponseEntity<String> - Http response with status code and message about the operation
+     */
+    @Override
+    public ConfigurationControllerStatusCodes pairConfigurationWithUser(User user, Configuration configuration) {
+        final UserConfigKey key = new UserConfigKey(user.getId(),configuration.getId());
+        boolean exists = this.userConfigurationJoinRepository.existsById(key);
+        //the configuration pairing already exists, we do not have to do anything
+        //request like this should not happen from client, something fishy might be going on
+        //or the request is a duplicate
+        if(exists) {
+            return ConfigurationControllerStatusCodes.CONFIGURATION_PAIRING_EXISTS;
+        }
+        //save the relation between user and configuration
+        this.userConfigurationJoinRepository.save(new UserConfigurationJoin(key,configuration.getConfigurationName()));
+        return ConfigurationControllerStatusCodes.CONFIGURATION_PAIRING_CREATED;
+    }
+
+
+    /**
+     * Method queries db to retrieve all configurations available to @param user
+     * if he/she does not have any of his/her (inclusive for netflix) only default configurations are returned
+     * @param user user querying configuration - ONLY username is valid in this object
+     * @return List<Configuration> list of available configurations
+     */
+    @Override
+    public List<Configuration> getUserConfigurations(User user) {
+        final String userName = user.getName();
+        if(userName == null){
+            return null;
+        }
+        //client can only send his name - he obviously does not know his id in db, we have to query that
+        User userInfo = this.userService.getUserByName(userName);
+        //fetch all configurations this particular user can see
+        //ie all public configs + configurations uploaded by this particular user
+        List<Object[]> configurations = this.configurationRepository.getAllUserConfigurations(userInfo.getId());
+        List<Configuration> configurationList = new ArrayList<>();
+        for (Object[] o : configurations) {
+            Configuration cof = (Configuration) (o[0]);
+            UserConfigurationJoin cofJoin = (UserConfigurationJoin) (o[1]);
+            if (cofJoin != null) {
+                cof.setConfigurationName(cofJoin.getConfigurationName());
+            }
+            configurationList.add(cof);
+        }
+        return configurationList;
+    }
+    //Wrappers around db connection to configuration table
+    @Override
+    public Configuration getConfigurationById(int id) {
+        return this.configurationRepository.findConfigurationById(id);
+    }
+
+    @Override
+    public String getConfigurationName(int userId, int configurationId) {
+        return this.configurationRepository.findConfigurationByCompoundKey(new UserConfigKey(userId, configurationId));
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionService.java
new file mode 100644
index 0000000..ae4f0a4
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionService.java
@@ -0,0 +1,14 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.detection;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Query;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResult;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+public interface DetectionService {
+    Query getAllProjectsAndAntipatterns();
+    List<QueryResult> analyze(UserDetectionDto detectionRequest);
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionServiceImpl.java
new file mode 100644
index 0000000..5fac76c
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/detection/DetectionServiceImpl.java
@@ -0,0 +1,70 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.detection;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.detecting.AntiPatternManager;
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.*;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.AntiPatternService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ConfigurationService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.service.ProjectService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Configuration;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.configuration.ConfigService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class DetectionServiceImpl implements DetectionService{
+    @Autowired
+    ConfigService configService;
+
+    @Autowired
+    private ProjectService projectService;
+
+    @Autowired
+    private AntiPatternService antiPatternService;
+
+    @Autowired
+    private AntiPatternManager antiPatternManager;
+
+    @Autowired
+    private UserService userService;
+
+    @Autowired
+    private ConfigurationService configurationService;
+
+    @Override
+    public Query getAllProjectsAndAntipatterns() {
+        Query q = new Query(projectService.getAllProjects(), antiPatternService.antiPatternsToModel(antiPatternService.getAllAntiPatterns()));
+        return q;
+    }
+
+    @Override
+    public List<QueryResult> analyze(UserDetectionDto detectionRequest) {
+        //User user = userService.getUserByName(detectionRequest.getUserName());
+        int configurationId = detectionRequest.getConfigurationId();
+        //String currentConfigurationName = this.configService.getConfigurationName(user.getId(), configurationId);
+        Configuration cfg = this.configService.getConfigurationById(configurationId);
+
+        //namapovat cfg do jsonu
+        Map<String, Map<String,String>> currentConfiguration = JSONBuilder.createMapFromString(cfg.getConfig());
+
+        String[] selectedProjects = detectionRequest.getSelectedProjects();
+        String[] selectedAntiPatterns = detectionRequest.getSelectedAntipatterns();
+        List<QueryResult> results = antiPatternManager.analyze(selectedProjects, selectedAntiPatterns, currentConfiguration);
+
+       /* List<QueryResultItem> i = new ArrayList<>();
+        Map<String,Threshold> thresholds = new HashMap<>();
+        thresholds.put("divisionOfIterationsWithRetrospective",new Threshold("divisionOfIterationsWithRetrospective","Division of iterations with retrospective","Minimum percentage of the total number of iterations with a retrospective (0,100)","Percentage must be float number between 0 and 100","Percentage"));
+        i.add(new QueryResultItem(new AntiPattern(3,"Business As Usual","BusinessAsUsual","Absence of a retrospective after individual iterations or after the completion project.")))
+        QueryResult q = new QueryResult(new Project("Rozšíření nástroje IMiGEr (KIV) - HKMM",""),new ArrayList<>());
+        */
+
+
+        return results;
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/AuthProvider.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/AuthProvider.java
new file mode 100644
index 0000000..7240326
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/AuthProvider.java
@@ -0,0 +1,71 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+@Service
+public class AuthProvider implements AuthenticationProvider {
+
+    @Value("${auth.realm.authenticate}")
+    private String auth_url;
+
+    private RestTemplate template;
+
+    public AuthProvider(RestTemplate restTemplate){
+        this.template = restTemplate;
+    }
+
+
+    @Override
+    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+
+        RestTemplate restTemplate = new RestTemplate();
+        String jwtToken = (String) authentication.getCredentials();
+
+        HttpHeaders headers = new HttpHeaders();
+        headers.setBearerAuth(jwtToken);
+        HttpEntity<String> entity = new HttpEntity<>(headers);
+
+        try {
+            ResponseEntity<UserDetails> responseEntity = restTemplate.exchange(
+                    auth_url,
+                    HttpMethod.POST,
+                    entity,
+                    UserDetails.class);
+
+            UserDetails userDetails = responseEntity.getBody();
+//            List<GrantedAuthority> authorities = new ArrayList<>();
+//            authorities.add(new SimpleGrantedAuthority(userDetails.getRole()));
+
+            if (userDetails != null && userDetails.getUsername() != null) {
+                return new UsernamePasswordAuthenticationToken(userDetails.getUsername(), jwtToken);
+            }
+
+            return new UsernamePasswordAuthenticationToken(null, null);
+
+        } catch (Exception e) {
+            throw new BadCredentialsException("Invalid JWT token");
+        }
+    }
+
+    @Override
+    public boolean supports(Class<?> authentication) {
+        return authentication.equals(UsernamePasswordAuthenticationToken.class);
+    }
+
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthService.java
new file mode 100644
index 0000000..70ada33
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthService.java
@@ -0,0 +1,16 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
+import org.springframework.http.HttpRequest;
+import org.springframework.http.ResponseEntity;
+
+import javax.servlet.http.HttpServletRequest;
+
+public interface OAuthService {
+    public ResponseEntity<String> authenticate(String token);
+    public ResponseEntity<String> loginUser(User user);
+    public ResponseEntity<String> logoutUser(User user);
+
+    ResponseEntity<String> refreshToken(String token);
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthServiceImpl.java
new file mode 100644
index 0000000..448bbeb
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/oauth/OAuthServiceImpl.java
@@ -0,0 +1,100 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.RequestBuilder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Service which communicate with OAuth application
+ */
+@Service
+public class OAuthServiceImpl implements OAuthService, UserDetailsService {
+
+    /**
+     * URL path to authenticate endpoint of OAuth application
+     */
+//    @Value("${auth.realm.authenticate}")
+    private String AUTH_URL_AUTH = "http://localhost:8081/authenticate";
+
+    /**
+     * URL path to login endpoint of OAuth application
+     */
+//    @Value("${auth.realm.login}")
+    private String AUTH_URL_LOGIN = "http://localhost:8081/login";
+
+    /**
+     * URL path to logout endpoint of OAuth application
+     */
+//    @Value("${auth.realm.logout}")
+    private String AUTH_URL_LOGOUT = "http://localhost:8081/logout";
+
+    private String AUTH_URL_REFRESH = "http://localhost:8081/refresh";
+
+    @Autowired
+    private RequestBuilder requestBuilder;
+    /**
+     *
+     */
+    @Autowired
+    private UserService userService;
+
+
+    //private RequestBuilder requestBuilder = new RequestBuilder();
+
+    public ResponseEntity<String> authenticate(String token) {
+
+        return requestBuilder.sendRequestResponse(AUTH_URL_AUTH, token);
+    }
+
+    public ResponseEntity<String> loginUser(User user) {
+        final String userName = user.getName();
+
+        if(userName == null) {
+            return null;
+        }
+        //HttpURLConnection con = RequestBuilder.createConnection(AUTH_URL);
+        Map<String, Object> requestBody = new HashMap<>();
+
+        requestBody.put("name", userName);
+
+        return requestBuilder.sendRequestResponse(AUTH_URL_LOGIN, requestBody);
+    }
+
+    public ResponseEntity<String> logoutUser(User user) {
+        final String userName = user.getName();
+        final String token = user.getToken();
+
+        if(userName == null || token == null) {
+            return null;
+        }
+
+        //HttpURLConnection con = RequestBuilder.createConnection(AUTH_URL);
+        HashMap<String, Object> requestBody = new HashMap<>();
+
+        requestBody.put("name", userName);
+        requestBody.put("token", token);
+
+        return requestBuilder.sendRequestResponse(AUTH_URL_LOGOUT, requestBody);
+    }
+
+    @Override
+    public ResponseEntity<String> refreshToken(String token) {
+        return requestBuilder.sendRequestResponse(AUTH_URL_REFRESH, token, true);
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
+        final User user = this.userService.getUserByName(s);
+        return new org.springframework.security.core.userdetails.User(user.getName(), user.getPassword(),new ArrayList<>());
+    }
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserService.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserService.java
new file mode 100644
index 0000000..f8f2f85
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserService.java
@@ -0,0 +1,27 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
+
+/**
+ * Interface implemented by service(s) which are responsible for user management (registration, login, logout)
+ * @version 1.0
+ * @author Vaclav Hrabik, Jiri Trefil
+ */
+public interface UserService {
+    /**
+     * Method attempts to register a user and returns status code indicating registration result
+     * @param user serialized JSON object representing user
+     * @return Integer - status code of the operation, ie 1 - successful, 0 - name taken, ...
+     */
+    public UserModelStatusCodes registerUser(User user);
+    /**
+     * Method attempts to log in a user and returns status code indicating login result
+     * @param user serialized JSON object representing user
+     * @return Integer - status code of the operation, ie 1 - successful, 0 - failed, ....
+     */
+    public UserModelStatusCodes verifyUser(User user);
+
+    public User getUserByName(String name);
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserServiceImpl.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserServiceImpl.java
new file mode 100644
index 0000000..857eb9f
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/user/UserServiceImpl.java
@@ -0,0 +1,118 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.Crypto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.regex.Pattern;
+
+/**
+ * Service provides functionality for user login/register/logout
+ * @author Vaclav Hrabik, Jiri Trefil
+ */
+@Service
+public class UserServiceImpl implements UserService {
+
+    @Autowired
+    private UserRepository userRepository;
+
+    /**
+     * Method attempts to register a user
+     * @param user serialized JSON object representing user
+     * @return  Enum code UserModelStatusCodes.
+     *      INVALID_USER_ARGUMENTS      if user send invalid name, email or password
+     *      USER_EXISTS                 if user send name, which is already taken
+     *      HASH_FAILED                 if hash function failed
+     *      USER_CREATION_FAILED        if there is problem with database
+     *      USER_CREATED                if user were created (happy-day)
+     */
+    @Override
+    public UserModelStatusCodes registerUser(User user) {
+        final String email = user.getEmail();
+        final String name = user.getName();
+        final String password = user.getPassword();
+
+        if (!verifyUserParameters(name, email, password))
+            return UserModelStatusCodes.INVALID_USER_ARGUMENTS;
+
+        //if the username is taken, kill the request as well
+        if (userRepository.findByName(user.getName()) != null) {
+            return UserModelStatusCodes.USER_EXISTS;
+        }
+
+        String passwordHash = Crypto.hashString(password);
+        //server side fault
+        if (passwordHash == null) {
+            return UserModelStatusCodes.HASH_FAILED;
+        }
+        //save the user
+        User u = userRepository.save(new User(name, email, passwordHash));
+        //database insert failed for some reason
+        if(u == null) {
+            return UserModelStatusCodes.USER_CREATION_FAILED;
+        }
+
+        //return okay status code, the user was created
+        return UserModelStatusCodes.USER_CREATED;
+    }
+
+    /**
+     * @param email String - user email provided by client
+     * @param name String - username provided by client
+     * @return true if @param User is valid
+     */
+    private boolean verifyUserParameters(String name, String email, String password) {
+        //if client send somehow not whole register request.
+        if (email == null || name == null || password == null) {
+            return false;
+        }
+        //if client request violates constraints - kill the request. User will not be registered.
+        if (email.length() > User.getEmailConstraint() || name.length() > User.getNameConstraint()) {
+            return false;
+        }
+        //regex for email validation
+        String emailRegex = "^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$";
+        final Pattern emailPattern = Pattern.compile(emailRegex);
+        //return true if email is valid (pattern wise)
+        return emailPattern.matcher(email).find();
+    }
+
+
+
+    /**
+     * Method
+     * @param user serialized JSON object representing user
+     * @return  Enum flag UserModelStatusCodes.
+     *      USER_LOGGED_IN     if user has right name and password
+     *      USER_LOGIN_FAILED  if user has wrong name or password
+     */
+
+    @Override
+    public UserModelStatusCodes verifyUser(User user) {
+        final String name = user.getName();
+        final String password = user.getPassword();
+        if(name == null || password == null) {
+            return UserModelStatusCodes.USER_LOGIN_FAILED;
+        }
+
+        User u = userRepository.findByName(user.getName());
+
+        if (u == null) {
+            return UserModelStatusCodes.USER_LOGIN_FAILED;
+        }
+        final boolean passwordMatches = Crypto.compareHashes(password, u.getPassword());
+
+        return (!passwordMatches ? UserModelStatusCodes.USER_LOGIN_FAILED : UserModelStatusCodes.USER_LOGGED_IN);
+    }
+
+
+
+    @Override
+    public User getUserByName(String name) {
+        return this.userRepository.findByName(name);
+    }
+
+
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ClassToDto.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ClassToDto.java
new file mode 100644
index 0000000..215dedd
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ClassToDto.java
@@ -0,0 +1,7 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters;
+import java.util.List;
+
+public interface ClassToDto<F,T> {
+    T convert(F source);
+    List<T> convert(List<F> source);
+}
diff --git a/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ProjectToDto.java b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ProjectToDto.java
new file mode 100644
index 0000000..51e022e
--- /dev/null
+++ b/src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/utils/converters/ProjectToDto.java
@@ -0,0 +1,34 @@
+package cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.converters;
+
+import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.ProjectDto;
+
+import java.util.ArrayList;
+import java.util.List;
+public class ProjectToDto implements ClassToDto<Project, ProjectDto> {
+
+    @Override
+    public ProjectDto convert(Project source) {
+        if (source == null) {
+            return null;
+        }
+        return ProjectDto.builder()
+                .id(source.getId())
+                .name(source.getName())
+                .description(source.getDescription())
+                .build();
+    }
+
+    @Override
+    public List<ProjectDto> convert(List<Project> source) {
+        List<ProjectDto> convertedList = new ArrayList<>();
+
+        if(source == null){
+            return convertedList;
+        }
+        source.stream().forEach(sourceItem->convertedList.add(this.convert(sourceItem)));
+        return convertedList;
+    }
+
+
+}
diff --git a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImplementationTest.java b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImplementationTest.java
index 82a458f..0495345 100644
--- a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImplementationTest.java
+++ b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/DetectionServiceImplementationTest.java
@@ -1,24 +1,16 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
 
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.AntiPattern;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.Project;
 import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResult;
-import cz.zcu.fav.kiv.antipatterndetectionapp.model.QueryResultItem;
-import cz.zcu.fav.kiv.antipatterndetectionapp.repository.AntiPatternRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.repository.ProjectRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.Configuration;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.UserDetectionDto;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.ConfigRepository;
-import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.detection.DetectionService;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.mock.mockito.MockBean;
 
 import java.util.List;
-import java.util.Optional;
 
 import static org.junit.jupiter.api.Assertions.*;
 import static org.mockito.ArgumentMatchers.any;
diff --git a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImplTest.java b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImplTest.java
index 0eac8c2..fa959c9 100644
--- a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImplTest.java
+++ b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/OAuthServiceImplTest.java
@@ -1,6 +1,7 @@
 package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
 
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.oauth.OAuthService;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.JSONBuilder;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.RequestBuilder;
 import org.junit.jupiter.api.Test;
diff --git a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpTest.java b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpTest.java
index 801fe1f..f3b2b15 100644
--- a/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpTest.java
+++ b/src/test/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpTest.java
@@ -3,6 +3,8 @@ package cz.zcu.fav.kiv.antipatterndetectionapp.v2.service;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.dials.UserModelStatusCodes;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.model.User;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.repository.UserRepository;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserService;
+import cz.zcu.fav.kiv.antipatterndetectionapp.v2.service.user.UserServiceImpl;
 import cz.zcu.fav.kiv.antipatterndetectionapp.v2.utils.Crypto;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
