com.ibm.openpages.api.questionnaire

Interface IQuestion

  • All Superinterfaces:
    IQuestionnaireBase


    public interface IQuestion
    extends IQuestionnaireBase
    This is an interface to access a question for both template and assessment.
    Category:
    Questionnaire
    • Method Detail

      • getAnswerType

        AnswerType getAnswerType()
        Returns answer type
        Returns:
        answer type enum
      • setAnswerType

        void setAnswerType(AnswerType aType)
        Sets answer type of the question
        Parameters:
        aType - answer type enum
      • setOptions

        void setOptions(java.util.List<IQuestionOption> options)
        Sets options for selection question.
        Parameters:
        options - list of IQuestionOption
      • getVisibilityDependency

        IQuestionDependency getVisibilityDependency()
        Returns a question dependency object that represents visibility dependency. This question is visible in the responder UI only when the dependency condition is met.
        Returns:
        IQuestionDependency
      • setVisibilityDependency

        void setVisibilityDependency(IQuestionDependency questiondependency)
        Sets a question dependency object. This question is visible in the responder UI only when the dependency condition is met.
        Parameters:
        questiondependency - IQuestionDependency
      • setWeight

        void setWeight(int weight)
        Sets weight of the question.
        Parameters:
        weight -
      • getWeight

        int getWeight()
        Returns weight of the question.
        Returns:
        weight
      • getScore

        java.lang.Float getScore()
        Returns score of the question.
        Returns:
        score
      • getMaxRiskScore

        java.lang.Float getMaxRiskScore()
        Returns maximum risk score of the question.
        Returns:
        maximum risk
      • isHidden

        boolean isHidden()
        Returns a flag to indicate if the question is hidden because of the visibility dependency condition.
        Returns:
        hidden flag
      • hasRequiredEvidences

        boolean hasRequiredEvidences()
        Returns a flag to indicate if the question meets all the required evidences. When the question does not require any evidences, this flag is true.
        Returns:
        flag to indicate if the question meets all the required evidences
      • setAnswer

        void setAnswer(java.lang.Object answer)
        Sets answer of the question. Refer to getAnswer() for the acceptable object type. Otherwise, this call throws an IllegalArgumentException. The answer can be null when it is unanswered.
        Parameters:
        answer -
      • getRequires

        java.util.List<java.lang.String> getRequires()
        Returns the list of evidence types required by this question for the question to be considered complete.
        Returns:
        List of strings (e.g., ["comment", "attachment"] )
      • setRequires

        void setRequires(java.util.List<java.lang.String> requires)
        Sets the list of evidence types required by this question for the question to be considered complete.
        Parameters:
        requires - List of strings (e.g., ["comment", "attachment"] )
      • getAnsweredOnDate

        java.util.Date getAnsweredOnDate()
        Returns the timestamp when the answer was persisted
        Returns:
        the answered timestamp
      • getAnsweredBy

        IUser getAnsweredBy()
        Returns the user who last answered
        Returns:
        IUser
      • isShowCommentTab

        boolean isShowCommentTab()
        Returns a flag to indicate if need to show the question comment tab.
        Returns:
        show comment tab flag
      • setShowCommentTab

        void setShowCommentTab(boolean showCommentTab)
        Sets if need to show the question comment tab
        Parameters:
        showCommentTab -
      • isShowAttachmentTab

        boolean isShowAttachmentTab()
        Returns a flag to indicate if need to show the question attachment tab.
        Returns:
        show attachment tab flag
      • setShowAttachmentTab

        void setShowAttachmentTab(boolean showAttachmentTab)
        Sets if need to show the question attachment tab
        Parameters:
        showAttachmentTab -

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.