Annotation Type Part


One field of a @Multipart method's multipart body. Only valid on a method also annotated @Multipart; String (a plain form field), java.io.File, byte[], and java.io.InputStream (all sent as a file part) parameters are supported.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The multipart field name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Value used when the argument is null - sent as a plain String part, same as if it had been the argument itself.
    The file name sent for a byte[]/java.io.InputStream value, or to override a java.io.File value's own name.
    boolean
    If true, a null argument with no defaultValue() throws a RestInPeaceException at call time.
  • Element Details

    • value

      String value
      The multipart field name.
      Returns:
      the field name
    • fileName

      String fileName
      The file name sent for a byte[]/java.io.InputStream value, or to override a java.io.File value's own name. Ignored for a String value. Defaults to value() when left unset, since byte[]/InputStream have no name of their own to fall back on.
      Returns:
      the file name, or "" to use value()
      Default:
      ""
    • required

      boolean required
      If true, a null argument with no defaultValue() throws a RestInPeaceException at call time.
      Returns:
      whether the part is required
      Default:
      false
    • defaultValue

      String defaultValue
      Value used when the argument is null - sent as a plain String part, same as if it had been the argument itself.
      Returns:
      the default value
      Default:
      "REST-IN-PEACE-DEFAULT-STRING"