| java.lang.Object | |
| ↳ | com.google.gdata.wireformats.AltFormat.Builder |
A builder for AltFormat. Create new builders using builder() or builder(AltFormat).
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| acceptableTypes | |||||||||||
| base | |||||||||||
| contentType | |||||||||||
| extraInputFormats | |||||||||||
| isSelectableByType | |||||||||||
| name | |||||||||||
| wireFormat | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Declares formats as being acceptable input formats when the
current AltFormat is selected as output.
| |||||||||||
Builds the
AltFormat. | |||||||||||
Declares text/plain to be an acceptable match for the purpose
of content negotiation.
| |||||||||||
Declares MIME types to be acceptable matches for the purpose
of content negotiation.
| |||||||||||
Declares text/xml and text/plain to be acceptable matches for the
purpose of content negotiation.
| |||||||||||
Declares another
AltFormat as the base for this one. | |||||||||||
Sets the primary MIME content type used for the representation.
| |||||||||||
Sets the short name for this format.
| |||||||||||
Indicates whether the MIME content type can be used as an alias to select
the representation.
| |||||||||||
Sets the content wire format.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Declares formats as being acceptable input formats when the current AltFormat is selected as output.
When posting or putting data, the request content type is expected to be the same as the response content type selected with the alt query parameter. This is enforced in the server.
For example, this is acceptable:
POST http://gdata.example.com/feeds/myfeed?alt=jsonc ContentType: application/jsonand this is not:
POST http://gdata.example.com/feeds/myfeed?alt=jsonc ContentType: application/atom+xml
Some cases violate this rule. For example, when posting a media file, the request content type is the type of the media while the response content type is either atom or json.
Such special cases should be declared using this method.
| formats |
|---|
Builds the AltFormat. This can be called only once.
| IllegalStateException | unless both name and content type are set |
|---|
Declares text/plain to be an acceptable match for the purpose of content negotiation.
Declares MIME types to be acceptable matches for the purpose
of content negotiation. By default, only the content type set
using setContentType(ContentType) is acceptable.
| types |
|---|
Declares text/xml and text/plain to be acceptable matches for the purpose of content negotiation.
Declares another AltFormat as the base for this one.
This is set for *-in-script variants and to allows access to the original format.
| base |
|---|
Sets the primary MIME content type used for the representation. This is the content type expected as input and the default content type returned as output.
| contentType |
|---|
Sets the short name for this format. This value is suitable for
use as the value of the alt query parameter. This is
required.
| name |
|---|
Indicates whether the MIME content type can be used as an alias to select the representation.
| isSelectableByType |
|---|
Sets the content wire format.
| wireFormat |
|---|