Class PropertyFileUtil.Arg

java.lang.Object
jp.ecuacion.lib.core.util.PropertyFileUtil.Arg
Enclosing class:
PropertyFileUtil

public static class PropertyFileUtil.Arg extends Object
Is considered as an argument string, but you can set message ID replaced to message string with PropertyFileUtil.getMsg(String).

In UI application like web, usually "throw new AppException" part does not care about the locale. It's taken care at ExceptionHandler.
So you also don't want obtain an appropriate locale when you put message obtained from PropertyFileUtil.getMsg(...) into the argument of AppException.

That's why this is needed.

  • Method Details

    • string

      public static PropertyFileUtil.Arg string(String argument)
      Constructs a new instance of normal string.
      Parameters:
      argument - normal string
      Returns:
      Arg
    • strings

      public static PropertyFileUtil.Arg[] strings(String... arguments)
      Constructs an array of new instances of normal string.
      Parameters:
      arguments - an array of normal string
      Returns:
      Arg[]
    • message

      public static PropertyFileUtil.Arg message(String messageId, PropertyFileUtil.Arg... messageArgs)
      Constructs a new instance of messageId and messageArgs.
      Parameters:
      messageId - messageId
      messageArgs - messageArgs
      Returns:
      Arg
    • getString

      public String getString()
    • isMessageId

      public boolean isMessageId()
    • getMessageArgs

      public PropertyFileUtil.Arg[] getMessageArgs()