Class MessageContext.WithArgs

java.lang.Object
org.nuclos.api.context.MessageContext.WithArgs
Enclosing class:
MessageContext

public static class MessageContext.WithArgs extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new WithArgs instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sendMessage(boolean translateAndRememberWithGeneratedKey, String message)
    Sends a message to the client with the configured arguments.
    void
    sendMessage(boolean translateAndRememberWithGeneratedKey, String message, String title)
    Sends a message with a title to the client with the configured arguments.
    void
    sendMessage(boolean translateAndRememberWithGeneratedKey, String message, String title, Locale sourceLocale)
    Sends a message with a title to the client with translation option for a specific locale and the configured arguments.
    void
    sendMessage(boolean translateAndRememberWithGeneratedKey, String message, Locale sourceLocale)
    Sends a message to the client with translation option for a specific locale and the configured arguments.
    void
    sendMessage(boolean translateAndRememberWithGeneratedKey, String message, NuclosLocale sourceLocale)
    Sends a message to the client with translation option for a specific Nuclos locale and the configured arguments.
    void
    Sends a message to the client with the configured arguments.
    void
    sendMessage(String message, String title)
    Sends a message with a title to the client with the configured arguments.
    void
    sendMessage(String key, String message, String title)
    Sends a message with a title to the client using a specific localization key and the configured arguments.
    void
    sendMessage(String key, String message, String title, Locale sourceLocale)
    Sends a message with a title to the client using a specific localization key, locale and the configured arguments.
    void
    sendMessage(String key, String message, String title, NuclosLocale sourceLocale)
    Sends a message with a title to the client using a specific localization key, Nuclos locale and the configured arguments.
    void
    Sends a message to the client without translation but with the configured arguments.
    void
    Sends a message with a title to the client without translation but with the configured arguments.
    void
    Sends a message to the client without translation but with the configured arguments.
    void
    Sends a message with a title to the client without translation but with the configured arguments.
    void
    sendProgress(int percent, boolean translateAndRememberWithGeneratedKey, String message, Locale sourceLocale)
    Sends a progress update to the client with translation options, a specific locale and the configured arguments.
    void
    sendProgress(int percent, boolean translateAndRememberWithGeneratedKey, String message, NuclosLocale sourceLocale)
    Sends a progress update to the client with translation options, a specific Nuclos locale and the configured arguments.
    void
    sendProgress(int percent, String message)
    Sends a progress update to the client with the configured arguments.
    void
    sendProgress(int percent, String key, String message, Locale sourceLocale)
    Sends a progress update to the client using a specific localization key, locale and the configured arguments.
    void
    sendProgress(int percent, String key, String message, NuclosLocale sourceLocale)
    Sends a progress update to the client using a specific localization key, Nuclos locale and the configured arguments.
    void
    sendProgress(int percent, DoNotTranslate message)
    Sends a progress update to the client without translation but with the configured arguments.
    void
    sendProgressDoNotTranslate(int percent, String message)
    Sends a progress update to the client without translation but with the configured arguments.
    withMessageArgs(Object... messageArgs)
    Sets message arguments for formatting the message string.
    withTitleArgs(Object... titleArgs)
    Sets title arguments for formatting the title string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WithArgs

      public WithArgs()
      Creates a new WithArgs instance.
  • Method Details

    • withMessageArgs

      public MessageContext.WithArgs withMessageArgs(Object... messageArgs)
      Sets message arguments for formatting the message string.
      Parameters:
      messageArgs - The arguments to use for message formatting
      Returns:
      This WithArgs instance for method chaining
    • withTitleArgs

      public MessageContext.WithArgs withTitleArgs(Object... titleArgs)
      Sets title arguments for formatting the title string.
      Parameters:
      titleArgs - The arguments to use for title formatting
      Returns:
      This WithArgs instance for method chaining
    • sendMessage

      public void sendMessage(String message)
      Sends a message to the client with the configured arguments.
      Parameters:
      message - The message text to send
    • sendMessage

      public void sendMessage(boolean translateAndRememberWithGeneratedKey, String message)
      Sends a message to the client with the configured arguments.
      Parameters:
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The message text to send
    • sendMessage

      public void sendMessage(boolean translateAndRememberWithGeneratedKey, String message, Locale sourceLocale)
      Sends a message to the client with translation option for a specific locale and the configured arguments.
      Parameters:
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The message text to send
      sourceLocale - The locale of the text
    • sendMessage

      public void sendMessage(boolean translateAndRememberWithGeneratedKey, String message, NuclosLocale sourceLocale)
      Sends a message to the client with translation option for a specific Nuclos locale and the configured arguments.
      Parameters:
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The message text to send
      sourceLocale - The NuclosLocale of the text
    • sendMessageDoNotTranslate

      public void sendMessageDoNotTranslate(String message)
      Sends a message to the client without translation but with the configured arguments.
      Parameters:
      message - The message text to send without translation
    • sendMessage

      public void sendMessage(DoNotTranslate message)
      Sends a message to the client without translation but with the configured arguments.
      Parameters:
      message - The message to send without translation
    • sendMessage

      public void sendMessage(String message, String title)
      Sends a message with a title to the client with the configured arguments.
      Parameters:
      message - The message text to send
      title - The title for the message
    • sendMessage

      public void sendMessage(boolean translateAndRememberWithGeneratedKey, String message, String title)
      Sends a message with a title to the client with the configured arguments.
      Parameters:
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The message text to send
      title - The title for the message
    • sendMessage

      public void sendMessage(boolean translateAndRememberWithGeneratedKey, String message, String title, Locale sourceLocale)
      Sends a message with a title to the client with translation option for a specific locale and the configured arguments.
      Parameters:
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The message text to send
      title - The title for the message
      sourceLocale - The locale of the text
    • sendMessageDoNotTranslate

      public void sendMessageDoNotTranslate(String message, String title)
      Sends a message with a title to the client without translation but with the configured arguments.
      Parameters:
      message - The message text to send without translation
      title - The title for the message without translation
    • sendMessage

      public void sendMessage(DoNotTranslate message, DoNotTranslate title)
      Sends a message with a title to the client without translation but with the configured arguments.
      Parameters:
      message - The message to send without translation
      title - The title for the message without translation
    • sendMessage

      public void sendMessage(String key, String message, String title)
      Sends a message with a title to the client using a specific localization key and the configured arguments.
      Parameters:
      key - The localization key to use
      message - The message text to send
      title - The title for the message
    • sendMessage

      public void sendMessage(String key, String message, String title, Locale sourceLocale)
      Sends a message with a title to the client using a specific localization key, locale and the configured arguments.
      Parameters:
      key - The localization key to use
      message - The message text to send
      title - The title for the message
      sourceLocale - The locale of the text
    • sendMessage

      public void sendMessage(String key, String message, String title, NuclosLocale sourceLocale)
      Sends a message with a title to the client using a specific localization key, Nuclos locale and the configured arguments.
      Parameters:
      key - The localization key to use
      message - The message text to send
      title - The title for the message
      sourceLocale - The NuclosLocale of the text
    • sendProgress

      public void sendProgress(int percent, String message)
      Sends a progress update to the client with the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      message - The progress message text
    • sendProgressDoNotTranslate

      public void sendProgressDoNotTranslate(int percent, String message)
      Sends a progress update to the client without translation but with the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      message - The progress message text without translation
    • sendProgress

      public void sendProgress(int percent, DoNotTranslate message)
      Sends a progress update to the client without translation but with the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      message - The progress message without translation
    • sendProgress

      public void sendProgress(int percent, boolean translateAndRememberWithGeneratedKey, String message, Locale sourceLocale)
      Sends a progress update to the client with translation options, a specific locale and the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The progress message text
      sourceLocale - The locale of the text
    • sendProgress

      public void sendProgress(int percent, boolean translateAndRememberWithGeneratedKey, String message, NuclosLocale sourceLocale)
      Sends a progress update to the client with translation options, a specific Nuclos locale and the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      translateAndRememberWithGeneratedKey - If true, translate and remember with a generated key
      message - The progress message text
      sourceLocale - The NuclosLocale of the text
    • sendProgress

      public void sendProgress(int percent, String key, String message, Locale sourceLocale)
      Sends a progress update to the client using a specific localization key, locale and the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      key - The localization key to use
      message - The progress message text
      sourceLocale - The locale of the text
    • sendProgress

      public void sendProgress(int percent, String key, String message, NuclosLocale sourceLocale)
      Sends a progress update to the client using a specific localization key, Nuclos locale and the configured arguments.
      Parameters:
      percent - The progress percentage (0-100)
      key - The localization key to use
      message - The progress message text
      sourceLocale - The NuclosLocale of the text