org.exoplatform.faq.service
Class Question

java.lang.Object
  extended by org.exoplatform.faq.service.Question

public class Question
extends Object

Data of question node is stored in question object which is used in processings: add new question, edit question and reponse question.

Author:
: Hung Nguyen Quang

Field Summary
static String QUESTION_ACTIVATED
          question activated
static String QUESTION_ATTACHMENT
          question add attachment
static String QUESTION_DETAIL
          question detail
static String QUESTION_ID
           
static String QUESTION_LANGUAGE
          question add language
static String QUESTION_NAME
          question name
static String QUESTION_RATING
          question rate
 
Constructor Summary
Question()
          Class constructor specifying id of object is created.
 
Method Summary
 Answer[] getAnswers()
          Gets the answers.
 List<FileAttachment> getAttachMent()
          Get list files are attached to this quetsion.
 String getAuthor()
          Get question's author who write question and wait an answer.
 String getAuthorOfLastActivity()
           
 String getCategoryId()
          Get id of category which contain this question.
 String getCategoryPath()
          Get relative path of category which contain this question.
 PropertyChangeEvent[] getChangeEvent()
           
 Comment[] getComments()
          Gets the comments.
 Date getCreatedDate()
          Return date time when question is created or updated.
 String getDetail()
          Get content of Question which is wanted answer.
 String getEmail()
          Get email address of question's author.
 String[] getEmailsWatch()
          Gets the emails watch.
 String getId()
          Get id of Question object.
 String getLanguage()
          Get question's language, this is default language of system when created question.
 String getLanguagesNotYetAnswered()
          Get list languages of question which are not yet answered.
 String getLink()
          Get link to question, this link is used to send mail notify, when user click in to this link, will be jump to FAQ and view this question.
 double getMarkVote()
          Gets the mark vote.
 QuestionLanguage[] getMultiLanguages()
           
 String[] getNameAttachs()
          Gets the name attachs.
 long getNumberOfPublicAnswers()
           
 String getPath()
           
 org.exoplatform.commons.utils.PropertyChangeSupport getPcs()
           
 String getQuestion()
          Gets the question.
 String[] getRelations()
          Get list questions in system which are like, related or support for this question.
 long getTimeOfLastActivity()
           
 String getTopicIdDiscuss()
          Gets the path topic discuss.
 String[] getUsersVote()
          Gets the users vote.
 String[] getUsersWatch()
          Gets the users watch.
 boolean isActivated()
          Return status of this question, return true if this question is activated and false if opposite.
 boolean isApproved()
          Return status of thi question, return true if this question is approved and false if opposite.
 void setActivated(boolean isActivated)
          Registers for this Question object is activated or not.
 void setAnswers(Answer[] answers)
          Sets the answers.
 void setApproved(boolean isApproved)
          Registers for this question is approved or not.
 void setAttachMent(List<FileAttachment> listFile)
          Registers list files will be attach to this question to description for this question.
 void setAuthor(String author)
          Set name for property author of this question, author is person who write question and wait an answer.
 void setCategoryId(String catId)
          Registers id for property categoryId of Question object, each question is contained in a category and this property is used to point this cateogry.
 void setCategoryPath(String categoryPath)
          Relative path of parent category of Question object, each question is contained in a category
 void setComments(Comment[] comments)
          Sets the comments.
 void setCreatedDate(Date createdDate)
          Registers date time for Question object.
 void setDetail(String name)
          Set content for Question object.
 void setEditedQuestionActivated(boolean activate)
           
 void setEditedQuestionAttachment(int length)
           
 void setEditedQuestionDetail(String newDetail)
           
 void setEditedQuestionLanguage(int length)
           
 void setEditedQuestionName(String newName)
           
 void setEditedQuestionRating(double markVote)
           
 void setEmail(String email)
          Registers email address of question's author for this Question object.
 void setEmailsWatch(String[] emailsWatch)
          Sets the emails watch.
 void setId(String id)
          Set an id for Question object.
 void setLanguage(String language)
          Set language for question, a language may be have multi languages but all of languages is used must be supported in portal.
 Question setLanguagesNotYetAnswered(String languagesNotYetAnswered)
          Registers language is not yet answered.
 void setLastActivity(String info)
          set information of last activity of question.
 void setLink(String link)
          Register link to question, this link is used to send mail notify, when user click in to this link, will be jump to FAQ and view this question.
 void setMarkVote(double markVote)
          Sets the mark vote.
 void setMultiLanguages(QuestionLanguage[] multiLanguages)
           
 void setNameAttachs(String[] nameAttachs)
          Sets the name attachs.
 void setNumberOfPublicAnswers(long numberOfPublicAnswers)
           
 void setPath(String path)
           
 void setPcs(org.exoplatform.commons.utils.PropertyChangeSupport pcs)
           
 void setQuestion(String title)
          Sets the question.
 void setRelations(String[] relations)
          Registers list questions is related or supported for this question.
 void setTopicIdDiscuss(String topicIdDiscuss)
          Sets the path topic discuss.
 void setUsersVote(String[] usersVote)
          Sets the users vote.
 void setUsersWatch(String[] usersWatch)
          Sets the users watch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUESTION_ID

