Package pl.edu.icm.unity.engine.api
Interface InvitationManagement
public interface InvitationManagement
Invitations to fill registration form management
- Author:
- K. Benedyczak
-
Method Summary
Modifier and TypeMethodDescriptionaddInvitation
(pl.edu.icm.unity.base.registration.invitation.InvitationParam invitation) Associates a new invitation with a form.pl.edu.icm.unity.base.registration.invitation.InvitationWithCode
getInvitation
(String code) Retrieves an invitation by codeList<pl.edu.icm.unity.base.registration.invitation.InvitationWithCode>
void
removeInvitation
(String code) Removes a single invitationvoid
sendInvitation
(String code) Sends an invitation message to the invitation specified by the code.void
updateInvitation
(String code, pl.edu.icm.unity.base.registration.invitation.InvitationParam invitation) Updates existing invitation.
-
Method Details
-
addInvitation
String addInvitation(pl.edu.icm.unity.base.registration.invitation.InvitationParam invitation) throws pl.edu.icm.unity.base.exceptions.EngineException Associates a new invitation with a form. The invitation code is auto generated and returned- Parameters:
invitation
- invitation to be added- Returns:
- code assigned to the invitation
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
updateInvitation
void updateInvitation(String code, pl.edu.icm.unity.base.registration.invitation.InvitationParam invitation) throws pl.edu.icm.unity.base.exceptions.EngineException Updates existing invitation. The email address and registration form can not be changed.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
sendInvitation
Sends an invitation message to the invitation specified by the code. In case when there is no such invitation, it has missing or invalid contact address or when the associated form has no message template for invitation this method throws exception.- Parameters:
code
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
removeInvitation
Removes a single invitation- Parameters:
code
-- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getInvitations
List<pl.edu.icm.unity.base.registration.invitation.InvitationWithCode> getInvitations() throws pl.edu.icm.unity.base.exceptions.EngineException- Returns:
- a list with all invitations
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
getInvitation
pl.edu.icm.unity.base.registration.invitation.InvitationWithCode getInvitation(String code) throws pl.edu.icm.unity.base.exceptions.EngineException Retrieves an invitation by code- Parameters:
code
- invitation code- Returns:
- an invitation with the given code. Note that the returned invitation may happen to be expired.
- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
- More specificallyWrongArgumentException
is thrown when there is no invitation with such code.
-