Class PostmarkConfigurationProperties

java.lang.Object
io.micronaut.email.postmark.PostmarkConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, PostmarkConfiguration

@Requires(property="postmark.api-token") @ConfigurationProperties("postmark") public class PostmarkConfigurationProperties extends Object implements PostmarkConfiguration
ConfigurationProperties implementation of PostmarkConfiguration.
Since:
1.0.0
Author:
Sergio del Amo
  • Field Details

    • PREFIX

      public static final String PREFIX
      postmark prefix.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
    • DEFAULT_TRACK_OPENS

      public static final boolean DEFAULT_TRACK_OPENS
      The default track opens value.
      See Also:
  • Constructor Details

    • PostmarkConfigurationProperties

      public PostmarkConfigurationProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      If Postmark integration is enabled. Default value: `true`
      Parameters:
      enabled - True if security is enabled
    • getApiToken

      @NonNull public @NonNull String getApiToken()
      Specified by:
      getApiToken in interface PostmarkConfiguration
      Returns:
      Postmark API token.
    • setApiToken

      public void setApiToken(@NonNull @NonNull String apiToken)
      Postmark API token.
      Parameters:
      apiToken - Postmark API token.
    • setTrackOpens

      public void setTrackOpens(boolean trackOpens)
      Whether to track if the email is opened. Default value: `false`
      Parameters:
      trackOpens - Whether to track if the email is opened
    • setTrackLinks

      public void setTrackLinks(@NonNull @NonNull TrackLinks trackLinks)
      Whether to track the email's links. Default value DO_NOT_TRACK.
      Parameters:
      trackLinks - Whether to track the email's links
    • getTrackOpens

      public boolean getTrackOpens()
      Specified by:
      getTrackOpens in interface PostmarkConfiguration
      Returns:
      Whether to track if the email is opened
    • getTrackLinks

      @NonNull public @NonNull TrackLinks getTrackLinks()
      Specified by:
      getTrackLinks in interface PostmarkConfiguration
      Returns:
      Whether to track the email's links