Interface EmailConfirmationManager
-
public interface EmailConfirmationManager
Confirmation manager for email attribute or identity- Author:
- P. Piernik
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIRMATION_TOKEN_TYPE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<EmailConfirmationConfiguration>
getConfirmationConfigurationForAttribute(String attributeName)
WorkflowFinalizationConfiguration
processConfirmation(String tokenValue)
Process confirmation based on token.void
sendConfirmationRequest(BaseEmailConfirmationState state)
Send confirmation request to the user with confirmation state.<T> void
sendVerification(EntityParam entity, Attribute attribute)
Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes ones.void
sendVerification(EntityParam entity, Identity identity)
see#sendVerificationNoTx(EntityParam, Identity)
, the only difference is that this method starts its own transactionvoid
sendVerificationNoTx(EntityParam entity, Identity identity, boolean force)
see#sendVerificationQuiet(EntityParam, Identity)
, the only difference is that this method throws exception.<T> void
sendVerificationQuietNoTx(EntityParam entity, 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(EntityParam entity, Identity identity, boolean force)
Sends confirmation messages for the identity if it requires so.void
sendVerificationsQuietNoTx(EntityParam entity, Collection<? extends Attribute> attributes, boolean force)
Sends confirmation messages for the values which requires so.
-
-
-
Field Detail
-
CONFIRMATION_TOKEN_TYPE
static final String CONFIRMATION_TOKEN_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
sendConfirmationRequest
void sendConfirmationRequest(BaseEmailConfirmationState state) throws 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:
EngineException
-
processConfirmation
WorkflowFinalizationConfiguration processConfirmation(String tokenValue) throws EngineException
Process confirmation based on token.- Parameters:
tokenValue
-- Returns:
- Confirmation status which contains user message key and args
- Throws:
EngineException
-
sendVerificationQuietNoTx
<T> void sendVerificationQuietNoTx(EntityParam entity, 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(EntityParam entity, Attribute attribute) throws EngineException
Sends confirmation messages for the values of an attribute which are verifiable, only for unconfirmed attributes ones.- Parameters:
entity
-attribute
-- Throws:
EngineException
-
sendVerificationQuietNoTx
void sendVerificationQuietNoTx(EntityParam entity, 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(EntityParam entity, Identity identity, boolean force) throws 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:
EngineException
-
sendVerification
void sendVerification(EntityParam entity, Identity identity) throws 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:
EngineException
-
sendVerificationsQuietNoTx
void sendVerificationsQuietNoTx(EntityParam entity, Collection<? extends 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<EmailConfirmationConfiguration> getConfirmationConfigurationForAttribute(String attributeName)
- Returns:
- attribute confirmation configuration
-
-