|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectplanet.survey.plugin.api.Question
ATTENTION: This class is a
facade for the system business Question. To improve performance you can
force it to keep the reference to the business object by calling keepBusinessObject()
. Keeping references to objects may cause inconsistencies in the system, so
allways remember to call releaseBusinessObject()
as soon as you
are finished using them.
Class Question encapsulates question data.
Question types implemented as subclasses of Question. A question can be one
of the following types:
add*EssayField()
method. Spesify index
- where in the question text the essay field should be inserted. Be aware
that when the essay field is inserted, question text will be
ESSAYFIELD_LENGTH longer than before, because a tag with id will be placed
at index position. If you have a lot of essay fields to insert, it is
recommend to begin from the end of the question text. You can't modify
existing essay fields. If you want to edit an essay field, delete it and
add an updated one.ESSAY_FIELD_*
constants to set essay field type.ValidatorType.ESSAY_FIELD_NUMERIC_IS_NUMBER
) will be added automatically when you create these field types.freeTextOn
will then be set to true
and attributes freeTextColumns
, freeTextRows
,
freeTextLabel
and freeTextMaxLength
will define
look and size of the textarea.validate()
performs this operation and should be called after each response.
Field Summary | |
static int |
ESSAY_FIELD_CHECKBOX
Checkbox essay field type |
static int |
ESSAY_FIELD_DROPDOWN
Dropdown essay field type |
static int |
ESSAY_FIELD_NUMERIC_DEC
Numeric decimal essay field type |
static int |
ESSAY_FIELD_NUMERIC_INT
Numeric integer essay field type |
static int |
ESSAY_FIELD_TEXT
Text input essay field type |
static int |
ESSAYFIELD_LENGTH
Essay field total length |
static int |
QUESTION_DROPDOWN
Dropdown question type |
static int |
QUESTION_MATRIX
Matrix question type |
static int |
QUESTION_MULTIPLE
Multiple choice question type |
static int |
QUESTION_NO_TYPE
No question type (essay fields or free text is usually used for input) |
static int |
QUESTION_NUMERIC
Numeric question type |
static int |
QUESTION_RATING
Rating question type |
static java.lang.String |
TAG_END
Essay field end |
static java.lang.String |
TAG_START
Essay field start |
Method Summary | |
void |
addEssayFieldCheckbox(int index)
Adds an essay field of type checkbox. |
void |
addEssayFieldDecimal(int index,
int fieldSize,
java.lang.String errorMsg)
Adds an essay field of type numeric decimal. |
void |
addEssayFieldDropdown(int index,
java.lang.String label,
java.lang.String items,
boolean sortOn)
Adds an essay field of type dropdown. |
void |
addEssayFieldInteger(int index,
int fieldSize,
java.lang.String errorMsg)
Adds an essay field of type numeric integer. |
void |
addEssayFieldText(int index,
int fieldSize)
Adds an essay field of type text. |
void |
deleteEssayField(int essayFieldIndex)
Delete essay field. |
void |
deleteValidator(int type)
Delete validator. |
void |
deleteValidator(int type,
int essayFieldIndex)
Delete essay field validator. |
void |
deleteValidator(int type,
int columnPosition,
int rowPosition)
Delete matrix cell validator. |
java.lang.String |
getDisplayNo()
Gets the display number attribute of the question. |
int |
getEssayFieldCount()
Gets the number of essay fields |
java.lang.String[] |
getEssayFieldDropdownItems(int essayFieldIndex)
Get dropdown items of essay field, one per line. |
java.lang.String |
getEssayFieldDropdownLabel(int essayFieldIndex)
Get dropdown label of essay field. |
boolean |
getEssayFieldDropdownSortOn(int essayFieldIndex)
Get dropdown essay field sortOn attribute . |
int |
getEssayFieldSize(int essayFieldIndex)
Get essay field size. |
int |
getEssayFieldType(int essayFieldIndex)
Get essay field type.. |
int |
getFreeTextColumns()
Gets the number of columns in the free-text field |
java.lang.String |
getFreeTextLabel()
Gets the label of the free-text field |
int |
getFreeTextMaxLength()
Gets the max allowed length (to type in) of the free-text field. |
int |
getFreeTextRows()
Gets the number of rows in the free-text field |
long |
getQuestionId()
Gets the question Id. |
java.lang.String |
getQuestionLayout()
Gets the question layout. |
java.lang.String |
getQuestionText()
Gets the question text. |
int |
getQuestionType()
Gets the questionType attribute of the Question. |
java.lang.String |
getTextAfter()
Gets the textAfter attribute of the Question. |
java.lang.String |
getTextBefore()
Gets the text-before attribute of the question. |
java.lang.String |
getValidatorErrorMessage(int type)
Gets error message for validator. |
java.lang.String |
getValidatorErrorMessage(int type,
int essayFieldIndex)
Gets error message for essay field validator. |
java.lang.String |
getValidatorErrorMessage(int type,
int columnPosition,
int rowPosition)
Gets error message for matrix cell validator. |
java.lang.String |
getValidatorParameter(int type)
Gets the validator parameter. |
java.lang.String |
getValidatorParameter(int type,
int essayFieldIndex)
Gets the essay field validator parameter. |
java.lang.String |
getValidatorParameter(int type,
int columnPosition,
int rowPosition)
Gets the matrix cell validator parameter. |
boolean |
hasBusinessObject()
Check if this question has reference to the business Question object. |
boolean |
isFreeTextOn()
Gets the freeTextOn attribute of the question |
boolean |
isValidatorOn(int type)
Check if validator is on. |
boolean |
isValidatorOn(int type,
int essayFieldIndex)
Check if essay field validator is on. |
boolean |
isValidatorOn(int type,
int columnPosition,
int rowPosition)
Check if matrix cell validator is on. |
void |
keepBusinessObject()
Get and keep business object. |
void |
releaseBusinessObject()
Release business object. |
void |
setDisplayNo(java.lang.String displayNo)
The display number is specified by survey creator/admin. |
void |
setFreeTextColumns(int freeTextCols)
Sets the number of columns in the free-text field |
void |
setFreeTextLabel(java.lang.String freeTextLabel)
Sets the label for the free-text field |
void |
setFreeTextMaxLength(int freeTextMaxLength)
Sets the max length allowed to type in the free text field. |
void |
setFreeTextOn(boolean freeTextOn)
Sets the freeTextOn attribute of the question |
void |
setFreeTextRows(int freeTextRows)
Sets the number of rows in the free-text field |
void |
setQuestionLayout(java.lang.String questionLayout)
Sets the question layout attribute of the question. |
void |
setQuestionText(java.lang.String questionText)
Sets the question text. |
void |
setTextAfter(java.lang.String textAfter)
Sets the text-after attribute of the question. |
void |
setTextBefore(java.lang.String setTextBefore)
Sets the text-before attribute of the question. |
void |
setValidator(int type,
java.lang.String errorMessage,
java.lang.String parameter)
Sets the validator. |
void |
setValidator(int type,
java.lang.String errorMessage,
java.lang.String parameter,
int essayFieldIndex)
Sets the essay field validator. |
void |
setValidator(int type,
java.lang.String errorMessage,
java.lang.String parameter,
int columnPosition,
int rowPosition)
Sets the matrix cell validator. |
boolean |
validate(Response response)
Validates a response. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ESSAYFIELD_LENGTH
public static final int ESSAY_FIELD_CHECKBOX
public static final int ESSAY_FIELD_DROPDOWN
public static final int ESSAY_FIELD_NUMERIC_DEC
public static final int ESSAY_FIELD_NUMERIC_INT
public static final int ESSAY_FIELD_TEXT
public static final int QUESTION_DROPDOWN
public static final int QUESTION_MATRIX
public static final int QUESTION_MULTIPLE
public static final int QUESTION_NO_TYPE
public static final int QUESTION_NUMERIC
public static final int QUESTION_RATING
public static final java.lang.String TAG_END
public static final java.lang.String TAG_START
Method Detail |
public void setDisplayNo(java.lang.String displayNo) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
displayNo
- The new display number
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 setFreeTextColumns(int freeTextCols) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
freeTextCols
- The number of columns
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 setFreeTextLabel(java.lang.String freeTextLabel) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
freeTextLabel
- The new free-text 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 setFreeTextMaxLength(int freeTextMaxLength) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
freeTextMaxLength
- The max length of free-text field.
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 setFreeTextOn(boolean freeTextOn) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
freeTextOn
- The new freeTextOn 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 setFreeTextRows(int freeTextRows) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
freeTextRows
- The new number of free text rows
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 setQuestionLayout(java.lang.String questionLayout) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
questionLayout
- The new questionLayout value.
"horizontal" / "vertical"
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 setQuestionText(java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
questionText
- The new question text
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 setTextAfter(java.lang.String textAfter) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
textAfter
- The new textAfter
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 setTextBefore(java.lang.String setTextBefore) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
setTextBefore
- The new textBefore 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 setValidator(int type, java.lang.String errorMessage, java.lang.String parameter) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
type
- Validator type. See ValidatorTypeerrorMessage
- Error message to show to the
respondent if the input is incorrect.parameter
- Validator parameter. See comment for
the validator type.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- If an error occurs in the system.
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.public void setValidator(int type, java.lang.String errorMessage, java.lang.String parameter, int essayFieldIndex) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
type
- Essay field validator type. See ValidatorTypeerrorMessage
- Error message to show to the
respondent if the input is incorrect.parameter
- Validator parameter. See comment for
the validator type.essayFieldIndex
- Essay field position, starts at 0.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- If an error occurs in the system.
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.public void setValidator(int type, java.lang.String errorMessage, java.lang.String parameter, int columnPosition, int rowPosition) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
type
- Matrix cell validator type. See ValidatorTypeerrorMessage
- Error message to show to the
respondent if the input is incorrect.parameter
- Validator parameter. See comment for
the validator type.columnPosition
- Matrix cell column position.rowPosition
- Matrix cell row position.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- If an error occurs in the system.
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.public java.lang.String getDisplayNo() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getEssayFieldCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String[] getEssayFieldDropdownItems(int essayFieldIndex) throws SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have 5
essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public java.lang.String getEssayFieldDropdownLabel(int essayFieldIndex) throws SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have 5
essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public boolean getEssayFieldDropdownSortOn(int essayFieldIndex) throws SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have 5
essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public int getEssayFieldSize(int essayFieldIndex) throws SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have 5
essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public int getEssayFieldType(int essayFieldIndex) throws SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have 5
essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public int getFreeTextColumns() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFreeTextLabel() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getFreeTextMaxLength() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getFreeTextRows() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getQuestionId() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getQuestionLayout() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getQuestionText() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getQuestionType() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getTextAfter() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getTextBefore() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorErrorMessage(int type) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Validator type. See ValidatorType
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorErrorMessage(int type, int essayFieldIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Essay field validator type. See ValidatorTypeessayFieldIndex
- Position of the essay field. Starts at
0.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorErrorMessage(int type, int columnPosition, int rowPosition) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Matrix cell validator type. See ValidatorTypecolumnPosition
- Matrix cell column position.rowPosition
- Matrix cell row position.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorParameter(int type) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Validator type. See ValidatorType
java.lang.IllegalArgumentException
- If invalid type.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorParameter(int type, int essayFieldIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Essay field validator type. See ValidatorTypeessayFieldIndex
- Position of the essay field
java.lang.IllegalArgumentException
- If invalid type/position.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorParameter(int type, int columnPosition, int rowPosition) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Matrix cell validator type. See ValidatorTypecolumnPosition
- Matrix cell column positionrowPosition
- Matrix row column position
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public boolean isFreeTextOn() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean isValidatorOn(int type) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Validator type. See ValidatorType
java.lang.IllegalArgumentException
- If invalid validator type.
SurveySystemException
- If an error occurs in the system.public boolean isValidatorOn(int type, int essayFieldIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Essay field validator type. See ValidatorTypeessayFieldIndex
- Essay field index (starts at 0)
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public boolean isValidatorOn(int type, int columnPosition, int rowPosition) throws SurveySystemException, java.lang.IllegalArgumentException
type
- Matrix cell validator type. See ValidatorTypecolumnPosition
- Matrix cell column position, starts at
0rowPosition
- Matrix cell row position, starts at 0
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public void addEssayFieldCheckbox(int index) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
index
- Position in the question text where
the essay field will be inserted.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If illegal index.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void addEssayFieldDecimal(int index, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
index
- Position in the question text where
the essay field will be inserted.fieldSize
- The size of the text field.errorMsg
- Error message to show to the
respondent if the response is not a invalid double.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If illegal index or errorMsg is null
or empty.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void addEssayFieldDropdown(int index, java.lang.String label, java.lang.String items, boolean sortOn) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
index
- Position in the question text where
the essay field will be inserted.label
- The displayed label of the dropdown
list when no items are selected.items
- Dropdown items as String one per line.
(separated by /n/r)sortOn
- True if items should be alphabetically
sorted.
SurveySystemException
- If an error occurs in the system.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void addEssayFieldInteger(int index, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
index
- Position in the question text where
the essay field will be inserted.fieldSize
- The size of the text field.errorMsg
- Error message to show to the
respondent if the response is not a invalid integer.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If illegal index or errorMsg is null
or empty.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void addEssayFieldText(int index, int fieldSize) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
index
- Position in the question text where
the essay field will be inserted.fieldSize
- The size of the text field.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If illegal index.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void deleteEssayField(int essayFieldIndex) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
essayFieldIndex
- Index of the essay field. (If you have
5 essay fields, essayFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.
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.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
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.public void deleteValidator(int type) throws LockException, RespondentsExistException, SurveySystemException, SurveySecurityException, java.lang.IllegalArgumentException
type
- Validator type. See ValidatorType
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.
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.public void deleteValidator(int type, int essayFieldIndex) throws LockException, RespondentsExistException, SurveySystemException, SurveySecurityException, java.lang.IllegalArgumentException
type
- Essay field validator type. See ValidatorTypeessayFieldIndex
- Position of the essay field. Starts at
0.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.
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.public void deleteValidator(int type, int columnPosition, int rowPosition) throws LockException, RespondentsExistException, SurveySystemException, SurveySecurityException, java.lang.IllegalArgumentException
type
- Matrix cell validator type. See ValidatorTypecolumnPosition
- Matrix cell column position.rowPosition
- Matrix cell row position.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.
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.public boolean hasBusinessObject()
public void keepBusinessObject() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public void releaseBusinessObject()
public boolean validate(Response response) throws SurveySystemException
response
- Responde to this question that should be
validated.
SurveySystemException
- If an error occurs in the system.
|
Copyright © ObjectPlanet Inc. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |