Interface RegistrationsManagement


  • public interface RegistrationsManagement
    Registrations support: forms, submissions of requests and their processing.
    Author:
    K. Benedyczak
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addForm​(pl.edu.icm.unity.types.registration.RegistrationForm form)
      Add a new registration form.
      pl.edu.icm.unity.types.registration.RegistrationForm getForm​(java.lang.String id)  
      FormAutomationSupport getFormAutomationSupport​(pl.edu.icm.unity.types.registration.RegistrationForm form)  
      java.util.List<pl.edu.icm.unity.types.registration.RegistrationForm> getForms()  
      pl.edu.icm.unity.types.registration.RegistrationRequestState getRegistrationRequest​(java.lang.String id)  
      java.util.List<pl.edu.icm.unity.types.registration.RegistrationRequestState> getRegistrationRequests()
      Lists all registration requests.
      boolean hasForm​(java.lang.String id)  
      void processRegistrationRequest​(java.lang.String id, pl.edu.icm.unity.types.registration.RegistrationRequest finalRequest, pl.edu.icm.unity.types.registration.RegistrationRequestAction action, java.lang.String publicComment, java.lang.String privateComment)
      Accepts, deletes or rejects a given registration request.
      void removeForm​(java.lang.String formId, boolean dropRequests)
      Remove an existing registration form.
      java.lang.String submitRegistrationRequest​(pl.edu.icm.unity.types.registration.RegistrationRequest request, pl.edu.icm.unity.types.registration.RegistrationContext context)
      Submits a new registration request.
      void updateForm​(pl.edu.icm.unity.types.registration.RegistrationForm updatedForm, boolean ignoreRequestsAndInvitations)
      Updates an existing form.
    • Method Detail

      • addForm

        void addForm​(pl.edu.icm.unity.types.registration.RegistrationForm form)
              throws pl.edu.icm.unity.exceptions.EngineException
        Add a new registration form.
        Parameters:
        form -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • removeForm

        void removeForm​(java.lang.String formId,
                        boolean dropRequests)
                 throws pl.edu.icm.unity.exceptions.EngineException
        Remove an existing registration form.
        Parameters:
        formId -
        dropRequests - if true then all requests of this form are deleted. If false, the operation will throw exception if there are any forms for the form.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • updateForm

        void updateForm​(pl.edu.icm.unity.types.registration.RegistrationForm updatedForm,
                        boolean ignoreRequestsAndInvitations)
                 throws pl.edu.icm.unity.exceptions.EngineException
        Updates an existing form.
        Parameters:
        updatedForm -
        ignoreRequestsAndInvitations - if true then operation will ignore form requests and invitations. If false then it will fail if there are any pending requests of the form.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getForms

        java.util.List<pl.edu.icm.unity.types.registration.RegistrationForm> getForms()
                                                                               throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        all available forms.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getForm

        pl.edu.icm.unity.types.registration.RegistrationForm getForm​(java.lang.String id)
                                                              throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        form with given id.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • hasForm

        boolean hasForm​(java.lang.String id)
        Returns:
        true if form with given name exists
      • submitRegistrationRequest

        java.lang.String submitRegistrationRequest​(pl.edu.icm.unity.types.registration.RegistrationRequest request,
                                                   pl.edu.icm.unity.types.registration.RegistrationContext context)
                                            throws pl.edu.icm.unity.exceptions.EngineException
        Submits a new registration request. It gets a pending state unless automatically processed by the form's automation. Note that the input parameter can be modified by the invocation: all the supplied credential secrets are transformed to the internal (typically hashed) form. Important: this API call requires high authZ privileges. This is because the operation trusts confirmation state of the passed arguments. In case such operation shall be exposed with a public, unprivileged API, then we need an other variant, forcing unconfirmed state of parameters. This can be problematic for mobile numbers.
        Parameters:
        request -
        context -
        Returns:
        automatically assigned identifier of the request
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getRegistrationRequests

        java.util.List<pl.edu.icm.unity.types.registration.RegistrationRequestState> getRegistrationRequests()
                                                                                                      throws pl.edu.icm.unity.exceptions.EngineException
        Lists all registration requests.
        Returns:
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getRegistrationRequest

        pl.edu.icm.unity.types.registration.RegistrationRequestState getRegistrationRequest​(java.lang.String id)
                                                                                     throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        registration request by id
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • processRegistrationRequest

        void processRegistrationRequest​(java.lang.String id,
                                        pl.edu.icm.unity.types.registration.RegistrationRequest finalRequest,
                                        pl.edu.icm.unity.types.registration.RegistrationRequestAction action,
                                        java.lang.String publicComment,
                                        java.lang.String privateComment)
                                 throws pl.edu.icm.unity.exceptions.EngineException
        Accepts, deletes or rejects a given registration request. The request can be freely modified at this time too, with one exception: the credentials originally submitted are always preserved.
        Parameters:
        id - request id to be processed
        finalRequest - updated registration request with edits made by admin
        action - what to do with the request.
        publicComment - comment to be recorded and sent to the requester
        privateComment - comment to be internally recored only.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getFormAutomationSupport

        FormAutomationSupport getFormAutomationSupport​(pl.edu.icm.unity.types.registration.RegistrationForm form)
        Returns:
        form automation support for a given form