Class VariantListBuilderImpl
- java.lang.Object
-
- javax.ws.rs.core.Variant.VariantListBuilder
-
- org.restlet.ext.jaxrs.internal.core.VariantListBuilderImpl
-
@Deprecated public class VariantListBuilderImpl extends javax.ws.rs.core.Variant.VariantListBuilderDeprecated.Will be removed in next minor release.Concrete implementation of abstract classVariant.VariantListBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>encodingsDeprecated.private java.util.List<java.util.Locale>languagesDeprecated.private java.util.List<javax.ws.rs.core.MediaType>mediaTypesDeprecated.private java.util.List<javax.ws.rs.core.Variant>variantsDeprecated.
-
Constructor Summary
Constructors Constructor Description VariantListBuilderImpl()Deprecated.Creates a new VariantListBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.ws.rs.core.Variant.VariantListBuilderadd()Deprecated.Add the current combination of metadata to the list of supported variants, after this method is called the current combination of metadata is emptied.java.util.List<javax.ws.rs.core.Variant>build()Deprecated.Build a list of representation variants from the current state of the builder.private voidbuildVariants()Deprecated.private static <T> java.util.Iterator<T>createIterator(java.util.List<T> list)Deprecated.Creates an Iterator over the elements of the list.javax.ws.rs.core.Variant.VariantListBuilderencodings(java.lang.String... encodings)Deprecated.Set the encoding[s] for this variant.javax.ws.rs.core.Variant.VariantListBuilderlanguages(java.util.Locale... languages)Deprecated.Set the language[s] for this variant.javax.ws.rs.core.Variant.VariantListBuildermediaTypes(javax.ws.rs.core.MediaType... mediaTypes)Deprecated.Set the media type[s] for this variant.
-
-
-
Field Detail
-
encodings
private java.util.List<java.lang.String> encodings
Deprecated.
-
languages
private java.util.List<java.util.Locale> languages
Deprecated.
-
mediaTypes
private java.util.List<javax.ws.rs.core.MediaType> mediaTypes
Deprecated.
-
variants
private java.util.List<javax.ws.rs.core.Variant> variants
Deprecated.
-
-
Method Detail
-
createIterator
private static <T> java.util.Iterator<T> createIterator(java.util.List<T> list)
Deprecated.Creates an Iterator over the elements of the list. If the list is null or empty, an Iterator with exact one element is returned: null.- Type Parameters:
T-- Parameters:
list-- Returns:
- an
Iteratorwith at least one element (perhaps null). never null.
-
add
public javax.ws.rs.core.Variant.VariantListBuilder add()
Deprecated.Add the current combination of metadata to the list of supported variants, after this method is called the current combination of metadata is emptied. If more than one value is supplied for one or more of the variant properties then a variant will be generated for each possible combination. E.g. in the followinglistwould have four members:List<Variant> list = VariantListBuilder.newInstance().languages("en","fr") .encodings("zip", "identity").add().build()- Specified by:
addin classjavax.ws.rs.core.Variant.VariantListBuilder- Returns:
- the updated builder
- See Also:
Variant.VariantListBuilder.add()
-
build
public java.util.List<javax.ws.rs.core.Variant> build()
Deprecated.Build a list of representation variants from the current state of the builder. After this method is called the builder is reset to an empty state.- Specified by:
buildin classjavax.ws.rs.core.Variant.VariantListBuilder- Returns:
- a list of representation variants
- See Also:
Variant.VariantListBuilder.build()
-
buildVariants
private void buildVariants()
Deprecated.
-
encodings
public javax.ws.rs.core.Variant.VariantListBuilder encodings(java.lang.String... encodings)
Deprecated.Set the encoding[s] for this variant.- Specified by:
encodingsin classjavax.ws.rs.core.Variant.VariantListBuilder- Parameters:
encodings- the available encodings- Returns:
- the updated builder
- See Also:
Variant.VariantListBuilder.encodings(java.lang.String[])
-
languages
public javax.ws.rs.core.Variant.VariantListBuilder languages(java.util.Locale... languages)
Deprecated.Set the language[s] for this variant.- Specified by:
languagesin classjavax.ws.rs.core.Variant.VariantListBuilder- Parameters:
languages- the available languages- Returns:
- the updated builder
- See Also:
javax.ws.rs.core.Variant.VariantListBuilder#languages(java.lang.String[])
-
mediaTypes
public javax.ws.rs.core.Variant.VariantListBuilder mediaTypes(javax.ws.rs.core.MediaType... mediaTypes)
Deprecated.Set the media type[s] for this variant.- Specified by:
mediaTypesin classjavax.ws.rs.core.Variant.VariantListBuilder- Parameters:
mediaTypes- the available mediaTypes. If specific charsets are supported they should be included as parameters of the respective media type.- Returns:
- the updated builder
- See Also:
Variant.VariantListBuilder.mediaTypes(javax.ws.rs.core.MediaType[])
-
-