|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ws.rs.core.Variant.VariantListBuilder
public abstract static class Variant.VariantListBuilder
A builder for a list of representation variants.
Constructor Summary | |
---|---|
protected |
Variant.VariantListBuilder()
Protected constructor, use the static newInstance
method to obtain an instance. |
Method Summary | |
---|---|
abstract Variant.VariantListBuilder |
add()
Add the current combination of metadata to the list of supported variants, after this method is called the current combination of metadata is emptied. |
abstract java.util.List<Variant> |
build()
Build a list of representation variants from the current state of the builder. |
abstract Variant.VariantListBuilder |
encodings(java.lang.String... encodings)
Set the encoding[s] for this variant. |
abstract Variant.VariantListBuilder |
languages(java.util.Locale... languages)
Set the language[s] for this variant. |
abstract Variant.VariantListBuilder |
mediaTypes(MediaType... mediaTypes)
Set the media type[s] for this variant. |
static Variant.VariantListBuilder |
newInstance()
Create a new builder instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Variant.VariantListBuilder()
newInstance
method to obtain an instance.
Method Detail |
---|
public static Variant.VariantListBuilder newInstance()
public abstract java.util.List<Variant> build()
public abstract Variant.VariantListBuilder add()
list
would have four members:
Listlist = VariantListBuilder.newInstance().languages("en","fr") .encodings("zip", "identity").add().build()
java.lang.IllegalStateException
- if there is not at least one
mediaType, language or encoding set for the current variant.public abstract Variant.VariantListBuilder languages(java.util.Locale... languages)
languages
- the available languages
public abstract Variant.VariantListBuilder encodings(java.lang.String... encodings)
encodings
- the available encodings
public abstract Variant.VariantListBuilder mediaTypes(MediaType... mediaTypes)
mediaTypes
- the available mediaTypes. If specific charsets
are supported they should be included as parameters of the respective
media type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |