Package org.restlet.resource
Annotation Interface Put
Annotation for methods that store submitted representations. Its semantics is
equivalent to an HTTP PUT method. Note that your method must have one input
parameter if you want it to be selected for requests containing an
entity.
Example:
Example:
@Put
public MyOutputBean store(MyInputBean input);
@Put("json")
public String storeJson(String value);
@Put("json|xml:xml|json")
public Representation store(Representation value);
@Put("json?param=val")
public Representation storeWithParam(String value);
@Put("json?param")
public Representation storeWithParam(String value);
@Put("?param")
public Representation storeWithParam(String value);
- Author:
- Jerome Louvel
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueSpecifies the media type of the request and response entities as extensions. If only one extension is provided, the extension applies to both request and response entities. If two extensions are provided, separated by a colon, then the first one is for the request entity and the second one for the response entity.
If several media types are supported, their extension can be specified separated by "|" characters. Note that this isn't the full MIME type value, just the extension name declared inMetadataService. For a list of all predefined extensions, please checkMetadataService.addCommonExtensions(). New extension can be registered usingMetadataService.addExtension(String, org.restlet.data.Metadata)method.- Returns:
- The media types of request and/or response entities.
- Default:
- ""
-