|
||||||||
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
public class 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 always 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:
addIntext*(..)
methods. Specify position - where in the question text the in-text
element should be inserted. The following actions are performed in all
addIntext*(..)
methods:
INTEXT_TYPE_*
constants to set in-text element type.ValidatorType.INTEXT_NUMERIC_IS_NUMBER
) will be added automatically when you create
these element 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 in-text field type |
static int |
ESSAY_FIELD_DROPDOWN
Dropdown in-text field type |
static int |
ESSAY_FIELD_NUMERIC_DEC
Numeric decimal in-text field type |
static int |
ESSAY_FIELD_NUMERIC_INT
Numeric integer in-text field type |
static int |
ESSAY_FIELD_TEXT
Text input in-text field type |
static int |
ESSAYFIELD_LENGTH
Essay field total length |
static int |
INTEXT_TYPE_CHECKBOX
In-text element of type checkbox |
static int |
INTEXT_TYPE_DROPDOWN
In-text element of type dropdown |
static int |
INTEXT_TYPE_NUMERIC_DEC
In-text element of type numeric decimal |
static int |
INTEXT_TYPE_NUMERIC_INT
In-text element of type numeric integer |
static int |
INTEXT_TYPE_TEXT
In-text element of type text |
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 (in-text elements 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
In-text element end tag |
static java.lang.String |
TAG_START
In-text element start tag |
static int |
UPLOAD_IMAGE
Upload allowed, type images |
static int |
UPLOAD_NONE
No upload allowed |
Method Summary | |
---|---|
void |
addEssayFieldCheckbox(int posInQuestionText)
Deprecated. Use addIntextCheckbox(int posInQuestionText, String intextName). |
void |
addEssayFieldDecimal(int posInQuestionText,
int fieldSize,
java.lang.String errorMsg)
Deprecated. Use addIntextDecimal(int posInQuestionText, String intextName, int fieldSize, String errorMsg). |
void |
addEssayFieldDropdown(int posInQuestionText,
java.lang.String label,
java.lang.String items,
boolean sortOn)
Deprecated. Use addIntextDropdown(int posInQuestionText, String intextName, String label, String items, boolean sortOn). |
void |
addEssayFieldInteger(int posInQuestionText,
int fieldSize,
java.lang.String errorMsg)
Deprecated. Use addIntextInteger(int posInQuestionText, String intextName, int fieldSize, String errorMsg). |
void |
addEssayFieldText(int posInQuestionText,
int fieldSize)
Deprecated. Use addEssayFieldText(int posInQuestionText, String intextName, int fieldSize). |
void |
addIntextCheckbox(int posInQuestionText,
java.lang.String intextName)
Adds an in-text element of type checkbox to the question. |
void |
addIntextDecimal(int posInQuestionText,
java.lang.String intextName,
int fieldSize,
java.lang.String errorMsg)
Adds an in-text element of type numeric decimal to the question. |
void |
addIntextDropdown(int posInQuestionText,
java.lang.String intextName,
java.lang.String label,
java.lang.String items,
boolean sortOn)
Adds an in-text element of type dropdown to the question. |
void |
addIntextInteger(int posInQuestionText,
java.lang.String intextName,
int fieldSize,
java.lang.String errorMsg)
Adds an in-text element of type numeric integer to the question. |
void |
addIntextText(int posInQuestionText,
java.lang.String intextName,
int fieldSize)
Adds an in-text element of type text to the question. |
void |
deleteEssayField(int inTextFieldIndex)
Deprecated. use deleteIntext(intextIndex) |
void |
deleteIntext(int intextIndex)
Delete in-text element from the question. |
void |
deleteValidator(int type)
Delete validator. |
void |
deleteValidator(int type,
int intextIndex)
Deprecated. use deleteValidator(int type, String intextTagId) |
void |
deleteValidator(int type,
int columnPosition,
int rowPosition)
Delete matrix cell validator. |
void |
deleteValidator(int type,
java.lang.String intextTagId)
Delete in-text element validator. |
boolean |
getAnswerRotation()
Gets the answer rotation attribute |
java.lang.String |
getCustomId()
Gets the customId of the Question object. |
java.lang.String |
getDisplayNo()
Gets the display number attribute of the question. |
int |
getEssayFieldCount()
Deprecated. use getIntextCount() |
java.lang.String[] |
getEssayFieldDropdownItems(int inTextFieldIndex)
Deprecated. use getIntextDropdownItems(intextIndex) |
java.lang.String |
getEssayFieldDropdownLabel(int inTextFieldIndex)
Deprecated. use getIntextDropdownLabel(int intextIndex) |
boolean |
getEssayFieldDropdownSortOn(int inTextFieldIndex)
Deprecated. use getIntextDropdownSortOn(int intextIntext); |
int |
getEssayFieldSize(int inTextFieldIndex)
Deprecated. use getIntextSize(int intextIndex) |
int |
getEssayFieldType(int inTextFieldIndex)
Deprecated. use getIntextType(int intextIndex) |
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 |
int |
getIntextCount()
Gets the number of in-text elements in this question |
java.lang.String[] |
getIntextDropdownItems(int intextIndex)
Get dropdown items of in-text element, one per line. |
java.lang.String |
getIntextDropdownLabel(int intextIndex)
Get dropdown label of in-text element. |
boolean |
getIntextDropdownSortOn(int intextIntext)
Get dropdown in-text element sortOn attribute . |
int |
getIntextIndex(java.lang.String intextName)
Get in-text element index by name. |
java.lang.String |
getIntextName(int intextIndex)
Get in-text element name. |
int |
getIntextSize(int intextIndex)
Get in-text element size. |
int |
getIntextType(int intextIndex)
Get in-text element type. |
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. |
int |
getUploadType()
Gets the upload type, currently supported: UPLOAD_NONE and UPLOAD_IMAGE |
java.lang.String |
getValidatorErrorMessage(int type)
Gets error message for validator. |
java.lang.String |
getValidatorErrorMessage(int type,
int intextIndex)
Deprecated. getValidatorErrorMessage(int, String) |
java.lang.String |
getValidatorErrorMessage(int type,
int columnPosition,
int rowPosition)
Gets error message for matrix cell validator. |
java.lang.String |
getValidatorErrorMessage(int type,
java.lang.String intextTagId)
Gets error message for in-text element validator. |
java.lang.String |
getValidatorParameter(int type)
Gets the validator parameter. |
java.lang.String |
getValidatorParameter(int type,
int intextIndex)
Deprecated. use getValidatorParameter(int type, String intextTagId) |
java.lang.String |
getValidatorParameter(int type,
int columnPosition,
int rowPosition)
Gets the matrix cell validator parameter. |
java.lang.String |
getValidatorParameter(int type,
java.lang.String intextTagId)
Gets the in-text element validator parameter. |
int |
getWeight()
Gets the weight of this question |
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 intextIndex)
Deprecated. use isValidatorOn(int type, String intextTagId) |
boolean |
isValidatorOn(int type,
int columnPosition,
int rowPosition)
Check if matrix cell validator is on. |
boolean |
isValidatorOn(int type,
java.lang.String intextTagId)
Check if in-text element validator is on. |
void |
keepBusinessObject()
Get and keep business object. |
void |
releaseBusinessObject()
Release business object. |
void |
setAnswerRotation(boolean answerRotation)
The answer rotation attribute. |
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 |
setUploadType(int uploadType)
Set the upload type. |
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 intextIndex)
Deprecated. Use setValidator(int type, String errorMessage, String parameter, String intextTagId) |
void |
setValidator(int type,
java.lang.String errorMessage,
java.lang.String parameter,
int columnPosition,
int rowPosition)
Sets the matrix cell validator. |
void |
setValidator(int type,
java.lang.String errorMessage,
java.lang.String parameter,
java.lang.String intextTagId)
Sets the in-text element validator. |
void |
setWeight(int weight)
The weight of this question |
void |
updateAttribute(java.lang.String attritbuteDbName)
Update question attribute in the storage. |
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 INTEXT_TYPE_CHECKBOX
public static final int INTEXT_TYPE_DROPDOWN
public static final int INTEXT_TYPE_NUMERIC_DEC
public static final int INTEXT_TYPE_NUMERIC_INT
public static final int INTEXT_TYPE_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 int UPLOAD_NONE
public static final int UPLOAD_IMAGE
public static final java.lang.String TAG_START
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
Method Detail |
---|
public void setWeight(int weight) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
weight
- The new weight
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 setAnswerRotation(boolean answerRotation) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
answerRotation
- True if answer rotation is on.
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 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 setUploadType(int uploadType) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
uploadType
- The new upload type
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 updateAttribute(java.lang.String attritbuteDbName) throws LockException, SurveySecurityException, SurveySystemException
question.setWeight(25);
question.updateAttribute("weight");
attritbuteDbName
- Attribute name used in the storage.
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.
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 intextIndex) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element 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.intextIndex
- in-text element index in the question, 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, java.lang.String intextTagId) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element 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.intextTagId
- in-text element tagId (name of the intext element)
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 getIntextCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String[] getIntextDropdownItems(int intextIndex) throws SurveySystemException
intextIndex
- Index of the in-text element. Starts at 0
SurveySystemException
- If an error occurs in the system.public java.lang.String getIntextDropdownLabel(int intextIndex) throws SurveySystemException
intextIndex
- Index of the in-text element. Starts at 0
SurveySystemException
- If an error occurs in the system.public boolean getIntextDropdownSortOn(int intextIntext) throws SurveySystemException
intextIndex
- Index of the in-text element. Starts at 0
SurveySystemException
- If an error occurs in the system.public int getIntextSize(int intextIndex) throws SurveySystemException
intextIndex
- Index of the in-text element. Starts at 0.
SurveySystemException
- If an error occurs in the system.public int getIntextType(int intextIndex) throws SurveySystemException
intextIndex
- Index of the in-text element, starts at 0
SurveySystemException
- If an error occurs in the system.public int getIntextIndex(java.lang.String intextName) throws SurveySystemException
intextName
- Name of the in-text field
SurveySystemException
- If an error occurs in the system.public java.lang.String getIntextName(int intextIndex) throws SurveySystemException
intextIndex
- Index of the in-text element, starts at 0
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 getWeight() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getAnswerRotation() 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 getCustomId() throws SurveySystemException
SurveySystemException
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 int getUploadType() 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 intextIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element Starts at 0.
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorErrorMessage(int type, java.lang.String intextTagId) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element 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 intextIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element
java.lang.IllegalArgumentException
- If invalid type/position.
SurveySystemException
- If an error occurs in the system.public java.lang.String getValidatorParameter(int type, java.lang.String intextTagId) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element
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 intextIndex) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- in-text element index (starts at 0)
java.lang.IllegalArgumentException
- If invalid parameters.
SurveySystemException
- If an error occurs in the system.public boolean isValidatorOn(int type, java.lang.String intextTagId) throws SurveySystemException, java.lang.IllegalArgumentException
type
- in-text element validator type. See ValidatorTypeintextIndex
- in-text element 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 addIntextCheckbox(int posInQuestionText, java.lang.String intextName) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text element will be
inserted.intextName.
- Name of the in-text element. Any descriptive name for the element. Must be
unique within the question.
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 addIntextDecimal(int posInQuestionText, java.lang.String intextName, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text element will be
inserted.intextName.
- Name of the in-text element. Any descriptive name for the element. Must be
unique within the question.fieldSize
- The size of the input 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 addIntextDropdown(int posInQuestionText, java.lang.String intextName, java.lang.String label, java.lang.String items, boolean sortOn) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
posInQuestionText
- Position in the question text where the in-text element will be
inserted.intextName.
- Name of the in-text element. Any descriptive name for the element. Must be
unique within the question.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 addIntextInteger(int posInQuestionText, java.lang.String intextName, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text element will be
inserted.intextName.
- Name of the in-text element. Any descriptive name for the element. Must be
unique within the question.fieldSize
- The size of the input 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 addIntextText(int posInQuestionText, java.lang.String intextName, int fieldSize) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text element will be
inserted.intextName.
- Name of the in-text element. Any descriptive name for the element. Must be
unique within the question.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 deleteIntext(int intextIndex) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
intextIndex
- Index of the in-text element. (If you have 5 in-text elements,
intextIndex
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 intextIndex) throws LockException, RespondentsExistException, SurveySystemException, SurveySecurityException, java.lang.IllegalArgumentException
type
- In-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element. 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, java.lang.String intextTagId) throws LockException, RespondentsExistException, SurveySystemException, SurveySecurityException, java.lang.IllegalArgumentException
type
- In-text element validator type. See ValidatorTypeintextIndex
- Position of the in-text element. 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
- Response to this question that should be validated.
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 inTextFieldIndex) throws SurveySystemException
inTextFieldIndex
- Index of the in-text field. (If you have 5 in-text fields,
inTextFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public java.lang.String getEssayFieldDropdownLabel(int inTextFieldIndex) throws SurveySystemException
inTextFieldIndex
- Index of the in-text field. (If you have 5 in-text fields,
inTextFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public void addEssayFieldDecimal(int posInQuestionText, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text 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 addEssayFieldCheckbox(int posInQuestionText) throws LockException, SurveySystemException, SurveySecurityException, RespondentsExistException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text 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 boolean getEssayFieldDropdownSortOn(int inTextFieldIndex) throws SurveySystemException
inTextFieldIndex
- Index of the in-text field. (If you have 5 in-text fields,
inTextFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public int getEssayFieldSize(int inTextFieldIndex) throws SurveySystemException
inTextFieldIndex
- Index of the in-text field. (If you have 5 in-text fields,
inTextFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public int getEssayFieldType(int inTextFieldIndex) throws SurveySystemException
inTextFieldIndex
- Index of the in-text field. (If you have 5 in-text fields,
inTextFieldIndex
can be from 0 to 4)
SurveySystemException
- If an error occurs in the system.public void addEssayFieldDropdown(int posInQuestionText, java.lang.String label, java.lang.String items, boolean sortOn) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
posInQuestionText
- Position in the question text where the in-text 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 posInQuestionText, int fieldSize, java.lang.String errorMsg) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text 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 posInQuestionText, int fieldSize) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException, java.lang.IllegalArgumentException
posInQuestionText
- Position in the question text where the in-text 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 inTextFieldIndex) throws LockException, SurveySecurityException, RespondentsExistException, SurveySystemException
inTextFieldIndex
- Index of the in-text field.
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.
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |