Interface InvitationManagement


  • public interface InvitationManagement
    Invitations to fill registration form management
    Author:
    K. Benedyczak
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String addInvitation​(pl.edu.icm.unity.types.registration.invite.InvitationParam invitation)
      Associates a new invitation with a form.
      pl.edu.icm.unity.types.registration.invite.InvitationWithCode getInvitation​(java.lang.String code)
      Retrieves an invitation by code
      java.util.List<pl.edu.icm.unity.types.registration.invite.InvitationWithCode> getInvitations()  
      void removeInvitation​(java.lang.String code)
      Removes a single invitation
      void sendInvitation​(java.lang.String code)
      Sends an invitation message to the invitation specified by the code.
      void updateInvitation​(java.lang.String code, pl.edu.icm.unity.types.registration.invite.InvitationParam invitation)
      Updates existing invitation.
    • Method Detail

      • addInvitation

        java.lang.String addInvitation​(pl.edu.icm.unity.types.registration.invite.InvitationParam invitation)
                                throws pl.edu.icm.unity.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.exceptions.EngineException
      • updateInvitation

        void updateInvitation​(java.lang.String code,
                              pl.edu.icm.unity.types.registration.invite.InvitationParam invitation)
                       throws pl.edu.icm.unity.exceptions.EngineException
        Updates existing invitation. The email address and registration form can not be changed.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • sendInvitation

        void sendInvitation​(java.lang.String code)
                     throws pl.edu.icm.unity.exceptions.EngineException
        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.exceptions.EngineException
      • removeInvitation

        void removeInvitation​(java.lang.String code)
                       throws pl.edu.icm.unity.exceptions.EngineException
        Removes a single invitation
        Parameters:
        code -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getInvitations

        java.util.List<pl.edu.icm.unity.types.registration.invite.InvitationWithCode> getInvitations()
                                                                                              throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        a list with all invitations
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getInvitation

        pl.edu.icm.unity.types.registration.invite.InvitationWithCode getInvitation​(java.lang.String code)
                                                                             throws pl.edu.icm.unity.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.exceptions.EngineException - More specifically WrongArgumentException is thrown when there is no invitation with such code.