com.ibm.openpages.api.questionnaire

Interface IQuestionnaire

  • All Superinterfaces:
    IQuestionnaireBase


    public interface IQuestionnaire
    extends IQuestionnaireBase
    This is an interface to access a questionnaire for both template and assessment.
    • Method Detail

      • getSections

        java.util.List<ISection> getSections()
        Returns a list of sections and sub-sections, sorted by the order configured on the child objects.
        Returns:
        list of ISection
      • getSectionBy

        ISection getSectionBy(Id id)
        Returns a section or sub-section that has the specified id.
        Parameters:
        id - of a section or a sub-section
        Returns:
        an ISection object, or null if id does not match any of the sections or sub-sections for this questionnaire
      • getQuestions

        java.util.List<IQuestion> getQuestions()
        Returns a list of questions, sorted by the order configured on the child objects.
        Returns:
        list of IQuestion
      • getQuestionBy

        IQuestion getQuestionBy(Id id)
        Returns a question that has the specified id.
        Parameters:
        id - the id of a question
        Returns:
        an IQuestion object, or null if id does not match any of the questions for this questionnaire
      • getComments

        java.util.List<IComment> getComments()
        Returns a list of comments of the assessment.
        Returns:
        list of IComment
      • getAttachments

        java.util.List<IAttachment> getAttachments()
        Returns a list of attachments of the assessment.
        Returns:
        list of IAttachment
      • getCompletionRequired

        java.lang.Boolean getCompletionRequired()
        Returns:
        the flag whether the completion is required
      • getAssignee

        IUser getAssignee()
        Returns the assignee (user) of this questionnaire. Note that the IQuestionnaire API only supports single user display type for the assignee field.
        Returns:
        the assignee of this questionnaire as IUser, or null if the display type is not single user.
      • getDueDate

        java.util.Date getDueDate()
        Returns:
        the due date of the assessment
      • getLastModifiedDate

        java.util.Date getLastModifiedDate()
        Returns:
        last modified date of the template or the assessment
      • addSection

        void addSection(ISection section)
        Add a section to the questionnaire.
        Parameters:
        section - the section to be added
      • removeSection

        void removeSection(Id sectionId)
        Remove a section from the section.
        Parameters:
        sectionId - the id of the section
      • removeQuestion

        void removeQuestion(Id questionId)
        Remove a question from the question.
        Parameters:
        questionId - the id of the question
      • addQuestion

        void addQuestion(IQuestion question)
        Add a question to the questionnaire.
        Parameters:
        question - the question to be added
      • addComment

        void addComment(IComment comment)
        Add a comment to the assessment.
        Parameters:
        comment - the comment to be added
      • addAttachment

        void addAttachment(IAttachment attachment)
        Add an attachment to the assessment.
        Parameters:
        attachment - the attachment to be added
      • removeAttachment

        void removeAttachment(IAttachment attachment)
        Remove an attachment from the assessment.
        Parameters:
        attachment - the attachment to be removed
      • getTransitionComment

        java.lang.String getTransitionComment()
        Returns:
        transition comment of the questionnaire
      • setTransitionComment

        void setTransitionComment(java.lang.String comment)
        Sets transition comment of the questionnaire.
        Parameters:
        comment -
      • getAvailableTransitions

        java.util.List<IEnumValue> getAvailableTransitions()
        Returns available transitions to set, which is determined by the lifecycle.
        Returns:
        IEnumValue
      • setTransition

        void setTransition(java.lang.String transitionName)
        Sets transition of the questionnaire. When you set the transition and save the questionnaire, the lifecycle stage/questionnaire status is updated automatically by the lifecycle trigger. This throws InvalidArgumentException when the transitionName is not in the list of available transitions.
        Parameters:
        transitionName - non-null string value which is one of available transitions
      • recalculateScore

        void recalculateScore(boolean recalcScore)
        Sets the flag to indicate to re-calculate the scores and the progress of the assessment (as a percentage) in the next save operation. The flag itself is not persisted. By default, the score is calculated incrementally and it is not required to call this method to recalculate the score. There would be a case like a product jar is patched and you would like to reflect the change in the scores. Then, you can set this flag and save the questionnaire.
        Parameters:
        recalcScore -

Licensed Materials - Property of IBM
© Copyright IBM Corp. 2013, 2018. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.