|
|||||||||
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
ATTENTION: This class is a
facade for the system business Invitation. 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.
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.
Invitation invitation = survey.addInvitation("Invitation");
invitation.setFromName("You name"); invitation.setFromEmail("youEmail@smth.com"); ...
survey.updateInvitation(invitation.getInvitationId());
survey.startInvitation(invitation.getInvitationId());
survey.startInvitation()
.
Method Summary | |
java.lang.String[] |
addInvitees(java.lang.String invitees)
Adds invitees to the invitation. |
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. |
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. |
int |
getReminderCount()
Gets the reminder count. |
long |
getReminderInterval()
Gets the reminder interval. |
java.lang.String |
getReminderMessage()
Gets the reminder message. |
java.lang.String |
getReminderSubject()
Gets the reminder subject. |
java.lang.String |
getTaskStatus()
Gets the invitation task status. |
boolean |
hasBusinessObject()
Check if this invitation has reference to the business Invitation object. |
void |
keepBusinessObject()
Get and keep the business object. |
void |
releaseBusinessObject()
Release the business object. |
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 |
setReminderCount(int reminderCount)
Sets the reminder count. |
void |
setReminderInterval(long reminderInterval)
Sets the reminder interval (number of days between each reminder if invitee has not responded to the survey). |
void |
setReminderMessage(java.lang.String reminderMessage)
Sets the reminder message. |
void |
setReminderSubject(java.lang.String reminderSubject)
Sets the reminder subject. |
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 |
Method Detail |
public void setInvitationName(java.lang.String invitationName) throws LockException, SurveySystemException
invitationName
- The new invitation name
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setFromName(java.lang.String fromName) throws LockException, SurveySystemException
fromName
- The new from name value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setFromEmail(java.lang.String fromEmail) throws LockException, SurveySystemException, java.lang.IllegalArgumentException
fromEmail
- The new from email value
LockException
- Thrown if the survey is locked by
another user.
SurveySystemException
- Thrown if an error occurs in the
system.
java.lang.IllegalArgumentException
- If invalid emailpublic void setInvitationDate(long invitationDate) throws LockException, SurveySystemException
invitationDate
- The new invitation date value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setReminderInterval(long reminderInterval) throws LockException, SurveySystemException
reminderInterval
- The new reminder interval value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setReminderCount(int reminderCount) throws LockException, SurveySystemException
reminderCount
- The new reminder count value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setContentType(java.lang.String contentType) throws LockException, SurveySystemException
contentType
- The content type
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setInvitationSubject(java.lang.String invitationSubject) throws LockException, SurveySystemException
invitationSubject
- The new invitation subject
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setInvitationMessage(java.lang.String invitationMessage) throws LockException, SurveySystemException
invitationMessage
- The new invitation message
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setReminderSubject(java.lang.String reminderSubject) throws LockException, SurveySystemException
reminderSubject
- The new reminder subject value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public void setReminderMessage(java.lang.String reminderMessage) throws LockException, SurveySystemException
reminderMessage
- The new reminder message value
LockException
- Thrown if the survey is locked by another
user.
SurveySystemException
- Thrown if an error occurs in the system.public long getInvitationId() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getInvitationName() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getFromName() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getFromEmail() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public long getInvitationDate() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public long getReminderInterval() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public int getReminderCount() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getContentType() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getInvitationSubject() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getInvitationMessage() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getReminderSubject() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String getReminderMessage() throws SurveySystemException
SurveySystemException
- Thrown if an error occurs in the system.public java.lang.String[] addInvitees(java.lang.String invitees) throws LockException, SurveySystemException
Two invitees will be created:StringBuffer invitees = new StringBuffer(); invitees.append("smith@smth.com").append("\n"); invitees.append("brown@smth.com Michael Brown").append("\n"); invitees.append("olsen@smth");
invitees
- List of invitees, one per line.
LockException
- Thrown if the survey is locked by another
user.
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 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 |