DTOConverter (training-module-library 1.0.0-4.12.0-163223 API)
Date: 2018-07-19

org.gcube.portal.trainingmodule.shared

## Class DTOConverter

- java.lang.Object
- - org.gcube.portal.trainingmodule.shared.DTOConverter

-     public class DTOConverter
      extends Object

  The Class DTOConverter.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 22, 2018

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `USERNAME_SEPARATOR` The Constant USERNAME_SEPARATOR.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DTOConverter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `addUsernameToShareWith(String sharedWith, List<String> listOfUsername)` Adds the username to share with.
    `static List<TrainingCourseDTO>` | `fromListOfProject(List<TrainingProject> listPrj)` From list of project.
    `static List<TrainingUnitDTO>` | `fromListOfUnit(List<TrainingUnit> listUnit)` From list of unit.
    `static TrainingUnitProgressDTO` | `fromProgressUnit(ProgressPerUnit dao)` From progress unit.
    `static List<String>` | `fromSharedWith(String sharedWith)` Gets the shared with.
    `static TrainingCourseDTO` | `fromTrainingProject(TrainingProject project)` From training project.
    `static TrainingUnitDTO` | `fromTrainingUnit(TrainingUnit unit)` From training unit.
    `static TrainingUnitQuestionnaireDTO` | `fromTrainingUnitQuestionnaire(TrainingUnitQuestionnaire quest)` To training unit questionnaire.
    `static TrainingVideoDTO` | `fromTrainingVideo(TrainingVideo video)` From training video.
    `static ProgressPerUnit` | `toProgressUnit(TrainingUnitProgressDTO dto)` To progress unit.
    `static String` | `toSharedWith(List<String> listOfUsername)` Sets the shared with.
    `static TrainingProject` | `toTrainingProject(TrainingCourseDTO project)` To training project.
    `static TrainingUnit` | `toTrainingUnit(TrainingUnitDTO unit)` From training unit.
    `static TrainingUnitQuestionnaire` | `toTrainingUnitQuestionnaire(TrainingUnitQuestionnaireDTO questDTO)` To training unit questionnaire.
    `static TrainingVideo` | `toTrainingVideo(TrainingVideoDTO videoDTO)` To training video.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### USERNAME_SEPARATOR

          public static final String USERNAME_SEPARATOR

      The Constant USERNAME_SEPARATOR.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DTOConverter

          public DTOConverter()

  - ### Method Detail

    - #### fromSharedWith

          public static List<String> fromSharedWith(String sharedWith)

      Gets the shared with.
      Parameters:
        `sharedWith` - the shared with
      Returns:
        the shared with

    - #### toSharedWith

          public static String toSharedWith(List<String> listOfUsername)

      Sets the shared with.
      Parameters:
        `listOfUsername` - the list of username
      Returns:
        the string

    - #### addUsernameToShareWith

          public static String addUsernameToShareWith(String sharedWith,
                                                      List<String> listOfUsername)

      Adds the username to share with.
      Parameters:
        `sharedWith` - the shared with
        `listOfUsername` - the list of username
      Returns:
        the string

    - #### fromListOfProject

          public static List<TrainingCourseDTO> fromListOfProject(List<TrainingProject> listPrj)

      From list of project.
      Parameters:
        `listPrj` - the list prj
      Returns:
        the list

    - #### fromListOfUnit

          public static List<TrainingUnitDTO> fromListOfUnit(List<TrainingUnit> listUnit)

      From list of unit.
      Parameters:
        `listUnit` - the list unit
      Returns:
        the list

    - #### fromTrainingProject

          public static TrainingCourseDTO fromTrainingProject(TrainingProject project)

      From training project.
      Parameters:
        `project` - the project
      Returns:
        the training project DTO

    - #### fromTrainingUnit

          public static TrainingUnitDTO fromTrainingUnit(TrainingUnit unit)

      From training unit.
      Parameters:
        `unit` - the unit
      Returns:
        the training unit DTO

    - #### toTrainingUnit

          public static TrainingUnit toTrainingUnit(TrainingUnitDTO unit)

      From training unit.
      Parameters:
        `unit` - the unit
      Returns:
        the training unit DTO

    - #### toProgressUnit

          public static ProgressPerUnit toProgressUnit(TrainingUnitProgressDTO dto)

      To progress unit.
      Parameters:
        `dto` - the dto
      Returns:
        the progress per unit

    - #### fromProgressUnit

          public static TrainingUnitProgressDTO fromProgressUnit(ProgressPerUnit dao)

      From progress unit.
      Parameters:
        `dao` - the dao
      Returns:
        the training unit progress DTO

    - #### toTrainingProject

          public static TrainingProject toTrainingProject(TrainingCourseDTO project)

      To training project.
      Parameters:
        `project` - the project
      Returns:
        the training project

    - #### toTrainingUnitQuestionnaire

          public static TrainingUnitQuestionnaire toTrainingUnitQuestionnaire(TrainingUnitQuestionnaireDTO questDTO)

      To training unit questionnaire.
      Parameters:
        `questDTO` - the quest DTO
      Returns:
        the training unit questionnaire

    - #### fromTrainingUnitQuestionnaire

          public static TrainingUnitQuestionnaireDTO fromTrainingUnitQuestionnaire(TrainingUnitQuestionnaire quest)

      To training unit questionnaire.
      Parameters:
        `quest` - the quest
      Returns:
        the training unit questionnaire

    - #### toTrainingVideo

          public static TrainingVideo toTrainingVideo(TrainingVideoDTO videoDTO)

      To training video.
      Parameters:
        `videoDTO` - the video DTO
      Returns:
        the training video

    - #### fromTrainingVideo

          public static TrainingVideoDTO fromTrainingVideo(TrainingVideo video)

      From training video.
      Parameters:
        `video` - the video
      Returns:
        the training video DTO

Copyright © 2018. All Rights Reserved.