|
||||||||
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
public class 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 |
ANONYMITY_FULL
Full response anonymity in invitations. |
static int |
ANONYMITY_OFF
No response anonymity in invitations. |
static int |
ANONYMITY_PARTLY
Partly response anonymity in invitations. |
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 |
MULTIPLE_SUBMISSIONS_CHECK_EVERY_PAGE
Check multiple submissions on every survey page. |
static int |
MULTIPLE_SUBMISSIONS_CHECK_START_STOP
Check multiple submissions on survey start and completion |
static int |
PREVENT_METHOD_COOKIES
Use cookies to prevent multiple submissions |
static int |
PREVENT_METHOD_COUNT
Number of prevent methods |
static int |
PREVENT_METHOD_INVITATION
Use invitee id check to prevent multiple submissions (only one response per invitee) |
static int |
PREVENT_METHOD_IP
Use IP-address check to prevent multiple submissions |
static int |
PROGRESS_BAR_COUNT
Progress bar with question count label |
static int |
PROGRESS_BAR_NO_LABEL
Progress bar without label |
static int |
PROGRESS_BAR_PERCENT
Progress bar with percent completed label |
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. |
void |
addInvitation(User user,
long surveyId,
Invitation invitation)
Adds a new invitation to the survey (persistent). |
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.) This method creates a new question of the requested type, copies all old question attributes and in-text elements and return the new question object as Question. |
void |
deleteAllQuestions()
Deletes all questions in this survey. |
void |
deleteInvitation(long invitationId)
Deletes an invitation. |
void |
deleteQuestion(int questionNo)
Deletes a question. |
void |
deleteSurveyPageCustomAttribute(int pageNo,
java.lang.String attributeName)
Deleted a survey page custom attribute. |
java.lang.String |
getAttribute(java.lang.String attributeName)
Gets an attribute of the Survey object |
int |
getAuthenticationType()
Gets the authentication type. |
java.lang.String |
getBackButtonImage()
Gets the back button image. |
boolean |
getBackButtonOn()
Gets the back button. |
java.lang.String |
getBackButtonText()
Gets the back button text. |
java.lang.String |
getBgColor()
Gets the survey background color. |
java.lang.String |
getBgImage()
Gets the survey background image. |
java.lang.String |
getBranchLayoutCSV()
get a csv representation of the branching information. |
int |
getColumnCount()
Gets the number of columns in the survey. |
long |
getCompletedRespondentCount()
Gets the number of completed responses for this survey. |
long |
getCreatedBy()
Gets the user the survey was created by. |
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). |
void |
getHtmlFile()
Gets the HTML file for the survey. |
long |
getInProgressRespondentCount()
Gets the in progress respondent count |
Invitation |
getInvitation(long invitationId)
Gets an invitation. |
long[] |
getInvitationIds()
Gets invitation ids. |
int |
getInvitationsAnonymity()
Gets the invitationsAnonymity attribute. |
Invitee |
getInvitee(long inviteeId)
Gets an invitee by the invitee id. |
java.lang.String |
getLanguageCode()
Gets the language code of the survey. |
int |
getLastQuestionNo()
Gets the number of the last question number in the survey |
long |
getMaxResponses()
Gets the maximum respondent count for this survey. |
long |
getMaxUploadSize()
Gets the maximum size for uploaded files in KB. |
boolean |
getMultipleSubmissions()
Gets the multiple submissions value |
int |
getMultipleSubmissionsCheckType()
Gets the multiple submissions check type for the survey. |
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. |
java.util.BitSet |
getPreventMethods()
Gets the method for preventing multiple submissions. |
boolean |
getProgressBar()
Gets the progress bar attribute. |
int |
getProgressBarLabel()
Gets the progress bar label type (one of the types above). |
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 |
getStoreOPDataOn()
Gets the storeOPDataOn attribute. |
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.util.ArrayList |
getSurveyLanguages()
Returns a list of the languages the survey supports. |
java.lang.String |
getSurveyName()
Gets the survey name |
int |
getSurveyPageByQuestionNo(int questionNo)
Deprecated. This method is deprecated. Use getSurveySectionByQuestionNo() instead. |
int |
getSurveyPageCount()
Deprecated. This method is deprecated. Use getSurveySectionCount() instead. |
java.lang.String |
getSurveyPageCustomAttribute(int pageNo,
java.lang.String attributeName)
Deprecated. This method is deprecated. Use SurveySection.getCustomAttribute() instead, after getting the SurveySection from Survey. |
int |
getSurveyPageFirstQuestion(int pageNo)
Deprecated. This method is deprecated. Use SurveySection.getFromQuestion() instead, after getting the SurveySection from Survey. |
int |
getSurveyPageLastQuestion(int pageNo)
Deprecated. This method is deprecated. Use SurveySection.getToQuestion() instead, after getting the SurveySection from Survey. |
SurveySection |
getSurveySection(int sectionId)
Gets a survey section object with the specified section id |
int |
getSurveySectionByQuestionNo(int questionNo)
Gets a survey section number, by question number. |
int |
getSurveySectionCount()
Gets the number of survey sections in this survey. |
java.util.ArrayList |
getSurveySections()
Gets all survey sections in the survey |
java.lang.String |
getTemplateName()
Sets the template name. |
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. |
boolean |
isPoll()
Trus if survey is of type poll |
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 |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Sets an attribute of the Survey object |
void |
setAuthenticationType(int authenticationType)
Sets the authentication type for the survey. |
void |
setBackButtonImage(java.lang.String backButtonImage)
Sets the back button image |
void |
setBackButtonOn(boolean backButtonOn)
Sets the back button on/off |
void |
setBackButtonText(java.lang.String backButtonText)
Sets the back button text |
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 mainCSS)
Deprecated. This log method is no longer used. Use setMainCSS() instead. |
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 |
setHtmlFile(java.lang.String htmlFile)
Sets the HTML file for the survey. |
void |
setInvitationsAnonymity(int invitationsAnonymity)
Sets the invitation anonymity. |
void |
setMainCss(java.lang.String mainCSS)
Sets the CSS for the survey. |
void |
setMaxResponses(int maxResponses)
Sets the maximum responses for this survey. |
void |
setMaxUploadSize(long maxUploadSize)
Sets the maximum size for uploaded files in KB. |
void |
setMobileHeader(java.lang.String mobileHeader)
Sets the mobile header, text at the top of the survey |
void |
setMultipleSubmissions(boolean multipleSubmissions)
Sets the multiple submissions on/off. |
void |
setMultipleSubmissionsCheckType(int multipleSubmissionsCheckType)
Sets the multiple submissions check type for the survey. |
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 |
setPreventMethods(java.util.BitSet preventMethods)
Sets the method to prevent multiple submissions. |
void |
setProgressBar(boolean progressBar)
Turn the progress bar on/off |
void |
setProgressBarLabel(int label)
Set the progress bar label type (one of the types above) |
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 |
setStoreOPDataOn(boolean storeOPDataOn)
Sets the storeOPDataOn attribute. |
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 |
setSurveyPageCustomAttribute(int pageNo,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets (creates / updates) the survey page custom attribute. |
void |
setSurveyPages(int[] firstQuestions)
Deprecated. use setSurveySections(); |
void |
setSurveySections(int[] firstQuestions)
Sets survey pages. |
void |
setTabletHeader(java.lang.String tabletHeader)
Sets the tablet header, text at the top of the survey |
void |
setTemplateName(java.lang.String templateName)
Sets the template name. |
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(Invitation invitation)
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 ANONYMITY_FULL
public static final int ANONYMITY_OFF
public static final int ANONYMITY_PARTLY
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 MULTIPLE_SUBMISSIONS_CHECK_EVERY_PAGE
public static final int MULTIPLE_SUBMISSIONS_CHECK_START_STOP
public static final int PREVENT_METHOD_COOKIES
public static final int PREVENT_METHOD_IP
public static final int PREVENT_METHOD_COUNT
public static final int PREVENT_METHOD_INVITATION
public static final int PROGRESS_BAR_COUNT
public static final int PROGRESS_BAR_NO_LABEL
public static final int PROGRESS_BAR_PERCENT
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 setAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws LockException, SurveySecurityException, SurveySystemException
String
- attributeName The attribute nameString
- attributeValue The attribute value
LockException
SurveySecurityException
SurveySystemException
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 setBackButtonImage(java.lang.String backButtonImage) throws LockException, SurveySecurityException, SurveySystemException
backButtonImage
- The new back button 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 setMultipleSubmissionsCheckType(int multipleSubmissionsCheckType) throws LockException, SurveySecurityException, SurveySystemException
multipleSubmissionsCheckType
- Check 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 setBackButtonOn(boolean backButtonOn) throws LockException, SurveySecurityException, SurveySystemException
backButtonOn
- True if the back button 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 setBackButtonText(java.lang.String backButtonText) throws LockException, SurveySecurityException, SurveySystemException
backButtonText
- The new back button text
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 mainCSS) throws LockException, SurveySecurityException, SurveySystemException
mainCSS
- 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 setHtmlFile(java.lang.String htmlFile) throws LockException, SurveySecurityException, SurveySystemException
htmlFile
- The new HTML file. The relative path (from opinio home folder).
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 setMainCss(java.lang.String mainCSS) throws LockException, SurveySecurityException, SurveySystemException
mainCSS
- 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 setMaxUploadSize(long maxUploadSize) throws LockException, SurveySecurityException, SurveySystemException
maxUploadSize
- The new size for uploaded files in KB.
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 setInvitationsAnonymity(int invitationsAnonymity) throws LockException, SurveySecurityException, SurveySystemException
invitationsAnonymity
- The new invitationsAnonymity 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 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 setTabletHeader(java.lang.String tabletHeader) throws LockException, SurveySecurityException, SurveySystemException
tabletHeader
- The new tablet 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 setMobileHeader(java.lang.String mobileHeader) throws LockException, SurveySecurityException, SurveySystemException
mobileHeader
- The new mobile 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 setPreventMethods(java.util.BitSet preventMethods) throws LockException, SurveySecurityException, SurveySystemException
BitSet preventMethods = new BitSet(PREVENT_METHOD_COUNT);
preventMethods.set(PREVENT_METHOD_IP);
preventMethods.set(PREVENT_METHOD_INVITATION);
preventMethod
- The new prevent methods. 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 setProgressBarLabel(int label) throws LockException, SurveySecurityException, SurveySystemException
label
- The progress bar label 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 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 setStoreOPDataOn(boolean storeOPDataOn) throws LockException, SurveySecurityException, SurveySystemException
storeOPDataOn
- The new storeOPDataOn 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 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 introduction
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 setSurveySections(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 setSurveyPages(int[] firstQuestions) throws LockException, RespondentsExistException, SurveySecurityException, SurveySystemException, java.lang.IllegalArgumentException
LockException
RespondentsExistException
SurveySecurityException
SurveySystemException
java.lang.IllegalArgumentException
public void setTemplateName(java.lang.String templateName) throws LockException, SurveySecurityException, SurveySystemException
templateName
- The new template 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 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 setSurveyPageCustomAttribute(int pageNo, java.lang.String attributeName, java.lang.String attributeValue) throws java.lang.IllegalArgumentException, LockException, SurveySecurityException, SurveySystemException
pageNo
- Page numberattributeName
- Custom attribute name (the key)attributeValue
- Custom attribute 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 pageNopublic void deleteSurveyPageCustomAttribute(int pageNo, java.lang.String attributeName) throws java.lang.IllegalArgumentException, 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.
java.lang.IllegalArgumentException
- If invalid pageNopublic 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 java.lang.String getAttribute(java.lang.String attributeName) throws SurveySystemException
String
- attributeName The attribute name
SurveySystemException
public int getAuthenticationType() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getBackButtonImage() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getBackButtonOn() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getBackButtonText() 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 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 long getCreatedBy() 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 int getInvitationsAnonymity() 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 boolean isPoll() throws SurveySystemException
SurveySystemException
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 void getHtmlFile() throws SurveySystemException
htmlFile
- The new HTML file. This is the relative path to the file, from the Opinio
home folder.
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 long getInProgressRespondentCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getLanguageCode() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getLastQuestionNo() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getMaxResponses() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getMaxUploadSize() 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 java.util.BitSet getPreventMethods() throws SurveySystemException
BitSet preventMethods = survey.getPreventMethods();
boolean preventByIP = preventMethods.get(PREVENT_METHOD_IP);
boolean preventByCookies = preventMethods.get(PREVENT_METHOD_COOKIES);
boolean preventByInvitations = preventMethods.get(PREVENT_METHOD_INVITATION);
SurveySystemException
- If an error occurs in the system.public boolean getProgressBar() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getProgressBarLabel() 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 getStoreOPDataOn() 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.util.ArrayList getSurveyLanguages() 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 java.lang.String getSurveyPageCustomAttribute(int pageNo, java.lang.String attributeName) throws java.lang.IllegalArgumentException, SurveySystemException
titleFont
- The new survey title font.
SurveySystemException
- If an error occurs in the system.
java.lang.IllegalArgumentException
- If invalid pageNopublic 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 int getSurveySectionByQuestionNo(int questionNo) throws SurveySystemException, java.lang.IllegalArgumentException
questionNo
- The question number used as key to find the section. From 1 to question
count.
java.lang.IllegalArgumentException
- If illegal question number
SurveySystemException
- If an error occurs in the system.public int getSurveySectionCount() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public SurveySection getSurveySection(int sectionId) throws SurveySystemException, java.lang.IllegalArgumentException
sectionId
- Section id, from 1 to page count
java.lang.IllegalArgumentException
- If illegal section id
SurveySystemException
- If an error occurs in the system.public java.util.ArrayList getSurveySections() throws SurveySystemException, java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- If illegal section id
SurveySystemException
- If an error occurs in the system.public java.lang.String getTemplateName() throws SurveySystemException
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 getMultipleSubmissionsCheckType() 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 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 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 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.public java.lang.String getBranchLayoutCSV() throws SurveySystemException
SurveySystemException
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.
SurveySystemException
- if error occurredpublic void addInvitation(User user, long surveyId, Invitation invitation) throws java.lang.IllegalArgumentException, LockException, SurveySecurityException, SurveySystemException
invitation
- New invitation object
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
SurveySystemException
- if error occurred
java.lang.IllegalArgumentException
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 Invitee getInvitee(long inviteeId) throws SurveySecurityException, SurveySystemException
inviteeId
- Id of the invitee to get
SurveySecurityException
- Thrown if the user is not authorized to access invitations
or invitees.
SurveySystemException
- If an error occurs in the system.public long[] getInvitationIds() throws SurveySecurityException, SurveySystemException
SurveySecurityException
- Thrown if the user is not authorized to access
invitations.
SurveySystemException
- 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 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(Invitation invitation) throws LockException, SurveySecurityException, SurveySystemException, java.lang.IllegalAccessException
surveyId
- Invitation 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 user
java.lang.IllegalAccessException
java.lang.IllegalAccessException
- if invitation is active (running)
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |