|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.objectplanet.survey.plugin.api.Question
com.objectplanet.survey.plugin.api.QuestionDropdown
public class QuestionDropdown
This class represents a dropdown question. Subclasses Question, and adds functionality to create/edit/delete a dropdown question.
| Field Summary |
|---|
| Fields inherited from class com.objectplanet.survey.plugin.api.Question |
|---|
ESSAY_FIELD_CHECKBOX, ESSAY_FIELD_DROPDOWN, ESSAY_FIELD_NUMERIC_DEC, ESSAY_FIELD_NUMERIC_INT, ESSAY_FIELD_TEXT, ESSAYFIELD_LENGTH, INTEXT_TYPE_CHECKBOX, INTEXT_TYPE_DROPDOWN, INTEXT_TYPE_NUMERIC_DEC, INTEXT_TYPE_NUMERIC_INT, INTEXT_TYPE_TEXT, QUESTION_DROPDOWN, QUESTION_MATRIX, QUESTION_MULTIPLE, QUESTION_NO_TYPE, QUESTION_NUMERIC, QUESTION_RATING, TAG_END, TAG_START, UPLOAD_IMAGE, UPLOAD_NONE |
| Method Summary | |
|---|---|
int |
getItemCount()
Get number of items. |
java.lang.String[] |
getItems()
Gets the dropdown items as array of Strings. |
java.lang.String |
getLabel()
Gets the dropdown label. |
java.lang.String |
getLabelValueSeparator()
Gets the separator between dropdown item and value |
boolean |
getMultipleOn()
Gets the multipleOn attribute. |
int |
getSize()
Gets the dropdown size. |
boolean |
getSortOn()
Gets the sortOn attribute. |
void |
keepBusinessObject()
Get and keep business object. |
void |
releaseBusinessObject()
Release business object. |
void |
setItems(java.lang.String itemsAsString)
Sets the dropdown items (one item per line). |
void |
setLabel(java.lang.String dropdownLabel)
Sets the dropdown label. |
void |
setMultipleOn(boolean multipleOn)
Sets the multipleOn attribute of the Dropdown question. |
void |
setSize(int dropdownSize)
Sets the dropdown size. |
void |
setSortOn(boolean sortOn)
Sets the sorting attribute. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setItems(java.lang.String itemsAsString)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
getLabelValueSeparator() to
separate item label and item value. If no dropdown value entered, label is
used as value: String separator = questionDropdown.getLabelValueSeparator();
StringBuffer items = new StringBuffer();
items.append("Norway").append(separator).append("no").append("\n");
items.append("France").append(separator).append("fr").append("\n");
items.append("USA").append("\n");
Three dropdown items wil be created:
itemsAsString - The new dropdownItems value
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setLabel(java.lang.String dropdownLabel)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
dropdownLabel - The new label
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setMultipleOn(boolean multipleOn)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
multipleOn - The new multipleOn value
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setSize(int dropdownSize)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
dropdownSize - The new dropdown size
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public void setSortOn(boolean sortOn)
throws LockException,
RespondentsExistException,
SurveySecurityException,
SurveySystemException
sortOn - The new sortOn value
LockException - Thrown if the survey is locked and
can't be edited. Not yet implemented. Use survey.isLocked()
to be sure that the survey can be updated.
RespondentsExistException - Thrown if the survey has responses and
can't be edited. Not yet implemented. Use survey.hasRespondents()
to be sure that the survey can be updated.
SurveySecurityException - Thrown if the user is not authorized
to call this method.
SurveySystemException - If an error occurs in the system.
public int getItemCount()
throws SurveySystemException
SurveySystemException - If an error occurs in the system.
public java.lang.String[] getItems()
throws SurveySystemException
getLabelValueSeparator()
SurveySystemException - If an error occurs in the system
public java.lang.String getLabel()
throws SurveySystemException
SurveySystemException - If an error occurs in the systempublic java.lang.String getLabelValueSeparator()
public boolean getMultipleOn()
throws SurveySystemException
SurveySystemException - If an error occurs in the system
public int getSize()
throws SurveySystemException
SurveySystemException - If an error occurs in the system
public boolean getSortOn()
throws SurveySystemException
SurveySystemException - If an error occurs in the system
public void keepBusinessObject()
throws SurveySystemException
keepBusinessObject in class QuestionSurveySystemException - If an error occurs in the system.public void releaseBusinessObject()
releaseBusinessObject in class Question
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||