Package org.xwiki.extension.job.history
Interface QuestionRecorder<T>
-
- Type Parameters:
T- the type of question handled by this recorder
- All Superinterfaces:
Serializable
@Role public interface QuestionRecorder<T> extends Serializable
Component used to record the answers given to a specific type of questions and to replay the recorded answers later in case those questions are asked again.- Since:
- 7.1RC1
- Version:
- $Id: 8509bad61637455b39fc1b980ec6f36e1810eb90 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrecord(T question)Record the answer to the given question.booleanreplay(T question)Respond to the given question using a recorded answer, if available.
-
-
-
Method Detail
-
record
void record(T question)
Record the answer to the given question. The answer is included in the object that represents the question.- Parameters:
question- the question that has been asked and its answer
-
replay
boolean replay(T question)
Respond to the given question using a recorded answer, if available.- Parameters:
question- the question that must be answered- Returns:
trueif there is a recorded answer for the given question (which is used to answer the question),falseif there is not recorded answer for the given question
-
-