|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectplanet.survey.plugin.api.Survey
ATTENTION: This class is a
facade for the system business Survey. 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.
This class encapsulates survey data. See the Opinio documentation
get to know the different survey attributes and question types.
Field Summary | |
static int |
AUTH_NONE
Turns survey authentication off |
static int |
AUTH_PASSWORD_ASSIGNED
Turns authentication on, with unique passwords per invitee. |
static int |
AUTH_PASSWORD_FIXED
Turns authentication on, with a fixed password (same password for all respondents). |
static int |
DISPLAY_QUESTIONNO_DEFAULT
Dislpay default question numbers (1, 2, 3, ..) |
static int |
DISPLAY_QUESTIONNO_DEFINED
Display numbers which defined in every question |
static int |
DISPLAY_QUESTIONNO_NONE
Do not display question numbers |
static int |
PREVENT_METHOD_COOKIES
Use cookies to prevent multipe submissions |
static int |
PREVENT_METHOD_IP
Use IP-addres check to prevent multipe submissions |
static int |
REDIRECT_AFTER_LASTPAGE
Redirect after the last survey page |
static int |
REDIRECT_AFTER_THANKYOUNOTE
Redirect after the 'thank you note' |
static int |
REDIRECT_NONE
Redirect is turned off (no address is entered) |
static int |
VALIDATION_TYPE_CLIENT
Client side responses validation |
static int |
VALIDATION_TYPE_SERVER
Server side responses validation |
Method Summary | |
QuestionDropdown |
addDropdownQuestion(java.lang.String questionText)
Add a new question of type Question.QUESTION_DROPDOWN at the
end of the survey.
|
Invitation |
addInvitation(java.lang.String invitationName,
java.lang.String fromName,
java.lang.String fromEmail,
java.lang.String surveyLink)
Adds a new invitation to the survey. |
QuestionMatrix |
addMatrixQuestion(java.lang.String questionText,
int columnCount,
int rowCount)
Add a new question of type Question.QUESTION_MATRIX at the end
of the survey.
|
QuestionMultiple |
addMultipleQuestion(java.lang.String questionText)
Add a new question of type Question.QUESTION_MULTIPLE at the
end of the survey.
|
QuestionNumeric |
addNumericQuestion(java.lang.String questionText,
int numericType,
java.lang.String errorMsg)
Add a new question of type Question.QUESTION_NUMERIC at the
end of the survey.
|
Question |
addQuestion(java.lang.String questionText)
Add a new question of type Question.QUESTION_NO_TYPE at the
end of the survey.
|
QuestionRating |
addRatingQuestion(java.lang.String questionText,
int ratingLevel)
Add a new question of type Question.QUESTION_RATING at the end
of the survey.
|
Question |
changeQuestionType(int questionNo,
int newQuestionType)
Change question type (rating question to multiple, matrix to dropdown and so on.) |
void |
deleteAllQuestions()
Deletes all questions in this survey. |
void |
deleteInvitation(long invitationId)
Deletes an invitation. |
void |
deleteQuestion(int questionNo)
Deletes a question. |
int |
getAuthenticationType()
Gets the authentication type. |
java.lang.String |
getBgColor()
Gets the survey background color. |
java.lang.String |
getBgImage()
Gets the survey background image. |
int |
getBranchCount()
Gets the branch condition count |
int |
getColumnCount()
Gets the number of columns in the survey. |
long |
getCompletedRespondentCount()
Gets the number of completed resposes for this survey. |
long |
getCreatedDate()
Gets the created date |
java.lang.String |
getCSS_URL()
Gets the survey css. |
java.lang.String |
getCustomId()
Gets the custom survey id. |
int |
getDislpayQuestionNo()
Gets the dislpayQuestionNo attribute. |
java.lang.String |
getFinishButtonImage()
Gets the image for the 'finish'-button. |
java.lang.String |
getFinishButtonText()
Gets the text on the 'finish'-button |
long |
getFolderId()
Gets the folder id. |
java.lang.String |
getFont()
Gets the survey text font. |
java.lang.String |
getFontColor()
Gets the survey text font color. |
int |
getFontSize()
Gets the survey text font size. |
java.lang.String |
getFooter()
Gets the survey footer (text at the bottom of the survey). |
int |
getFormWidth()
Gets the survey form width. |
java.lang.String |
getHeader()
Gets the survey header (text at the top of the survey). |
long |
getInProgressRespondentCount()
Gets the in progress respondent count |
Invitation |
getInvitation(long invitationId)
Gets an invitation. |
int |
getLastQuestionNo()
Gets the number of the last question number in the survey |
int |
getMaxResponses()
Gets the maximum respondent count for this survey. |
boolean |
getMultipleSubmissions()
Gets the multiple submissions value |
java.lang.String |
getNextButtonImage()
Gets the image for the 'next'-button. |
java.lang.String |
getNextButtonText()
Gets the text on the 'next'-button |
java.lang.String |
getPassword()
Gets the password. |
int |
getPreventMethod()
Gets the method for preventing multiple submissions. |
boolean |
getProgressBar()
Gets the progress bar attribute. |
Question |
getQuestion(int questionNo)
Gets a question object by question number |
int |
getQuestionCount()
Gets the number of questions in this survey. |
java.lang.String |
getRedirectAddress()
Gets the redirectAddress. |
int |
getRedirectAfter()
Gets the redirectAfter attribute. |
boolean |
getSaveAndBack()
Gets the saveAndBack attribute |
java.lang.String |
getSaveButtonImage()
Gets the image for the 'save'-button. |
java.lang.String |
getSaveButtonText()
Gets the text on the 'save'-button |
java.lang.String |
getStartButtonImage()
Gets the image for the 'start'-button. |
java.lang.String |
getStartButtonText()
Gets the text on the 'start'-button |
long |
getStartDate()
Gets the survey start date |
long |
getStopDate()
Gets the survey stop date |
long |
getStoredRespondentCount()
Gets the stored respondent count. |
boolean |
getStorePageResponseOn()
Gets the storePageResponseOn. |
java.lang.String |
getSurveyHeading()
Gets the survey heading |
long |
getSurveyId()
Gets the survey Id. |
java.lang.String |
getSurveyIntro()
Gets the survey introduction. |
java.lang.String |
getSurveyName()
Gets the survey name |
int |
getSurveyPageByQuestionNo(int questionNo)
Gets a survey page number, by question number. |
int |
getSurveyPageCount()
Gets the number of survey pages in this survey. |
int |
getSurveyPageFirstQuestion(int pageNo)
Gets a first question on the page |
int |
getSurveyPageLastQuestion(int pageNo)
Gets a last question on the page |
java.lang.String |
getThankYouNote()
Gets the thank you-note. |
java.lang.String |
getTitleColor()
Gets the survey title color. |
java.lang.String |
getTitleFont()
Gets the survey title. |
int |
getTitleFontSize()
Gets the survey title font size in pixels. |
int |
getValidationType()
Gets the validation type. |
boolean |
hasBusinessObject()
Check if this question has reference to the business Survey object. |
boolean |
hasRespondents()
Check if the survey has respondents. |
QuestionDropdown |
insertDropdownQuestion(int questionNo,
java.lang.String questionText)
Inserts a question of type Question.QUESTION_DROPDOWN at the
questionNo position. |
QuestionMatrix |
insertMatrixQuestion(int questionNo,
java.lang.String questionText,
int columnCount,
int rowCount)
Inserts a question of type Question.QUESTION_MATRIX at the
questionNo position. |
QuestionMultiple |
insertMultipleQuestion(int questionNo,
java.lang.String questionText)
Inserts a question of type Question.QUESTION_MULTIPLE at the
questionNo position. |
QuestionNumeric |
insertNumericQuestion(int questionNo,
java.lang.String questionText,
int numericType,
java.lang.String errorMsg)
Inserts a question of type Question.QUESTION_NUMERIC at the
questionNo position. |
Question |
insertQuestionNoType(int questionNo,
java.lang.String questionText)
Inserts a question of type Question.QUESTION_NO_TYPE at the
questionNo position. |
QuestionRating |
insertRatingQuestion(int questionNo,
java.lang.String questionText,
int ratingLevel)
Inserts a question of type Question.QUESTION_RATING at the
questionNo position. |
boolean |
isLocked()
Check if the survey is locked. |
void |
keepBusinessObject()
Get and keep business object. |
void |
moveQuestion(int oldQuestionNo,
int newQuestionNo)
Moves a question from one question number to another. |
void |
releaseBusinessObject()
Release business object. |
void |
releaseLock()
Release lock on survey. |
void |
setAuthenticationType(int authenticationType)
Sets the authentication type for the survey. |
void |
setBgColor(java.lang.String bgColor)
Sets the survey background color. |
void |
setBgImage(java.lang.String bgImage)
Sets the survey background image |
void |
setColumnCount(int columnCount)
Sets the number of columns in survey (up to 3) |
void |
setCSS_URL(java.lang.String CSS_URL)
Sets the css for the survey. |
void |
setCustomId(java.lang.String customId)
Sets the custom survey id. |
void |
setDislpayQuestionNo(int dislpayQuestionNo)
Sets the dislpayQuestionNo attribute. |
void |
setFinishButtonImage(java.lang.String imageUrl)
Sets the image to use instead of 'finish'-button. |
void |
setFinishButtonText(java.lang.String finishButtonText)
Sets the text for the 'finish'-button. |
void |
setFolderId(long folderId)
Sets the folder for this survey |
void |
setFont(java.lang.String font)
Sets the font for texts in survey and questions. |
void |
setFontColor(java.lang.String fontColor)
Sets the font color for texts in survey and questions. |
void |
setFontSize(int fontSize)
Sets the font size for texts in survey and questions. |
void |
setFooter(java.lang.String footer)
Sets the footer, text at the bottom of the survey (survey page) |
void |
setFormWidth(int formWidth)
Sets the width of your survey in pixels |
void |
setHeader(java.lang.String header)
Sets the header, text at the top of the survey |
void |
setMaxResponses(int maxResponses)
Sets the maximum responses for this survey. |
void |
setMultipleSubmissions(boolean multipleSubmissions)
Sets the multiple submissions on/off. |
void |
setNextButtonImage(java.lang.String imageUrl)
Sets the image to use instead of 'next'-button. |
void |
setNextButtonText(java.lang.String nextButtonText)
Sets the text for the 'next'-button. |
void |
setPassword(java.lang.String password)
Sets the password. |
void |
setPreventMethod(int preventMethod)
Sets the method to prevent multiple submissions. |
void |
setProgressBar(boolean progressBar)
Turn the progress bar on/off |
void |
setRedirectAddress(java.lang.String redirectAddress)
Sets the web address to go to when the respondent is completed. |
void |
setRedirectAfter(int redirectAfter)
Define when to redirect: after last survey page or after the thank-you note. |
void |
setSaveAndBack(boolean saveAndBack)
Sets the saveAndBack attribute. |
void |
setSaveButtonImage(java.lang.String imageUrl)
Sets the image to use instead of 'save'-button. |
void |
setSaveButtonText(java.lang.String saveButtonText)
Sets the text for the 'save'-button. |
void |
setStartButtonImage(java.lang.String imageUrl)
Sets the image to use instead of 'start'-button. |
void |
setStartButtonText(java.lang.String startButtonText)
Sets the text for the 'start'-button. |
void |
setStartDate(long startDate)
Sets the start date. |
void |
setStopDate(long stopDate)
Sets the stop date. |
void |
setStorePageResponseOn(boolean storePageResponseOn)
Sets the storePageResponseOn attribute. |
void |
setSurveyHeading(java.lang.String surveyHeading)
Sets the survey heading. |
void |
setSurveyIntro(java.lang.String surveyIntro)
Sets the survey introduction. |
void |
setSurveyName(java.lang.String surveyName)
Sets the survey name. |
void |
setSurveyPages(int[] firstQuestions)
Sets survey pages. |
void |
setThankYouNote(java.lang.String thankYouNote)
Sets the 'thank you'-note. |
void |
setTitleColor(java.lang.String titleColor)
Sets the survey font color. |
void |
setTitleFont(java.lang.String titleFont)
Sets the survey title font. |
void |
setTitleFontSize(int titleFontSize)
Sets the survey title font size in pixels. |
void |
setValidationType(int validationType)
Sets the validationType attribute. |
void |
startInvitation(long invitationId)
Start the invitation. |
void |
stopInvitation(long invitationId)
Stop the invitation. |
void |
updateInvitation(long invitationId)
Updates the invitation in the storage. |
void |
updateQuestion(int questionNo)
Updates a question in the storage. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AUTH_NONE
public static final int AUTH_PASSWORD_ASSIGNED
public static final int AUTH_PASSWORD_FIXED
public static final int DISPLAY_QUESTIONNO_DEFAULT
public static final int DISPLAY_QUESTIONNO_DEFINED
public static final int DISPLAY_QUESTIONNO_NONE
public static final int PREVENT_METHOD_COOKIES
public static final int PREVENT_METHOD_IP
public static final int REDIRECT_AFTER_LASTPAGE
public static final int REDIRECT_AFTER_THANKYOUNOTE
public static final int REDIRECT_NONE
public static final int VALIDATION_TYPE_CLIENT
public static final int VALIDATION_TYPE_SERVER
Method Detail |
public void setAuthenticationType(int authenticationType) throws LockException, SurveySecurityException, SurveySystemException
authenticationType
- The new authentication type.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setBgColor(java.lang.String bgColor) throws LockException, SurveySecurityException, SurveySystemException
bgColor
- The new background color (Example:
#CCCCFF)
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setBgImage(java.lang.String bgImage) throws LockException, SurveySecurityException, SurveySystemException
bgImage
- The new background image (relative url)
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setCSS_URL(java.lang.String CSS_URL) throws LockException, SurveySecurityException, SurveySystemException
CSS_URL
- The new css, relative url
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setColumnCount(int columnCount) throws LockException, SurveySecurityException, SurveySystemException
columnCount
- The new number of columns (up to 3)
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setCustomId(java.lang.String customId) throws LockException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
customId
- The new customId value
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If invalid customId..public void setDislpayQuestionNo(int dislpayQuestionNo) throws LockException, SurveySecurityException, SurveySystemException
dislpayQuestionNo
- The new dislpayQuestionNo value, one of
the constants above.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFinishButtonImage(java.lang.String imageUrl) throws LockException, SurveySecurityException, SurveySystemException
imageUrl
- Relative url to the image
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFinishButtonText(java.lang.String finishButtonText) throws LockException, SurveySecurityException, SurveySystemException
finishButtonText
- The new text for the 'finish'-button.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFolderId(long folderId) throws LockException, SurveySecurityException, SurveySystemException
folderId
- The new folder id
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFont(java.lang.String font) throws LockException, SurveySecurityException, SurveySystemException
font
- The new font
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFontColor(java.lang.String fontColor) throws LockException, SurveySecurityException, SurveySystemException
fontColor
- The new font color (Example: #CCCCFF)
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFontSize(int fontSize) throws LockException, SurveySecurityException, SurveySystemException
fontSize
- The new font size in pixels.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFooter(java.lang.String footer) throws LockException, SurveySecurityException, SurveySystemException
footer
- The new footer
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setFormWidth(int formWidth) throws LockException, SurveySecurityException, SurveySystemException
formWidth
- The new width of your survey in pixels.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setHeader(java.lang.String header) throws LockException, SurveySecurityException, SurveySystemException
header
- The new header value
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setMaxResponses(int maxResponses) throws LockException, SurveySecurityException, SurveySystemException
maxResponses
- The new maximum responses. 0 for
unlimited.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setMultipleSubmissions(boolean multipleSubmissions) throws LockException, SurveySecurityException, SurveySystemException
multipleSubmissions
- The new multiple submissions value.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setNextButtonImage(java.lang.String imageUrl) throws LockException, SurveySecurityException, SurveySystemException
imageUrl
- Relative url to the image
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setNextButtonText(java.lang.String nextButtonText) throws LockException, SurveySecurityException, SurveySystemException
nextButtonText
- The new text for the 'next'-button.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setPassword(java.lang.String password) throws LockException, SurveySecurityException, SurveySystemException
password
- The new password
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setPreventMethod(int preventMethod) throws LockException, SurveySecurityException, SurveySystemException
preventMethod
- The new prevent method. Use constants
above.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setProgressBar(boolean progressBar) throws LockException, SurveySecurityException, SurveySystemException
progressBar
- The new progressBar value
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setRedirectAddress(java.lang.String redirectAddress) throws LockException, SurveySecurityException, SurveySystemException
redirectAddress
- The new redirectAddress value
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setRedirectAfter(int redirectAfter) throws LockException, SurveySecurityException, SurveySystemException
redirectAfter
- The new redirectAfter value. Use
constants above.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSaveAndBack(boolean saveAndBack) throws LockException, SurveySecurityException, SurveySystemException
saveAndBack
- True if the feature is on.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSaveButtonImage(java.lang.String imageUrl) throws LockException, SurveySecurityException, SurveySystemException
imageUrl
- Relative url to the image
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSaveButtonText(java.lang.String saveButtonText) throws LockException, SurveySecurityException, SurveySystemException
saveButtonText
- The new text for the 'save'-button.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setStartButtonImage(java.lang.String imageUrl) throws LockException, SurveySecurityException, SurveySystemException
imageUrl
- Relative url to the image
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setStartButtonText(java.lang.String startButtonText) throws LockException, SurveySecurityException, SurveySystemException
startButtonText
- The new text for the 'start'-button.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setStartDate(long startDate) throws LockException, SurveySecurityException, SurveySystemException
startDate
- The new start date
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setStopDate(long stopDate) throws LockException, SurveySecurityException, SurveySystemException
stopDate
- The new stop date
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setStorePageResponseOn(boolean storePageResponseOn) throws LockException, SurveySecurityException, SurveySystemException
storePageResponseOn
- The new storePageResponseOn value
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSurveyHeading(java.lang.String surveyHeading) throws LockException, SurveySecurityException, SurveySystemException
surveyHeading
- The new survey heading
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSurveyIntro(java.lang.String surveyIntro) throws LockException, SurveySecurityException, SurveySystemException
surveyIntro
- The new survey intro
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSurveyName(java.lang.String surveyName) throws LockException, SurveySecurityException, SurveySystemException
surveyName
- The new survey name
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setSurveyPages(int[] firstQuestions) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
int[] firstQuestions = {1, 4, 7};
int[] firstQuestions = {0, 1, 4, 7};
int[] firstQuestions = {0, 2, 4, 7};
firstQuestions
- Array of first questions on the pages.
Use 0 for survey introduction
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.
java.lang.IllegalArgumentException
- If illegal pages.public void setThankYouNote(java.lang.String thankYouNote) throws LockException, SurveySecurityException, SurveySystemException
thankYouNote
- The new 'thank you'-note.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setTitleColor(java.lang.String titleColor) throws LockException, SurveySecurityException, SurveySystemException
titleColor
- The new survey font color (Example:
#CCCCFF)
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setTitleFont(java.lang.String titleFont) throws LockException, SurveySecurityException, SurveySystemException
titleFont
- The new survey title font.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setTitleFontSize(int titleFontSize) throws LockException, SurveySecurityException, SurveySystemException
titleFontSize
- The new survey title font size in
pixels.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public void setValidationType(int validationType) throws LockException, SurveySecurityException, SurveySystemException
validationType
- The new validationType value, one of the
constants above.
LockException
- If survey is locked by another user
SurveySecurityException
- Thrown if the user is not authorized to
call this method.
SurveySystemException
- If an error occurs in the system.public int getAuthenticationType() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getBgColor() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getBgImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getBranchCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getCSS_URL() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getColumnCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getCompletedRespondentCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getCreatedDate() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getCustomId() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getDislpayQuestionNo() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFinishButtonImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFinishButtonText() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getFolderId() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFont() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFontColor() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getFontSize() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getFooter() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getFormWidth() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getHeader() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getInProgressRespondentCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public Invitation getInvitation(long invitationId) throws SurveySecurityException, SurveySystemException
invitationId
- Id of the invitation to get
SurveySecurityException
- Thrown if the user is not authorized to
access invitations.
SurveySystemException
- If an error occurs in the system.public int getLastQuestionNo() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getMaxResponses() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getMultipleSubmissions() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getNextButtonImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getNextButtonText() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getPassword() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getPreventMethod() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getProgressBar() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public Question getQuestion(int questionNo) throws SurveySystemException, java.lang.IllegalArgumentException
questionNo
- Question number of the question object
java.lang.IllegalArgumentException
- If illegal question number
SurveySystemException
- If an error occurs in the system.public int getQuestionCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getRedirectAddress() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getRedirectAfter() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getSaveAndBack() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getSaveButtonImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getSaveButtonText() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getStartButtonImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getStartButtonText() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getStartDate() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getStopDate() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getStorePageResponseOn() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getStoredRespondentCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getSurveyHeading() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getSurveyId() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getSurveyIntro() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getSurveyName() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getSurveyPageByQuestionNo(int questionNo) throws SurveySystemException, java.lang.IllegalArgumentException
questionNo
- The question number used as key to find
page. From 1 to question count.
java.lang.IllegalArgumentException
- If illegal question number
SurveySystemException
- If an error occurs in the system.public int getSurveyPageCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getSurveyPageFirstQuestion(int pageNo) throws SurveySystemException, java.lang.IllegalArgumentException
pageNo
- Page number, from 1 to page count
java.lang.IllegalArgumentException
- If illegal page number
SurveySystemException
- If an error occurs in the system.public int getSurveyPageLastQuestion(int pageNo) throws SurveySystemException, java.lang.IllegalArgumentException
pageNo
- Page number, from 1 to page count
java.lang.IllegalArgumentException
- If illegal page number
SurveySystemException
- If an error occurs in the system.public java.lang.String getThankYouNote() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getTitleColor() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getTitleFont() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getTitleFontSize() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getValidationType() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean isLocked() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public QuestionDropdown addDropdownQuestion(java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_DROPDOWN
at the
end of the survey.
questionText
- Question text
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public Invitation addInvitation(java.lang.String invitationName, java.lang.String fromName, java.lang.String fromEmail, java.lang.String surveyLink) throws java.lang.IllegalArgumentException, LockException, SurveySecurityException, SurveySystemException
invitationName
- Invitation name. Not null.fromName
- Who sends the email, name. Not null.fromEmail
- Who sends the email, email address. Not
null.surveyLink
- Url to the survey. Use PluginUtil.getSurveyUrl()
to get it if you don't know the url. usually looks like http://server-address/opinio/s?s=surveyId (or customId)
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 by
another user
java.lang.IllegalArgumentException
- If illegal parameters.public QuestionMatrix addMatrixQuestion(java.lang.String questionText, int columnCount, int rowCount) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_MATRIX
at the end
of the survey.
questionText
- Question textcolumnCount
- Number of columns in the matrixrowCount
- Number of rows in the matrix
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionMultiple addMultipleQuestion(java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_MULTIPLE
at the
end of the survey.
questionText
- Question text
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionNumeric addNumericQuestion(java.lang.String questionText, int numericType, java.lang.String errorMsg) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_NUMERIC
at the
end of the survey.
questionText
- Question textnumericType
- Numeric type (integer or decimal). One
of the constants in QuestionNumeric
errorMsg
- Error message to show if response is
not a number/invalid number
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public Question addQuestion(java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_NO_TYPE
at the
end of the survey.
questionText
- Question text
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionRating addRatingQuestion(java.lang.String questionText, int ratingLevel) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_RATING
at the end
of the survey.
questionText
- Question textratingLevel
- Number of ration options.
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public Question changeQuestionType(int questionNo, int newQuestionType) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
When changing type toQuestion updatedQuestion = survey.changeQuestionType(5, Question.QUESTION_DROPDOWN); QuestionDropdown dropdownQuestion = (QuestionDropdown)updatedQuestion; dropdownQuestion.setLabel("Select an option"); String dropdownItems = "Good\nBad\nNot sure"; dropdownQuestion.setItems(dropdownItems); survey.updateQuestion(5); // update the question in the database.
QUESTION_NUMERIC
remember to set validator of type ValidatorType.NUMERIC_QUESTION_IS_NUMBER
.
questionNo
- The number of question to be changednewQuestionType
- New question type. One of the
constants in Question
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public void deleteAllQuestions() throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public void deleteInvitation(long invitationId) throws LockException, SurveySecurityException, SurveySystemException
invitationId
- Id of invitation to delete.
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 by
another userpublic void deleteQuestion(int questionNo) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
questionNo
- Question number to be deleted
java.lang.IllegalArgumentException
- If illegal question number
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public boolean hasBusinessObject()
public boolean hasRespondents() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public QuestionDropdown insertDropdownQuestion(int questionNo, java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_DROPDOWN
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionText
- The question textquestionNo
- The question number to be created
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionMatrix insertMatrixQuestion(int questionNo, java.lang.String questionText, int columnCount, int rowCount) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_MATRIX
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionText
- The question text.questionNo
- The question number to be created.columnCount
- Number of columns in the matrix.rowCount
- Number of rows in the matrix.
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionMultiple insertMultipleQuestion(int questionNo, java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_MULTIPLE
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionText
- The question textquestionNo
- The question number to be created
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionNumeric insertNumericQuestion(int questionNo, java.lang.String questionText, int numericType, java.lang.String errorMsg) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_NUMERIC
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionText
- The question textquestionNo
- The question number to be creatednumericType
- Numeric type (integer or decimal). One
of the constants in QuestionNumeric
errorMsg
- Error message to show if response is
not a number/invalid number
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public Question insertQuestionNoType(int questionNo, java.lang.String questionText) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_NO_TYPE
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionNo
- The question number to be createdquestionText
- Question text
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public QuestionRating insertRatingQuestion(int questionNo, java.lang.String questionText, int ratingLevel) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
Question.QUESTION_RATING
at the
questionNo
position. Returns an empty question object, with
question number set. updateQuestion()
should be called
subsequently, to save the intended values in the object. The procedure
should be this:
questionText
- The question textquestionNo
- The question number to be createdratingLevel
- Number of ration options.
java.lang.IllegalArgumentException
- If illegal parameters.
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public void keepBusinessObject() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public void moveQuestion(int oldQuestionNo, int newQuestionNo) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
oldQuestionNo
- The old question numbernewQuestionNo
- The new question number
java.lang.IllegalArgumentException
- If illegal question numbers
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown if an error occurs in the
system.public void releaseBusinessObject()
public void releaseLock() throws SurveySecurityException, SurveySystemException
SurveySecurityException
- Thrown if the user try to unlock the
survey when it is locked by another user.
SurveySystemException
- Thrown if an error occurs in the system.public void startInvitation(long invitationId) throws SurveySystemException, SurveySecurityException
invitationId
- Invitation id
SurveySystemException
- If an error occurs in the system.
SurveySecurityException
- Thrown if the survey is locked by
another userpublic void stopInvitation(long invitationId) throws SurveySystemException, SurveySecurityException
invitationId
- Invitation id
SurveySystemException
- If an error occurs in the system.
SurveySecurityException
- Thrown if the survey is locked by
another userpublic void updateInvitation(long invitationId) throws LockException, SurveySecurityException, SurveySystemException
invitationId
- Invitaion id
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 by
another userpublic void updateQuestion(int questionNo) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
questionNo
- Number of question to be updated
java.lang.IllegalArgumentException
- If illegal question number
LockException
- Thrown if the survey is locked by
another user.
RespondentsExistException
- Thrown if the survey has responses and
can't be edited.
SurveySecurityException
- Thrown if the user is not authorized
to call this method.
SurveySystemException
- Thrown 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 |