com.silverpeas.workflow.engine.instance
Class QuestionImpl

java.lang.Object
  extended by com.silverpeas.workflow.engine.instance.QuestionImpl
All Implemented Interfaces:
Question

public class QuestionImpl
extends Object
implements Question

A Question object represents a question asked for the instance


Constructor Summary
QuestionImpl()
          default constructor used by Castor
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 Summary
 void answer(String responseText)
          Answer this question
 State getFromState()
          Get the state where the question was asked
 String getFromStateName()
          Get the state where the question was asked
 User getFromUser()
          Get the user who asked the question
 String getFromUserId()
          Get the id of user who asked the question
 String getId()
          Get the question id
 ProcessInstance getProcessInstance()
          Get the process instance where the question was asked
 Date getQuestionDate()
          Get the date when question was asked
 String getQuestionText()
          Get the question content
 Date getResponseDate()
          Get the date when question was asked
 String getResponseText()
          Get the response content
 State getTargetState()
          Get the destination state for the question
 String getTargetStateName()
          Get the destination state for the question
 User getToUser()
          Get the user who received the question
 String getToUserId()
          Get the id of user who received the question
 boolean hasResponse()
          Is a response was sent to this question
 boolean isRelevant()
          Has this question been answered and taken in account, if yes, so it's not relevant anymore (return false)
 int isRelevantCastor()
           
 void setFromStateName(String fromState)
          Set the state where the question was asked
 void setFromUserId(String fromUserId)
          Set the id of user who asked the question
 void setId(String id)
          Set the question id
 void setProcessInstance(ProcessInstance processInstance)
          Set the process instance where the question was asked
 void setQuestionDate(Date questionDate)
          Set the date when question was asked
 void setQuestionText(String questionText)
          Set the question content
 void setRelevant(boolean relevant)
          Set the relevant status of this question
 void setRelevantCastor(int relevant)
           
 void setResponseDate(Date responseDate)
          Set the date when question was asked
 void setResponseText(String responseText)
          Set the response content
 void setTargetStateName(String targetState)
          Set the destination state for the question
 void setToUserId(String toUserId)
          Set the id of user who received the question
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionImpl

public QuestionImpl()
default constructor used by Castor


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

getId

public String getId()
Get the question id

Specified by:
getId in interface Question

setId

public void setId(String id)
Set the question id


getProcessInstance

public ProcessInstance getProcessInstance()
Get the process instance where the question was asked

Specified by:
getProcessInstance in interface Question

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


getQuestionText

public String getQuestionText()
Get the question content

Specified by:
getQuestionText in interface Question

setQuestionText

public void setQuestionText(String questionText)
Set the question content


getResponseText

public String getResponseText()
Get the response content

Specified by:
getResponseText in interface Question

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


getFromUser

public User getFromUser()
                 throws WorkflowException
Get the user who asked the question

Specified by:
getFromUser in interface Question
Throws:
WorkflowException

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


getToUser

public User getToUser()
               throws WorkflowException
Get the user who received the question

Specified by:
getToUser in interface Question
Throws:
WorkflowException

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

isRelevantCastor

public int isRelevantCastor()

setRelevant

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

See Also:
isRelevant()

setRelevantCastor

public void setRelevantCastor(int relevant)


Copyright © 2016 Silverpeas. All Rights Reserved.