From fe7356de6d7a65b01b96060ca1790e6b24d92c1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Pil=C3=A1r?= <445537@mail.muni.cz>
Date: Mon, 15 Feb 2021 17:03:22 +0000
Subject: [PATCH] Resolve "Create DTOs for missing domain classes"

---
 .../training/adaptive/dto/AuditInfoDTO.java   | 180 ++++++++++++
 .../adaptive/dto/BasicPhaseInfoDTO.java       | 146 ++++++++++
 .../adaptive/dto/IsCorrectAnswerDTO.java      |  98 +++++++
 .../training/adaptive/dto/UserRefDTO.java     | 195 +++++++++++++
 .../phases/AbstractPhaseArchiveDTO.java       | 114 ++++++++
 .../phases/info/InfoPhaseArchiveDTO.java      |  56 ++++
 .../questionnaire/QuestionArchiveDTO.java     |  77 +++++
 .../QuestionChoiceArchiveDTO.java             |  75 +++++
 .../QuestionPhaseRelationArchiveDTO.java      |  58 ++++
 .../QuestionnairePhaseArchiveDTO.java         |  73 +++++
 .../training/DecisionMatrixRowArchiveDTO.java |  80 ++++++
 .../phases/training/TaskArchiveDTO.java       | 111 +++++++
 .../training/TrainingPhaseArchiveDTO.java     |  78 +++++
 .../TrainingDefinitionArchiveDTO.java         | 199 +++++++++++++
 .../training/TrainingInstanceArchiveDTO.java  | 154 ++++++++++
 .../training/TrainingRunArchiveDTO.java       | 152 ++++++++++
 .../LocalDateTimeUTCDeserializer.java         |  29 ++
 .../LocalDateTimeUTCSerializer.java           |  25 ++
 .../adaptive/dto/export/FileToReturnDTO.java  |  74 +++++
 .../adaptive/dto/export/UserRefExportDTO.java | 145 ++++++++++
 .../export/phases/AbstractPhaseExportDTO.java | 110 +++++++
 .../phases/info/InfoPhaseExportDTO.java       |  48 ++++
 .../QuestionChoiceExportDTO.java              |  40 +++
 .../questionnaire/QuestionExportDTO.java      |  52 ++++
 .../QuestionPhaseRelationExportDTO.java       |  76 +++++
 .../QuestionnairePhaseExportDTO.java          |  58 ++++
 .../training/TrainingPhaseExportDTO.java      | 114 ++++++++
 ...TrainingDefinitionWithPhasesExportDTO.java | 189 ++++++++++++
 .../export/training/TrainingRunExportDTO.java | 112 ++++++++
 .../imports/ImportTrainingDefinitionDTO.java  | 203 +++++++++++++
 .../phases/AbstractPhaseImportDTO.java        | 127 ++++++++
 .../phases/info/InfoPhaseImportDTO.java       |  57 ++++
 .../QuestionChoiceImportDTO.java              |  61 ++++
 .../questionnaire/QuestionImportDTO.java      |  86 ++++++
 .../QuestionPhaseRelationImportDTO.java       |  78 +++++
 .../QuestionnairePhaseImportDTO.java          |  83 ++++++
 .../training/DecisionMatrixRowImportDTO.java  |  70 +++++
 .../phases/training/TaskImportDTO.java        | 144 ++++++++++
 .../training/TrainingPhaseImportDTO.java      | 118 ++++++++
 .../dto/responses/LockedPoolInfo.java         |  53 ++++
 .../dto/responses/PageResultResource.java     | 137 +++++++++
 .../responses/PageResultResourcePython.java   | 146 ++++++++++
 .../adaptive/dto/responses/PoolInfoDTO.java   |  94 ++++++
 .../dto/responses/SandboxDefinitionInfo.java  |  69 +++++
 .../adaptive/dto/responses/SandboxInfo.java   |  51 ++++
 .../dto/responses/SandboxPoolInfo.java        | 103 +++++++
 .../dto/training/ValidateAnswerDTO.java       |  40 +++
 .../TrainingDefinitionByIdDTO.java            | 270 ++++++++++++++++++
 .../TrainingDefinitionCreateDTO.java          | 150 ++++++++++
 .../TrainingDefinitionDTO.java                | 253 ++++++++++++++++
 .../TrainingDefinitionInfoDTO.java            |  99 +++++++
 .../TrainingDefinitionUpdateDTO.java          | 192 +++++++++++++
 .../TrainingInstanceAssignPoolIdDTO.java      |  48 ++++
 .../TrainingInstanceBasicInfoDTO.java         |  90 ++++++
 .../TrainingInstanceCreateDTO.java            | 138 +++++++++
 .../traininginstance/TrainingInstanceDTO.java | 204 +++++++++++++
 .../TrainingInstanceFindAllResponseDTO.java   | 175 ++++++++++++
 .../TrainingInstanceIsFinishedInfoDTO.java    |  60 ++++
 .../TrainingInstanceUpdateDTO.java            | 159 +++++++++++
 .../dto/trainingrun/AccessTrainingRunDTO.java | 187 ++++++++++++
 .../trainingrun/AccessedTrainingRunDTO.java   | 204 +++++++++++++
 .../dto/trainingrun/TrainingRunByIdDTO.java   | 216 ++++++++++++++
 .../dto/trainingrun/TrainingRunDTO.java       | 167 +++++++++++
 .../kypo/training/adaptive/enums/Actions.java |  22 ++
 .../locale/ValidationMessages.properties      |  92 ++++++
 .../ValidationMessages_cs_CZ.properties       |  92 ++++++
 .../ValidationMessages_sk_SK.properties       |  91 ++++++
 67 files changed, 7547 insertions(+)
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AuditInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/BasicPhaseInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/IsCorrectAnswerDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/UserRefDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/AbstractPhaseArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/info/InfoPhaseArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionChoiceArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionPhaseRelationArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionnairePhaseArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/DecisionMatrixRowArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TaskArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TrainingPhaseArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingDefinitionArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingInstanceArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingRunArchiveDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCDeserializer.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCSerializer.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/FileToReturnDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/UserRefExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/AbstractPhaseExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/info/InfoPhaseExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionChoiceExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionPhaseRelationExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionnairePhaseExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/training/TrainingPhaseExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingDefinitionWithPhasesExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingRunExportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/ImportTrainingDefinitionDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/AbstractPhaseImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/info/InfoPhaseImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionChoiceImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionPhaseRelationImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionnairePhaseImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/DecisionMatrixRowImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TaskImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TrainingPhaseImportDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/LockedPoolInfo.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResource.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResourcePython.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PoolInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxDefinitionInfo.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxInfo.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxPoolInfo.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/ValidateAnswerDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionByIdDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionCreateDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionUpdateDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceAssignPoolIdDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceBasicInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceCreateDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceFindAllResponseDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceIsFinishedInfoDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceUpdateDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessTrainingRunDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessedTrainingRunDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunByIdDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunDTO.java
 create mode 100644 src/main/java/cz/muni/ics/kypo/training/adaptive/enums/Actions.java
 create mode 100644 src/main/resources/locale/ValidationMessages.properties
 create mode 100644 src/main/resources/locale/ValidationMessages_cs_CZ.properties
 create mode 100644 src/main/resources/locale/ValidationMessages_sk_SK.properties

diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AuditInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AuditInfoDTO.java
new file mode 100644
index 00000000..28954192
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AuditInfoDTO.java
@@ -0,0 +1,180 @@
+package cz.muni.ics.kypo.training.adaptive.dto;
+
+/**
+ * Encapsulates information used for auditing.
+ */
+public class AuditInfoDTO {
+
+    private long userRefId;
+    private long sandboxId;
+    private long poolId;
+    private long trainingRunId;
+    private long trainingDefinitionId;
+    private long trainingInstanceId;
+    private long trainingTime;
+    private long phase;
+
+    /**
+     * Instantiates a new Audit info dto.
+     */
+    public AuditInfoDTO() {
+    }
+
+    /**
+     * Gets user ref id.
+     *
+     * @return the user ref id
+     */
+    public long getUserRefId() {
+        return userRefId;
+    }
+
+    /**
+     * Sets user ref id.
+     *
+     * @param userRefId the user ref id
+     */
+    public void setUserRefId(long userRefId) {
+        this.userRefId = userRefId;
+    }
+
+    /**
+     * Gets sandbox id.
+     *
+     * @return the sandbox id
+     */
+    public long getSandboxId() {
+        return sandboxId;
+    }
+
+    /**
+     * Sets sandbox id.
+     *
+     * @param sandboxId the sandbox id
+     */
+    public void setSandboxId(long sandboxId) {
+        this.sandboxId = sandboxId;
+    }
+
+    /**
+     * Gets pool id.
+     *
+     * @return the pool id
+     */
+    public long getPoolId() {
+        return poolId;
+    }
+
+    /**
+     * Sets pool id.
+     *
+     * @param poolId the pool id
+     */
+    public void setPoolId(long poolId) {
+        this.poolId = poolId;
+    }
+
+    /**
+     * Gets training run id.
+     *
+     * @return the training run id
+     */
+    public long getTrainingRunId() {
+        return trainingRunId;
+    }
+
+    /**
+     * Sets training run id.
+     *
+     * @param trainingRunId the training run id
+     */
+    public void setTrainingRunId(long trainingRunId) {
+        this.trainingRunId = trainingRunId;
+    }
+
+    /**
+     * Gets training definition id.
+     *
+     * @return the training definition id
+     */
+    public long getTrainingDefinitionId() {
+        return trainingDefinitionId;
+    }
+
+    /**
+     * Sets training definition id.
+     *
+     * @param trainingDefinitionId the training definition id
+     */
+    public void setTrainingDefinitionId(long trainingDefinitionId) {
+        this.trainingDefinitionId = trainingDefinitionId;
+    }
+
+    /**
+     * Gets training instance id.
+     *
+     * @return the training instance id
+     */
+    public long getTrainingInstanceId() {
+        return trainingInstanceId;
+    }
+
+    /**
+     * Sets training instance id.
+     *
+     * @param trainingInstanceId the training instance id
+     */
+    public void setTrainingInstanceId(long trainingInstanceId) {
+        this.trainingInstanceId = trainingInstanceId;
+    }
+
+    /**
+     * Gets training time.
+     *
+     * @return the training time
+     */
+    public long getTrainingTime() {
+        return trainingTime;
+    }
+
+    /**
+     * Sets training time.
+     *
+     * @param trainingTime the training time
+     */
+    public void setTrainingTime(long trainingTime) {
+        this.trainingTime = trainingTime;
+    }
+
+    /**
+     * Gets phase.
+     *
+     * @return the phase
+     */
+    public long getPhase() {
+        return phase;
+    }
+
+    /**
+     * Sets phase.
+     *
+     * @param phase the phase
+     */
+    public void setPhase(long phase) {
+        this.phase = phase;
+    }
+
+    @Override
+    public String toString() {
+        return "AuditInfoDTO{" +
+                "userRefId=" + userRefId +
+                ", sandboxId=" + sandboxId +
+                ", poolId=" + poolId +
+                ", trainingRunId=" + trainingRunId +
+                ", trainingDefinitionId=" + trainingDefinitionId +
+                ", trainingInstanceId=" + trainingInstanceId +
+                ", gameTime=" + trainingTime +
+                ", level=" + phase +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/BasicPhaseInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/BasicPhaseInfoDTO.java
new file mode 100644
index 00000000..a6e03867
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/BasicPhaseInfoDTO.java
@@ -0,0 +1,146 @@
+package cz.muni.ics.kypo.training.adaptive.dto;
+
+import cz.muni.ics.kypo.training.adaptive.enums.PhaseType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Encapsulates basic information about phase.
+ *
+ */
+@ApiModel(value = "BasicPhaseInfoDTO", description = "Basic information about the phase and its type.")
+public class BasicPhaseInfoDTO {
+
+    @ApiModelProperty(value = "Main identifier of phase.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Short textual description of the phase.", example = "Training phase")
+    private String title;
+    @ApiModelProperty(value = "Order of phase among phases in training definition.", example = "1")
+    private int order;
+    @ApiModelProperty(value = "Type of the phase.", example = "GAME")
+    private PhaseType phaseType;
+
+    /**
+     * Instantiates a new Basic phase info dto.
+     */
+    public BasicPhaseInfoDTO() {
+    }
+
+    /**
+     * Instantiates a new Basic level info dto.
+     *
+     * @param id        the id
+     * @param title     the title
+     * @param phaseType the phase type
+     * @param order     the order
+     */
+    public BasicPhaseInfoDTO(Long id, String title, PhaseType phaseType, int order) {
+        this.id = id;
+        this.title = title;
+        this.phaseType = phaseType;
+        this.order = order;
+    }
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets order number of level that is compared with order numbers of other levels associated with same definition.
+     * First level from definition has order of 0
+     *
+     * @return the order
+     */
+    public int getOrder() {
+        return order;
+    }
+
+    /**
+     * Sets order number of level that is compared with order numbers of other levels associated with same definition.
+     * First level from definition has order of 0
+     *
+     * @param order the order
+     */
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    /**
+     * Gets phase type.
+     *
+     * @return the {@link PhaseType}
+     */
+    public PhaseType getPhaseType() {
+        return phaseType;
+    }
+
+    /**
+     * Sets phase type.
+     *
+     * @param phaseType the {@link PhaseType}
+     */
+    public void setPhaseType(PhaseType phaseType) {
+        this.phaseType = phaseType;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        BasicPhaseInfoDTO that = (BasicPhaseInfoDTO) o;
+        return order == that.order &&
+                Objects.equals(id, that.id) &&
+                Objects.equals(title, that.title) &&
+                phaseType == that.phaseType;
+    }
+
+    @Override
+    public int hashCode() {
+
+        return Objects.hash(id, title, order, phaseType);
+    }
+
+    @Override
+    public String toString() {
+        return "BasicPhaseInfoDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", order=" + order +
+                ", phaseType=" + phaseType +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/IsCorrectAnswerDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/IsCorrectAnswerDTO.java
new file mode 100644
index 00000000..052d43f5
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/IsCorrectAnswerDTO.java
@@ -0,0 +1,98 @@
+package cz.muni.ics.kypo.training.adaptive.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Response to attempt of flag input
+ *
+ */
+@ApiModel(value = "IsCorrectAnswerDTO", description = "A response for the request about the validation of the task answer. May also " +
+        "include solution if remaining attempts reach 0.")
+public class IsCorrectAnswerDTO {
+
+    @ApiModelProperty(value = "True/false if flag has been correct/incorrect.", example = "false")
+    private boolean isCorrect;
+    @ApiModelProperty(value = "Number of attempts to submit a bad flag.", example = "3")
+    private int remainingAttempts;
+    @ApiModelProperty(value = "Instruction how to get flag in game.", example = "This is how you do it")
+    private String solution;
+
+    /**
+     * Is correct boolean.
+     *
+     * @return True if answer is correct
+     */
+    public boolean isCorrect() {
+        return isCorrect;
+    }
+
+    /**
+     * Sets correct.
+     *
+     * @param correct True if answer is correct
+     */
+    public void setCorrect(boolean correct) {
+        isCorrect = correct;
+    }
+
+    /**
+     * Gets remaining attempts.
+     *
+     * @return the remaining attempts
+     */
+    public int getRemainingAttempts() {
+        return remainingAttempts;
+    }
+
+    /**
+     * Sets remaining attempts.
+     *
+     * @param remainingAttempts the remaining attempts
+     */
+    public void setRemainingAttempts(int remainingAttempts) {
+        this.remainingAttempts = remainingAttempts;
+    }
+
+    /**
+     * Gets solution.
+     *
+     * @return the solution
+     */
+    public String getSolution() {
+        return solution;
+    }
+
+    /**
+     * Sets solution.
+     *
+     * @param solution the solution
+     */
+    public void setSolution(String solution) {
+        this.solution = solution;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof IsCorrectAnswerDTO)) return false;
+        IsCorrectAnswerDTO that = (IsCorrectAnswerDTO) object;
+        return isCorrect() == that.isCorrect() &&
+                getRemainingAttempts() == that.getRemainingAttempts() &&
+                Objects.equals(getSolution(), that.getSolution());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(isCorrect(), getRemainingAttempts(), getSolution());
+    }
+
+    @Override
+    public String toString() {
+        return "IsCorrectFlagDTO{" +
+                "isCorrect=" + isCorrect +
+                ", remainingAttempts=" + remainingAttempts +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/UserRefDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/UserRefDTO.java
new file mode 100644
index 00000000..cca98400
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/UserRefDTO.java
@@ -0,0 +1,195 @@
+package cz.muni.ics.kypo.training.adaptive.dto;
+
+import com.fasterxml.jackson.annotation.JsonAlias;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Encapsulates information about user reference.
+ *
+ */
+@ApiModel(value = "UserRefDTO", description = "User information from user-and-group microservice is mapped to this class " +
+        "and is also used to provide information about authors, participants, and organizers.")
+public class UserRefDTO {
+
+    @ApiModelProperty(value = "Reference to user in another microservice and get his id", example = "1")
+    private Long userRefId;
+    @ApiModelProperty(value = "Reference to user in another microservice.", example = "441048@mail.muni.cz")
+    @JsonProperty("sub")
+    private String userRefSub;
+    @ApiModelProperty(value = "Reference to user in another microservice and get his full name", example = "Mgr. Ing. Pavel Å eda")
+    @JsonProperty("full_name")
+    private String userRefFullName;
+    @ApiModelProperty(value = "User given name", example = "Pavel")
+    @JsonProperty("given_name")
+    private String userRefGivenName;
+    @ApiModelProperty(value = "User family name", example = "Seda")
+    @JsonProperty("family_name")
+    private String userRefFamilyName;
+    @ApiModelProperty(value = "Reference to user in another microservice and get his iss", example = "https://oidc.muni.cz")
+    private String iss;
+    @ApiModelProperty(value = "Identicon of a user.", example = "iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAACIUlEQVR4Xu3YsY0dSQxAQQUlpXT5Z3CS/YgxSrQa4gLlEOBb9pj/x6//fv7/t/78/XhN3yBWyz3kBX2DWC33kBf0DWK13ENe0DeI1XIPeUHfIFbLPeQFfYNYLfeQF/QNYrXcQ17QN4jVcg95Qd8gVss95AV9g1gt95AX9A1itdxDXtA3iNVyD3lB3yBWyz3kBX2DWC33kBf0DWLERGOiLdGWaEuMgeghoi3RlmhLjIHoIaIt0ZZoS4yB6CGiLdGWaEuMgeghoi3RlmhLjIHoIaIt0ZZoS4yB6CGiLdGWaEuMgeghoi3RlmhLjIHoIaIt0ZZoS4yB6CGiLdGWaEuMgeghoi3RlmhLjIHoIaIt0ZZoS4yB6CGiLdGWaEuMgeghoi3RlmhLjIHoIaIt0ZZoS6z+8b/mPha4jwXuY4H7WOA+FriPBe5jgftY4D4WuI8F7mOB+1jgPha4jwXGbzbn2xicb2Nwvo3B+TYG59sYnG9jcL6Nwfk2BufbGJxvY3C+jcH5Ngbn2xicb2Nwvq1+z2pMtCXaEm2J1XIPEW2JtkRbYrXcQ0Rboi3Rllgt9xDRlmhLtCVWyz1EtCXaEm2J1XIPEW2JtkRbYrXcQ0Rboi3Rllgt9xDRlmhLtCVWyz1EtCXaEm2J1XIPEW2JtkRbYrXcQ0Rboi3Rllgt9xDRlmhLtCVWyz1EtCXaEm2J1XIPEW2JtkRbYrXcQ0Rboi3RlvgNt34wfeJElG8AAAAASUVORK5CYII=")
+    private byte[] picture;
+
+    /**
+     * Gets user ref sub.
+     *
+     * @return the user ref sub
+     */
+    public String getUserRefSub() {
+        return userRefSub;
+    }
+
+    /**
+     * Sets user ref sub.
+     *
+     * @param userRefSub the user ref sub
+     */
+    public void setUserRefSub(String userRefSub) {
+        this.userRefSub = userRefSub;
+    }
+
+    /**
+     * Gets iss.
+     *
+     * @return the iss
+     */
+    public String getIss() {
+        return iss;
+    }
+
+    /**
+     * Sets iss.
+     *
+     * @param iss the iss
+     */
+    public void setIss(String iss) {
+        this.iss = iss;
+    }
+
+    /**
+     * Gets user ref id.
+     *
+     * @return the user ref id
+     */
+    @JsonProperty("user_ref_id")
+    public Long getUserRefId() {
+        return userRefId;
+    }
+
+    /**
+     * Sets user ref id.
+     *
+     * @param userRefId the user ref id
+     */
+    @JsonAlias({"id", "user_ref_id"})
+    public void setUserRefId(Long userRefId) {
+        this.userRefId = userRefId;
+    }
+
+    /**
+     * Gets user ref full name.
+     *
+     * @return the user ref full name
+     */
+    public String getUserRefFullName() {
+        return userRefFullName;
+    }
+
+    /**
+     * Sets user ref full name.
+     *
+     * @param userRefFullName the user ref full name
+     */
+    public void setUserRefFullName(String userRefFullName) {
+        this.userRefFullName = userRefFullName;
+    }
+
+    /**
+     * Gets user ref given name.
+     *
+     * @return the user ref given name
+     */
+    public String getUserRefGivenName() {
+        return userRefGivenName;
+    }
+
+    /**
+     * Sets user ref given name.
+     *
+     * @param userRefGivenName the user ref given name
+     */
+    public void setUserRefGivenName(String userRefGivenName) {
+        this.userRefGivenName = userRefGivenName;
+    }
+
+    /**
+     * Gets user ref family name.
+     *
+     * @return the user ref family name
+     */
+    public String getUserRefFamilyName() {
+        return userRefFamilyName;
+    }
+
+    /**
+     * Sets user ref family name.
+     *
+     * @param userRefFamilyName the user ref family name
+     */
+    public void setUserRefFamilyName(String userRefFamilyName) {
+        this.userRefFamilyName = userRefFamilyName;
+    }
+
+    /**
+     * Gets the identicon of the user encoded in base64.
+     *
+     * @return identicon of the user.
+     */
+    public byte[] getPicture() {
+        return picture;
+    }
+
+    /**
+     * Sets the identicon of the user encoded in base64.
+     *
+     * @param picture encoded identicon of the user.
+     */
+    public void setPicture(byte[] picture) {
+        this.picture = picture;
+    }
+
+
+    @Override
+    public String toString() {
+        return "UserRefDTO{" +
+                ", userRefSub='" + userRefSub + '\'' +
+                ", userRefFullName='" + userRefFullName + '\'' +
+                ", userRefGivenName='" + userRefGivenName + '\'' +
+                ", userRefFamilyName='" + userRefFamilyName + '\'' +
+                ", iss='" + iss + '\'' +
+                ", userRefId=" + userRefId +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof UserRefDTO)) return false;
+        UserRefDTO that = (UserRefDTO) o;
+        return Objects.equals(getUserRefId(), that.getUserRefId()) &&
+                Objects.equals(getUserRefSub(), that.getUserRefSub()) &&
+                Objects.equals(getUserRefFullName(), that.getUserRefFullName()) &&
+                Objects.equals(getUserRefGivenName(), that.getUserRefGivenName()) &&
+                Objects.equals(getUserRefFamilyName(), that.getUserRefFamilyName()) &&
+                Objects.equals(getIss(), that.getIss());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getUserRefId(), getUserRefSub(), getUserRefFullName(), getUserRefGivenName(), getUserRefFamilyName(), getIss());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/AbstractPhaseArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/AbstractPhaseArchiveDTO.java
new file mode 100644
index 00000000..a89740de
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/AbstractPhaseArchiveDTO.java
@@ -0,0 +1,114 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.info.InfoPhaseArchiveDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.questionnaire.QuestionnairePhaseArchiveDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.training.TrainingPhaseArchiveDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.PhaseType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Encapsulates information about abstract phase.
+ * Used for archiving.
+ * Extended by {@link QuestionnairePhaseArchiveDTO}, {@link TrainingPhaseArchiveDTO} and {@link InfoPhaseArchiveDTO}.
+ */
+@JsonSubTypes({
+        @JsonSubTypes.Type(value = TrainingPhaseArchiveDTO.class, name = "TrainingPhaseArchiveDTO"),
+        @JsonSubTypes.Type(value = QuestionnairePhaseArchiveDTO.class, name = "QuestionnairePhaseArchiveDTO"),
+        @JsonSubTypes.Type(value = InfoPhaseArchiveDTO.class, name = "InfoPhaseArchiveDTO")})
+@ApiModel(value = "AbstractPhaseArchiveDTO", subTypes = {TrainingPhaseArchiveDTO.class, InfoPhaseArchiveDTO.class, QuestionnairePhaseArchiveDTO.class},
+        description = "Superclass for classes TrainingPhaseArchiveDTO, InfoPhaseArchiveDTO and QuestionnairePhaseArchiveDTO")
+public abstract class AbstractPhaseArchiveDTO {
+
+    @ApiModelProperty(value = "Main identifier of phase.", example = "1")
+    protected Long id;
+    @ApiModelProperty(value = "Short textual description of the phase.", example = "Training phase")
+    protected String title;
+    @ApiModelProperty(value = "Type of the phase.", example = "TRAINING")
+    protected PhaseType phaseType;
+    @ApiModelProperty(value = "Order of phase, starts with 0", example = "2")
+    protected Integer order;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets phase type.
+     *
+     * @return the phase type
+     */
+    public PhaseType getPhaseType() {
+        return phaseType;
+    }
+
+    /**
+     * Sets phase type.
+     *
+     * @param phaseType the phase type
+     */
+    public void setPhaseType(PhaseType phaseType) {
+        this.phaseType = phaseType;
+    }
+
+    /**
+     * Gets order.
+     *
+     * @return the order
+     */
+    public int getOrder() {
+        return order;
+    }
+
+    /**
+     * Sets order.
+     *
+     * @param order the order
+     */
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    @Override
+    public String toString() {
+        return "AbstractPhaseArchiveDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", phaseType=" + phaseType +
+                ", order=" + order +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/info/InfoPhaseArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/info/InfoPhaseArchiveDTO.java
new file mode 100644
index 00000000..544e7393
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/info/InfoPhaseArchiveDTO.java
@@ -0,0 +1,56 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.info;
+
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.AbstractPhaseArchiveDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Encapsulates information about info phase. Inherits from {@link AbstractPhaseArchiveDTO}
+ * Used for archiving.
+ */
+@ApiModel(value = "InfoPhaseArchiveDTO", description = "Archived info phase.", parent = AbstractPhaseArchiveDTO.class)
+public class InfoPhaseArchiveDTO extends AbstractPhaseArchiveDTO {
+
+    @ApiModelProperty(value = "The information and experiences that are directed towards a participant.", example = "Informational stuff")
+    private String content;
+
+    /**
+     * Gets content.
+     *
+     * @return the content
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * Sets content.
+     *
+     * @param content the content
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof InfoPhaseArchiveDTO)) return false;
+        InfoPhaseArchiveDTO that = (InfoPhaseArchiveDTO) o;
+        return Objects.equals(getContent(), that.getContent());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getContent());
+    }
+
+    @Override
+    public String toString() {
+        return "InfoPhaseArchiveDTO{" +
+                "content='" + content + '\'' +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionArchiveDTO.java
new file mode 100644
index 00000000..6e41021f
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionArchiveDTO.java
@@ -0,0 +1,77 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionType;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+import java.util.Objects;
+
+public class QuestionArchiveDTO {
+
+    @ApiModelProperty(value = "Main identifier of question.", example = "1")
+    protected Long id;
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    private int order;
+    @ApiModelProperty(value = "The question that will be displayed to a player", required = true, example = "What's the capital of Canada?")
+    private String text;
+    @ApiModelProperty(value = "It defines the type of the question", allowableValues = "FFQ, MCQ, RFQ", required = true, example = "MCQ")
+    private QuestionType questionType;
+    @ApiModelProperty(value = "Choices that are distributed with the question", required = true)
+    private List<QuestionChoiceArchiveDTO> choices;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public QuestionType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuestionType type) {
+        this.questionType = type;
+    }
+
+    public List<QuestionChoiceArchiveDTO> getChoices() {
+        return choices;
+    }
+
+    public void setChoices(List<QuestionChoiceArchiveDTO> choices) {
+        this.choices = choices;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionArchiveDTO)) return false;
+        QuestionArchiveDTO that = (QuestionArchiveDTO) o;
+        return getOrder() == that.getOrder() &&
+                Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getText(), that.getText()) &&
+                getQuestionType() == that.getQuestionType();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getOrder(), getText(), getQuestionType());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionChoiceArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionChoiceArchiveDTO.java
new file mode 100644
index 00000000..d8116130
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionChoiceArchiveDTO.java
@@ -0,0 +1,75 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+public class QuestionChoiceArchiveDTO {
+
+    @ApiModelProperty(value = "Question choice ID. Leave blank if new choice is added", required = true, example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
+    private String text;
+    @ApiModelProperty(value = "It defines whether this answer is correct or not", required = true, example = "true")
+    private Boolean correct;
+    @ApiModelProperty(value = "Order of question choice", required = true, example = "0")
+    private Integer order;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public Boolean isCorrect() {
+        return correct;
+    }
+
+    public void setCorrect(Boolean correct) {
+        this.correct = correct;
+    }
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionChoiceArchiveDTO)) return false;
+        QuestionChoiceArchiveDTO that = (QuestionChoiceArchiveDTO) o;
+        return Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getText(), that.getText()) &&
+                Objects.equals(correct, that.correct) &&
+                Objects.equals(getOrder(), that.getOrder());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getText(), correct, getOrder());
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionChoiceArchiveDTO{" +
+                "id=" + id +
+                ", text='" + text + '\'' +
+                ", correct=" + correct +
+                ", order=" + order +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionPhaseRelationArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionPhaseRelationArchiveDTO.java
new file mode 100644
index 00000000..b7fbe738
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionPhaseRelationArchiveDTO.java
@@ -0,0 +1,58 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Set;
+
+public class QuestionPhaseRelationArchiveDTO {
+
+    @ApiModelProperty(value = "Question-Phase relation ID. Leave blank if a new one is added", required = true, example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    private Integer order;
+    @ApiModelProperty(value = "Set of IDs of questions related to the specified questionnaire")
+    private Set<Long> questionIds;
+    @ApiModelProperty(value = "ID of training phase to which the questions are related of question", required = true, example = "1")
+    private Long phaseId;
+    @ApiModelProperty(value = "Percentage that defines whether a player was successful or not ", required = true, example = "50")
+    private int successRate;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    public Set<Long> getQuestionIds() {
+        return questionIds;
+    }
+
+    public void setQuestionIds(Set<Long> questionIds) {
+        this.questionIds = questionIds;
+    }
+
+    public Long getPhaseId() {
+        return phaseId;
+    }
+
+    public void setPhaseId(Long phaseId) {
+        this.phaseId = phaseId;
+    }
+
+    public int getSuccessRate() {
+        return successRate;
+    }
+
+    public void setSuccessRate(int successRate) {
+        this.successRate = successRate;
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionnairePhaseArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionnairePhaseArchiveDTO.java
new file mode 100644
index 00000000..76ef7e2a
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/questionnaire/QuestionnairePhaseArchiveDTO.java
@@ -0,0 +1,73 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.AbstractPhaseArchiveDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.questionnaire.QuestionDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.questionnaire.QuestionPhaseRelationDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionnaireType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about assessment phase. Inherits from {@link AbstractPhaseArchiveDTO}
+ * Used for archiving.
+ */
+@ApiModel(value = "QuestionnairePhaseArchiveDTO", description = "Archived questionnaire phase.", parent = AbstractPhaseArchiveDTO.class)
+public class QuestionnairePhaseArchiveDTO extends AbstractPhaseArchiveDTO {
+
+    private List<QuestionDTO> questions;
+    private QuestionnaireType questionnaireType;
+    private List<QuestionPhaseRelationDTO> phaseRelations;
+
+    public List<QuestionDTO> getQuestions() {
+        return questions;
+    }
+
+    public void setQuestions(List<QuestionDTO> questions) {
+        this.questions = questions;
+    }
+
+    public QuestionnaireType getQuestionnaireType() {
+        return questionnaireType;
+    }
+
+    public void setQuestionnaireType(QuestionnaireType questionnaireType) {
+        this.questionnaireType = questionnaireType;
+    }
+
+    public List<QuestionPhaseRelationDTO> getPhaseRelations() {
+        return phaseRelations;
+    }
+
+    public void setPhaseRelations(List<QuestionPhaseRelationDTO> phaseRelations) {
+        this.phaseRelations = phaseRelations;
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionnairePhaseArchiveDTO{" +
+                "questionnaireType=" + questionnaireType +
+                ", id=" + id +
+                ", title='" + title + '\'' +
+                ", phaseType=" + phaseType +
+                ", order=" + order +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionnairePhaseArchiveDTO)) return false;
+        QuestionnairePhaseArchiveDTO that = (QuestionnairePhaseArchiveDTO) o;
+        return Objects.equals(getQuestions(), that.getQuestions()) &&
+                getQuestionnaireType() == that.getQuestionnaireType() &&
+                Objects.equals(getPhaseRelations(), that.getPhaseRelations());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getQuestions(), getQuestionnaireType(), getPhaseRelations());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/DecisionMatrixRowArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/DecisionMatrixRowArchiveDTO.java
new file mode 100644
index 00000000..00dacb24
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/DecisionMatrixRowArchiveDTO.java
@@ -0,0 +1,80 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.training;
+
+public class DecisionMatrixRowArchiveDTO {
+    private long id;
+    private int order;
+    private double assessmentAnswered;
+    private double keywordUsed;
+    private double completedInTime;
+    private double solutionDisplayed;
+    private double wrongAnswers;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public double getAssessmentAnswered() {
+        return assessmentAnswered;
+    }
+
+    public void setAssessmentAnswered(double assessmentAnswered) {
+        this.assessmentAnswered = assessmentAnswered;
+    }
+
+    public double getKeywordUsed() {
+        return keywordUsed;
+    }
+
+    public void setKeywordUsed(double keywordUsed) {
+        this.keywordUsed = keywordUsed;
+    }
+
+    public double getCompletedInTime() {
+        return completedInTime;
+    }
+
+    public void setCompletedInTime(double completedInTime) {
+        this.completedInTime = completedInTime;
+    }
+
+    public double getSolutionDisplayed() {
+        return solutionDisplayed;
+    }
+
+    public void setSolutionDisplayed(double solutionDisplayed) {
+        this.solutionDisplayed = solutionDisplayed;
+    }
+
+    public double getWrongAnswers() {
+        return wrongAnswers;
+    }
+
+    public void setWrongAnswers(double wrongAnswers) {
+        this.wrongAnswers = wrongAnswers;
+    }
+
+    @Override
+    public String toString() {
+        return "DecisionMatrixRow{" +
+                "id=" + id +
+                ", order=" + order +
+                ", assessmentAnswered=" + assessmentAnswered +
+                ", keywordUsed=" + keywordUsed +
+                ", completedInTime=" + completedInTime +
+                ", solutionDisplayed=" + solutionDisplayed +
+                ", wrongAnswers=" + wrongAnswers +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TaskArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TaskArchiveDTO.java
new file mode 100644
index 00000000..df6aad09
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TaskArchiveDTO.java
@@ -0,0 +1,111 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.training;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class TaskArchiveDTO {
+
+    @ApiModelProperty(value = "Main identifier of task.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Short description of task", required = true, example = "Task title")
+    private String title;
+    private Integer order;
+    @ApiModelProperty(value = "The information that are displayed to a player", required = true, example = "Capture the flag")
+    private String content;
+    @ApiModelProperty(value = "Keyword that must be found in the task. Necessary in order to get to the next phase", required = true, example = "secretFlag")
+    private String answer;
+    @ApiModelProperty(value = "Description how to get the answer", required = true, example = "Open secret.txt")
+    private String solution;
+    @ApiModelProperty(value = "It defines the allowed number of incorrect answers submitted by the player", required = true, example = "5")
+    private int incorrectAnswerLimit;
+    @ApiModelProperty(value = "It defines whether the sandbox can be modified", example = "true")
+    private boolean modifySandbox;
+    @ApiModelProperty(value = "It defines the expected duration of sandbox change defined in seconds", example = "15")
+    private int sandboxChangeExpectedDuration;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    public String getSolution() {
+        return solution;
+    }
+
+    public void setSolution(String solution) {
+        this.solution = solution;
+    }
+
+    public int getIncorrectAnswerLimit() {
+        return incorrectAnswerLimit;
+    }
+
+    public void setIncorrectAnswerLimit(int incorrectAnswerLimit) {
+        this.incorrectAnswerLimit = incorrectAnswerLimit;
+    }
+
+    public boolean isModifySandbox() {
+        return modifySandbox;
+    }
+
+    public void setModifySandbox(boolean modifySandbox) {
+        this.modifySandbox = modifySandbox;
+    }
+
+    public int getSandboxChangeExpectedDuration() {
+        return sandboxChangeExpectedDuration;
+    }
+
+    public void setSandboxChangeExpectedDuration(int sandboxChangeExpectedDuration) {
+        this.sandboxChangeExpectedDuration = sandboxChangeExpectedDuration;
+    }
+
+    @Override
+    public String toString() {
+        return "TaskDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", order=" + order +
+                ", content='" + content + '\'' +
+                ", answer='" + answer + '\'' +
+                ", solution='" + solution + '\'' +
+                ", incorrectAnswerLimit=" + incorrectAnswerLimit +
+                ", isSandboxModified=" + modifySandbox +
+                ", sandboxChangeExpectedDuration=" + sandboxChangeExpectedDuration +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TrainingPhaseArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TrainingPhaseArchiveDTO.java
new file mode 100644
index 00000000..f9e81939
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/phases/training/TrainingPhaseArchiveDTO.java
@@ -0,0 +1,78 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.phases.training;
+
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.AbstractPhaseArchiveDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.training.TaskDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Encapsulates information about game level. Inherits from {@link AbstractPhaseArchiveDTO}
+ * Used for archiving.
+ */
+@ApiModel(value = "TrainingPhaseArchiveDTO", description = "Archived training phase.", parent = AbstractPhaseArchiveDTO.class)
+public class TrainingPhaseArchiveDTO extends AbstractPhaseArchiveDTO {
+
+    @ApiModelProperty(value = "Estimated time (minutes) taken by the player to solve the training phase", example = "20")
+    private int estimatedDuration;
+    @ApiModelProperty(value = "Maximal number of allowed commands provided by played", required = true, example = "10")
+    private int allowedCommands;
+    @ApiModelProperty(value = "Maximal number of allowed wrong answers provided by played", required = true, example = "10")
+    private int allowedWrongAnswers;
+    private List<TaskDTO> tasks = new ArrayList<>();
+
+    private List<DecisionMatrixRowArchiveDTO> decisionMatrix;
+
+    public int getEstimatedDuration() {
+        return estimatedDuration;
+    }
+
+    public void setEstimatedDuration(int estimatedDuration) {
+        this.estimatedDuration = estimatedDuration;
+    }
+
+    public int getAllowedCommands() {
+        return allowedCommands;
+    }
+
+    public void setAllowedCommands(int allowedCommands) {
+        this.allowedCommands = allowedCommands;
+    }
+
+    public int getAllowedWrongAnswers() {
+        return allowedWrongAnswers;
+    }
+
+    public void setAllowedWrongAnswers(int allowedWrongAnswers) {
+        this.allowedWrongAnswers = allowedWrongAnswers;
+    }
+
+    public List<TaskDTO> getTasks() {
+        return tasks;
+    }
+
+    public void setTasks(List<TaskDTO> tasks) {
+        this.tasks = tasks;
+    }
+
+    public List<DecisionMatrixRowArchiveDTO> getDecisionMatrix() {
+        return decisionMatrix;
+    }
+
+    public void setDecisionMatrix(List<DecisionMatrixRowArchiveDTO> decisionMatrix) {
+        this.decisionMatrix = decisionMatrix;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingPhaseArchiveDTO{" +
+                "estimatedDuration=" + estimatedDuration +
+                ", allowedCommands=" + allowedCommands +
+                ", allowedWrongAnswers=" + allowedWrongAnswers +
+                ", tasks=" + tasks +
+                ", decisionMatrix=" + decisionMatrix +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingDefinitionArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingDefinitionArchiveDTO.java
new file mode 100644
index 00000000..62c509af
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingDefinitionArchiveDTO.java
@@ -0,0 +1,199 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.training;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import cz.muni.ics.kypo.training.adaptive.dto.archive.phases.AbstractPhaseArchiveDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Encapsulates information about Training Definition.
+ * Used for archiving
+ */
+@ApiModel(value = "TrainingDefinitionArchiveDTO", description = "Archived detailed information about training definition which also include individual levels.")
+public class TrainingDefinitionArchiveDTO {
+
+    @ApiModelProperty(value = "Main identifier of training definition.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "")
+    private String[] prerequisites;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+    private TDState state;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+    private boolean showStepperBar;
+    @ApiModelProperty(value = "Information about all levels in training definition.")
+    private List<AbstractPhaseArchiveDTO> phases = new ArrayList<>();
+    @ApiModelProperty(value = "Estimated time it takes to finish runs created from this definition.", example = "5")
+    private int estimatedDuration;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites string [ ].
+     *
+     * @return the string [ ]
+     */
+    public String[] getPrerequisites() {
+        return prerequisites;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisites the prerequisites
+     */
+    public void setPrerequisites(String[] prerequisites) {
+        this.prerequisites = prerequisites;
+    }
+
+    /**
+     * Get outcomes string [ ].
+     *
+     * @return the string [ ]
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the state
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the state
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Is show stepper bar boolean.
+     *
+     * @return the boolean
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets show stepper bar.
+     *
+     * @param showStepperBar the show stepper bar
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    /**
+     * Gets phases.
+     *
+     * @return the phases
+     */
+    public List<AbstractPhaseArchiveDTO> getPhases() {
+        return phases;
+    }
+
+    /**
+     * Sets phases.
+     *
+     * @param phases the phases
+     */
+    public void setPhases(List<AbstractPhaseArchiveDTO> phases) {
+        this.phases = phases;
+    }
+
+    /**
+     * Gets estimated duration.
+     *
+     * @return the estimated duration
+     */
+    public int getEstimatedDuration() {
+        return estimatedDuration;
+    }
+
+    /**
+     * Sets estimated duration.
+     *
+     * @param estimatedDuration the estimated duration
+     */
+    public void setEstimatedDuration(int estimatedDuration) {
+        this.estimatedDuration = estimatedDuration;
+    }
+
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingInstanceArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingInstanceArchiveDTO.java
new file mode 100644
index 00000000..23fc6ae6
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingInstanceArchiveDTO.java
@@ -0,0 +1,154 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.training;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.Set;
+
+/**
+ * Encapsulates information about Training instance.
+ * Used for archiving
+ *
+ */
+@ApiModel(value = "TrainingInstanceArchiveDTO", description = "The finished and archived instance of training definition which includes individual finished training runs of participants.")
+public class TrainingInstanceArchiveDTO {
+
+	@ApiModelProperty(value = "Main identifier of training instance.", example = "1")
+	private Long id;
+	@ApiModelProperty(value = "Main identifier of training definition associated with this instance.", example = "1")
+	private Long definitionId;
+	@ApiModelProperty(value = "Date when training instance starts.", example = "2016-10-19 10:23:54+02")
+	@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+	private LocalDateTime startTime;
+	@ApiModelProperty(value = "Date when training instance ends.", example = "2017-10-19 10:23:54+02")
+	@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+	private LocalDateTime endTime;
+	@ApiModelProperty(value = "Short textual description of the training instance.", example = "Concluded Instance")
+	private String title;
+	@ApiModelProperty(value = "Reference to organizersRefIds which organize training instance.")
+	private Set<Long> organizersRefIds;
+	@ApiModelProperty(value = "Token needed to access runs created from this definition", example = "pass-1234")
+	private String accessToken;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getDefinitionId() {
+		return definitionId;
+	}
+
+	public void setDefinitionId(Long definitionId) {
+		this.definitionId = definitionId;
+	}
+
+	/**
+	 * Gets start time of training instance.
+	 *
+	 * @return the start time
+	 */
+	public LocalDateTime getStartTime() {
+		return startTime;
+	}
+
+	/**
+	 * Sets start time of training instance.
+	 *
+	 * @param startTime the start time
+	 */
+	public void setStartTime(LocalDateTime startTime) {
+		this.startTime = startTime;
+	}
+
+	/**
+	 * Gets end time of training instance.
+	 *
+	 * @return the end time
+	 */
+	public LocalDateTime getEndTime() {
+		return endTime;
+	}
+
+	/**
+	 * Sets end time of training instance.
+	 *
+	 * @param endTime the end time
+	 */
+	public void setEndTime(LocalDateTime endTime) {
+		this.endTime = endTime;
+	}
+
+	/**
+	 * Gets title of training instance.
+	 *
+	 * @return the title
+	 */
+	public String getTitle() {
+		return title;
+	}
+
+	/**
+	 * Sets title of training instance.
+	 *
+	 * @param title the title
+	 */
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	/**
+	 * Gets organizersRefIds of training instance.
+	 *
+	 * @return the organizersRefIds
+	 */
+	public Set<Long> getOrganizersRefIds() {
+		return organizersRefIds;
+	}
+
+	/**
+	 * Sets organizersRefIds of training instance.
+	 *
+	 * @param organizersRefIds the organizersRefIds
+	 */
+	public void setOrganizersRefIds(Set<Long> organizersRefIds) {
+		this.organizersRefIds = organizersRefIds;
+	}
+
+	/**
+	 * Gets access token of training instance.
+	 *
+	 * @return the access token
+	 */
+	public String getAccessToken() {
+		return accessToken;
+	}
+
+	/**
+	 * Sets access token of training instance.
+	 *
+	 * @param accessToken the access token
+	 */
+	public void setAccessToken(String accessToken) {
+		this.accessToken = accessToken;
+	}
+
+	@Override
+	public String toString() {
+		return "TrainingInstanceArchiveDTO{" +
+				"id=" + id +
+				", definitionId=" + definitionId +
+				", startTime=" + startTime +
+				", endTime=" + endTime +
+				", title='" + title + '\'' +
+				", organizersRefIds=" + organizersRefIds +
+				", accessToken='" + accessToken + '\'' +
+				'}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingRunArchiveDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingRunArchiveDTO.java
new file mode 100644
index 00000000..d3d2aedc
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/archive/training/TrainingRunArchiveDTO.java
@@ -0,0 +1,152 @@
+package cz.muni.ics.kypo.training.adaptive.dto.archive.training;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TRState;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training run.
+ * Used for archiving
+ */
+@ApiModel(value = "TrainingRunArchiveDTO", description = "An archived run of training instance of a particular participant.")
+public class TrainingRunArchiveDTO {
+
+    @ApiModelProperty(value = "Main identifier of training run.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Main identifier of training instance associated with this run.", example = "1")
+    private Long instanceId;
+    @ApiModelProperty(value = "Date when training run started.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training run ends.", example = "2022-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Current state of training run.", example = "ALLOCATED")
+    private TRState state;
+    @ApiModelProperty(value = "Reference to participant of training run.", example = "5")
+    private Long participantRefId;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets instance id.
+     *
+     * @return the instance id
+     */
+    public Long getInstanceId() {
+        return instanceId;
+    }
+
+    /**
+     * Sets instance id.
+     *
+     * @param instanceId the instance id
+     */
+    public void setInstanceId(Long instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the state
+     */
+    public TRState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the state
+     */
+    public void setState(TRState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets participant ref id.
+     *
+     * @return the participant ref id
+     */
+    public Long getParticipantRefId() {
+        return participantRefId;
+    }
+
+    /**
+     * Sets participant ref id.
+     *
+     * @param participantRefId the participant ref id
+     */
+    public void setParticipantRefId(Long participantRefId) {
+        this.participantRefId = participantRefId;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingRunArchiveDTO{" +
+                "id=" + id +
+                ", instanceId=" + instanceId +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", state=" + state +
+                ", participantRefId=" + participantRefId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCDeserializer.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCDeserializer.java
new file mode 100644
index 00000000..8aa9dbd3
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCDeserializer.java
@@ -0,0 +1,29 @@
+package cz.muni.ics.kypo.training.adaptive.dto.converters;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+
+import java.io.IOException;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+
+/**
+ * Deserializes UTC time with 'Z' suffix from Angular typescript Date, e.g., the date: '2018-11-30T10:26:02.727Z'
+ *
+ */
+public class LocalDateTimeUTCDeserializer extends StdDeserializer<LocalDateTime> {
+
+    public LocalDateTimeUTCDeserializer() {
+        super(LocalDateTime.class);
+    }
+
+    @Override
+    public LocalDateTime deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
+        Instant instant = Instant.parse(jp.readValueAs(String.class));
+        return LocalDateTime.ofInstant(instant, ZoneId.of(ZoneOffset.UTC.getId()));
+    }
+
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCSerializer.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCSerializer.java
new file mode 100644
index 00000000..ca951618
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/converters/LocalDateTimeUTCSerializer.java
@@ -0,0 +1,25 @@
+package cz.muni.ics.kypo.training.adaptive.dto.converters;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+
+import java.io.IOException;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+
+/**
+ * This class serialize LocalDateTime to UTC time.
+ *
+ */
+public class LocalDateTimeUTCSerializer extends StdSerializer<LocalDateTime> {
+
+    public LocalDateTimeUTCSerializer() {
+        super(LocalDateTime.class);
+    }
+
+    @Override
+    public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider provider) throws IOException {
+        gen.writeString(value.toInstant(ZoneOffset.UTC).toString());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/FileToReturnDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/FileToReturnDTO.java
new file mode 100644
index 00000000..c565766d
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/FileToReturnDTO.java
@@ -0,0 +1,74 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Class encapsulating entity into file.
+ */
+@ApiModel(value = "FileToReturnDTO", description = "Wrapping model which contains the content and title of the file.")
+public class FileToReturnDTO {
+
+	@ApiModelProperty(value = "Content of the file.", example = "[string]")
+	private byte[] content;
+	@ApiModelProperty(value = "Title of the file.", example = "TrainingInstance-NetworkDemolition")
+	private String title;
+
+	/**
+	 * Instantiates a new File to return dto.
+	 */
+	public FileToReturnDTO() {
+	}
+
+	/**
+	 * Instantiates a new File to return dto.
+	 *
+	 * @param content the content in byte array
+	 * @param title   the title of the file
+	 */
+	public FileToReturnDTO(byte[] content, String title) {
+		this.content = content;
+		this.title = title;
+	}
+
+	/**
+	 * Get content in byte array
+	 *
+	 * @return the in byte array
+	 */
+	public byte[] getContent() {
+		return content;
+	}
+
+	/**
+	 * Sets content.
+	 *
+	 * @param content the content
+	 */
+	public void setContent(byte[] content) {
+		this.content = content;
+	}
+
+	/**
+	 * Gets title of the file.
+	 *
+	 * @return the title of the file.
+	 */
+	public String getTitle() {
+		return title;
+	}
+
+	/**
+	 * Sets title of the file.
+	 *
+	 * @param title the title
+	 */
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	@Override
+    public String toString() {
+		return "FileToReturnDTO{" + "content=" + content + ", title='" + title + '\'' + '}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/UserRefExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/UserRefExportDTO.java
new file mode 100644
index 00000000..24b726a2
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/UserRefExportDTO.java
@@ -0,0 +1,145 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Encapsulates information about user reference.
+ */
+@ApiModel(value = "UserRefExportDTO", description = "An exported information about user reference.")
+public class UserRefExportDTO {
+
+    @ApiModelProperty(value = "Reference to user in another microservice.", example = "441048@mail.muni.cz")
+    private String userRefLogin;
+    @ApiModelProperty(value = "Reference to user in another microservice and get his full name", example = "Mgr. Ing. Pavel Å eda")
+    private String userRefFullName;
+    @ApiModelProperty(value = "User given name", example = "Pavel")
+    private String userRefGivenName;
+    @ApiModelProperty(value = "User family name", example = "Seda")
+    private String userRefFamilyName;
+    @ApiModelProperty(value = "Reference to user in another microservice and get his iss", example = "https://oidc.muni.cz")
+    private String iss;
+    @ApiModelProperty(value = "Reference to user in another microservice and get his id", example = "1")
+    private Long userRefId;
+
+    /**
+     * Gets user reference login.
+     *
+     * @return the user reference login
+     */
+    public String getUserRefLogin() {
+        return userRefLogin;
+    }
+
+    /**
+     * Sets user reference login.
+     *
+     * @param userRefLogin the user reference login
+     */
+    public void setUserRefLogin(String userRefLogin) {
+        this.userRefLogin = userRefLogin;
+    }
+
+    /**
+     * Gets user reference full name.
+     *
+     * @return the user reference full name
+     */
+    public String getUserRefFullName() {
+        return userRefFullName;
+    }
+
+    /**
+     * Sets user reference full name.
+     *
+     * @param userRefFullName the user reference full name
+     */
+    public void setUserRefFullName(String userRefFullName) {
+        this.userRefFullName = userRefFullName;
+    }
+
+    /**
+     * Gets iss.
+     *
+     * @return the iss
+     */
+    public String getIss() {
+        return iss;
+    }
+
+    /**
+     * Sets iss.
+     *
+     * @param iss the iss
+     */
+    public void setIss(String iss) {
+        this.iss = iss;
+    }
+
+    /**
+     * Gets user ref id.
+     *
+     * @return the user ref id
+     */
+    public Long getUserRefId() {
+        return userRefId;
+    }
+
+    /**
+     * Sets user ref id.
+     *
+     * @param userRefId the user ref id
+     */
+    public void setUserRefId(Long userRefId) {
+        this.userRefId = userRefId;
+    }
+
+    /**
+     * Gets user ref given name.
+     *
+     * @return the user ref given name
+     */
+    public String getUserRefGivenName() {
+        return userRefGivenName;
+    }
+
+    /**
+     * Sets user ref given name.
+     *
+     * @param userRefGivenName the user ref given name
+     */
+    public void setUserRefGivenName(String userRefGivenName) {
+        this.userRefGivenName = userRefGivenName;
+    }
+
+    /**
+     * Gets user ref family name.
+     *
+     * @return the user ref family name
+     */
+    public String getUserRefFamilyName() {
+        return userRefFamilyName;
+    }
+
+    /**
+     * Sets user ref family name.
+     *
+     * @param userRefFamilyName the user ref family name
+     */
+    public void setUserRefFamilyName(String userRefFamilyName) {
+        this.userRefFamilyName = userRefFamilyName;
+    }
+
+
+    @Override
+    public String toString() {
+        return "UserRefExportDTO{" +
+                "userRefLogin='" + userRefLogin + '\'' +
+                ", userRefFullName='" + userRefFullName + '\'' +
+                ", userRefGivenName='" + userRefGivenName + '\'' +
+                ", userRefFamilyName='" + userRefFamilyName + '\'' +
+                ", iss='" + iss + '\'' +
+                ", userRefId=" + userRefId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/AbstractPhaseExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/AbstractPhaseExportDTO.java
new file mode 100644
index 00000000..a7aec5f5
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/AbstractPhaseExportDTO.java
@@ -0,0 +1,110 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases;
+
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.info.InfoPhaseExportDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.questionnaire.QuestionnairePhaseExportDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.training.TrainingPhaseExportDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.PhaseType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Encapsulates information about abstract phase.
+ * Extended by {@link QuestionnairePhaseExportDTO}, {@link TrainingPhaseExportDTO} and {@link InfoPhaseExportDTO}
+ *
+ */
+@ApiModel(value = "AbstractPhaseExportDTO", subTypes = {TrainingPhaseExportDTO.class, InfoPhaseExportDTO.class, QuestionnairePhaseExportDTO.class},
+        description = "Superclass for classes TrainingPhaseExportDTO, InfoPhaseExportDTO and QuestionnairePhaseExportDTO")
+public abstract class AbstractPhaseExportDTO {
+
+    @ApiModelProperty(value = "Short textual description of the phase.", example = "Training Phase")
+    protected String title;
+    @ApiModelProperty(value = "Type of the phase.", example = "TRAINING")
+    protected PhaseType phaseType;
+    @ApiModelProperty(value = "Order of phase, starts with 0", example = "2")
+    protected int order;
+
+    /**
+     * Instantiates a new Abstract phase export dto.
+     */
+    public AbstractPhaseExportDTO(){}
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets phase type.
+     *
+     * @return the {@link PhaseType}
+     */
+    public PhaseType getPhaseType() {
+        return phaseType;
+    }
+
+    /**
+     * Sets phase type.
+     *
+     * @param phaseType the {@link PhaseType}
+     */
+    public void setPhaseType(PhaseType phaseType) {
+        this.phaseType = phaseType;
+    }
+
+    /**
+     * Gets order.
+     *
+     * @return the order
+     */
+    public int getOrder() {
+        return order;
+    }
+
+    /**
+     * Sets order.
+     *
+     * @param order the order
+     */
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof AbstractPhaseExportDTO)) return false;
+        AbstractPhaseExportDTO that = (AbstractPhaseExportDTO) o;
+        return getOrder() == that.getOrder() &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                getPhaseType() == that.getPhaseType();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getTitle(), getPhaseType(), getOrder());
+    }
+
+    @Override
+    public String toString() {
+        return "AbstractPhaseExportDTO{" +
+                "title='" + title + '\'' +
+                ", phaseType=" + phaseType +
+                ", order=" + order +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/info/InfoPhaseExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/info/InfoPhaseExportDTO.java
new file mode 100644
index 00000000..066c0c40
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/info/InfoPhaseExportDTO.java
@@ -0,0 +1,48 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.info;
+
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.AbstractPhaseExportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Encapsulates information about info phase. Inherits from {@link AbstractPhaseExportDTO}
+ *
+ */
+@ApiModel(value = "InfoPhaseExportDTO", description = "Exported info phase.", parent = AbstractPhaseExportDTO.class)
+public class InfoPhaseExportDTO extends AbstractPhaseExportDTO {
+
+    @ApiModelProperty(value = "The information and experiences that are directed towards a participant.", example = "Informational stuff")
+    private String content;
+
+    /**
+     * Instantiates a new Info phase export dto.
+     */
+    public InfoPhaseExportDTO() {
+        this.content = "";
+    }
+
+    /**
+     * Gets content.
+     *
+     * @return the content
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * Sets content.
+     *
+     * @param content the content
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        return "InfoPhaseExportDTO{" +
+                "content='" + content + '\'' +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionChoiceExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionChoiceExportDTO.java
new file mode 100644
index 00000000..c369b0be
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionChoiceExportDTO.java
@@ -0,0 +1,40 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+public class QuestionChoiceExportDTO {
+
+    @ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
+    private String text;
+    @ApiModelProperty(value = "It defines whether this answer is correct or not", required = true, example = "true")
+    private Boolean correct;
+    @ApiModelProperty(value = "Order of question choice", required = true, example = "0")
+    private Integer order;
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public Boolean isCorrect() {
+        return correct;
+    }
+
+    public void setCorrect(Boolean correct) {
+        this.correct = correct;
+    }
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionExportDTO.java
new file mode 100644
index 00000000..9884462a
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionExportDTO.java
@@ -0,0 +1,52 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionType;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+public abstract class QuestionExportDTO {
+
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    private int order;
+    @ApiModelProperty(value = "The question that will be displayed to a player", required = true, example = "What's the capital of Canada?")
+    private String text;
+    @ApiModelProperty(value = "It defines the type of the question", allowableValues = "FFQ, MCQ, RFQ", required = true, example = "MCQ")
+    private QuestionType questionType;
+    @ApiModelProperty(value = "Choices that are distributed with the question", required = true)
+    private List<QuestionChoiceExportDTO> choices;
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public QuestionType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuestionType type) {
+        this.questionType = type;
+    }
+
+    public List<QuestionChoiceExportDTO> getChoices() {
+        return choices;
+    }
+
+    public void setChoices(List<QuestionChoiceExportDTO> choices) {
+        this.choices = choices;
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionPhaseRelationExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionPhaseRelationExportDTO.java
new file mode 100644
index 00000000..0bb8c035
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionPhaseRelationExportDTO.java
@@ -0,0 +1,76 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+import java.util.Set;
+
+public class QuestionPhaseRelationExportDTO {
+
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    private Integer order;
+    @ApiModelProperty(value = "Set of IDs of questions related to the specified questionnaire")
+    private Set<Long> questionIds;
+    @ApiModelProperty(value = "ID of training phase to which the questions are related of question", required = true, example = "1")
+    private Long phaseId;
+    @ApiModelProperty(value = "Percentage that defines whether a player was successful or not ", required = true, example = "50")
+    private int successRate;
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    public Set<Long> getQuestionIds() {
+        return questionIds;
+    }
+
+    public void setQuestionIds(Set<Long> questionIds) {
+        this.questionIds = questionIds;
+    }
+
+    public Long getPhaseId() {
+        return phaseId;
+    }
+
+    public void setPhaseId(Long phaseId) {
+        this.phaseId = phaseId;
+    }
+
+    public int getSuccessRate() {
+        return successRate;
+    }
+
+    public void setSuccessRate(int successRate) {
+        this.successRate = successRate;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionPhaseRelationExportDTO)) return false;
+        QuestionPhaseRelationExportDTO that = (QuestionPhaseRelationExportDTO) o;
+        return getSuccessRate() == that.getSuccessRate() &&
+                Objects.equals(getOrder(), that.getOrder()) &&
+                Objects.equals(getQuestionIds(), that.getQuestionIds()) &&
+                Objects.equals(getPhaseId(), that.getPhaseId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getOrder(), getQuestionIds(), getPhaseId(), getSuccessRate());
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionPhaseRelationExportDTO{" +
+                "order=" + order +
+                ", questionIds=" + questionIds +
+                ", phaseId=" + phaseId +
+                ", successRate=" + successRate +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionnairePhaseExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionnairePhaseExportDTO.java
new file mode 100644
index 00000000..68338898
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/questionnaire/QuestionnairePhaseExportDTO.java
@@ -0,0 +1,58 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.AbstractPhaseExportDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionnaireType;
+import io.swagger.annotations.ApiModel;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about assessment level. Inherits from {@link AbstractPhaseExportDTO}
+ *
+ */
+@ApiModel(value = "AssessmentLevelExportDTO", description = "Exported assessment level.", parent = AbstractPhaseExportDTO.class)
+public class QuestionnairePhaseExportDTO extends AbstractPhaseExportDTO {
+
+    private List<QuestionExportDTO> questions;
+    private QuestionnaireType questionnaireType;
+    private List<QuestionPhaseRelationExportDTO> phaseRelations;
+
+    public List<QuestionExportDTO> getQuestions() {
+        return questions;
+    }
+
+    public void setQuestions(List<QuestionExportDTO> questions) {
+        this.questions = questions;
+    }
+
+    public QuestionnaireType getQuestionnaireType() {
+        return questionnaireType;
+    }
+
+    public void setQuestionnaireType(QuestionnaireType questionnaireType) {
+        this.questionnaireType = questionnaireType;
+    }
+
+    public List<QuestionPhaseRelationExportDTO> getPhaseRelations() {
+        return phaseRelations;
+    }
+
+    public void setPhaseRelations(List<QuestionPhaseRelationExportDTO> phaseRelations) {
+        this.phaseRelations = phaseRelations;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionnairePhaseExportDTO)) return false;
+        if (!super.equals(o)) return false;
+        QuestionnairePhaseExportDTO that = (QuestionnairePhaseExportDTO) o;
+        return getQuestionnaireType() == that.getQuestionnaireType();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), getQuestionnaireType());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/training/TrainingPhaseExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/training/TrainingPhaseExportDTO.java
new file mode 100644
index 00000000..8d53385c
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/phases/training/TrainingPhaseExportDTO.java
@@ -0,0 +1,114 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.phases.training;
+
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.AbstractPhaseExportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Encapsulates information about training phase. Inherits from {@link AbstractPhaseExportDTO}
+ *
+ */
+@ApiModel(value = "TrainingPhaseExportDTO", description = "Exported game level.", parent = AbstractPhaseExportDTO.class)
+public class TrainingPhaseExportDTO extends AbstractPhaseExportDTO {
+
+    @ApiModelProperty(value = "Keyword found in game, used for access next level.", example = "secretFlag")
+    private String flag;
+    @ApiModelProperty(value = "The information and experiences that are directed towards a participant.", example = "Play me")
+    private String content;
+    @ApiModelProperty(value = "Instruction how to get flag in game.", example = "This is how you do it")
+    private String solution;
+    @ApiModelProperty(value = "How many times player can submit incorrect flag before displaying solution.", example = "5")
+    private int incorrectFlagLimit;
+
+
+    /**
+     * Instantiates a new Game level export dto.
+     */
+    public TrainingPhaseExportDTO() {
+    }
+
+    /**
+     * Gets flag.
+     *
+     * @return the flag
+     */
+    public String getFlag() {
+        return flag;
+    }
+
+    /**
+     * Sets flag.
+     *
+     * @param flag the flag
+     */
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    /**
+     * Gets content.
+     *
+     * @return the content
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * Sets content.
+     *
+     * @param content the content
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    /**
+     * Gets solution.
+     *
+     * @return the solution
+     */
+    public String getSolution() {
+        return solution;
+    }
+
+    /**
+     * Sets solution.
+     *
+     * @param solution the solution
+     */
+    public void setSolution(String solution) {
+        this.solution = solution;
+    }
+
+    /**
+     * Gets incorrect flag limit.
+     *
+     * @return the incorrect flag limit
+     */
+    public int getIncorrectFlagLimit() {
+        return incorrectFlagLimit;
+    }
+
+    /**
+     * Sets incorrect flag limit.
+     *
+     * @param incorrectFlagLimit the incorrect flag limit
+     */
+    public void setIncorrectFlagLimit(int incorrectFlagLimit) {
+        this.incorrectFlagLimit = incorrectFlagLimit;
+    }
+
+    @Override
+    public String toString() {
+        return "GameLevelExportDTO{" +
+                "flag='" + flag + '\'' +
+                ", content='" + content + '\'' +
+                ", solution='" + solution + '\'' +
+                ", incorrectFlagLimit=" + incorrectFlagLimit +
+                ", title='" + title + '\'' +
+                ", maxScore=" + maxScore +
+                ", levelType=" + phaseType +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingDefinitionWithPhasesExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingDefinitionWithPhasesExportDTO.java
new file mode 100644
index 00000000..6682e249
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingDefinitionWithPhasesExportDTO.java
@@ -0,0 +1,189 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.training;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import cz.muni.ics.kypo.training.adaptive.dto.export.phases.AbstractPhaseExportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Encapsulates information about training definition and its levels.
+ *
+ */
+@ApiModel(value = "ExportTrainingDefinitionAndLevelsDTO", description = "An exported detailed information about training definition which also include individual levels.")
+public class TrainingDefinitionWithPhasesExportDTO {
+
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "")
+    private String[] prerequisites;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+    private TDState state;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+    private boolean showStepperBar;
+    @ApiModelProperty(value = "Information about all phases in training definition.")
+    private List<AbstractPhaseExportDTO> phases = new ArrayList<>();
+    @ApiModelProperty(value = "Estimated time (minutes) taken by the player to finish run created from this definition.", example = "5")
+    private int estimatedDuration;
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites.
+     *
+     * @return the prerequisites
+     */
+    public String[] getPrerequisites() {
+        return prerequisites;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisites the prerequisites
+     */
+    public void setPrerequisites(String[] prerequisites) {
+        this.prerequisites = prerequisites;
+    }
+
+    /**
+     * Get outcomes.
+     *
+     * @return the outcomes
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets development state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets development state.
+     *
+     * @param state {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Is show stepper bar boolean.
+     *
+     * @return the boolean
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets show stepper bar.
+     *
+     * @param showStepperBar the show stepper bar
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    /**
+     * Gets phases.
+     *
+     * @return the list of {@link AbstractPhaseExportDTO}
+     */
+    public List<AbstractPhaseExportDTO> getPhases() {
+        return phases;
+    }
+
+    /**
+     * Sets phases.
+     *
+     * @param phases the list of {@link AbstractPhaseExportDTO}
+     */
+    public void setPhases(List<AbstractPhaseExportDTO> phases) {
+        this.phases = phases;
+    }
+
+    /**
+     * Gets estimated duration.
+     *
+     * @return the estimated duration
+     */
+    public int getEstimatedDuration() {
+        return estimatedDuration;
+    }
+
+    /**
+     * Sets estimated duration.
+     *
+     * @param estimatedDuration the estimated duration
+     */
+    public void setEstimatedDuration(int estimatedDuration) {
+        this.estimatedDuration = estimatedDuration;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionWithPhasesExportDTO{" +
+                "title='" + title + '\'' +
+                ", description='" + description + '\'' +
+                ", state=" + state +
+                ", showStepperBar=" + showStepperBar +
+                ", estimatedDuration=" + estimatedDuration +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingRunExportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingRunExportDTO.java
new file mode 100644
index 00000000..6dd36ecc
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/export/training/TrainingRunExportDTO.java
@@ -0,0 +1,112 @@
+package cz.muni.ics.kypo.training.adaptive.dto.export.training;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TRState;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import cz.muni.ics.kypo.training.adaptive.dto.export.UserRefExportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training Run.
+ */
+@ApiModel(value = "TrainingRunExportDTO", description = "An exported run of training instance of a particular participant.")
+public class TrainingRunExportDTO {
+
+	@ApiModelProperty(value = "Date when training run started.", example = "2016-10-19 10:23:54+02")
+	@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+	private LocalDateTime startTime;
+	@ApiModelProperty(value = "Date when training run ends.", example = "2022-10-19 10:23:54+02")
+	@JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+	private LocalDateTime endTime;
+	@ApiModelProperty(value = "Current state of training run.", example = "ALLOCATED")
+	private TRState state;
+	@ApiModelProperty(value = "Reference to participant of training run.")
+	private UserRefExportDTO participantRef;
+
+	/**
+	 * Gets start time.
+	 *
+	 * @return the start time
+	 */
+	public LocalDateTime getStartTime() {
+		return startTime;
+	}
+
+	/**
+	 * Sets start time.
+	 *
+	 * @param startTime the start time
+	 */
+	public void setStartTime(LocalDateTime startTime) {
+		this.startTime = startTime;
+	}
+
+	/**
+	 * Gets end time.
+	 *
+	 * @return the end time
+	 */
+	public LocalDateTime getEndTime() {
+		return endTime;
+	}
+
+	/**
+	 * Sets end time.
+	 *
+	 * @param endTime the end time
+	 */
+	public void setEndTime(LocalDateTime endTime) {
+		this.endTime = endTime;
+	}
+
+	/**
+	 * Gets state.
+	 *
+	 * @return the {@link TRState}
+	 */
+	public TRState getState() {
+		return state;
+	}
+
+	/**
+	 * Sets state.
+	 *
+	 * @param state {@link TRState}
+	 */
+	public void setState(TRState state) {
+		this.state = state;
+	}
+
+	/**
+	 * Gets participant ref.
+	 *
+	 * @return the {@link UserRefExportDTO}
+	 */
+	public UserRefExportDTO getParticipantRef() {
+		return participantRef;
+	}
+
+	/**
+	 * Sets participant ref.
+	 *
+	 * @param participantRef the {@link UserRefExportDTO}
+	 */
+	public void setParticipantRef(UserRefExportDTO participantRef) {
+		this.participantRef = participantRef;
+	}
+
+	@Override
+	public String toString() {
+		return "TrainingRunExportDTO{" +
+				"startTime=" + startTime +
+				", endTime=" + endTime +
+				", state=" + state +
+				", participantRef=" + participantRef +
+				'}';
+	}
+}
+
+
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/ImportTrainingDefinitionDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/ImportTrainingDefinitionDTO.java
new file mode 100644
index 00000000..4006b1a3
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/ImportTrainingDefinitionDTO.java
@@ -0,0 +1,203 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.AbstractPhaseImportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Encapsulates information about training definition and its levels.
+ *
+ */
+@ApiModel(value = "ImportTrainingDefinitionDTO", description = "A basic information about hint.")
+public class ImportTrainingDefinitionDTO {
+
+	@ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+	@NotEmpty(message = "{trainingdefinitionimport.title.NotEmpty.message}")
+	private String title;
+	@ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+	private String description;
+	@ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "")
+	private String[] prerequisites;
+	@ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+	private String[] outcomes;
+	@ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+	@NotNull(message = "{trainingdefinitionimport.state.NotNull.message}")
+	private TDState state;
+	@ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+	@NotNull(message = "{trainingdefinitionimport.showStepperBar.NotNull.message}")
+	private boolean showStepperBar;
+	@ApiModelProperty(value = "Information about all levels in training definition.")
+	private List<AbstractPhaseImportDTO> phases = new ArrayList<>();
+	@ApiModelProperty(value = "Estimated time it takes to finish runs created from this definition.", example = "5")
+	private Integer estimatedDuration;
+
+	/**
+	 * Instantiates a new Import training definition dto.
+	 */
+	public ImportTrainingDefinitionDTO() {
+	}
+
+	/**
+	 * Gets title.
+	 *
+	 * @return the title
+	 */
+	public String getTitle() {
+		return title;
+	}
+
+	/**
+	 * Sets title.
+	 *
+	 * @param title the title
+	 */
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	/**
+	 * Gets description.
+	 *
+	 * @return the description
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * Sets description.
+	 *
+	 * @param description the description
+	 */
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * Get prerequisites.
+	 *
+	 * @return the prerequisites
+	 */
+	public String[] getPrerequisites() {
+		return prerequisites;
+	}
+
+	/**
+	 * Sets prerequisites.
+	 *
+	 * @param prerequisites the prerequisites
+	 */
+	public void setPrerequisites(String[] prerequisites) {
+		this.prerequisites = prerequisites;
+	}
+
+	/**
+	 * Get outcomes.
+	 *
+	 * @return the outcomes
+	 */
+	public String[] getOutcomes() {
+		return outcomes;
+	}
+
+	/**
+	 * Sets outcomes.
+	 *
+	 * @param outcomes the outcomes
+	 */
+	public void setOutcomes(String[] outcomes) {
+		this.outcomes = outcomes;
+	}
+
+	/**
+	 * Gets state.
+	 *
+	 * @return the {@link TDState}
+	 */
+	public TDState getState() {
+		return state;
+	}
+
+	/**
+	 * Sets state.
+	 *
+	 * @param state the {@link TDState}
+	 */
+	public void setState(TDState state) {
+		this.state = state;
+	}
+
+	/**
+	 * Gets if stepper bar is shown while in run.
+	 *
+	 * @return true if bar is shown
+	 */
+	public boolean isShowStepperBar() {
+		return showStepperBar;
+	}
+
+	/**
+	 * Gets if stepper bar is shown while in run.
+	 *
+	 * @param showStepperBar true if bar is shown
+	 */
+	public void setShowStepperBar(boolean showStepperBar) {
+		this.showStepperBar = showStepperBar;
+	}
+
+	/**
+	 * Gets levels.
+	 *
+	 * @return the list of {@link AbstractPhaseImportDTO}
+	 */
+	public List<AbstractPhaseImportDTO> getPhases() {
+		return phases;
+	}
+
+	/**
+	 * Sets levels.
+	 *
+	 * @param phases the list of {@link AbstractPhaseImportDTO}
+	 */
+	public void setPhases(List<AbstractPhaseImportDTO> phases) {
+		this.phases = new ArrayList<>(phases);
+	}
+
+
+	/**
+	 * Gets estimated duration.
+	 *
+	 * @return the estimated duration
+	 */
+	public Integer getEstimatedDuration() {
+		return estimatedDuration;
+	}
+
+	/**
+	 * Sets estimated duration.
+	 *
+	 * @param estimatedDuration the estimated duration
+	 */
+	public void setEstimatedDuration(Integer estimatedDuration) {
+		this.estimatedDuration = estimatedDuration;
+	}
+
+
+
+	@Override
+	public String toString() {
+		return "ImportTrainingDefinitionDTO{" +
+				"title='" + title + '\'' +
+				", description='" + description + '\'' +
+				", state=" + state +
+				", showStepperBar=" + showStepperBar +
+				", estimatedDuration=" + estimatedDuration +
+				'}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/AbstractPhaseImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/AbstractPhaseImportDTO.java
new file mode 100644
index 00000000..06f960fc
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/AbstractPhaseImportDTO.java
@@ -0,0 +1,127 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import cz.muni.ics.kypo.training.adaptive.domain.phases.TrainingPhase;
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.info.InfoPhaseImportDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.questionnaire.QuestionnairePhaseImportDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.training.TaskImportDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.training.TrainingPhaseImportDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.PhaseType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about abstract level.
+ * Extended by {@link QuestionnairePhaseImportDTO}, {@link TaskImportDTO} and {@link InfoPhaseImportDTO}
+ *
+ */
+@ApiModel(value = "AbstractLevelImportDTO", subTypes = {TrainingPhaseImportDTO.class, InfoPhaseImportDTO.class, QuestionnairePhaseImportDTO.class},
+		description = "Superclass for classes GameLevelImportDTO, AssessmentLevelImportDTO and InfoLevelImportDTO")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "level_type", visible = true)
+@JsonSubTypes({
+		@JsonSubTypes.Type(value = TrainingPhaseImportDTO.class, name = "TRAINING"),
+		@JsonSubTypes.Type(value = QuestionnairePhaseImportDTO.class, name = "QUESTIONNAIRE"),
+		@JsonSubTypes.Type(value = InfoPhaseImportDTO.class, name = "INFO")})
+public abstract class AbstractPhaseImportDTO {
+
+	@ApiModelProperty(value = "Short textual description of the level.", example = "Game Level1")
+	@NotEmpty(message = "{phase.title.NotEmpty.message}")
+	protected String title;
+	@ApiModelProperty(value = "Type of the level.", example = "GAME")
+	@NotNull(message = "{phase.phaseType.NotNull.message}")
+	protected PhaseType phaseType;
+	@ApiModelProperty(value = "Order of level, starts with 0", example = "2")
+	@NotNull(message = "{phase.order.NotNull.message}")
+	@Min(value = 0, message = "{phase.order.Min.message}")
+	protected Integer order;
+
+	/**
+	 * Instantiates a new Abstract level import dto.
+	 */
+	public AbstractPhaseImportDTO() {
+	}
+
+	/**
+	 * Gets title.
+	 *
+	 * @return the title
+	 */
+	public String getTitle() {
+		return title;
+	}
+
+	/**
+	 * Sets title.
+	 *
+	 * @param title the title
+	 */
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+
+	/**
+	 * Gets phase type.
+	 *
+	 * @return the {@link PhaseType}
+	 */
+	public PhaseType getPhaseType() {
+		return phaseType;
+	}
+
+	/**
+	 * Sets phase type.
+	 *
+	 * @param phaseType the {@link PhaseType}
+	 */
+	public void setPhaseType(PhaseType phaseType) {
+		this.phaseType = phaseType;
+	}
+
+	/**
+	 * Gets order number of level that is compared with order numbers of other levels associated with same definition.
+	 * First phase from definition has order of 0
+	 *
+	 * @return the order
+	 */
+	public Integer getOrder() {
+		return order;
+	}
+
+	/**
+	 * Sets order number of level that is compared with order numbers of other levels associated with same definition.
+	 * First level from definition has order of 0
+	 *
+	 * @param order the order
+	 */
+	public void setOrder(Integer order) {
+		this.order = order;
+	}
+
+	@Override
+    public String toString() {
+		return "AbstractLevelImportDTO{" + "title='" + title + '\'' + ", levelType=" + phaseType + ", order=" + order
+				+ '}';
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof AbstractPhaseImportDTO)) return false;
+		AbstractPhaseImportDTO that = (AbstractPhaseImportDTO) o;
+		return Objects.equals(getTitle(), that.getTitle()) &&
+				getPhaseType() == that.getPhaseType() &&
+				Objects.equals(getOrder(), that.getOrder());
+	}
+
+	@Override
+	public int hashCode() {
+		return Objects.hash(getTitle(), getPhaseType(), getOrder());
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/info/InfoPhaseImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/info/InfoPhaseImportDTO.java
new file mode 100644
index 00000000..6f9ca376
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/info/InfoPhaseImportDTO.java
@@ -0,0 +1,57 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.info;
+
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.AbstractPhaseImportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.Objects;
+
+/**
+ * The type Info level import dto. * Encapsulates information about info level. Inherits from {@link AbstractPhaseImportDTO}
+ *
+ */
+@ApiModel(value = "InfoLevelImportDTO", description = "An imported info level.", parent = AbstractPhaseImportDTO.class)
+public class InfoPhaseImportDTO extends AbstractPhaseImportDTO {
+
+	@ApiModelProperty(value = "The information and experiences that are directed towards a participant.", example = "Informational stuff")
+	@NotEmpty(message = "{info.content.NotEmpty.message}")
+	private String content;
+
+	/**
+	 * Gets content.
+	 *
+	 * @return the content
+	 */
+	public String getContent() {
+		return content;
+	}
+
+	/**
+	 * Sets content.
+	 *
+	 * @param content the content
+	 */
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	@Override
+	public String toString() {
+		return "InfoLevelImportDTO{" + "content='" + content + '\'' + '}';
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof InfoPhaseImportDTO)) return false;
+		if (!super.equals(o)) return false;
+		InfoPhaseImportDTO that = (InfoPhaseImportDTO) o;
+		return Objects.equals(getContent(), that.getContent());
+	}
+
+	@Override
+	public int hashCode() {
+		return Objects.hash(super.hashCode(), getContent());
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionChoiceImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionChoiceImportDTO.java
new file mode 100644
index 00000000..9793477a
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionChoiceImportDTO.java
@@ -0,0 +1,61 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Objects;
+
+public class QuestionChoiceImportDTO {
+
+    @ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
+    @NotEmpty(message = "{questionChoices.text.NotEmpty.message}")
+    private String text;
+    @ApiModelProperty(value = "It defines whether this answer is correct or not", required = true, example = "true")
+    @NotNull(message = "{questionChoices.correct.NotNull.message}")
+    private Boolean correct;
+    @ApiModelProperty(value = "Order of question choice", required = true, example = "0")
+    @NotNull(message = "{questionChoices.order.NotNull.message}")
+    @Min(value = 0, message = "{questionChoices.order.Min.message}")
+    private Integer order;
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public Boolean isCorrect() {
+        return correct;
+    }
+
+    public void setCorrect(Boolean correct) {
+        this.correct = correct;
+    }
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionChoiceImportDTO)) return false;
+        QuestionChoiceImportDTO that = (QuestionChoiceImportDTO) o;
+        return Objects.equals(getText(), that.getText()) &&
+                Objects.equals(correct, that.correct) &&
+                Objects.equals(getOrder(), that.getOrder());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getText(), correct, getOrder());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionImportDTO.java
new file mode 100644
index 00000000..58ad7bf6
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionImportDTO.java
@@ -0,0 +1,86 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionType;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+import java.util.Objects;
+
+public class QuestionImportDTO {
+
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    @NotNull(message = "{question.order.NotNull.message}")
+    @Min(value = 0, message = "{question.order.Min.message}")
+    private Integer order;
+    @ApiModelProperty(value = "The question that will be displayed to a player", required = true, example = "What's the capital of Canada?")
+    @NotEmpty(message = "{question.text.NotEmpty.message}")
+    private String text;
+    @ApiModelProperty(value = "It defines the type of the question", allowableValues = "FFQ, MCQ, RFQ", required = true, example = "MCQ")
+    @NotNull(message = "{question.questionType.NotNull.message}")
+    private QuestionType questionType;
+    @Valid
+    @ApiModelProperty(value = "Choices that are distributed with the question", required = true)
+    private List<QuestionChoiceImportDTO> choices;
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public QuestionType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuestionType type) {
+        this.questionType = type;
+    }
+
+    public List<QuestionChoiceImportDTO> getChoices() {
+        return choices;
+    }
+
+    public void setChoices(List<QuestionChoiceImportDTO> choices) {
+        this.choices = choices;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionImportDTO)) return false;
+        QuestionImportDTO that = (QuestionImportDTO) o;
+        return getOrder() == that.getOrder() &&
+                Objects.equals(getText(), that.getText()) &&
+                getQuestionType() == that.getQuestionType() &&
+                Objects.equals(getChoices(), that.getChoices());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getOrder(), getText(), getQuestionType(), getChoices());
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionImportDTO{" +
+                "order=" + order +
+                ", text='" + text + '\'' +
+                ", questionType=" + questionType +
+                ", choices=" + choices +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionPhaseRelationImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionPhaseRelationImportDTO.java
new file mode 100644
index 00000000..7ffeb585
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionPhaseRelationImportDTO.java
@@ -0,0 +1,78 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.questionnaire;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.util.Objects;
+import java.util.Set;
+
+public class QuestionPhaseRelationImportDTO {
+
+    @ApiModelProperty(value = "Order of question", required = true, example = "0")
+    @NotNull(message = "{questionnairePhaseRelation.order.NotNull.message}")
+    @Min(value = 0, message = "{questionnairePhaseRelation.order.Min.message}")
+    private Integer order;
+    @ApiModelProperty(value = "Set of IDs of questions related to the specified questionnaire")
+    @NotNull(message = "{questionnairePhaseRelation.questionIds.NotNull.message}")
+    @Size(min = 1, message = "{questionnairePhaseRelation.questionIds.Size.message}")
+    private Set<Long> questionIds;
+    @ApiModelProperty(value = "ID of training phase to which the questions are related of question", required = true, example = "1")
+    @NotNull(message = "{questionnairePhaseRelation.phaseId.NotNull.message}")
+    @Min(value = 0, message = "{questionnairePhaseRelation.phaseId.Min.message}")
+    private Long phaseId;
+    @ApiModelProperty(value = "Percentage that defines whether a player was successful or not ", required = true, example = "50")
+    @Min(value = 0, message = "{questionnairePhaseRelation.successRate.Min.message}")
+    @Max(value = 100, message = "{questionnairePhaseRelation.successRate.Max.message}")
+    private int successRate;
+
+    public Integer getOrder() {
+        return order;
+    }
+
+    public void setOrder(Integer order) {
+        this.order = order;
+    }
+
+    public Set<Long> getQuestionIds() {
+        return questionIds;
+    }
+
+    public void setQuestionIds(Set<Long> questionIds) {
+        this.questionIds = questionIds;
+    }
+
+    public Long getPhaseId() {
+        return phaseId;
+    }
+
+    public void setPhaseId(Long phaseId) {
+        this.phaseId = phaseId;
+    }
+
+    public int getSuccessRate() {
+        return successRate;
+    }
+
+    public void setSuccessRate(int successRate) {
+        this.successRate = successRate;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof QuestionPhaseRelationImportDTO)) return false;
+        QuestionPhaseRelationImportDTO that = (QuestionPhaseRelationImportDTO) o;
+        return getSuccessRate() == that.getSuccessRate() &&
+                getOrder().equals(that.getOrder()) &&
+                getQuestionIds().equals(that.getQuestionIds()) &&
+                getPhaseId().equals(that.getPhaseId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getOrder(), getQuestionIds(), getPhaseId(), getSuccessRate());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionnairePhaseImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionnairePhaseImportDTO.java
new file mode 100644
index 00000000..1b311377
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/questionnaire/QuestionnairePhaseImportDTO.java
@@ -0,0 +1,83 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.questionnaire;
+
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.AbstractPhaseImportDTO;
+import cz.muni.ics.kypo.training.adaptive.enums.QuestionnaireType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * Encapsulates information about questionnaire phase. Inherits from {@link QuestionnairePhaseImportDTO}
+ *
+ */
+@ApiModel(value = "QuestionnairePhaseImportDTO", description = "Imported questionnaire phase.", parent = QuestionnairePhaseImportDTO.class)
+public class QuestionnairePhaseImportDTO extends AbstractPhaseImportDTO {
+
+	@Valid
+	@ApiModelProperty(value = "Questions in the questionnaire", required = true)
+	private List<QuestionImportDTO> questions;
+	@ApiModelProperty(value = "The type of the questionnaire", required = true, example = "ADAPTIVE")
+	@NotNull(message = "{questionnairePhase.questionnaireType.NotNull.message}")
+	private QuestionnaireType questionnaireType;
+	@Valid
+	@ApiModelProperty(value = "The relation between questions in the questionnaire and phases in the training definition", required = true)
+	private List<QuestionPhaseRelationImportDTO> phaseRelations;
+
+	/**
+	 * Gets questions.
+	 *
+	 * @return the questions
+	 */
+	public List<QuestionImportDTO> getQuestions() {
+		return questions;
+	}
+
+	/**
+	 * Sets questions.
+	 *
+	 * @param questions the questions
+	 */
+	public void setQuestions(List<QuestionImportDTO> questions) {
+		this.questions = questions;
+	}
+
+	/**
+	 * Gets phase relations.
+	 *
+	 * @return the relations
+	 */
+	public List<QuestionPhaseRelationImportDTO> getPhaseRelations() {
+		return phaseRelations;
+	}
+
+	/**
+	 * Sets phase relations.
+	 *
+	 * @param phaseRelations the relations
+	 */
+	public void setPhaseRelations(List<QuestionPhaseRelationImportDTO> phaseRelations) {
+		this.phaseRelations = phaseRelations;
+	}
+
+	public QuestionnaireType getQuestionnaireType() {
+		return questionnaireType;
+	}
+
+	public void setQuestionnaireType(QuestionnaireType questionnaireType) {
+		this.questionnaireType = questionnaireType;
+	}
+
+	@Override
+	public String toString() {
+		return "QuestionnairePhaseImportDTO{" +
+				"questions=" + questions +
+				", phaseRelations=" + phaseRelations +
+				", title='" + title + '\'' +
+				", levelType=" + phaseType +
+				", order=" + order +
+				'}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/DecisionMatrixRowImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/DecisionMatrixRowImportDTO.java
new file mode 100644
index 00000000..4b4d1ef7
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/DecisionMatrixRowImportDTO.java
@@ -0,0 +1,70 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.training;
+
+public class DecisionMatrixRowImportDTO {
+    private int order;
+    private double assessmentAnswered;
+    private double keywordUsed;
+    private double completedInTime;
+    private double solutionDisplayed;
+    private double wrongAnswers;
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public double getAssessmentAnswered() {
+        return assessmentAnswered;
+    }
+
+    public void setAssessmentAnswered(double assessmentAnswered) {
+        this.assessmentAnswered = assessmentAnswered;
+    }
+
+    public double getKeywordUsed() {
+        return keywordUsed;
+    }
+
+    public void setKeywordUsed(double keywordUsed) {
+        this.keywordUsed = keywordUsed;
+    }
+
+    public double getCompletedInTime() {
+        return completedInTime;
+    }
+
+    public void setCompletedInTime(double completedInTime) {
+        this.completedInTime = completedInTime;
+    }
+
+    public double getSolutionDisplayed() {
+        return solutionDisplayed;
+    }
+
+    public void setSolutionDisplayed(double solutionDisplayed) {
+        this.solutionDisplayed = solutionDisplayed;
+    }
+
+    public double getWrongAnswers() {
+        return wrongAnswers;
+    }
+
+    public void setWrongAnswers(double wrongAnswers) {
+        this.wrongAnswers = wrongAnswers;
+    }
+
+    @Override
+    public String toString() {
+        return "DecisionMatrixRow{" +
+                "order=" + order +
+                ", assessmentAnswered=" + assessmentAnswered +
+                ", keywordUsed=" + keywordUsed +
+                ", completedInTime=" + completedInTime +
+                ", solutionDisplayed=" + solutionDisplayed +
+                ", wrongAnswers=" + wrongAnswers +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TaskImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TaskImportDTO.java
new file mode 100644
index 00000000..ada2b770
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TaskImportDTO.java
@@ -0,0 +1,144 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.training;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.*;
+
+/**
+ * Encapsulates information about game level. Inherits from {@link TaskImportDTO}
+ *
+ */
+@ApiModel(value = "TaskImportDTO", description = "Imported task of the training phase.")
+public class TaskImportDTO {
+
+	@ApiModelProperty(value = "Short textual description of the level.", example = "Game Level1")
+	@NotEmpty(message = "{task.title.NotEmpty.message}")
+	protected String title;
+	@ApiModelProperty(value = "Keyword found in game, used for access next level.", example = "secretFlag")
+	@NotEmpty(message = "{task.answer.NotEmpty.message}")
+	@Size(max = 50, message = "{task.answer.Size.message}")
+	private String answer;
+	@ApiModelProperty(value = "The information and experiences that are directed towards a participant.", example = "Play me")
+	@NotEmpty(message = "{task.content.NotEmpty.message}")
+	private String content;
+	@ApiModelProperty(value = "Instruction how to get flag in game.", example = "This is how you do it")
+	@NotEmpty(message = "{task.solution.NotEmpty.message}")
+	private String solution;
+	@ApiModelProperty(value = "How many times player can submit incorrect flag before displaying solution.", example = "5")
+	@NotNull(message = "{task.incorrectAnswerLimit.NotEmpty.message}")
+	@Min(value = 0, message = "{task.incorrectAnswerLimit.Min.message}")
+	@Max(value = 100, message = "{task.incorrectAnswerLimit.Max.message}")
+	private int incorrectAnswerLimit;
+	@ApiModelProperty(value = "Sign if sandbox should be modified if the task is picked.", example = "true")
+	private boolean modifySandbox;
+	@ApiModelProperty(value = "Expected duration of the sandbox change when the task is picked (in seconds).", example = "30")
+	@Min(value = 0, message = "{task.sandboxChangeExpectedDuration.Min.message}")
+	private int sandboxChangeExpectedDuration;
+
+	/**
+	 * Gets flag.
+	 *
+	 * @return the flag
+	 */
+	public String getAnswer() {
+		return answer;
+	}
+
+	/**
+	 * Sets flag.
+	 *
+	 * @param answer the flag
+	 */
+	public void setAnswer(String answer) {
+		this.answer = answer;
+	}
+
+	/**
+	 * Gets content.
+	 *
+	 * @return the content
+	 */
+	public String getContent() {
+		return content;
+	}
+
+	/**
+	 * Sets content.
+	 *
+	 * @param content the content
+	 */
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	/**
+	 * Gets solution.
+	 *
+	 * @return the solution
+	 */
+	public String getSolution() {
+		return solution;
+	}
+
+	/**
+	 * Sets solution.
+	 *
+	 * @param solution the solution
+	 */
+	public void setSolution(String solution) {
+		this.solution = solution;
+	}
+
+	/**
+	 * Gets incorrect flag limit.
+	 *
+	 * @return the incorrect flag limit
+	 */
+	public int getIncorrectAnswerLimit() {
+		return incorrectAnswerLimit;
+	}
+
+	/**
+	 * Sets incorrect flag limit.
+	 *
+	 * @param incorrectAnswerLimit the incorrect flag limit
+	 */
+	public void setIncorrectAnswerLimit(int incorrectAnswerLimit) {
+		this.incorrectAnswerLimit = incorrectAnswerLimit;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public boolean isModifySandbox() {
+		return modifySandbox;
+	}
+
+	public void setModifySandbox(boolean modifySandbox) {
+		this.modifySandbox = modifySandbox;
+	}
+
+	public int getSandboxChangeExpectedDuration() {
+		return sandboxChangeExpectedDuration;
+	}
+
+	public void setSandboxChangeExpectedDuration(int sandboxChangeExpectedDuration) {
+		this.sandboxChangeExpectedDuration = sandboxChangeExpectedDuration;
+	}
+
+	@Override
+	public String toString() {
+		return "GameLevelImportDTO{" +
+				"flag='" + answer + '\'' +
+				", content='" + content + '\'' +
+				", solution='" + solution + '\'' +
+				", incorrectFlagLimit=" + incorrectAnswerLimit +
+				'}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TrainingPhaseImportDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TrainingPhaseImportDTO.java
new file mode 100644
index 00000000..98953f82
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/imports/phases/training/TrainingPhaseImportDTO.java
@@ -0,0 +1,118 @@
+package cz.muni.ics.kypo.training.adaptive.dto.imports.phases.training;
+
+import cz.muni.ics.kypo.training.adaptive.dto.imports.phases.AbstractPhaseImportDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Encapsulates information about training phases. Inherits from {@link AbstractPhaseImportDTO}
+ *
+ */
+@ApiModel(value = "TrainingPhaseImportDTO", description = "Imported training phase.", parent = AbstractPhaseImportDTO.class)
+public class TrainingPhaseImportDTO extends AbstractPhaseImportDTO {
+
+	@ApiModelProperty(value = "Estimated time it takes to finish the phase (in seconds).", example = "50")
+	@NotNull(message = "{trainingPhase.estimatedDuration.NotNull.message}")
+	@Min(value = 0, message = "{trainingPhase.estimatedDuration.Size.message}")
+	private Integer estimatedDuration;
+	@ApiModelProperty(value = "Number of allowed commands that can be used to solve the task (used for data analysis).", example = "10")
+	@NotEmpty(message = "{trainingPhase.allowedCommands.NotEmpty.message}")
+	@Min(value = 0, message = "{trainingPhase.allowedCommands.Min.message}")
+	private Integer allowedCommands;
+	@ApiModelProperty(value = "How many times player can submit incorrect answer before displaying solution.", example = "4")
+	@NotEmpty(message = "{trainingPhase.allowedWrongAnswers.NotEmpty.message}")
+	@Min(value = 0, message = "{trainingPhase.allowedWrongAnswers.Min.message}")
+	private int allowedWrongAnswers;
+	@Valid
+	private List<TaskImportDTO> tasks = new ArrayList<>();
+	@Valid
+	private List<DecisionMatrixRowImportDTO> decisionMatrix;
+
+	/**
+	 * Gets estimated duration.
+	 *
+	 * @return the estimated duration
+	 */
+	public Integer getEstimatedDuration() {
+		return estimatedDuration;
+	}
+
+	/**
+	 * Sets estimated duration.
+	 *
+	 * @param estimatedDuration the estimated duration
+	 */
+	public void setEstimatedDuration(Integer estimatedDuration) {
+		this.estimatedDuration = estimatedDuration;
+	}
+
+	/**
+	 * Gets allowed commands.
+	 *
+	 * @return the allowed commands
+	 */
+	public int getAllowedCommands() {
+		return allowedCommands;
+	}
+
+	/**
+	 * Sets allowed commands.
+	 *
+	 * @param allowedCommands the allowed commands
+	 */
+	public void setAllowedCommands(int allowedCommands) {
+		this.allowedCommands = allowedCommands;
+	}
+
+	/**
+	 * Gets allowed wrong answers.
+	 *
+	 * @return the allowed wrong answers
+	 */
+	public int getAllowedWrongAnswers() {
+		return allowedWrongAnswers;
+	}
+
+	/**
+	 * Sets allowed wrong answers.
+	 *
+	 * @param allowedWrongAnswers the allowed wrong answers
+	 */
+	public void setAllowedWrongAnswers(int allowedWrongAnswers) {
+		this.allowedWrongAnswers = allowedWrongAnswers;
+	}
+
+
+	public List<TaskImportDTO> getTasks() {
+		return tasks;
+	}
+
+	public void setTasks(List<TaskImportDTO> tasks) {
+		this.tasks = tasks;
+	}
+
+	public List<DecisionMatrixRowImportDTO> getDecisionMatrix() {
+		return decisionMatrix;
+	}
+
+	public void setDecisionMatrix(List<DecisionMatrixRowImportDTO> decisionMatrix) {
+		this.decisionMatrix = decisionMatrix;
+	}
+
+	@Override
+	public String toString() {
+		return "TrainingPhaseImportDTO{" +
+				"estimatedDuration=" + estimatedDuration +
+				", allowedCommands=" + allowedCommands +
+				", allowedWrongAnswers=" + allowedWrongAnswers +
+				", title='" + title + '\'' +
+				", levelType=" + phaseType +
+				", order=" + order +
+				'}';
+	}
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/LockedPoolInfo.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/LockedPoolInfo.java
new file mode 100644
index 00000000..1c44c2f1
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/LockedPoolInfo.java
@@ -0,0 +1,53 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import javax.validation.constraints.NotNull;
+import java.util.Objects;
+
+public class LockedPoolInfo {
+
+    @NotNull(message = "{pool.id.NotNull.message}")
+    private long id;
+    @NotNull(message = "{pool.poolId.NotNull.message}")
+    @JsonProperty(value = "pool_id")
+    private long poolId;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getPoolId() {
+        return poolId;
+    }
+
+    public void setPoolId(long poolId) {
+        this.poolId = poolId;
+    }
+
+    @Override
+    public String toString() {
+        return "LockedPoolInfo{" +
+                "id=" + id +
+                ", poolId=" + poolId +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof LockedPoolInfo)) return false;
+        LockedPoolInfo that = (LockedPoolInfo) o;
+        return getId() == that.getId() &&
+                getPoolId() == that.getPoolId();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getPoolId());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResource.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResource.java
new file mode 100644
index 00000000..dc682d31
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResource.java
@@ -0,0 +1,137 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This class is used to replace Page class and reduce number of returned elements (standard Page
+ * class contains fields, which are not usefull (backward compatability)).
+ */
+@ApiModel(value = "PageResultResouce", description = "Content (Retrieved data) and meta information about REST API result page. Including page number, number of elements in page, size of elements, total number of elements and total number of pages")
+public class PageResultResource<E> {
+
+    @JsonProperty(required = true)
+    @ApiModelProperty(value = "Content - (Retrieved data) from databases.")
+    private List<E> content;
+    @JsonProperty(required = true)
+    @ApiModelProperty(value = "Pagination including: page number, number of elements in page, size, total elements and total pages.")
+    private Pagination pagination;
+
+    public PageResultResource() {
+    }
+
+    public PageResultResource(List<E> content) {
+        super();
+        this.content = content;
+    }
+
+    public PageResultResource(List<E> content, Pagination pageMetadata) {
+        super();
+        this.content = content;
+        this.pagination = pageMetadata;
+    }
+
+    public List<E> getContent() {
+        return Collections.unmodifiableList(content);
+    }
+
+    public void setContent(List<E> content) {
+        this.content = content;
+    }
+
+    public Pagination getPagination() {
+        return pagination;
+    }
+
+    public void setPagination(Pagination pagination) {
+        this.pagination = pagination;
+    }
+
+    @Override
+    public String toString() {
+        return "PageResultDTO [content=" + content + ", pageMetadata=" + pagination + ", getContent()=" + getContent() + ", getPageMetadata()="
+                + getPagination() + "]";
+    }
+
+    public static class Pagination {
+
+        @ApiModelProperty(value = "Page number.", example = "1")
+        @JsonProperty(required = true)
+        private int number;
+        @ApiModelProperty(value = "Number of elements in page.", example = "20")
+        @JsonProperty(required = true, value = "number_of_elements")
+        private int numberOfElements;
+        @ApiModelProperty(value = "Page size.", example = "20")
+        @JsonProperty(required = true)
+        private int size;
+        @ApiModelProperty(value = "Total number of elements in this resource (in all Pages).", example = "100")
+        @JsonProperty(required = true, value = "total_elements")
+        private long totalElements;
+        @ApiModelProperty(value = "Total number of pages.", example = "5")
+        @JsonProperty(required = true, value = "total_pages")
+        private int totalPages;
+
+        public Pagination() {
+        }
+
+        public Pagination(int number, int numberOfElements, int size, long totalElements, int totalPages) {
+            super();
+            this.number = number;
+            this.numberOfElements = numberOfElements;
+            this.size = size;
+            this.totalElements = totalElements;
+            this.totalPages = totalPages;
+        }
+
+        public int getNumber() {
+            return number;
+        }
+
+        public void setNumber(int number) {
+            this.number = number;
+        }
+
+        public int getNumberOfElements() {
+            return numberOfElements;
+        }
+
+        public void setNumberOfElements(int numberOfElements) {
+            this.numberOfElements = numberOfElements;
+        }
+
+        public int getSize() {
+            return size;
+        }
+
+        public void setSize(int size) {
+            this.size = size;
+        }
+
+        public long getTotalElements() {
+            return totalElements;
+        }
+
+        public void setTotalElements(long totalElements) {
+            this.totalElements = totalElements;
+        }
+
+        public int getTotalPages() {
+            return totalPages;
+        }
+
+        public void setTotalPages(int totalPages) {
+            this.totalPages = totalPages;
+        }
+
+        @Override
+        public String toString() {
+            return "PageMetadata [number=" + number + ", numberOfElements=" + numberOfElements + ", size=" + size + ", totalElements="
+                    + totalElements + ", totalPages=" + totalPages + "]";
+        }
+    }
+
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResourcePython.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResourcePython.java
new file mode 100644
index 00000000..149e6003
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PageResultResourcePython.java
@@ -0,0 +1,146 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+
+/**
+ * This class is used to replace Page class and reduce number of returned elements. Used for responses from Python api.
+ */
+public class PageResultResourcePython<E> {
+    private int page;
+    @JsonProperty("page_size")
+    private int pageSize;
+    @JsonProperty("page_count")
+    private int pageCount;
+    private int count;
+    @JsonProperty("total_count")
+    private int totalCount;
+    private List<E> results;
+
+    /**
+     * Instantiates a new Page result resource python.
+     */
+    public PageResultResourcePython() {
+    }
+
+    /**
+     * Gets page.
+     *
+     * @return the page
+     */
+    public int getPage() {
+        return page;
+    }
+
+    /**
+     * Sets page.
+     *
+     * @param page the page
+     */
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    /**
+     * Gets page size.
+     *
+     * @return the page size
+     */
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    /**
+     * Sets page size.
+     *
+     * @param pageSize the page size
+     */
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    /**
+     * Gets page count.
+     *
+     * @return the page count
+     */
+    public int getPageCount() {
+        return pageCount;
+    }
+
+    /**
+     * Sets page count.
+     *
+     * @param pageCount the page count
+     */
+    public void setPageCount(int pageCount) {
+        this.pageCount = pageCount;
+    }
+
+    /**
+     * Gets count.
+     *
+     * @return the count
+     */
+    public int getCount() {
+        return count;
+    }
+
+    /**
+     * Sets count.
+     *
+     * @param count the count
+     */
+    public void setCount(int count) {
+        this.count = count;
+    }
+
+    /**
+     * Gets total count.
+     *
+     * @return the total count
+     */
+    public int getTotalCount() {
+        return totalCount;
+    }
+
+    /**
+     * Sets total count.
+     *
+     * @param totalCount the total count
+     */
+    public void setTotalCount(int totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    /**
+     * Gets results.
+     *
+     * @return the results
+     */
+    public List<E> getResults() {
+        return results;
+    }
+
+    /**
+     * Sets results.
+     *
+     * @param results the results
+     */
+    public void setResults(List<E> results) {
+        this.results = results;
+    }
+
+    @Override
+    public String toString() {
+        return "PageResultResourcePython{" +
+                "page=" + page +
+                ", pageSize=" + pageSize +
+                ", pageCount=" + pageCount +
+                ", count=" + count +
+                ", totalCount=" + totalCount +
+                ", results=" + results +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PoolInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PoolInfoDTO.java
new file mode 100644
index 00000000..313cf3ef
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/PoolInfoDTO.java
@@ -0,0 +1,94 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import javax.validation.constraints.NotNull;
+
+public class PoolInfoDTO {
+    @NotNull(message = "{pool.id.NotNull.message}")
+    private Long id;
+    @NotNull(message = "{pool.definitionId.NotNull.message}")
+    @JsonProperty(value = "definition_id")
+    private Long definitionId;
+    @NotNull(message = "{pool.size.NotNull.message}")
+    private Long size;
+    @NotNull(message = "{pool.maxSize.NotNull.message}")
+    @JsonProperty(value = "max_size")
+    private Long maxSize;
+    @NotNull(message = "{pool.lockId.NotNull.message}")
+    @JsonProperty(value = "lock_id")
+    private Long lockId;
+    @JsonProperty(value = "rev")
+    private String rev;
+    @JsonProperty(value = "rev_sha")
+    private String revSha;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getDefinitionId() {
+        return definitionId;
+    }
+
+    public void setDefinitionId(Long definitionId) {
+        this.definitionId = definitionId;
+    }
+
+    public Long getSize() {
+        return size;
+    }
+
+    public void setSize(Long size) {
+        this.size = size;
+    }
+
+    public Long getMaxSize() {
+        return maxSize;
+    }
+
+    public void setMaxSize(Long maxSize) {
+        this.maxSize = maxSize;
+    }
+
+    public Long getLockId() {
+        return lockId;
+    }
+
+    public void setLockId(Long lockId) {
+        this.lockId = lockId;
+    }
+
+    public String getRev() {
+        return rev;
+    }
+
+    public void setRev(String rev) {
+        this.rev = rev;
+    }
+
+    public String getRevSha() {
+        return revSha;
+    }
+
+    public void setRevSha(String revSha) {
+        this.revSha = revSha;
+    }
+
+    @Override
+    public String toString() {
+        return "PoolInfoDto{" +
+                "id=" + id +
+                ", definitionId=" + definitionId +
+                ", size=" + size +
+                ", maxSize=" + maxSize +
+                ", lockId=" + lockId +
+                ", rev=" + rev +
+                ", revSha=" + revSha +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxDefinitionInfo.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxDefinitionInfo.java
new file mode 100644
index 00000000..dfda0c9e
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxDefinitionInfo.java
@@ -0,0 +1,69 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import io.swagger.annotations.ApiModel;
+
+import javax.validation.constraints.NotNull;
+
+@ApiModel(value = "SandboxDefinitionInfo", description = "Basic information about the sandbox definition.")
+public class SandboxDefinitionInfo {
+    @NotNull(message = "{sandboxDefinition.id.NotNull.message}")
+    private Long id;
+    @NotNull(message = "{sandboxDefinition.name.NotNull.message}")
+    private String name;
+    @NotNull(message = "{sandboxDefinition.url.NotNull.message}")
+    private String url;
+    @NotNull(message = "{sandboxDefinition.rev.NotNull.message}")
+    private String rev;
+
+    public SandboxDefinitionInfo() {
+    }
+
+    public SandboxDefinitionInfo(Long id, String name, String url, String rev) {
+        this.id = id;
+        this.name = name;
+        this.url = url;
+        this.rev = rev;
+    }
+
+    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 getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getRev() {
+        return rev;
+    }
+
+    public void setRev(String rev) {
+        this.rev = rev;
+    }
+
+    @Override
+    public String toString() {
+        return "SandboxDefinitionInfo{" +
+                "id=" + id +
+                ", name='" + name + '\'' +
+                ", url='" + url + '\'' +
+                ", rev='" + rev + '\'' +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxInfo.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxInfo.java
new file mode 100644
index 00000000..a35e5527
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxInfo.java
@@ -0,0 +1,51 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * Represents basic information about Sandbox.
+ */
+public class SandboxInfo {
+
+    @NotNull(message = "{sandbox.id.NotNull.message}")
+    private Long id;
+    @JsonProperty(value = "lock_id")
+    private Integer lockId;
+    @JsonProperty(value = "allocation_unit_id")
+    private Integer allocationUnitId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getLockId() {
+        return lockId;
+    }
+
+    public void setLockId(Integer lockId) {
+        this.lockId = lockId;
+    }
+
+    public Integer getAllocationUnitId() {
+        return allocationUnitId;
+    }
+
+    public void setAllocationUnitId(Integer allocationUnitId) {
+        this.allocationUnitId = allocationUnitId;
+    }
+
+    @Override
+    public String toString() {
+        return "SandboxInfo{" +
+                "id=" + id +
+                ", lockId=" + lockId +
+                ", allocationUnitId=" + allocationUnitId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxPoolInfo.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxPoolInfo.java
new file mode 100644
index 00000000..410df31a
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/responses/SandboxPoolInfo.java
@@ -0,0 +1,103 @@
+package cz.muni.ics.kypo.training.adaptive.dto.responses;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * Represents basic info about Sandbox pools.
+ */
+public class SandboxPoolInfo {
+    @NotNull(message = "{pool.id.NotNull.message}")
+    private Long id;
+    @NotNull(message = "{pool.definitionId.NotNull.message}")
+    @JsonProperty(value = "definition_id")
+    private Long definitionId;
+    @NotNull(message = "{pool.size.NotNull.message}")
+    private Long size;
+    @NotNull(message = "{pool.maxSize.NotNull.message}")
+    @JsonProperty(value = "max_size")
+    private Long maxSize;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets definitionId.
+     *
+     * @return the definitionId
+     */
+    public Long getDefinitionId() {
+        return definitionId;
+    }
+
+    /**
+     * Sets definitionId.
+     *
+     * @param definitionId the definitionId
+     */
+    public void setDefinitionId(Long definitionId) {
+        this.definitionId = definitionId;
+    }
+
+    /**
+     * Gets size.
+     *
+     * @return the size
+     */
+    public Long getSize() {
+        return size;
+    }
+
+    /**
+     * Sets size.
+     *
+     * @param size the size
+     */
+    public void setSize(Long size) {
+        this.size = size;
+    }
+
+    /**
+     * Gets max size.
+     *
+     * @return the max size
+     */
+    public Long getMaxSize() {
+        return maxSize;
+    }
+
+    /**
+     * Sets max size.
+     *
+     * @param maxSize the max size
+     */
+    public void setMaxSize(Long maxSize) {
+        this.maxSize = maxSize;
+    }
+
+    @Override
+    public String toString() {
+        return "SandboxPoolInfo{" +
+                "id=" + id +
+                ", definitionId=" + definitionId +
+                ", size='" + size + '\'' +
+                ", maxSize=" + maxSize +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/ValidateAnswerDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/ValidateAnswerDTO.java
new file mode 100644
index 00000000..6693e8d5
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/ValidateAnswerDTO.java
@@ -0,0 +1,40 @@
+package cz.muni.ics.kypo.training.adaptive.dto.training;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.Objects;
+
+public class ValidateAnswerDTO {
+    @ApiModelProperty(value = "Answer to be validated.", required = true, example = "answer")
+    @NotEmpty(message = "{validateAnswer.answer.NotEmpty.message}")
+    private String answer;
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ValidateAnswerDTO)) return false;
+        ValidateAnswerDTO that = (ValidateAnswerDTO) o;
+        return Objects.equals(getAnswer(), that.getAnswer());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getAnswer());
+    }
+
+    @Override
+    public String toString() {
+        return "ValidateAnswerDTO{" +
+                "answer='" + answer + '\'' +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionByIdDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionByIdDTO.java
new file mode 100644
index 00000000..01a23e1f
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionByIdDTO.java
@@ -0,0 +1,270 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import cz.muni.ics.kypo.training.adaptive.dto.AbstractPhaseDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about Training Definition.
+ */
+@ApiModel(value = "TrainingDefinitionByIdDTO", description = "A blueprint of abstract phases.")
+public class TrainingDefinitionByIdDTO {
+
+    @ApiModelProperty(value = "Main identifier of training definition.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "")
+    private String[] prerequisities;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+    private TDState state;
+    @ApiModelProperty(value = "Information about all phases in training definition.")
+    private List<AbstractPhaseDTO> phases = new ArrayList<>();
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+    private boolean showStepperBar;
+    @ApiModelProperty(value = "Sign if training definition can be archived or not.", example = "true")
+    private boolean canBeArchived;
+    @ApiModelProperty(value = "Estimated time it takes to finish runs created from this definition.", example = "5")
+    private long estimatedDuration;
+    @ApiModelProperty(value = "Time of last edit done to definition.", example = "2017-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime lastEdited;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites.
+     *
+     * @return the prerequisites
+     */
+    public String[] getPrerequisities() {
+        return prerequisities;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisities the prerequisites
+     */
+    public void setPrerequisities(String[] prerequisities) {
+        this.prerequisities = prerequisities;
+    }
+
+    /**
+     * Get outcomes.
+     *
+     * @return the outcomes
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets phases.
+     *
+     * @return the list of {@link AbstractPhaseDTO}
+     */
+    public List<AbstractPhaseDTO> getPhases() {
+        return phases;
+    }
+
+    /**
+     * Sets phases.
+     *
+     * @param phases the list of {@link AbstractPhaseDTO}
+     */
+    public void setPhases(List<AbstractPhaseDTO> phases) {
+        this.phases = phases;
+    }
+
+    /**
+     * Gets if stepper bar is shown while in run.
+     *
+     * @return true if bar is shown
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets if stepper bar is shown while in run.
+     *
+     * @param showStepperBar true if bar is shown
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    /**
+     * Definition can be archived if no associated instances are active.
+     *
+     * @return true if definition can be archived
+     */
+    public boolean isCanBeArchived() {
+        return canBeArchived;
+    }
+
+    /**
+     * Definition can be archived if no associated instances are active.
+     *
+     * @param canBeArchived true if definition can be archived
+     */
+    public void setCanBeArchived(boolean canBeArchived) {
+        this.canBeArchived = canBeArchived;
+    }
+
+    /**
+     * Gets estimated duration.
+     *
+     * @return the estimated duration
+     */
+    public long getEstimatedDuration() {
+        return estimatedDuration;
+    }
+
+    /**
+     * Sets estimated duration.
+     *
+     * @param estimatedDuration the estimated duration
+     */
+    public void setEstimatedDuration(long estimatedDuration) {
+        this.estimatedDuration = estimatedDuration;
+    }
+
+    /**
+     * Gets time of last edit.
+     *
+     * @return the last edited
+     */
+    public LocalDateTime getLastEdited() {
+        return lastEdited;
+    }
+
+    /**
+     * Sets time of last edit.
+     *
+     * @param lastEdited the last edited
+     */
+    public void setLastEdited(LocalDateTime lastEdited) {
+        this.lastEdited = lastEdited;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof TrainingDefinitionByIdDTO)) return false;
+        TrainingDefinitionByIdDTO that = (TrainingDefinitionByIdDTO) object;
+        return Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                Objects.equals(getState(), that.getState());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getTitle(), getState());
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionByIdDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", description='" + description + '\'' +
+                ", state=" + state +
+                ", showStepperBar=" + showStepperBar +
+                ", canBeArchived=" + canBeArchived +
+                ", estimatedDuration=" + estimatedDuration +
+                ", lastEdited=" + lastEdited +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionCreateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionCreateDTO.java
new file mode 100644
index 00000000..70fc3b85
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionCreateDTO.java
@@ -0,0 +1,150 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * Encapsulates information about Training definition, intended for creation of new definition.
+ */
+@ApiModel(value = "TrainingDefinitionCreateDTO", description = "Training definition to create.")
+public class TrainingDefinitionCreateDTO {
+
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", required = true, example = "Photo Hunter")
+    @NotEmpty(message = "{trainingDefinition.title.NotEmpty.message}")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Description of Photo Hunter")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "[HTML, http protocol]")
+    private String[] prerequisites;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "[outcomes]")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", required = true, example = "UNRELEASED")
+    @NotNull(message = "{trainingDefinition.state.NotNull.message}")
+    private TDState state;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", required = true, example = "true")
+    @NotNull(message = "{trainingDefinition.showStepperBar.NotNull.message}")
+    private Boolean showStepperBar;
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites.
+     *
+     * @return the prerequisites
+     */
+    public String[] getPrerequisites() {
+        return prerequisites;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisites the prerequisites
+     */
+    public void setPrerequisites(String[] prerequisites) {
+        this.prerequisites = prerequisites;
+    }
+
+    /**
+     * Get outcomes.
+     *
+     * @return the outcomes
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets if stepper bar is shown while in run.
+     *
+     * @return true if bar is shown
+     */
+    public Boolean getShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets if stepper bar is shown while in run.
+     *
+     * @param showStepperBar true if bar is shown
+     */
+    public void setShowStepperBar(Boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionCreateDTO{" +
+                "title='" + title + '\'' +
+                ", description='" + description + '\'' +
+                ", state=" + state +
+                ", showStepperBar=" + showStepperBar +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionDTO.java
new file mode 100644
index 00000000..e4c3c4f8
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionDTO.java
@@ -0,0 +1,253 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about Training Definition
+ */
+@ApiModel(value = "TrainingDefinitionDTO", description = "A blueprint of abstract phases.")
+public class TrainingDefinitionDTO {
+
+    @ApiModelProperty(value = "Main identifier of training definition.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "")
+    private String[] prerequisites;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+    private TDState state;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+    private boolean showStepperBar;
+    @ApiModelProperty(value = "Sign if training definition can be archived or not.", example = "false")
+    private boolean canBeArchived;
+    @ApiModelProperty(value = "Estimated time it takes to finish runs created from this definition.", example = "5")
+    private long estimatedDuration;
+    @ApiModelProperty(value = "Time of last edit done to definition.", example = "2017-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime lastEdited;
+
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites.
+     *
+     * @return the prerequisites
+     */
+    public String[] getPrerequisites() {
+        return prerequisites;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisites the prerequisites
+     */
+    public void setPrerequisites(String[] prerequisites) {
+        this.prerequisites = prerequisites;
+    }
+
+    /**
+     * Get outcomes.
+     *
+     * @return the outcomes
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets if stepper bar is shown while in run.
+     *
+     * @return true if bar is shown
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets if stepper bar is shown while in run.
+     *
+     * @param showStepperBar true if bar is shown
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    /**
+     * Definition can be archived if no associated instances are active.
+     *
+     * @return true if definition can be archived
+     */
+    public boolean isCanBeArchived() {
+        return canBeArchived;
+    }
+
+    /**
+     * Definition can be archived if no associated instances are active.
+     *
+     * @param canBeArchived true if definition can be archived
+     */
+    public void setCanBeArchived(boolean canBeArchived) {
+        this.canBeArchived = canBeArchived;
+    }
+
+    /**
+     * Gets estimated duration.
+     *
+     * @return the estimated duration
+     */
+    public long getEstimatedDuration() {
+        return estimatedDuration;
+    }
+
+    /**
+     * Sets estimated duration.
+     *
+     * @param estimatedDuration the estimated duration
+     */
+    public void setEstimatedDuration(long estimatedDuration) {
+        this.estimatedDuration = estimatedDuration;
+    }
+
+    /**
+     * Gets time of last edit.
+     *
+     * @return the last edited
+     */
+    public LocalDateTime getLastEdited() {
+        return lastEdited;
+    }
+
+    /**
+     * Sets time of last edit.
+     *
+     * @param lastEdited the last edited
+     */
+    public void setLastEdited(LocalDateTime lastEdited) {
+        this.lastEdited = lastEdited;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", description='" + description + '\'' +
+                ", prerequisities=" + Arrays.toString(prerequisites) +
+                ", outcomes=" + Arrays.toString(outcomes) +
+                ", state=" + state +
+                ", showStepperBar=" + showStepperBar +
+                ", canBeArchived=" + canBeArchived +
+                ", estimatedDuration=" + estimatedDuration +
+                ", lastEdited=" + lastEdited +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof TrainingDefinitionDTO)) return false;
+        TrainingDefinitionDTO that = (TrainingDefinitionDTO) object;
+        return isCanBeArchived() == that.isCanBeArchived() &&
+                Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                Objects.equals(getDescription(), that.getDescription()) &&
+                Objects.equals(getState(), that.getState());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getTitle(), getDescription(), getState(), isCanBeArchived());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionInfoDTO.java
new file mode 100644
index 00000000..11a01c78
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionInfoDTO.java
@@ -0,0 +1,99 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Objects;
+
+/**
+ * Encapsulates basic information about Training Definition.
+ */
+@ApiModel(value = "TrainingDefinitionInfoDTO", description = "Basic training definition information.")
+public class TrainingDefinitionInfoDTO {
+
+    @ApiModelProperty(value = "Main identifier of training definition.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", example = "TrainingDefinition2")
+    private String title;
+    @ApiModelProperty(value = "Current state of training definition.", example = "UNRELEASED")
+    private TDState state;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TrainingDefinitionInfoDTO that = (TrainingDefinitionInfoDTO) o;
+        return Objects.equals(id, that.id) &&
+                Objects.equals(title, that.title) &&
+                state == that.state;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, title, state);
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionInfoDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", state=" + state +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionUpdateDTO.java
new file mode 100644
index 00000000..7b7fecc0
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingdefinition/TrainingDefinitionUpdateDTO.java
@@ -0,0 +1,192 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition;
+
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TDState;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Arrays;
+import java.util.Objects;
+
+
+/**
+ * Encapsulates information about Training Definition, intended for edit of the definition.
+ */
+@ApiModel(value = "TrainingDefinitionUpdateDTO", description = "Training definition to update.")
+public class TrainingDefinitionUpdateDTO {
+
+    @ApiModelProperty(value = "Main identifier of training definition.", required = true, example = "2")
+    @NotNull(message = "{trainingDefinition.id.NotNull.message}")
+    private Long id;
+    @ApiModelProperty(value = "A name of the training/game (e.g., Photo Hunter) .", required = true, example = "TrainingDefinition2")
+    @NotEmpty(message = "{trainingDefinition.title.NotEmpty.message}")
+    private String title;
+    @ApiModelProperty(value = "Description of training definition that is visible to the participant.", example = "Unreleased training definition")
+    private String description;
+    @ApiModelProperty(value = "List of knowledge and skills necessary to complete the training.", example = "[phishing]")
+    private String[] prerequisites;
+    @ApiModelProperty(value = "A list of knowledge and skills that the participant should learn by attending the training (if it is used for educational purposes) ", example = "")
+    private String[] outcomes;
+    @ApiModelProperty(value = "Current state of training definition.", required = true, example = "UNRELEASED")
+    @NotNull(message = "{trainingDefinition.state.NotNull.message}")
+    private TDState state;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", required = true, example = "false")
+    @NotNull(message = "{trainingDefinition.showStepperBar.NotNull.message}")
+    private boolean showStepperBar;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets description.
+     *
+     * @return the description
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets description.
+     *
+     * @param description the description
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Get prerequisites.
+     *
+     * @return the prerequisites.
+     */
+    public String[] getPrerequisites() {
+        return prerequisites;
+    }
+
+    /**
+     * Sets prerequisites.
+     *
+     * @param prerequisites the prerequisites.
+     */
+    public void setPrerequisites(String[] prerequisites) {
+        this.prerequisites = prerequisites;
+    }
+
+    /**
+     * Get outcomes.
+     *
+     * @return the outcomes
+     */
+    public String[] getOutcomes() {
+        return outcomes;
+    }
+
+    /**
+     * Sets outcomes.
+     *
+     * @param outcomes the outcomes
+     */
+    public void setOutcomes(String[] outcomes) {
+        this.outcomes = outcomes;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TDState}
+     */
+    public TDState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TDState}
+     */
+    public void setState(TDState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets if stepper bar is shown while in run.
+     *
+     * @return true if bar is shown
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets if stepper bar is shown while in run.
+     *
+     * @param showStepperBar true if bar is shown
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof TrainingDefinitionUpdateDTO)) return false;
+        TrainingDefinitionUpdateDTO that = (TrainingDefinitionUpdateDTO) o;
+        return Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                Objects.equals(getDescription(), that.getDescription()) &&
+                getState() == that.getState();
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getTitle(), getDescription(), getState());
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingDefinitionUpdateDTO{" +
+                "id=" + id +
+                ", title='" + title + '\'' +
+                ", description='" + description + '\'' +
+                ", prerequisities=" + Arrays.toString(prerequisites) +
+                ", outcomes=" + Arrays.toString(outcomes) +
+                ", state=" + state +
+                ", showStepperBar=" + showStepperBar +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceAssignPoolIdDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceAssignPoolIdDTO.java
new file mode 100644
index 00000000..bd7e8ff4
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceAssignPoolIdDTO.java
@@ -0,0 +1,48 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about Training Instance, intended for assigning pool id.
+ */
+@ApiModel(value = "TrainingInstanceAssignPoolIdDTO", description = "Training Instance assign pool ID.")
+public class TrainingInstanceAssignPoolIdDTO {
+
+    @ApiModelProperty(value = "Pool associated with training instance.", example = "2", required = true)
+    @NotNull(message = "{assignPool.poolId.NotNull.message}")
+    @Min(value = 0, message = "{assignPool.poolId.Min.message}")
+    private Long poolId;
+
+    public Long getPoolId() {
+        return poolId;
+    }
+
+    public void setPoolId(Long poolId) {
+        this.poolId = poolId;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof TrainingInstanceAssignPoolIdDTO)) return false;
+        TrainingInstanceAssignPoolIdDTO that = (TrainingInstanceAssignPoolIdDTO) o;
+        return Objects.equals(getPoolId(), that.getPoolId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getPoolId());
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceAssignPoolIdDTO{" +
+                ", poolId=" + poolId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceBasicInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceBasicInfoDTO.java
new file mode 100644
index 00000000..d597c3d9
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceBasicInfoDTO.java
@@ -0,0 +1,90 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training Instance
+ */
+@ApiModel(value = "TrainingInstanceBasicInfoDTO")
+public class TrainingInstanceBasicInfoDTO {
+
+    @ApiModelProperty(value = "Main identifier of training instance.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Date when training instance starts.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training instance ends.", example = "2017-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Short textual description of the training instance.", example = "Concluded Instance")
+    private String title;
+    @ApiModelProperty(value = "Token used to access training run.", required = true, example = "hunter")
+    private String accessToken;
+    @ApiModelProperty(value = "Id of sandbox pool belonging to training instance", example = "1")
+    private Long poolId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    public Long getPoolId() {
+        return poolId;
+    }
+
+    public void setPoolId(Long poolId) {
+        this.poolId = poolId;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceBasicInfoDTO{" +
+                "id=" + id +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", title='" + title + '\'' +
+                ", accessToken='" + accessToken + '\'' +
+                ", poolId=" + poolId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceCreateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceCreateDTO.java
new file mode 100644
index 00000000..cb480819
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceCreateDTO.java
@@ -0,0 +1,138 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCDeserializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training Instance, intended for creation of new instance.
+ */
+@ApiModel(value = "TrainingInstanceCreateDTO", description = "Training Instance to create.")
+public class TrainingInstanceCreateDTO {
+
+    @ApiModelProperty(value = "Date when training instance starts.", required = true, example = "2020-11-20T10:28:02.727Z")
+    @NotNull(message = "{trainingInstance.startTime.NotNull.message}")
+    @JsonDeserialize(using = LocalDateTimeUTCDeserializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training instance ends.", required = true, example = "2020-11-25T10:26:02.727Z")
+    @NotNull(message = "{trainingInstance.endTime.NotNull.message}")
+    @JsonDeserialize(using = LocalDateTimeUTCDeserializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Short textual description of the training instance.", required = true, example = "December instance")
+    @NotEmpty(message = "{trainingInstance.title.NotEmpty.message}")
+    private String title;
+    @ApiModelProperty(value = "AccessToken which will be modified and then used for accessing training run.", required = true, example = "hunter")
+    @NotEmpty(message = "{trainingInstance.accessToken.NotEmpty.message}")
+    private String accessToken;
+    @ApiModelProperty(value = "Reference to training definition from which is training instance created.", required = true, example = "1")
+    @NotNull(message = "{trainingInstance.trainingDefinitionId.NotNull.message}")
+    @Min(value = 0, message = "{trainingInstance.trainingDefinitionId.Min.message}")
+    private Long trainingDefinitionId;
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets access token.
+     *
+     * @return the access token
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * Sets access token.
+     *
+     * @param accessToken the access token
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * Gets training definition id.
+     *
+     * @return the training definition id
+     */
+    public long getTrainingDefinitionId() {
+        return trainingDefinitionId;
+    }
+
+    /**
+     * Sets training definition id.
+     *
+     * @param trainingDefinitionId the training definition id
+     */
+    public void setTrainingDefinitionId(long trainingDefinitionId) {
+        this.trainingDefinitionId = trainingDefinitionId;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceCreateDTO{" +
+                "startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", title='" + title + '\'' +
+                ", accessToken='" + accessToken + '\'' +
+                ", trainingDefinitionId=" + trainingDefinitionId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceDTO.java
new file mode 100644
index 00000000..07e55767
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceDTO.java
@@ -0,0 +1,204 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition.TrainingDefinitionByIdDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about Training Instance
+ */
+@ApiModel(value = "TrainingInstanceDTO", description = "A session of attending a concrete training, which involves a deployment of the training definition in one or more sandbox instances that are then assigned to participants. The instance comprises one or more game runs.")
+public class TrainingInstanceDTO {
+
+    @ApiModelProperty(value = "Main identifier of training instance.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Date when training instance starts.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training instance ends.", example = "2017-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Short textual description of the training instance.", example = "Concluded Instance")
+    private String title;
+    @ApiModelProperty(value = "Reference to training definition from which is training instance created.")
+    private TrainingDefinitionByIdDTO trainingDefinition;
+    @ApiModelProperty(value = "Token used to access training run.", required = true, example = "hunter")
+    private String accessToken;
+    @ApiModelProperty(value = "Id of sandbox pool belonging to training instance", example = "1")
+    private Long poolId;
+    @ApiModelProperty(value = "Ids of sandboxes which are assigned to training run.", example = "[3,15]")
+    private List<Long> sandboxesWithTrainingRun = new ArrayList<>();
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets training definition.
+     *
+     * @return the training definition
+     */
+    public TrainingDefinitionByIdDTO getTrainingDefinition() {
+        return trainingDefinition;
+    }
+
+    /**
+     * Sets training definition.
+     *
+     * @param trainingDefinition the training definition
+     */
+    public void setTrainingDefinition(TrainingDefinitionByIdDTO trainingDefinition) {
+        this.trainingDefinition = trainingDefinition;
+    }
+
+    /**
+     * Gets access token.
+     *
+     * @return the access token
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * Sets access token.
+     *
+     * @param accessToken the access token
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * Gets pool id.
+     *
+     * @return the pool id
+     */
+    public Long getPoolId() {
+        return poolId;
+    }
+
+    /**
+     * Sets pool id.
+     *
+     * @param poolId the pool id
+     */
+    public void setPoolId(Long poolId) {
+        this.poolId = poolId;
+    }
+
+    /**
+     * Gets sandboxes with training run.
+     *
+     * @return the sandboxes with training run
+     */
+    public List<Long> getSandboxesWithTrainingRun() {
+        return sandboxesWithTrainingRun;
+    }
+
+    /**
+     * Sets sandboxes with training run.
+     *
+     * @param sandboxesWithTrainingRun the sandboxes with training run
+     */
+    public void setSandboxesWithTrainingRun(List<Long> sandboxesWithTrainingRun) {
+        this.sandboxesWithTrainingRun = sandboxesWithTrainingRun;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceDTO{" + "id=" + id + ", startTime=" + startTime + ", endTime=" + endTime + ", title='" + title + '\''
+                + ", trainingDefinition=" + trainingDefinition + ", accessToken='"
+                + accessToken + '\'' + ", poolId=" + poolId + '}';
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof TrainingInstanceDTO)) return false;
+        TrainingInstanceDTO that = (TrainingInstanceDTO) object;
+        return Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                Objects.equals(getAccessToken(), that.getAccessToken()) &&
+                Objects.equals(getPoolId(), that.getPoolId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getTitle(), getAccessToken(), getPoolId());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceFindAllResponseDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceFindAllResponseDTO.java
new file mode 100644
index 00000000..4dc985a5
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceFindAllResponseDTO.java
@@ -0,0 +1,175 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import cz.muni.ics.kypo.training.adaptive.dto.trainingdefinition.TrainingDefinitionByIdDTO;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates basic information about Training Instance
+ */
+public class TrainingInstanceFindAllResponseDTO {
+
+    @ApiModelProperty(value = "Main identifier of training instance.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Date when training instance starts.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training instance ends.", example = "2017-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Short textual description of the training instance.", example = "Concluded Instance")
+    private String title;
+    @ApiModelProperty(value = "Reference to training definition from which is training instance created.")
+    private TrainingDefinitionByIdDTO trainingDefinition;
+    @ApiModelProperty(value = "Token used to access training run.", required = true, example = "hunter")
+    private String accessToken;
+    @ApiModelProperty(value = "Id of sandbox pool belonging to training instance", example = "1")
+    private Long poolId;
+
+    /**
+     * Instantiates a new Training instance find all response dto.
+     */
+    public TrainingInstanceFindAllResponseDTO() {
+    }
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets training definition.
+     *
+     * @return the training definition
+     */
+    public TrainingDefinitionByIdDTO getTrainingDefinition() {
+        return trainingDefinition;
+    }
+
+    /**
+     * Sets training definition.
+     *
+     * @param trainingDefinition the training definition
+     */
+    public void setTrainingDefinition(TrainingDefinitionByIdDTO trainingDefinition) {
+        this.trainingDefinition = trainingDefinition;
+    }
+
+    /**
+     * Gets access token.
+     *
+     * @return the access token
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * Sets access token.
+     *
+     * @param accessToken the access token
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * Gets pool id.
+     *
+     * @return the pool id
+     */
+    public Long getPoolId() {
+        return poolId;
+    }
+
+    /**
+     * Sets pool id.
+     *
+     * @param poolId the pool id
+     */
+    public void setPoolId(Long poolId) {
+        this.poolId = poolId;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceFindAllResponseDTO{" +
+                "id=" + id +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", title='" + title + '\'' +
+                ", accessToken='" + accessToken + '\'' +
+                ", poolId=" + poolId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceIsFinishedInfoDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceIsFinishedInfoDTO.java
new file mode 100644
index 00000000..a0bed508
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceIsFinishedInfoDTO.java
@@ -0,0 +1,60 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Encapsulates the information stating if training instance has finished.
+ */
+@ApiModel(value = "TrainingInstanceIsFinishedInfoDTO", description = "Information stating if training instance has finished.")
+public class TrainingInstanceIsFinishedInfoDTO {
+
+    @ApiModelProperty(value = "Sign if training instance is finished or not.", example = "false")
+    private boolean hasFinished;
+    @ApiModelProperty(value = "Message about training instance state.", example = "false")
+    private String message;
+
+    /**
+     * Get if instance has finished.
+     *
+     * @return the boolean
+     */
+    public boolean getHasFinished() {
+        return hasFinished;
+    }
+
+    /**
+     * Sets if instance has finished.
+     *
+     * @param hasFinished the has finished
+     */
+    public void setHasFinished(boolean hasFinished) {
+        this.hasFinished = hasFinished;
+    }
+
+    /**
+     * Gets message.
+     *
+     * @return the message
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * Sets message.
+     *
+     * @param message the message
+     */
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceIsFinishedInfoDTO{" +
+                "hasFinished=" + hasFinished +
+                ", message='" + message + '\'' +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceUpdateDTO.java
new file mode 100644
index 00000000..7b9b1fd2
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/traininginstance/TrainingInstanceUpdateDTO.java
@@ -0,0 +1,159 @@
+package cz.muni.ics.kypo.training.adaptive.dto.traininginstance;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCDeserializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training Instance, intended for edit of the instance.
+ */
+@ApiModel(value = "TrainingInstanceUpdateDTO", description = "Training Instance to update.")
+public class TrainingInstanceUpdateDTO {
+
+    @ApiModelProperty(value = "Main identifier of training instance.", required = true, example = "2")
+    @NotNull(message = "{trainingInstance.id.NotNull.message}")
+    private Long id;
+    @ApiModelProperty(value = "Date when training instance starts.", required = true, example = "2019-10-19T10:28:02.727Z")
+    @NotNull(message = "{trainingInstance.startTime.NotNull.message}")
+    @JsonDeserialize(using = LocalDateTimeUTCDeserializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training instance ends.", required = true, example = "2019-10-25T10:28:02.727Z")
+    @NotNull(message = "{trainingInstance.endTime.NotNull.message}")
+    @JsonDeserialize(using = LocalDateTimeUTCDeserializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Short textual description of the training instance.", required = true, example = "Current Instance")
+    @NotEmpty(message = "{trainingInstance.title.NotEmpty.message}")
+    private String title;
+    @ApiModelProperty(value = "AccessToken which will be modified and then used for accessing training run.", required = true, example = "hello-6578")
+    @NotEmpty(message = "{trainingInstance.accessToken.NotEmpty.message}")
+    private String accessToken;
+    @ApiModelProperty(value = "Reference to training definition from which is training instance created.", required = true, example = "1")
+    @NotNull(message = "{trainingInstance.trainingDefinitionId.NotNull.message}")
+    private Long trainingDefinitionId;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets access token.
+     *
+     * @return the access token
+     */
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    /**
+     * Sets access token.
+     *
+     * @param accessToken the access token
+     */
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    /**
+     * Gets training definition id.
+     *
+     * @return the training definition id
+     */
+    public Long getTrainingDefinitionId() {
+        return trainingDefinitionId;
+    }
+
+    /**
+     * Sets training definition id.
+     *
+     * @param trainingDefinitionId the training definition id
+     */
+    public void setTrainingDefinitionId(Long trainingDefinitionId) {
+        this.trainingDefinitionId = trainingDefinitionId;
+    }
+
+
+    @Override
+    public String toString() {
+        return "TrainingInstanceUpdateDTO{" +
+                "id=" + id +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", title='" + title + '\'' +
+                ", accessToken='" + accessToken + '\'' +
+                ", trainingDefinitionId=" + trainingDefinitionId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessTrainingRunDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessTrainingRunDTO.java
new file mode 100644
index 00000000..f6aab5b6
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessTrainingRunDTO.java
@@ -0,0 +1,187 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingrun;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.AbstractPhaseDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.BasicPhaseInfoDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * Encapsulates information about Training Run, intended as a response to run accessing.
+ */
+@ApiModel(value = "AccessTrainingRunDTO", description = "Just accessed training run.")
+public class AccessTrainingRunDTO {
+
+    @ApiModelProperty(value = "Main identifier of training run.", example = "1")
+    private Long trainingRunID;
+    @ApiModelProperty(value = "Sign if stepper bar should be displayed.", example = "false")
+    private boolean showStepperBar;
+    @ApiModelProperty(value = "Main identifier of sandbox which is assigned to training run.", example = "2")
+    private Long sandboxInstanceRefId;
+    @ApiModelProperty(value = "First phase in the current training run.")
+    private AbstractPhaseDTO abstractPhaseDTO;
+    @ApiModelProperty(value = "Information about all phases in training instance.")
+    private List<BasicPhaseInfoDTO> infoAboutPhases;
+    @ApiModelProperty(value = "Id of associated training instance", example = "1")
+    private Long instanceId;
+    @ApiModelProperty(value = "Date when training run started.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Sign if solution of current training phase was taken", example = "true")
+    private String takenSolution;
+
+    /**
+     * Gets training run id.
+     *
+     * @return the training run id
+     */
+    public Long getTrainingRunID() {
+        return trainingRunID;
+    }
+
+    /**
+     * Sets training run id.
+     *
+     * @param trainingRunID the training run id
+     */
+    public void setTrainingRunID(Long trainingRunID) {
+        this.trainingRunID = trainingRunID;
+    }
+
+    /**
+     * Gets if stepper bar is shown while in run.
+     *
+     * @return true if bar is shown
+     */
+    public boolean isShowStepperBar() {
+        return showStepperBar;
+    }
+
+    /**
+     * Sets if stepper bar is shown while in run.
+     *
+     * @param showStepperBar true if bar is shown
+     */
+    public void setShowStepperBar(boolean showStepperBar) {
+        this.showStepperBar = showStepperBar;
+    }
+
+    /**
+     * Gets sandbox instance id.
+     *
+     * @return the sandbox instance id
+     */
+    public Long getSandboxInstanceRefId() {
+        return sandboxInstanceRefId;
+    }
+
+    /**
+     * Sets sandbox instance id.
+     *
+     * @param sandboxInstanceRefId the sandbox instance id
+     */
+    public void setSandboxInstanceRefId(Long sandboxInstanceRefId) {
+        this.sandboxInstanceRefId = sandboxInstanceRefId;
+    }
+
+    /**
+     * Gets current phase.
+     *
+     * @return the {@link AbstractPhaseDTO}
+     */
+    public AbstractPhaseDTO getAbstractPhaseDTO() {
+        return abstractPhaseDTO;
+    }
+
+    /**
+     * Sets current phase.
+     *
+     * @param abstractPhaseDTO the {@link AbstractPhaseDTO}
+     */
+    public void setAbstractPhaseDTO(AbstractPhaseDTO abstractPhaseDTO) {
+        this.abstractPhaseDTO = abstractPhaseDTO;
+    }
+
+    /**
+     * Gets basic info about all phases.
+     *
+     * @return the list of {@link BasicPhaseInfoDTO}
+     */
+    public List<BasicPhaseInfoDTO> getInfoAboutPhases() {
+        return infoAboutPhases;
+    }
+
+    /**
+     * Sets basic info about all phases.
+     *
+     * @param infoAboutPhases the list of {@link BasicPhaseInfoDTO}
+     */
+    public void setInfoAboutPhases(List<BasicPhaseInfoDTO> infoAboutPhases) {
+        this.infoAboutPhases = infoAboutPhases;
+    }
+
+    /**
+     * Gets instance id.
+     *
+     * @return the instance id
+     */
+    public Long getInstanceId() {
+        return instanceId;
+    }
+
+    /**
+     * Sets instance id.
+     *
+     * @param instanceId the instance id
+     */
+    public void setInstanceId(Long instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets taken solution.
+     *
+     * @return the taken solution
+     */
+    public String getTakenSolution() {
+        return takenSolution;
+    }
+
+    /**
+     * Sets taken solution.
+     *
+     * @param takenSolution the taken solution
+     */
+    public void setTakenSolution(String takenSolution) {
+        this.takenSolution = takenSolution;
+    }
+
+    @Override
+    public String toString() {
+        return "AccessTrainingRunDTO{" + "trainingRunID=" + trainingRunID + ", showStepperBar=" + showStepperBar + ", sandboxInstanceRefId="
+                + sandboxInstanceRefId + ", abstractPhaseDTO=" + abstractPhaseDTO + ", infoAboutPhases=" + infoAboutPhases + ", instanceId="
+                + instanceId + ", startTime=" + startTime + '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessedTrainingRunDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessedTrainingRunDTO.java
new file mode 100644
index 00000000..a4a2170c
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/AccessedTrainingRunDTO.java
@@ -0,0 +1,204 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingrun;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import cz.muni.ics.kypo.training.adaptive.enums.Actions;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about already accessed training run.
+ */
+@ApiModel(value = "AccessedTrainingRunDTO", description = "Already accessed training run by some participant.")
+public class AccessedTrainingRunDTO {
+
+    @ApiModelProperty(value = "Main identifier of training run.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Short textual description of the training instance.", example = "Concluded Instance")
+    private String title;
+    @ApiModelProperty(value = "Start date of training instance for which the training run was created.", example = "2016-10-19T10:23:54")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime trainingInstanceStartDate;
+    @ApiModelProperty(value = "End date of training instance for which the training run was created.", example = "2017-10-19T10:23:54")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime trainingInstanceEndDate;
+    @ApiModelProperty(value = "Current level order of training run.", example = "1")
+    private int currentLevelOrder;
+    @ApiModelProperty(value = "The number of levels in the training instance.", example = "3")
+    private int numberOfLevels;
+    @ApiModelProperty(value = "Possible action which can be executed with training Run.", example = "RESULTS")
+    private Actions possibleAction;
+    @ApiModelProperty(value = "Id of associated training instance", example = "1")
+    private Long instanceId;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets title.
+     *
+     * @return the title
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * Sets title.
+     *
+     * @param title the title
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * Gets start date of training instance.
+     *
+     * @return the training instance start date
+     */
+    public LocalDateTime getTrainingInstanceStartDate() {
+        return trainingInstanceStartDate;
+    }
+
+    /**
+     * Sets start date of training instance.
+     *
+     * @param trainingInstanceStartDate the training instance start date
+     */
+    public void setTrainingInstanceStartDate(LocalDateTime trainingInstanceStartDate) {
+        this.trainingInstanceStartDate = trainingInstanceStartDate;
+    }
+
+    /**
+     * Gets end date of training instance.
+     *
+     * @return the training instance end date
+     */
+    public LocalDateTime getTrainingInstanceEndDate() {
+        return trainingInstanceEndDate;
+    }
+
+    /**
+     * Sets end date of training instance.
+     *
+     * @param trainingInstanceEndDate the training instance end date
+     */
+    public void setTrainingInstanceEndDate(LocalDateTime trainingInstanceEndDate) {
+        this.trainingInstanceEndDate = trainingInstanceEndDate;
+    }
+
+    /**
+     * Gets current level order.
+     *
+     * @return the current level order
+     */
+    public int getCurrentLevelOrder() {
+        return currentLevelOrder;
+    }
+
+    /**
+     * Sets current level order.
+     *
+     * @param currentLevelOrder the current level order
+     */
+    public void setCurrentLevelOrder(int currentLevelOrder) {
+        this.currentLevelOrder = currentLevelOrder;
+    }
+
+    /**
+     * Gets number of levels.
+     *
+     * @return the number of levels
+     */
+    public int getNumberOfLevels() {
+        return numberOfLevels;
+    }
+
+    /**
+     * Sets number of levels.
+     *
+     * @param numberOfLevels the number of levels
+     */
+    public void setNumberOfLevels(int numberOfLevels) {
+        this.numberOfLevels = numberOfLevels;
+    }
+
+    /**
+     * Gets possible action.
+     *
+     * @return the possible {@link Actions}
+     */
+    public Actions getPossibleAction() {
+        return possibleAction;
+    }
+
+    /**
+     * Sets possible action.
+     *
+     * @param possibleAction the possible {@link Actions}
+     */
+    public void setPossibleAction(Actions possibleAction) {
+        this.possibleAction = possibleAction;
+    }
+
+    /**
+     * Gets instance id.
+     *
+     * @return the instance id
+     */
+    public Long getInstanceId() {
+        return instanceId;
+    }
+
+    /**
+     * Sets instance id.
+     *
+     * @param instanceId the instance id
+     */
+    public void setInstanceId(Long instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    @Override
+    public String toString() {
+        return "AccessedTrainingRunDTO{" + "id=" + id + ", title='" + title + '\'' + ", trainingInstanceStartDate="
+                + trainingInstanceStartDate + ", trainingInstanceEndDate=" + trainingInstanceEndDate + ", currentLevelOrder="
+                + currentLevelOrder + ", numberOfLevels=" + numberOfLevels + ", possibleAction=" + possibleAction + ", instanceId=" + instanceId
+                + '}';
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof AccessedTrainingRunDTO)) return false;
+        AccessedTrainingRunDTO that = (AccessedTrainingRunDTO) object;
+        return Objects.equals(getCurrentLevelOrder(), that.getCurrentLevelOrder()) &&
+                Objects.equals(getNumberOfLevels(), that.getNumberOfLevels()) &&
+                Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getTitle(), that.getTitle()) &&
+                Objects.equals(getInstanceId(), that.getInstanceId());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getTitle(), getCurrentLevelOrder(), getNumberOfLevels(), getInstanceId());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunByIdDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunByIdDTO.java
new file mode 100644
index 00000000..9804188e
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunByIdDTO.java
@@ -0,0 +1,216 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingrun;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TRState;
+import cz.muni.ics.kypo.training.adaptive.dto.UserRefDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+
+/**
+ * Encapsulates information about Training Run.
+ */
+@ApiModel(value = "TrainingRunByIdDTO", description = "The act, or a recording, of performing actions during training from a perspective of one concrete participant.")
+public class TrainingRunByIdDTO {
+
+    @ApiModelProperty(value = "Main identifier of training run.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Date when training run started.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training run ends.", example = "2022-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Current state of training run.", example = "ALLOCATED")
+    private TRState state;
+    @ApiModelProperty(value = "Reference to the received sandbox.")
+    private Long sandboxInstanceRefId;
+    @ApiModelProperty(value = "Reference to participant of training run.")
+    private UserRefDTO participantRef;
+    @ApiModelProperty(value = "Id of associated training definition")
+    private Long definitionId;
+    @ApiModelProperty(value = "Id of associated training instance")
+    private Long instanceId;
+    @ApiModelProperty(value = "Id of a previous sandbox instance assigned to the training run.", example = "12")
+    private Long previousSandboxInstanceRefId;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TRState}
+     */
+    public TRState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TRState}
+     */
+    public void setState(TRState state) {
+        this.state = state;
+    }
+
+
+    /**
+     * Gets sandbox instance id.
+     *
+     * @return the sandbox instance id
+     */
+    public Long getSandboxInstanceRefId() {
+        return sandboxInstanceRefId;
+    }
+
+    /**
+     * Sets sandbox instance id.
+     *
+     * @param sandboxInstanceRefId the sandbox instance id
+     */
+    public void setSandboxInstanceRefId(Long sandboxInstanceRefId) {
+        this.sandboxInstanceRefId = sandboxInstanceRefId;
+    }
+
+    /**
+     * Gets participant ref.
+     *
+     * @return the {@link UserRefDTO}
+     */
+    public UserRefDTO getParticipantRef() {
+        return participantRef;
+    }
+
+    /**
+     * Sets participant ref.
+     *
+     * @param participantRef the {@link UserRefDTO}
+     */
+    public void setParticipantRef(UserRefDTO participantRef) {
+        this.participantRef = participantRef;
+    }
+
+    /**
+     * Gets definition id.
+     *
+     * @return the definition id
+     */
+    public Long getDefinitionId() {
+        return definitionId;
+    }
+
+    /**
+     * Sets definition id.
+     *
+     * @param definitionId the definition id
+     */
+    public void setDefinitionId(Long definitionId) {
+        this.definitionId = definitionId;
+    }
+
+    /**
+     * Gets instance id.
+     *
+     * @return the instance id
+     */
+    public Long getInstanceId() {
+        return instanceId;
+    }
+
+    /**
+     * Sets instance id.
+     *
+     * @param instanceId the instance id
+     */
+    public void setInstanceId(Long instanceId) {
+        this.instanceId = instanceId;
+    }
+
+    /**
+     * Gets ID of previous used sandbox instance ref.
+     *
+     * @return the previous sandbox instance ref id
+     */
+    public Long getPreviousSandboxInstanceRefId() {
+        return previousSandboxInstanceRefId;
+    }
+
+    /**
+     * Sets ID of previous used sandbox instance ref.
+     *
+     * @param previousSandboxInstanceRefId the previous sandbox instance ref id
+     */
+    public void setPreviousSandboxInstanceRefId(Long previousSandboxInstanceRefId) {
+        this.previousSandboxInstanceRefId = previousSandboxInstanceRefId;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingRunByIdDTO{" +
+                "id=" + id +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", state=" + state +
+                ", sandboxInstanceRefId=" + sandboxInstanceRefId +
+                ", participantRef=" + participantRef +
+                ", definitionId=" + definitionId +
+                ", instanceId=" + instanceId +
+                ", previousSandboxInstanceRefId=" + previousSandboxInstanceRefId +
+                '}';
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunDTO.java
new file mode 100644
index 00000000..9bfa9db7
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/trainingrun/TrainingRunDTO.java
@@ -0,0 +1,167 @@
+package cz.muni.ics.kypo.training.adaptive.dto.trainingrun;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import cz.muni.ics.kypo.training.adaptive.domain.enums.TRState;
+import cz.muni.ics.kypo.training.adaptive.dto.UserRefDTO;
+import cz.muni.ics.kypo.training.adaptive.dto.converters.LocalDateTimeUTCSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+/**
+ * Encapsulates information about Training Run.
+ */
+@ApiModel(value = "TrainingRunDTO", description = "The act, or a recording, of performing actions during training from a perspective of one concrete participant.")
+public class TrainingRunDTO {
+
+    @ApiModelProperty(value = "Main identifier of training run.", example = "1")
+    private Long id;
+    @ApiModelProperty(value = "Date when training run started.", example = "2016-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime startTime;
+    @ApiModelProperty(value = "Date when training run ends.", example = "2022-10-19 10:23:54+02")
+    @JsonSerialize(using = LocalDateTimeUTCSerializer.class)
+    private LocalDateTime endTime;
+    @ApiModelProperty(value = "Current state of training run.", example = "ALLOCATED")
+    private TRState state;
+    @ApiModelProperty(value = "Reference to the received sandbox.")
+    private Long sandboxInstanceRefId;
+    @ApiModelProperty(value = "Reference to participant of training run.")
+    private UserRefDTO participantRef;
+
+    /**
+     * Gets id.
+     *
+     * @return the id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * Sets id.
+     *
+     * @param id the id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * Gets start time.
+     *
+     * @return the start time
+     */
+    public LocalDateTime getStartTime() {
+        return startTime;
+    }
+
+    /**
+     * Sets start time.
+     *
+     * @param startTime the start time
+     */
+    public void setStartTime(LocalDateTime startTime) {
+        this.startTime = startTime;
+    }
+
+    /**
+     * Gets end time.
+     *
+     * @return the end time
+     */
+    public LocalDateTime getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * Sets end time.
+     *
+     * @param endTime the end time
+     */
+    public void setEndTime(LocalDateTime endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * Gets state.
+     *
+     * @return the {@link TRState}
+     */
+    public TRState getState() {
+        return state;
+    }
+
+    /**
+     * Sets state.
+     *
+     * @param state the {@link TRState}
+     */
+    public void setState(TRState state) {
+        this.state = state;
+    }
+
+    /**
+     * Gets sandbox instance ref.
+     *
+     * @return the sandbox instance ref id
+     */
+    public Long getSandboxInstanceRefId() {
+        return sandboxInstanceRefId;
+    }
+
+    /**
+     * Sets sandbox instance ref.
+     *
+     * @param sandboxInstanceRefId the sandbox instance ref id
+     */
+    public void setSandboxInstanceRefId(Long sandboxInstanceRefId) {
+        this.sandboxInstanceRefId = sandboxInstanceRefId;
+    }
+
+    /**
+     * Gets participant ref.
+     *
+     * @return the {@link UserRefDTO}
+     */
+    public UserRefDTO getParticipantRef() {
+        return participantRef;
+    }
+
+    /**
+     * Sets participant ref.
+     *
+     * @param participantRef the {@link UserRefDTO}
+     */
+    public void setParticipantRef(UserRefDTO participantRef) {
+        this.participantRef = participantRef;
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingRunDTO{" +
+                "id=" + id +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", state=" + state +
+                ", sandboxInstanceRefId=" + sandboxInstanceRefId +
+                ", participantRef=" + participantRef +
+                '}';
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (!(object instanceof TrainingRunDTO)) return false;
+        TrainingRunDTO that = (TrainingRunDTO) object;
+        return Objects.equals(getId(), that.getId()) &&
+                Objects.equals(getState(), that.getState()) &&
+                Objects.equals(getParticipantRef(), that.getParticipantRef());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), getState(), getParticipantRef());
+    }
+}
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/enums/Actions.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/enums/Actions.java
new file mode 100644
index 00000000..07346855
--- /dev/null
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/enums/Actions.java
@@ -0,0 +1,22 @@
+package cz.muni.ics.kypo.training.adaptive.enums;
+
+/**
+ * The enumeration of Actions.
+ *
+ */
+public enum Actions {
+
+    /**
+     * None actions.
+     */
+    NONE,
+    /**
+     * Shows results of finished training runs.
+     */
+    RESULTS,
+
+    /**
+     * Resume actions.
+     */
+    RESUME;
+}
diff --git a/src/main/resources/locale/ValidationMessages.properties b/src/main/resources/locale/ValidationMessages.properties
new file mode 100644
index 00000000..cf8206a9
--- /dev/null
+++ b/src/main/resources/locale/ValidationMessages.properties
@@ -0,0 +1,92 @@
+#PHASE
+phase.id.NotNull.message=Phase field 'id' cannot be null.
+phase.title.NotEmpty.message=Phase field 'title' cannot be empty.
+phase.phaseType.NotNull.message=Phase field 'phaseType' cannot be null.
+phase.order.NotNull.message=Phase field 'order' cannot be null.
+phase.order.Min.message=Phase field 'order' cannot be lower than 0.
+
+#QUESTIONNAIRE PHASE
+questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase field 'questionnaireType' cannot be null.
+questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation field 'order' cannot be null.
+questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation field 'order' cannot be lower than 0.
+questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation field 'questionIds' cannot be null.
+questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation field 'questionIds' must contain at least one value.
+questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation field 'phaseId' cannot be null.
+questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation field 'phaseId' cannot be lower than 0.
+questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation field 'successRate' cannot be lower than 0.
+questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation field 'successRate' cannot be higher than 100.
+
+#QUESTION
+question.order.NotNull.message=Question Level field 'order' cannot be null.
+question.order.Min.message=Question field 'order' cannot be lower than 0.
+question.text.NotEmpty.message=Question field 'text' cannot be empty.
+question.questionType.NotNull.message=Question field 'questionType' cannot be null.
+
+#QUESTION CHOICES
+questionChoices.text.NotEmpty.message=Question field 'text' cannot be empty.
+questionChoices.correct.NotNull.message=Question field 'correct' cannot be null.
+questionChoices.order.NotNull.message=Question field 'order' cannot be null.
+questionChoices.order.Min.message=Question field 'order' cannot be lower than 0.
+
+#TRAINING PHASE
+trainingPhase.id.NotNull.message=Training Phase field 'id' cannot be null.
+trainingPhase.title.NotEmpty.message=Training Phase field 'title' cannot be empty.
+trainingPhase.estimatedDuration.NotNull.message=Training Phase field 'maxScore' cannot be null.
+trainingPhase.estimatedDuration.Min.message=Training Phase field 'maxScore' cannot be lower than 0.
+trainingPhase.allowedCommands.NotNull.message=Training Phase field 'allowedCommands' cannot be null.
+trainingPhase.allowedCommands.Min.message=Training Phase field 'allowedCommands' cannot be lower than 0.
+trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase field 'allowedWrongAnswers' cannot be null.
+trainingPhase.allowedWrongAnswers.Min.message=Training Phase field 'allowedWrongAnswers' cannot be lower than 0.
+
+#TASK
+task.title.NotEmpty.message=Task field 'title' cannot be empty.
+task.answer.NotEmpty.message=Task field 'answer' cannot be empty.
+task.answer.Size.message=Task field 'answer' cannot have more than 50 characters.
+task.content.NotEmpty.message=Task field 'content' cannot be empty.
+task.solution.NotEmpty.message=Task field 'solution' cannot be empty.
+task.incorrectAnswerLimit.NotEmpty.message=Task field 'incorrectFlagLimit' cannot be empty.
+task.incorrectAnswerLimit.Min.message=Task field 'incorrectFlagLimit' cannot be lower than 0.
+task.incorrectAnswerLimit.Max.message=Task field 'incorrectFlagLimit' cannot be higher than 100.
+task.sandboxChangeExpectedDuration.Min.message=Task field 'sandboxChangeExpectedDuration' cannot be lower than 0.
+
+#INFO PHASE
+info.content.NotEmpty.message=Info Level field 'content' cannot be empty.
+
+#VALIDATE ANSWER
+validateAnswer.answer.NotEmpty.message=Validate answer field 'answer' cannot be empty.
+
+#TRAINING DEFINITION
+trainingDefinition.title.NotEmpty.message=Training Definition field 'title' cannot be empty.
+trainingDefinition.state.NotNull.message=Training Definition field 'state' cannot be null.
+trainingDefinition.showStepperBar.NotNull.message=Training Definition field 'showStepperBar' cannot be null.
+trainingDefinition.id.NotNull.message=Training Definition field 'id' cannot be null.
+
+#TRAINING INSTANCE
+assignPool.poolId.NotNull.message=Training Instance Assign Pool field  'poolId' cannot be null.
+assignPool.poolId.Min.message=Training Instance Assign Pool field  'poolId' cannot be lower than 0.
+
+trainingInstance.id.NotNull.message=Training Instance field 'id' cannot be null.
+trainingInstance.startTime.NotNull.message=Training Instance field 'startTime' cannot be null.
+trainingInstance.endTime.NotNull.message=Training Instance field 'endTime' cannot be null.
+trainingInstance.title.NotEmpty.message=Training Instance field 'title' cannot be empty.
+trainingInstance.accessToken.NotEmpty.message=Training Instance field 'accessToken' cannot be empty.
+trainingInstance.trainingDefinitionId.NotNull.message=Training Instance field 'trainingDefinition' cannot be null.
+trainingInstance.trainingDefinitionId.Min.message=Training Instance field 'trainingDefinitionId' cannot be lower than 0.
+
+#SANDBOX DEFINITION
+sandboxDefinition.id.NotNull.message=Sandbox Definition Info field 'id' cannot be null.
+sandboxDefinition.name.NotNull.message=Sandbox Definition Info field 'name' cannot be null.
+sandboxDefinition.url.NotNull.message=Sandbox Definition Info field 'url' cannot be null.
+sandboxDefinition.rev.NotNull.message=Sandbox Definition Info field 'rev' cannot be null.
+
+#SANDBOX
+sandbox.id.NotNull.message=Sandbox Info field 'id' cannot be null.
+
+#POOL INFO
+poolInfo.id.NotNull.message=Pool Info field 'id' cannot be null.
+poolInfo.maxSize.NotNull.message=Pool Info field 'maxSize' cannot be null.
+poolInfo.size.NotNull.message=Pool Info field 'size' cannot be null.
+poolInfo.poolId.NotNull.message=Pool Id Info field 'poolId' cannot be null.
+poolInfo.definitionId.NotNull.message=Pool Info field 'definitionId' cannot be null.
+poolInfo.lockId.NotNull.message=Pool Info field 'lockId' cannot be null.
+
diff --git a/src/main/resources/locale/ValidationMessages_cs_CZ.properties b/src/main/resources/locale/ValidationMessages_cs_CZ.properties
new file mode 100644
index 00000000..69f29831
--- /dev/null
+++ b/src/main/resources/locale/ValidationMessages_cs_CZ.properties
@@ -0,0 +1,92 @@
+#PHASE
+phase.id.NotNull.message=Phase pole 'id' nemůže být null.
+phase.title.NotEmpty.message=Phase pole 'title' nemůže být prázdné.
+phase.phaseType.NotNull.message=Phase pole 'phaseType' nemůže být null.
+phase.order.NotNull.message=Phase pole 'order' nemůže být null.
+phase.order.Min.message=Phase pole 'order' nemůže být menší než 0.
+
+#QUESTIONNAIRE PHASE
+questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase pole 'questionnaireType' nemůže být null.
+questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation pole 'order' nemůže být null.
+questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation pole 'order' nemůže být menší než 0.
+questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation pole 'questionIds' nemůže být null.
+questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation pole 'questionIds' must contain at least one value.
+questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation pole 'phaseId' nemůže být null.
+questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation pole 'phaseId' nemůže být menší než 0.
+questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation pole 'successRate' nemůže být menší než 0.
+questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation pole 'successRate' nemůže být vyšší než 100.
+
+#QUESTION
+question.order.NotNull.message=Question Level pole 'order' nemůže být null.
+question.order.Min.message=Question pole 'order' nemůže být menší než 0.
+question.text.NotEmpty.message=Question pole 'text' nemůže být prázdné.
+question.questionType.NotNull.message=Question pole 'questionType' nemůže být null.
+
+#QUESTION CHOICES
+questionChoices.text.NotEmpty.message=Question pole 'text' nemůže být prázdné.
+questionChoices.correct.NotNull.message=Question pole 'correct' nemůže být null.
+questionChoices.order.NotNull.message=Question pole 'order' nemůže být null.
+questionChoices.order.Min.message=Question pole 'order' nemůže být menší než 0.
+
+#TRAINING PHASE
+trainingPhase.id.NotNull.message=Training Phase pole 'id' nemůže být null.
+trainingPhase.title.NotEmpty.message=Training Phase pole 'title' nemůže být prázdné.
+trainingPhase.estimatedDuration.NotNull.message=Training Phase pole 'maxScore' nemůže být null.
+trainingPhase.estimatedDuration.Min.message=Training Phase pole 'maxScore' nemůže být menší než 0.
+trainingPhase.allowedCommands.NotNull.message=Training Phase pole 'allowedCommands' nemůže být null.
+trainingPhase.allowedCommands.Min.message=Training Phase pole 'allowedCommands' nemůže být menší než 0.
+trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase pole 'allowedWrongAnswers' nemůže být null.
+trainingPhase.allowedWrongAnswers.Min.message=Training Phase pole 'allowedWrongAnswers' nemůže být menší než 0.
+
+#TASK
+task.title.NotEmpty.message=Task pole 'title' nemůže být prázdné.
+task.answer.NotEmpty.message=Task pole 'answer' nemůže být prázdné.
+task.answer.Size.message=Task pole 'answer' nemůže mít víc než 50 znaků.
+task.content.NotEmpty.message=Task pole 'content' nemůže být prázdné.
+task.solution.NotEmpty.message=Task pole 'solution' nemůže být prázdné.
+task.incorrectAnswerLimit.NotEmpty.message=Task pole 'incorrectFlagLimit' nemůže být prázdné.
+task.incorrectAnswerLimit.Min.message=Task pole 'incorrectFlagLimit' nemůže být menší než 0.
+task.incorrectAnswerLimit.Max.message=Task pole 'incorrectFlagLimit' nemůže být vyšší než 100.
+task.sandboxChangeExpectedDuration.Min.message=Task pole 'sandboxChangeExpectedDuration' nemůže být menší než 0.
+
+#INFO PHASE
+info.content.NotEmpty.message=Info Level pole 'content' nemůže být prázdné.
+
+#VALIDATE ANSWER
+validateAnswer.answer.NotEmpty.message=Validate answer pole 'answer' nemůže být prázdné.
+
+#TRAINING DEFINITION
+trainingDefinition.title.NotEmpty.message=Training Definition pole 'title' nemůže být prázdné.
+trainingDefinition.state.NotNull.message=Training Definition pole 'state' nemůže být null.
+trainingDefinition.showStepperBar.NotNull.message=Training Definition pole 'showStepperBar' nemůže být null.
+trainingDefinition.id.NotNull.message=Training Definition pole 'id' nemůže být null.
+
+#TRAINING INSTANCE
+assignPool.poolId.NotNull.message=Training Instance Assign Pool pole 'poolId' nemůže být null.
+assignPool.poolId.Min.message=Training Instance Assign Pool pole 'poolId' nemůže být menší než 0.
+
+trainingInstance.id.NotNull.message=Training Instance pole 'id' nemůže být null.
+trainingInstance.startTime.NotNull.message=Training Instance pole 'startTime' nemůže být null.
+trainingInstance.endTime.NotNull.message=Training Instance pole 'endTime' nemůže být null.
+trainingInstance.title.NotEmpty.message=Training Instance pole 'title' nemůže být prázdné.
+trainingInstance.accessToken.NotEmpty.message=Training Instance pole 'accessToken' nemůže být prázdné.
+trainingInstance.trainingDefinitionId.NotNull.message=Training Instance pole 'trainingDefinition' nemůže být null.
+trainingInstance.trainingDefinitionId.Min.message=Training Instance pole 'trainingDefinitionId' nemůže být menší než 0.
+
+#SANDBOX DEFINITION
+sandboxDefinition.id.NotNull.message=Sandbox Definition Info field 'id' nemůže být null.
+sandboxDefinition.name.NotNull.message=Sandbox Definition Info field 'name' nemůže být null.
+sandboxDefinition.url.NotNull.message=Sandbox Definition Info field 'url' nemůže být null.
+sandboxDefinition.rev.NotNull.message=Sandbox Definition Info field 'rev' nemůže být null.
+
+#SANDBOX
+sandbox.id.NotNull.message=Sandbox Info field 'id' nemůže být null.
+
+#POOL INFO
+poolInfo.id.NotNull.message=Pool Info field 'id' nemůže být null.
+poolInfo.maxSize.NotNull.message=Pool Info field 'maxSize' nemůže být null.
+poolInfo.size.NotNull.message=Pool Info field 'size' nemůže být null.
+poolInfo.poolId.NotNull.message=Pool Id Info field 'poolId' nemůže být null.
+poolInfo.definitionId.NotNull.message=Pool Info field 'definitionId' nemůže být null.
+poolInfo.lockId.NotNull.message=Pool Info field 'lockId' nemůže být null.
+
diff --git a/src/main/resources/locale/ValidationMessages_sk_SK.properties b/src/main/resources/locale/ValidationMessages_sk_SK.properties
new file mode 100644
index 00000000..6852cbde
--- /dev/null
+++ b/src/main/resources/locale/ValidationMessages_sk_SK.properties
@@ -0,0 +1,91 @@
+#PHASE
+phase.id.NotNull.message=Phase pole 'id' nemôže byť null.
+phase.title.NotEmpty.message=Phase pole 'title' nemôže byť prázdne.
+phase.phaseType.NotNull.message=Phase pole 'phaseType' nemôže byť null.
+phase.order.NotNull.message=Phase pole 'order' nemôže byť null.
+phase.order.Min.message=Phase pole 'order' nemôže byť nižšie než 0.
+
+#QUESTIONNAIRE PHASE
+questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase pole 'questionnaireType' nemôže byť null.
+questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation pole 'order' nemôže byť null.
+questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation pole 'order' nemôže byť nižšie než 0.
+questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation pole 'questionIds' nemôže byť null.
+questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation pole 'questionIds' must contain at least one value.
+questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation pole 'phaseId' nemôže byť null.
+questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation pole 'phaseId' nemôže byť nižšie než 0.
+questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation pole 'successRate' nemôže byť nižšie než 0.
+questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation pole 'successRate' nemôže byť vyššie než 100.
+
+#QUESTION
+question.order.NotNull.message=Question Level pole 'order' nemôže byť null.
+question.order.Min.message=Question pole 'order' nemôže byť nižšie než 0.
+question.text.NotEmpty.message=Question pole 'text' nemôže byť prázdne.
+question.questionType.NotNull.message=Question pole 'questionType' nemôže byť null.
+
+#QUESTION CHOICES
+questionChoices.text.NotEmpty.message=Question pole 'text' nemôže byť prázdne.
+questionChoices.correct.NotNull.message=Question pole 'correct' nemôže byť null.
+questionChoices.order.NotNull.message=Question pole 'order' nemôže byť null.
+questionChoices.order.Min.message=Question pole 'order' nemôže byť nižšie než 0.
+
+#TRAINING PHASE
+trainingPhase.id.NotNull.message=Training Phase pole 'id' nemôže byť null.
+trainingPhase.title.NotEmpty.message=Training Phase pole 'title' nemôže byť prázdne.
+trainingPhase.estimatedDuration.NotNull.message=Training Phase pole 'maxScore' nemôže byť null.
+trainingPhase.estimatedDuration.Min.message=Training Phase pole 'maxScore' nemôže byť nižšie než 0.
+trainingPhase.allowedCommands.NotNull.message=Training Phase pole 'allowedCommands' nemôže byť null.
+trainingPhase.allowedCommands.Min.message=Training Phase pole 'allowedCommands' nemôže byť nižšie než 0.
+trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase pole 'allowedWrongAnswers' nemôže byť null.
+trainingPhase.allowedWrongAnswers.Min.message=Training Phase pole 'allowedWrongAnswers' nemôže byť nižšie než 0.
+
+#TASK
+task.title.NotEmpty.message=Task pole 'title' nemôže byť prázdne.
+task.answer.NotEmpty.message=Task pole 'answer' nemôže byť prázdne.
+task.answer.Size.message=Task pole 'answer' nemôže mať viac než 50 znakov.
+task.content.NotEmpty.message=Task pole 'content' nemôže byť prázdne.
+task.solution.NotEmpty.message=Task pole 'solution' nemôže byť prázdne.
+task.incorrectAnswerLimit.NotEmpty.message=Task pole 'incorrectFlagLimit' nemôže byť prázdne.
+task.incorrectAnswerLimit.Min.message=Task pole 'incorrectFlagLimit' nemôže byť nižšie než 0.
+task.incorrectAnswerLimit.Max.message=Task pole 'incorrectFlagLimit' nemôže byť vyššie než 100.
+task.sandboxChangeExpectedDuration.Min.message=Task pole 'sandboxChangeExpectedDuration' nemôže byť nižšie než 0.
+
+#INFO PHASE
+info.content.NotEmpty.message=Info Level pole 'content' nemôže byť prázdne.
+
+#VALIDATE ANSWER
+validateAnswer.answer.NotEmpty.message=Validate answer pole 'answer' nemôže byť prázdne.
+
+#TRAINING DEFINITION
+trainingDefinition.title.NotEmpty.message=Training Definition pole 'title' nemôže byť prázdne.
+trainingDefinition.state.NotNull.message=Training Definition pole 'state' nemôže byť null.
+trainingDefinition.showStepperBar.NotNull.message=Training Definition pole 'showStepperBar' nemôže byť null.
+trainingDefinition.id.NotNull.message=Training Definition pole 'id' nemôže byť null.
+
+#TRAINING INSTANCE
+assignPool.poolId.NotNull.message=Training Instance Assign Pool pole 'poolId' nemôže byť null.
+assignPool.poolId.Min.message=Training Instance Assign Pool pole 'poolId' nemôže byť nižšie než 0.
+
+trainingInstance.id.NotNull.message=Training Instance pole 'id' nemôže byť null.
+trainingInstance.startTime.NotNull.message=Training Instance pole 'startTime' nemôže byť null.
+trainingInstance.endTime.NotNull.message=Training Instance pole 'endTime' nemôže byť null.
+trainingInstance.title.NotEmpty.message=Training Instance pole 'title' nemôže byť prázdne.
+trainingInstance.accessToken.NotEmpty.message=Training Instance pole 'accessToken' nemôže byť prázdne.
+trainingInstance.trainingDefinitionId.NotNull.message=Training Instance pole 'trainingDefinition' nemôže byť null.
+trainingInstance.trainingDefinitionId.Min.message=Training Instance pole 'trainingDefinitionId' nemôže byť nižšie než 0.
+
+#SANDBOX DEFINITION
+sandboxDefinition.id.NotNull.message=Sandbox Definition Info field 'id' nemôže byť null.
+sandboxDefinition.name.NotNull.message=Sandbox Definition Info field 'name' nemôže byť null.
+sandboxDefinition.url.NotNull.message=Sandbox Definition Info field 'url' nemôže byť null.
+sandboxDefinition.rev.NotNull.message=Sandbox Definition Info field 'rev' nemôže byť null.
+
+#SANDBOX
+sandbox.id.NotNull.message=Sandbox Info field 'id' nemôže byť null.
+
+#POOL INFO
+poolInfo.id.NotNull.message=Pool Info field 'id' nemôže byť null.
+poolInfo.maxSize.NotNull.message=Pool Info field 'maxSize' nemôže byť null.
+poolInfo.size.NotNull.message=Pool Info field 'size' nemôže byť null.
+poolInfo.poolId.NotNull.message=Pool Id Info field 'poolId' nemôže byť null.
+poolInfo.definitionId.NotNull.message=Pool Info field 'definitionId' nemôže byť null.
+poolInfo.lockId.NotNull.message=Pool Info field 'lockId' nemôže byť null.
-- 
GitLab