Annotation Type Part
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
@HTTPRequestParamMarker(BODY)
public @interface 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 -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionValue used when the argument isnull- sent as a plainStringpart, same as if it had been the argument itself.The file name sent for abyte[]/java.io.InputStreamvalue, or to override ajava.io.Filevalue's own name.boolean
-
Element Details
-
value
String valueThe multipart field name.- Returns:
- the field name
-
-
-
fileName
String fileNameThe file name sent for abyte[]/java.io.InputStreamvalue, or to override ajava.io.Filevalue's own name. Ignored for aStringvalue. Defaults tovalue()when left unset, sincebyte[]/InputStreamhave no name of their own to fall back on.- Returns:
- the file name, or
""to usevalue()
- Default:
- ""
-
required
boolean required- Returns:
- whether the part is required
- Default:
- false
-
defaultValue
String defaultValueValue used when the argument isnull- sent as a plainStringpart, same as if it had been the argument itself.- Returns:
- the default value
- Default:
- "REST-IN-PEACE-DEFAULT-STRING"
-