com.objectplanet.survey.plugin.api
Class QuestionRating

java.lang.Object
  extended by com.objectplanet.survey.plugin.api.Question
      extended by com.objectplanet.survey.plugin.api.QuestionRating

public class QuestionRating
extends Question

This class represents a rating question. Subclasses Question, and adds functionality to create/edit/delete a rating type question. In rating/scale question type respondent must choose a value from 1 to N, where N is the number of levels in the scale. This question type also allows a non-selection answer (N/A).

Author:
Irina Brun
Created:
28. march 2003

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
 java.lang.String getMaxText()
          Gets the maximum text
 java.lang.String getMinText()
          Gets the minimum text
 java.lang.String getNALabel()
          Gets the label of the N/A field
 int getRatingLevel()
          Gets the rating level
 int getRatingStartLevel()
          Gets the rating start level
 boolean getShowNA()
          Gets the showNA attribute
 void keepBusinessObject()
          Get and keep business object.
 void releaseBusinessObject()
          Release business object.
 void setMaxText(java.lang.String maxText)
          Sets the maximum text
 void setMinText(java.lang.String minText)
          Sets the minimum text
 void setNALabel(java.lang.String NALabel)
          Sets the label of the N/A field
 void setRatingLevel(int ratingLevel)
          Sets the rating level
 void setRatingStartLevel(int ratingStartLevel)
          Sets the rating start level
 void setShowNA(boolean showNA)
          Sets the value for showNA attribute.
 
Methods inherited from class com.objectplanet.survey.plugin.api.Question
addEssayFieldCheckbox, addEssayFieldDecimal, addEssayFieldDropdown, addEssayFieldInteger, addEssayFieldText, addIntextCheckbox, addIntextDecimal, addIntextDropdown, addIntextInteger, addIntextText, deleteEssayField, deleteIntext, deleteValidator, deleteValidator, deleteValidator, deleteValidator, getAnswerRotation, getCustomId, getDisplayNo, getEssayFieldCount, getEssayFieldDropdownItems, getEssayFieldDropdownLabel, getEssayFieldDropdownSortOn, getEssayFieldSize, getEssayFieldType, getFreeTextColumns, getFreeTextLabel, getFreeTextMaxLength, getFreeTextRows, getIntextCount, getIntextDropdownItems, getIntextDropdownLabel, getIntextDropdownSortOn, getIntextIndex, getIntextName, getIntextSize, getIntextType, getQuestionId, getQuestionLayout, getQuestionText, getQuestionType, getTextAfter, getTextBefore, getUploadType, getValidatorErrorMessage, getValidatorErrorMessage, getValidatorErrorMessage, getValidatorErrorMessage, getValidatorParameter, getValidatorParameter, getValidatorParameter, getValidatorParameter, getWeight, hasBusinessObject, isFreeTextOn, isValidatorOn, isValidatorOn, isValidatorOn, isValidatorOn, setAnswerRotation, setDisplayNo, setFreeTextColumns, setFreeTextLabel, setFreeTextMaxLength, setFreeTextOn, setFreeTextRows, setQuestionLayout, setQuestionText, setTextAfter, setTextBefore, setUploadType, setValidator, setValidator, setValidator, setValidator, setWeight, updateAttribute, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setMinText

public void setMinText(java.lang.String minText)
                throws LockException,
                       RespondentsExistException,
                       SurveySecurityException,
                       SurveySystemException
Sets the minimum text

Parameters:
minText - the minimum text
Throws:
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.

setMaxText

public void setMaxText(java.lang.String maxText)
                throws LockException,
                       RespondentsExistException,
                       SurveySecurityException,
                       SurveySystemException
Sets the maximum text

Parameters:
maxText - the maximum text
Throws:
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.

setRatingLevel

public void setRatingLevel(int ratingLevel)
                    throws LockException,
                           RespondentsExistException,
                           SurveySecurityException,
                           SurveySystemException
Sets the rating level

Parameters:
ratingLevel - The rating level
Throws:
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.

setRatingStartLevel

public void setRatingStartLevel(int ratingStartLevel)
                         throws LockException,
                                RespondentsExistException,
                                SurveySecurityException,
                                SurveySystemException
Sets the rating start level

Parameters:
ratingStartLevel - The rating start level
Throws:
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.

setShowNA

public void setShowNA(boolean showNA)
               throws LockException,
                      RespondentsExistException,
                      SurveySecurityException,
                      SurveySystemException
Sets the value for showNA attribute.

Parameters:
showNA - true if N/A field is used
Throws:
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.

setNALabel

public void setNALabel(java.lang.String NALabel)
                throws LockException,
                       RespondentsExistException,
                       SurveySecurityException,
                       SurveySystemException
Sets the label of the N/A field

Parameters:
NALabel - The label for the N/A field
Throws:
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.

getMinText

public java.lang.String getMinText()
                            throws SurveySystemException
Gets the minimum text

Returns:
the minimum text
Throws:
SurveySystemException - If an error occurs in the system.

getMaxText

public java.lang.String getMaxText()
                            throws SurveySystemException
Gets the maximum text

Returns:
the maximum text
Throws:
SurveySystemException - If an error occurs in the system.

getRatingLevel

public int getRatingLevel()
                   throws SurveySystemException
Gets the rating level

Returns:
The rating level
Throws:
SurveySystemException - If an error occurs in the system.

getRatingStartLevel

public int getRatingStartLevel()
                        throws SurveySystemException
Gets the rating start level

Returns:
The rating start level
Throws:
SurveySystemException - If an error occurs in the system.

getShowNA

public boolean getShowNA()
                  throws SurveySystemException
Gets the showNA attribute

Returns:
True if N/A field is used
Throws:
SurveySystemException - If an error occurs in the system.

getNALabel

public java.lang.String getNALabel()
                            throws SurveySystemException
Gets the label of the N/A field

Returns:
The label of the N/A field
Throws:
SurveySystemException - If an error occurs in the system.

keepBusinessObject

public void keepBusinessObject()
                        throws SurveySystemException
Get and keep business object. See ATTENTION .

Overrides:
keepBusinessObject in class Question
Throws:
SurveySystemException - If an error occurs in the system.

releaseBusinessObject

public void releaseBusinessObject()
Release business object. See ATTENTION .

Overrides:
releaseBusinessObject in class Question

Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016