Interface EmailConfirmationManager


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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<pl.edu.icm.unity.base.confirmation.EmailConfirmationConfiguration>
     
    Process confirmation based on token.
    void
    Send confirmation request to the user with confirmation state.
    <T> void
    sendVerification(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.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.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.Identity identity)
    see #sendVerificationNoTx(EntityParam, Identity), the only difference is that this method starts its own transaction
    void
    sendVerificationNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.Identity identity, boolean force)
    see #sendVerificationQuiet(EntityParam, Identity), the only difference is that this method throws exception.
    <T> void
    sendVerificationQuietNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.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.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.Identity identity, boolean force)
    Sends confirmation messages for the identity if it requires so.
    void
    sendVerificationsQuietNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, Collection<? extends pl.edu.icm.unity.base.attribute.Attribute> attributes, boolean force)
    Sends confirmation messages for the values which requires so.
  • Field Details

  • Method Details

    • sendConfirmationRequest

      void sendConfirmationRequest(BaseEmailConfirmationState state) throws pl.edu.icm.unity.base.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.base.exceptions.EngineException
    • processConfirmation

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

      <T> void sendVerificationQuietNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.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.base.entity.EntityParam entity, pl.edu.icm.unity.base.attribute.Attribute attribute) throws pl.edu.icm.unity.base.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.base.exceptions.EngineException
    • sendVerificationQuietNoTx

      void sendVerificationQuietNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.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.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.Identity identity, boolean force) throws pl.edu.icm.unity.base.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.base.exceptions.EngineException
    • sendVerification

      void sendVerification(pl.edu.icm.unity.base.entity.EntityParam entity, pl.edu.icm.unity.base.identity.Identity identity) throws pl.edu.icm.unity.base.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.base.exceptions.EngineException
    • sendVerificationsQuietNoTx

      void sendVerificationsQuietNoTx(pl.edu.icm.unity.base.entity.EntityParam entity, Collection<? extends pl.edu.icm.unity.base.attribute.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

      Optional<pl.edu.icm.unity.base.confirmation.EmailConfirmationConfiguration> getConfirmationConfigurationForAttribute(String attributeName)
      Returns:
      attribute confirmation configuration