public static final String QUESTION_ID

QUESTION_NAME

public static String QUESTION_NAME
question name


QUESTION_DETAIL

public static String QUESTION_DETAIL
question detail


QUESTION_ACTIVATED

public static String QUESTION_ACTIVATED
question activated


QUESTION_ATTACHMENT

public static String QUESTION_ATTACHMENT
question add attachment


QUESTION_LANGUAGE

public static String QUESTION_LANGUAGE
question add language


QUESTION_RATING

public static String QUESTION_RATING
question rate

Constructor Detail

Question

public Question()
Class constructor specifying id of object is created.

Method Detail

getPcs

public org.exoplatform.commons.utils.PropertyChangeSupport getPcs()

setPcs

public void setPcs(org.exoplatform.commons.utils.PropertyChangeSupport pcs)

setEditedQuestionName

public void setEditedQuestionName(String newName)

setEditedQuestionDetail

public void setEditedQuestionDetail(String newDetail)

setEditedQuestionActivated

public void setEditedQuestionActivated(boolean activate)

setEditedQuestionAttachment

public void setEditedQuestionAttachment(int length)

setEditedQuestionLanguage

public void setEditedQuestionLanguage(int length)

setEditedQuestionRating

public void setEditedQuestionRating(double markVote)

getId

public String getId()
Get id of Question object.

Returns:
question's id

setId

public void setId(String id)
Set an id for Question object.

Parameters:
id - the id of question object

getDetail

public String getDetail()
Get content of Question which is wanted answer.

Returns:
the content of question

setDetail

public void setDetail(String name)
Set content for Question object.

Parameters:
name - the content of question which is wanted answer

setLanguage

public void setLanguage(String language)
Set language for question, a language may be have multi languages but all of languages is used must be supported in portal. And the language which is useing in portal will be auto setted for this quetsion.

Parameters:
language - the language is default language is used in system

getLanguage

public String getLanguage()
Get question's language, this is default language of system when created question.

Returns:
language the language is default of system and question

setAuthor

public void setAuthor(String author)
Set name for property author of this question, author is person who write question and wait an answer.

Parameters:
author - ther author of question

getAuthor

public String getAuthor()
Get question's author who write question and wait an answer.

Returns:
author the name of question's author

getRelations

public String[] getRelations()
Get list questions in system which are like, related or support for this question.

Returns:
relations return list question's content is like this question

setRelations

public void setRelations(String[] relations)
Registers list questions is related or supported for this question.

Parameters:
relations - list questions have related with this question

setEmail

public void setEmail(String email)
Registers email address of question's author for this Question object.

Parameters:
email - the email

getEmail

public String getEmail()
Get email address of question's author.

Returns:
email the email address of person who write question

setCreatedDate

public void setCreatedDate(Date createdDate)
Registers date time for Question object.

Parameters:
createdDate - the date time when question is created

getCreatedDate

public Date getCreatedDate()
Return date time when question is created or updated.

Returns:
the date time of question

setActivated

public void setActivated(boolean isActivated)
Registers for this Question object is activated or not. This setting with set approve for question will allow question is viewed or not

Parameters:
isActivated - is true if this question is activated and is false if this questiosn is not activated

isActivated

public boolean isActivated()
Return status of this question, return true if this question is activated and false if opposite.

Returns:
status of this question object, is activated or not

setApproved

public void setApproved(boolean isApproved)
Registers for this question is approved or not. This setting with set activate for question will allow this question is viewed or not

Parameters:
isApproved - is true if this question is approved and is false if this question is not approved

isApproved

public boolean isApproved()
Return status of thi question, return true if this question is approved and false if opposite.

Returns:
status of question is approved or not

setCategoryId

public void setCategoryId(String catId)
Registers id for property categoryId of Question object, each question is contained in a category and this property is used to point this cateogry.

Parameters:
catId - id of category which contain this question

getCategoryId

