Interface EmailConfirmationManager


  • public interface EmailConfirmationManager
    Confirmation manager for email attribute or identity
    Author:
    P. Piernik
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<pl.edu.icm.unity.types.confirmation.EmailConfirmationConfiguration> getConfirmationConfigurationForAttribute​(java.lang.String attributeName)  
      WorkflowFinalizationConfiguration processConfirmation​(java.lang.String tokenValue)
      Process confirmation based on token.
      void sendConfirmationRequest​(BaseEmailConfirmationState state)
      Send confirmation request to the user with confirmation state.
      <T> void sendVerification​(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute)
      Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes ones.
      void sendVerification​(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Identity identity)
      see #sendVerificationNoTx(EntityParam, Identity), the only difference is that this method starts its own transaction
      void sendVerificationNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Identity identity, boolean force)
      see #sendVerificationQuiet(EntityParam, Identity), the only difference is that this method throws exception.
      <T> void sendVerificationQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Attribute attribute, boolean force)
      Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes for which a confirmation was not yet sent.
      void sendVerificationQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity, pl.edu.icm.unity.types.basic.Identity identity, boolean force)
      Sends confirmation messages for the identity if it requires so.
      void sendVerificationsQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity, java.util.Collection<? extends pl.edu.icm.unity.types.basic.Attribute> attributes, boolean force)
      Sends confirmation messages for the values which requires so.
    • Field Detail

      • CONFIRMATION_TOKEN_TYPE

        static final java.lang.String CONFIRMATION_TOKEN_TYPE
        See Also:
        Constant Field Values
    • Method Detail

      • sendConfirmationRequest

        void sendConfirmationRequest​(BaseEmailConfirmationState state)
                              throws pl.edu.icm.unity.exceptions.EngineException
        Send confirmation request to the user with confirmation state. Confirmations configuration appropriate for the confirmation is used to establish message template id. The template is filled by manager with confirmation link and the whole message is sent via configured notification channel.
        Parameters:
        state -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • processConfirmation

        WorkflowFinalizationConfiguration processConfirmation​(java.lang.String tokenValue)
                                                       throws pl.edu.icm.unity.exceptions.EngineException
        Process confirmation based on token.
        Parameters:
        tokenValue -
        Returns:
        Confirmation status which contains user message key and args
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • sendVerificationQuietNoTx

        <T> void sendVerificationQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                           pl.edu.icm.unity.types.basic.Attribute attribute,
                                           boolean force)
        Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes for which a confirmation was not yet sent. In case of error only log entry is printed, no exception is thrown.

        WARNING: this method requires to set up existing transaction

        Parameters:
        entity -
        attribute -
        force - if true then request is sent even if one was already sent previously
      • sendVerification

        <T> void sendVerification​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                  pl.edu.icm.unity.types.basic.Attribute attribute)
                           throws pl.edu.icm.unity.exceptions.EngineException
        Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes ones.
        Parameters:
        entity -
        attribute -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • sendVerificationQuietNoTx

        void sendVerificationQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                       pl.edu.icm.unity.types.basic.Identity identity,
                                       boolean force)
        Sends confirmation messages for the identity if it requires so. Only for unconfirmed identities. In case of error only log entry is printed, no exception is thrown.

        WARNING: this method requires to set up existing transaction

        Parameters:
        entity -
        identity -
        force - if true then request is sent even if one was already sent previously
      • sendVerificationNoTx

        void sendVerificationNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                  pl.edu.icm.unity.types.basic.Identity identity,
                                  boolean force)
                           throws pl.edu.icm.unity.exceptions.EngineException
        see #sendVerificationQuiet(EntityParam, Identity), the only difference is that this method throws exception.

        WARNING: this method requires to set up existing transaction

        Parameters:
        entity -
        identity -
        force - if true then request is sent even if one was already sent previously
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • sendVerification

        void sendVerification​(pl.edu.icm.unity.types.basic.EntityParam entity,
                              pl.edu.icm.unity.types.basic.Identity identity)
                       throws pl.edu.icm.unity.exceptions.EngineException
        see #sendVerificationNoTx(EntityParam, Identity), the only difference is that this method starts its own transaction
        Parameters:
        entity -
        identity -
        force - if true then request is sent even if one was already sent previously
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • sendVerificationsQuietNoTx

        void sendVerificationsQuietNoTx​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                        java.util.Collection<? extends pl.edu.icm.unity.types.basic.Attribute> attributes,
                                        boolean force)
        Sends confirmation messages for the values which requires so. Only for unconfirmed attributes.

        WARNING: this method requires to set up existing transaction

        Parameters:
        entity -
        attribute -
        force - if true then request is sent even if one was already sent previously
      • getConfirmationConfigurationForAttribute

        java.util.Optional<pl.edu.icm.unity.types.confirmation.EmailConfirmationConfiguration> getConfirmationConfigurationForAttribute​(java.lang.String attributeName)
        Returns:
        attribute confirmation configuration