public class QnaEvent extends SocialEvent<QnaEvent.QnaActions>
Modifier and Type | Class and Description |
---|---|
static class |
QnaEvent.QnaActions
List of available QnA actions that can trigger a QnA event.
|
SocialEvent.SocialActions
Modifier and Type | Field and Description |
---|---|
static String |
QNA_TOPIC
The event topic suffix for QnA events.
|
SOCIAL_EVENT_TOPIC_PREFIX
Modifier and Type | Method and Description |
---|---|
static QnaEvent |
answerCreated(String answerPath,
String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.ANSWER_CREATED |
static QnaEvent |
answerDeleted(String answerPath,
String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.ANSWER_DELETED |
static QnaEvent |
answerEdited(String answerPath,
String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.ANSWER_EDITED |
static QnaEvent |
answerSelected(String questionPath,
String answerPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.ANSWER_SELECTED |
static QnaEvent |
answerUnselected(String questionPath,
String answerPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.ANSWER_UNSELECTED |
static QnaEvent |
fromEvent(Event event)
Retrieves the QnA event from the given generic
Event . |
String |
getAnswerPath() |
String |
getQnaForumPath() |
String |
getQuestionPath() |
static QnaEvent |
questionCreated(String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.QUESTION_CREATED |
static QnaEvent |
questionDeleted(String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.QUESTION_DELETED |
static QnaEvent |
questionEdited(String questionPath,
String qnaForumPath,
String userId)
Creates a QnAEvent that represents an action of
QnaActions.QUESTION_EDITED |
getAction, getPath, getUserId
public static final String QNA_TOPIC
public static QnaEvent answerSelected(String questionPath, String answerPath, String qnaForumPath, String userId)
QnaActions.ANSWER_SELECTED
questionPath
- - the jcr node path of the question for which an answer was selected.answerPath
- - the jcr node path of the answer that was chosen as the correct answer.qnaForumPath
- - the jcr node path to the QnA forum to which the question belongs.userId
- - the user id of the user who selected the answer.public static QnaEvent answerUnselected(String questionPath, String answerPath, String qnaForumPath, String userId)
QnaActions.ANSWER_UNSELECTED
questionPath
- - the jcr node path of the question for which an answer was unselected.answerPath
- - the jcr node path of the answer that was removed as the correct answer.qnaForumPath
- - the jcr node path to the QnA forum to which the question belongs.userId
- - the user id of the user who unselected the answer.public String getQnaForumPath()
public String getAnswerPath()
public String getQuestionPath()
public static QnaEvent questionCreated(String questionPath, String qnaForumPath, String userId)
QnaActions.QUESTION_CREATED
questionPath
- - the jcr node path to the question that was created.qnaForumPath
- - the jcr node path to the QnA Forum in which the question was created.userId
- - the user id of the user who created the question.public static QnaEvent questionEdited(String questionPath, String qnaForumPath, String userId)
QnaActions.QUESTION_EDITED
questionPath
- - the jcr node path to the question that was edited.qnaForumPath
- - the jcr node path to the QnA Forum in which the question was edited.userId
- - the user id of the user who edited the question.public static QnaEvent questionDeleted(String questionPath, String qnaForumPath, String userId)
QnaActions.QUESTION_DELETED
questionPath
- - the jcr node path to the question that was deleted.qnaForumPath
- - the jcr node path to the QnA Forum in which the question was deleted.userId
- - the user id of the user who deleted the question.public static QnaEvent answerCreated(String answerPath, String questionPath, String qnaForumPath, String userId)
QnaActions.ANSWER_CREATED
answerPath
- - the jcr node path to the answer that was created.questionPath
- - the jcr node path to the question for which the answer was created.qnaForumPath
- - the jcr node path to the QnA Forum in which the answer was created.userId
- - the user id for the user who created the answer.public static QnaEvent answerDeleted(String answerPath, String questionPath, String qnaForumPath, String userId)
QnaActions.ANSWER_DELETED
answerPath
- - the jcr node path to the answer that was deleted.questionPath
- - the jcr node path to the question for which the answer was deleted.qnaForumPath
- - the jcr node path to the QnA Forum in which the answer was deleted.userId
- - the user id for the user who deleted the answer.public static QnaEvent answerEdited(String answerPath, String questionPath, String qnaForumPath, String userId)
QnaActions.ANSWER_EDITED
answerPath
- - the jcr node path to the answer that was edited.questionPath
- - the jcr node path to the question for which the answer was edited.qnaForumPath
- - the jcr node path to the QnA Forum in which the answer was edited.userId
- - the user id for the user who edited the answer.public static QnaEvent fromEvent(Event event)
Event
.event
- The event.null
if the given event is not a QnA event."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"