Class QuestionImpl

    • Constructor Detail

      • QuestionImpl

        protected QuestionImpl()
      • QuestionImpl

        public QuestionImpl​(ProcessInstance processInstance,
                            String questionText,
                            String fromState,
                            String targetState,
                            User fromUser,
                            User toUser)
        a Question object is build from - its content, - the source state name, - the target state name - and the instance where the question was asked
    • Method Detail

      • setProcessInstance

        public void setProcessInstance​(ProcessInstance processInstance)
        Set the process instance where the question was asked
      • getFromStateName

        public String getFromStateName()
        Get the state where the question was asked
      • getFromState

        public State getFromState()
        Get the state where the question was asked
        Specified by:
        getFromState in interface Question
      • setFromStateName

        public void setFromStateName​(String fromState)
        Set the state where the question was asked
      • getTargetStateName

        public String getTargetStateName()
        Get the destination state for the question
      • getTargetState

        public State getTargetState()
        Get the destination state for the question
        Specified by:
        getTargetState in interface Question
      • setTargetStateName

        public void setTargetStateName​(String targetState)
        Set the destination state for the question
      • setQuestionText

        public void setQuestionText​(String questionText)
        Set the question content
      • setResponseText

        public void setResponseText​(String responseText)
        Set the response content
      • answer

        public void answer​(String responseText)
        Answer this question
        Specified by:
        answer in interface Question
      • setFromUserId

        public void setFromUserId​(String fromUserId)
        Set the id of user who asked the question
      • getFromUserId

        public String getFromUserId()
        Get the id of user who asked the question
      • setToUserId

        public void setToUserId​(String toUserId)
        Set the id of user who received the question
      • getToUserId

        public String getToUserId()
        Get the id of user who received the question
      • getQuestionDate

        public Date getQuestionDate()
        Get the date when question was asked
        Specified by:
        getQuestionDate in interface Question
      • setQuestionDate

        public void setQuestionDate​(Date questionDate)
        Set the date when question was asked
      • getResponseDate

        public Date getResponseDate()
        Get the date when question was asked
        Specified by:
        getResponseDate in interface Question
      • setResponseDate

        public void setResponseDate​(Date responseDate)
        Set the date when question was asked
      • hasResponse

        public boolean hasResponse()
        Is a response was sent to this question
        Specified by:
        hasResponse in interface Question
      • isRelevant

        public boolean isRelevant()
        Has this question been answered and taken in account, if yes, so it's not relevant anymore (return false)
        Specified by:
        isRelevant in interface Question
      • setRelevant

        public void setRelevant​(boolean relevant)
        Set the relevant status of this question