public String getCategoryId()
Get id of category which contain this question.

Returns:
an id of category which thi question

setCategoryPath

public void setCategoryPath(String categoryPath)
Relative path of parent category of Question object, each question is contained in a category

Parameters:
categoryPath - is relative path of category which contain this question

getCategoryPath

public String getCategoryPath()
Get relative path of category which contain this question.

Returns:
a relative path of category which thi question

setAttachMent

public void setAttachMent(List<FileAttachment> listFile)
Registers list files will be attach to this question to description for this question. Each file have size is less than 10MB and larger 0B

Parameters:
listFile - list files are attached to question.

getAttachMent

public List<FileAttachment> getAttachMent()
Get list files are attached to this quetsion.

Returns:
list files are attached to this quetsion
See Also:
FileAttachment

getLanguagesNotYetAnswered

public String getLanguagesNotYetAnswered()
Get list languages of question which are not yet answered.

Returns:
list languages

setLanguagesNotYetAnswered

public Question setLanguagesNotYetAnswered(String languagesNotYetAnswered)
Registers language is not yet answered.

Parameters:
languagesNotYetAnswered - the languages not yet answered
Returns:
the question

getNameAttachs

public String[] getNameAttachs()
Gets the name attachs.

Returns:
the name attachs

setNameAttachs

public void setNameAttachs(String[] nameAttachs)
Sets the name attachs.

Parameters:
nameAttachs - the new name attachs

getLink

public String getLink()
Get link to question, this link is used to send mail notify, when user click in to this link, will be jump to FAQ and view this question.

Returns:
link to question

setLink

public void setLink(String link)
Register link to question, this link is used to send mail notify, when user click in to this link, will be jump to FAQ and view this question.

Parameters:
link - the link

getUsersVote

public String[] getUsersVote()
Gets the users vote.

Returns:
the users vote

setUsersVote

public void setUsersVote(String[] usersVote)
Sets the users vote.

Parameters:
usersVote - the new users vote

getMarkVote

public double getMarkVote()
Gets the mark vote.

Returns:
the mark vote

setMarkVote

public void setMarkVote(double markVote)
Sets the mark vote.

Parameters:
markVote - the new mark vote

getUsersWatch

public String[] getUsersWatch()
Gets the users watch.

Returns:
the users watch

setUsersWatch

public void setUsersWatch(String[] usersWatch)
Sets the users watch.

Parameters:
usersWatch - the new users watch

getEmailsWatch

public String[] getEmailsWatch()
Gets the emails watch.

Returns:
the emails watch

setEmailsWatch

public void setEmailsWatch(String[] emailsWatch)
Sets the emails watch.

Parameters:
emailsWatch - the new emails watch

getQuestion

public String getQuestion()
Gets the question.

Returns:
the question

setQuestion

public void setQuestion(String title)
Sets the question.

Parameters:
title - the new question

getTopicIdDiscuss

public String getTopicIdDiscuss()
Gets the path topic discuss.

Returns:
the path topic discuss

setTopicIdDiscuss

public void setTopicIdDiscuss(String topicIdDiscuss)
Sets the path topic discuss.

Parameters:
pathTopicDiscus - the new path topic discuss

getAnswers

public Answer[] getAnswers()
Gets the answers.

Returns:
the answers

setAnswers

public void setAnswers(Answer[] answers)
Sets the answers.

Parameters:
answers - the new answers

getComments

public Comment[] getComments()
Gets the comments.

Returns:
the comments

setComments

public void setComments(Comment[] comments)
Sets the comments.

Parameters:
comments - the new comments

setPath

public void setPath(String path)

getPath

public String getPath()

setMultiLanguages

public void setMultiLanguages(QuestionLanguage[] multiLanguages)

getMultiLanguages

public QuestionLanguage[] getMultiLanguages()

getAuthorOfLastActivity

public String getAuthorOfLastActivity()

getTimeOfLastActivity

public long getTimeOfLastActivity()

setLastActivity

public void setLastActivity(String info)
set information of last activity of question.

Parameters:
info - includes two parts separated by a dash. the first part is user name has last activity. The second part is long value of time that appears last activity.

getNumberOfPublicAnswers

public long getNumberOfPublicAnswers()
Returns:
the numberOfPublicAnswers

setNumberOfPublicAnswers

public void setNumberOfPublicAnswers(long numberOfPublicAnswers)
Parameters:
numberOfPublicAnswers - the numberOfPublicAnswers to set

getChangeEvent

public PropertyChangeEvent[] getChangeEvent()


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.