|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.objectplanet.survey.plugin.api.Invitation
public class Invitation
Class represents a survey invitation.
Invitations are used to invite people to participate in a survey. There can be 0 to many
invitations per survey, and 1 to many invitees in one invitation.
The invitation must be created before you can start adding invitees.
Invitation invitation = new Invitation(String name, User user);
invitation.setFromName("Your name"); invitation.setFromEmail("yourEmail@smth.com"); invitation.setInvitationDate(dateToSend); ...
survey.addInvitation(invitation);
survey.startInvitation(invitation.getInvitationId());
survey.updateInvitation(invitation)
is called.
Field Summary | |
---|---|
static java.lang.String |
ID_PLACE_HOLDER
|
static java.lang.String |
KEY_PLACE_HOLDER
|
static java.lang.String |
PANELIST_ID_PLACE_HOLDER
|
static java.lang.String |
REOPEN_PLACE_HOLDER
|
Constructor Summary | |
---|---|
Invitation(java.lang.String invitationName,
com.objectplanet.survey.business.User user)
Constructor for the Invitation object |
Method Summary | |
---|---|
void |
addInvitee(java.lang.String email,
java.lang.String inviteeName,
java.util.HashMap attributes)
Adds new invitee to the invitation. |
void |
addInvitees(User user,
java.io.File file,
java.lang.String delimiter)
Add invitees from the file. |
long |
addInviteesInThread(User user,
java.io.File file,
java.lang.String delimiter)
Add invitees from the file. |
void |
deleteInvitees()
Delete all invitees |
void |
deleteInvitees(long[] invitees)
Delete invitees |
java.lang.String |
getContentType()
Sets the content type for the message. |
java.lang.String |
getFromEmail()
Gets the from email. |
java.lang.String |
getFromName()
Gets the from name. |
long |
getInvitationDate()
Gets the invitation date. |
long |
getInvitationId()
Gets the invitation id |
java.lang.String |
getInvitationMessage()
Gets the invitation message (in the email sent to invitee) |
java.lang.String |
getInvitationName()
Gets the invitation name. |
long |
getInvitationSentDate()
Get the date when invitation email was sent. |
java.lang.String |
getInvitationSubject()
Gets the invitation subject (in the email sent to invitee) |
Invitee |
getInvitee(long inviteeId)
Gets an invitee from storage |
long |
getInviteeCount()
Get invitee count |
long[] |
getInviteeIds()
Gets array of all invitee ids. |
java.lang.String |
getLastReminderMessage()
Get message of the last reminder. |
java.lang.String |
getLastReminderSubject()
Get subject of the last reminder. |
long |
getReminder1Date()
Gets the date when the first reminder is scheduled to be sent. |
long |
getReminder1SentDate()
Get the date when first reminder was sent. |
long |
getReminder2Date()
Gets the date when the second reminder is scheduled to be sent. |
long |
getReminder2SentDate()
Get the date when second reminder was sent. |
long |
getReminder3Date()
Gets the date when the third reminder is scheduled to be sent. |
long |
getReminder3SentDate()
Get the date when third reminder was sent. |
long |
getReminder4Date()
Gets the date when the fourth reminder is scheduled to be sent. |
long |
getReminder4SentDate()
Get the date when fourth reminder was sent. |
long |
getReminder5Date()
Gets the date when the fifth reminder is scheduled to be sent. |
long |
getReminder5SentDate()
Get the date when fifth reminder was sent. |
int |
getReminderCount()
Gets the reminder count. |
java.lang.String |
getReminderMessage()
Gets the reminder message. |
java.lang.String |
getReminderSubject()
Gets the reminder subject. |
long[] |
getSendDates()
Get array of dates when invitation will be sent. |
long |
getSurveyId()
Get survey id the invitation belongs to |
java.lang.String |
getTaskStatus()
Gets the invitation task status. |
boolean |
hasBusinessObject()
Deprecated. The Invitation class has no longer reference to the business object. All data is cached in this class |
void |
keepBusinessObject()
Deprecated. This method has no longer any effect on performance. The Invitation class has no longer reference to the business object. All data is cached in this class |
void |
releaseBusinessObject()
Deprecated. the Invitation class has no longer reference to the business object. All data is cached in this class |
void |
setContentType(java.lang.String contentType)
Sets the content type for the message. |
void |
setFromEmail(java.lang.String fromEmail)
Sets the from email. |
void |
setFromName(java.lang.String fromName)
Sets the from name. |
void |
setInvitationDate(long invitationDate)
Sets the invitation date |
void |
setInvitationMessage(java.lang.String invitationMessage)
Sets the invitation message (in the email sent to invitee) |
void |
setInvitationName(java.lang.String invitationName)
Sets the invitation name (used in listing of invitations in the admin screens). |
void |
setInvitationSubject(java.lang.String invitationSubject)
Sets the invitation subject (in the email sent to invitee) |
void |
setInviteeProperty(long inviteeId,
java.lang.String attributeName,
java.lang.String attributeValue)
Set or Update an invitee attribute |
void |
setLastReminderMessage(java.lang.String lastReminderMessage)
Set message of the last reminder. |
void |
setLastReminderSubject(java.lang.String lastReminderSubject)
Set subject of the last reminder. |
void |
setReminder1Date(long reminder1Date)
Sets the date when the first reminder will be sent. |
void |
setReminder2Date(long reminder2Date)
Sets the date when the second reminder will be sent. |
void |
setReminder3Date(long reminder3Date)
Sets the date when the third reminder will be sent. |
void |
setReminder4Date(long reminder4Date)
Sets the date when the fourth reminder will be sent. |
void |
setReminder5Date(long reminder5Date)
Sets the date when the fifth reminder will be sent. |
void |
setReminderMessage(java.lang.String reminderMessage)
Sets the reminder message. |
void |
setReminderSubject(java.lang.String reminderSubject)
Sets the reminder subject. |
void |
setSendDates(long[] dates)
Set dates when invitation and reminders will be sent. |
void |
updateInvitee(long inviteeId,
java.lang.String inviteeName,
java.lang.String inviteeEmail)
Update invitee |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KEY_PLACE_HOLDER
public static final java.lang.String ID_PLACE_HOLDER
public static final java.lang.String REOPEN_PLACE_HOLDER
public static final java.lang.String PANELIST_ID_PLACE_HOLDER
Constructor Detail |
---|
public Invitation(java.lang.String invitationName, com.objectplanet.survey.business.User user)
user
- who create the invitationMethod Detail |
---|
public void setInvitationName(java.lang.String invitationName)
invitationName
- The new invitation namepublic void setFromName(java.lang.String fromName)
fromName
- The new from name valuepublic void setFromEmail(java.lang.String fromEmail) throws java.lang.IllegalArgumentException
fromEmail
- The new from email value
java.lang.IllegalArgumentException
- If invalid emailpublic void setInvitationDate(long invitationDate)
invitationDate
- The new invitation date valuepublic void setContentType(java.lang.String contentType)
contentType
- The content typepublic void setInvitationSubject(java.lang.String invitationSubject)
invitationSubject
- The new invitation subjectpublic void setInvitationMessage(java.lang.String invitationMessage)
invitationMessage
- The new invitation messagepublic void setReminderSubject(java.lang.String reminderSubject)
reminderSubject
- The new reminder subject valuepublic void setReminderMessage(java.lang.String reminderMessage)
reminderMessage
- The new reminder message valuepublic long getInvitationId()
public java.lang.String getInvitationName()
public java.lang.String getFromName()
public java.lang.String getFromEmail()
public long getInvitationDate()
public int getReminderCount()
public java.lang.String getContentType()
public java.lang.String getInvitationSubject()
public java.lang.String getInvitationMessage()
public java.lang.String getReminderSubject()
public java.lang.String getReminderMessage()
public java.lang.String getLastReminderMessage()
public void setLastReminderMessage(java.lang.String lastReminderMessage)
public java.lang.String getLastReminderSubject()
public void setLastReminderSubject(java.lang.String lastReminderSubject)
public long[] getSendDates()
public void setSendDates(long[] dates)
public long getReminder1Date()
public void setReminder1Date(long reminder1Date)
public long getReminder2Date()
public void setReminder2Date(long reminder2Date)
public long getReminder3Date()
public void setReminder3Date(long reminder3Date)
public long getReminder4Date()
public void setReminder4Date(long reminder4Date)
public long getReminder5Date()
public void setReminder5Date(long reminder5Date)
public long getSurveyId()
public long getInvitationSentDate()
public long getReminder1SentDate()
public long getReminder2SentDate()
public long getReminder3SentDate()
public long getReminder4SentDate()
public long getReminder5SentDate()
public void addInvitees(User user, java.io.File file, java.lang.String delimiter) throws LockException, SurveySystemException, com.objectplanet.survey.business.invitation.InvalidContentException
user
- user who adds inviteesfile
- file with invitees data to import. One per line.delimiter
- Delimiter between invitee data parts
InvalidContentException
- Thrown if content of the file is invalid
LockException
SurveySystemException
com.objectplanet.survey.business.invitation.InvalidContentException
public long addInviteesInThread(User user, java.io.File file, java.lang.String delimiter) throws LockException, SurveySystemException, com.objectplanet.survey.business.invitation.InvalidContentException
user
- user who adds inviteesfile
- file with invitees data to import. One per line.delimiter
- Delimiter between invitee data parts
InvalidContentException
- Thrown if content of the file is invalid
LockException
SurveySystemException
com.objectplanet.survey.business.invitation.InvalidContentException
public void addInvitee(java.lang.String email, java.lang.String inviteeName, java.util.HashMap attributes) throws LockException, SurveySystemException
email
- Valid email addressinviteeName
- Invitee nameattributes
- HashMap of invitee attributes. Pass any attributes you want to be
associated with the invitee and his responses (String keys and String values)
LockException
- Thrown if the survey is locked by another user.
java.lang.IllegalArgumentException
- Thrown if email address is invalid
SurveySystemException
- Thrown if an error occurs in the system.public void deleteInvitees() throws LockException, SurveySystemException
LockException
- Thrown if the survey is locked by another user.
SurveySystemException
- Thrown if an error occurs in the system.public void deleteInvitees(long[] invitees) throws LockException, SurveySystemException
invitees
- List of invitee ids to be deleted.
LockException
- Thrown if the survey is locked by another user.
SurveySystemException
- Thrown if an error occurs in the system.public void updateInvitee(long inviteeId, java.lang.String inviteeName, java.lang.String inviteeEmail) throws LockException, SurveySystemException, java.lang.IllegalArgumentException
inviteeId
- Invitee idinviteeName
- New invitee nameinviteeEmail
- New invitee email
LockException
- Thrown if the survey is locked by another user.
SurveySystemException
- Thrown if an error occurs in the system.
java.lang.IllegalArgumentException
- If invitee email is invalidpublic void setInviteeProperty(long inviteeId, java.lang.String attributeName, java.lang.String attributeValue) throws LockException, SurveySystemException
inviteeId
- Invitee idattributeName
- Name of the property to set/changeattributeValue
- The value of the property
LockException
- Thrown if the survey is locked by another user.
SurveySystemException
- Thrown if an error occurs in the system.public Invitee getInvitee(long inviteeId) throws SurveySystemException
inviteeId
- Id of invitee to retrieve
SurveySystemException
- Thrown if an error occurs in the system.public long[] getInviteeIds() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public long getInviteeCount() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getTaskStatus() throws SurveySecurityException, SurveySystemException
SurveySystemException
- If an error occurs in the system.
SurveySecurityException
public void keepBusinessObject() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public void releaseBusinessObject()
public boolean hasBusinessObject()
|
Copyright ? ObjectPlanet Inc. All Rights Reserved. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |