Class QuestionnaireServiceImpl

    • Constructor Detail

      • QuestionnaireServiceImpl

        public QuestionnaireServiceImpl​(DataService dataService,
                                        EntityManager entityManager,
                                        org.molgenis.security.core.UserPermissionEvaluator userPermissionEvaluator,
                                        QuestionnaireFactory questionnaireFactory,
                                        StaticContentService staticContentService,
                                        org.molgenis.security.acl.MutableAclClassService mutableAclClassService)
    • Method Detail

      • startQuestionnaire

        public QuestionnaireResponse startQuestionnaire​(String entityTypeId)
        Description copied from interface: QuestionnaireService
        Start a questionnaire based on ID. If current user does not have a row for the specified questionnaire, one is created.

        Created questionnaire entries get the status 'OPEN'.

        Specified by:
        startQuestionnaire in interface QuestionnaireService
        Parameters:
        entityTypeId - The ID of a questionnaire type
        Returns:
        QuestionnaireResponse to return the added questionaire to the frontend
      • getQuestionnaireSubmissionText

        public String getQuestionnaireSubmissionText​(String id)
        Description copied from interface: QuestionnaireService
        Retrieve static content for a specific questionnaire containing a "Thank you" text which is shown on submission.

        If no static content is specified, will return a text with HTML contents by default.

        Specified by:
        getQuestionnaireSubmissionText in interface QuestionnaireService
        Parameters:
        id - The ID of a questionnaire
        Returns:
        A piece of text which can be shown after submission of a questionnaire
      • findQuestionnaireEntity

        @Nullable
        @CheckForNull
        public Questionnaire findQuestionnaireEntity​(String entityTypeId)
        Description copied from interface: QuestionnaireService
        Find the single row in the Questionnaire table that belongs to the current user. Returns null if no row is found, or the questionnaire ID does not exist.
        Specified by:
        findQuestionnaireEntity in interface QuestionnaireService
        Parameters:
        entityTypeId - The ID of a questionnaire table
        Returns:
        An Entity of type Questionnaire or Null