## Uses of Class
org.restlet.representation.Variant

Packages that use Variant
Package | Description
--- | ---
org.restlet.data | Information exchanged by components.
org.restlet.engine.application | Supports Restlet applications.
org.restlet.engine.converter | Supports the converter service.
org.restlet.engine.http.io | Supports HTTP input and output.
org.restlet.engine.local | Supports local connectors and resources.
org.restlet.engine.resource | Supports resources.
org.restlet.engine.util | General utilities.
org.restlet.ext.jackson | Integration with Jackson 1.4.
org.restlet.representation | Common representation data elements.
org.restlet.resource | Client and server resource classes.
org.restlet.service | Services used by applications and components.
org.restlet.util | Various utility classes.

### Uses of Variant in org.restlet.data

Methods in org.restlet.data that return Variant
Modifier and Type | Method and Description
--- | ---
`Variant` | ClientInfo.`getPreferredVariant(java.util.List<? extends Variant> variants, MetadataService metadataService)` Returns the best variant for a given resource according the the client preferences: accepted languages, accepted character sets, accepted media types and accepted encodings.
`Variant` | ClientInfo.`getPreferredVariant(Resource resource, MetadataService metadataService)` Deprecated. Used `ClientInfo.getPreferredVariant(List, org.restlet.service.MetadataService)` instead.

Method parameters in org.restlet.data with type arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`Variant` | ClientInfo.`getPreferredVariant(java.util.List<? extends Variant> variants, MetadataService metadataService)` Returns the best variant for a given resource according the the client preferences: accepted languages, accepted character sets, accepted media types and accepted encodings.

Constructor parameters in org.restlet.data with type arguments of type Variant
Constructor and Description
`ClientInfo(java.util.List<? extends Variant> variants)` Constructor from a list of variants.

### Uses of Variant in org.restlet.engine.application

Subclasses of Variant in org.restlet.engine.application
Modifier and Type | Class and Description
--- | ---
`class` | `DecodeRepresentation` Representation that decodes a wrapped representation if its encoding is supported.
`class` | `EncodeRepresentation` Content that encodes a wrapped content.
`class` | `RangeRepresentation` Representation that exposes only a range of the content of a wrapped representation.

### Uses of Variant in org.restlet.engine.converter

Methods in org.restlet.engine.converter with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`static ConverterHelper` | ConverterUtils.`getBestHelper(java.lang.Object source, Variant target, UniformResource resource)` Returns the best converter helper matching the given parameters.
`abstract java.util.List<java.lang.Class<?>>` | ConverterHelper.`getObjectClasses(Variant source)` Returns the list of object classes that can be converted from a given variant.
`java.util.List<java.lang.Class<?>>` | DefaultConverter.`getObjectClasses(Variant source)`
`static java.util.List<VariantInfo>` | ConverterUtils.`getVariants(java.lang.Class<?> sourceClass, Variant targetVariant)` Returns the list of variants that can be converted from a given object class.
`abstract float` | ConverterHelper.`score(java.lang.Object source, Variant target, UniformResource resource)` Scores the affinity of this helper with the source class.
`float` | DefaultConverter.`score(java.lang.Object source, Variant target, UniformResource resource)`
`abstract Representation` | ConverterHelper.`toRepresentation(java.lang.Object source, Variant target, UniformResource resource)` Converts a regular Java object into a Representation.
`Representation` | DefaultConverter.`toRepresentation(java.lang.Object source, Variant target, UniformResource resource)`

### Uses of Variant in org.restlet.engine.http.io

Subclasses of Variant in org.restlet.engine.http.io
Modifier and Type | Class and Description
--- | ---
`class` | `ClosingRepresentation` Wrapper representation to close the associated socket when the representation is released.

### Uses of Variant in org.restlet.engine.local

Subclasses of Variant in org.restlet.engine.local
Modifier and Type | Class and Description
--- | ---
`class` | `ZipEntryRepresentation` An entry in a Zip/JAR file.

Methods in org.restlet.engine.local that return Variant
Modifier and Type | Method and Description
--- | ---
`Variant` | Entity.`getVariant()` Returns a variant corresponding to the extensions of this entity.

Methods in org.restlet.engine.local that return types with arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<Variant>` | DirectoryServerResource.`getVariants()`
`protected java.util.List<Variant>` | DirectoryServerResource.`getVariants(Method method)` Returns the list of variants for the given method.

Methods in org.restlet.engine.local with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`static java.util.Collection<java.lang.String>` | Entity.`getExtensions(Variant variant, MetadataService metadataService)` Returns the list of known extensions taken from a given variant.
`static void` | Entity.`updateMetadata(java.lang.String entryName, Variant variant, boolean applyDefault, MetadataService metadataService)` Updates some variant metadata based on a given entry name with extensions.

### Uses of Variant in org.restlet.engine.resource

Subclasses of Variant in org.restlet.engine.resource
Modifier and Type | Class and Description
--- | ---
`class` | `VariantInfo` Variant that is declared by an annotated Java method.

Methods in org.restlet.engine.resource that return types with arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<Variant>` | AnnotationInfo.`getRequestVariants(MetadataService metadataService, ConverterService converterService)` Returns a list of request variants based on the annotation value.
`java.util.List<Variant>` | AnnotationInfo.`getResponseVariants(MetadataService metadataService, ConverterService converterService)` Returns a list of response variants based on the annotation value.

Constructors in org.restlet.engine.resource with parameters of type Variant
Constructor and Description
`VariantInfo(Variant variant, AnnotationInfo annotationInfo)` Constructor.

### Uses of Variant in org.restlet.engine.util

Methods in org.restlet.engine.util that return Variant
Modifier and Type | Method and Description
--- | ---
`static Variant` | ConnegUtils.`getPreferredVariant(ClientInfo clientInfo, java.util.List<? extends Variant> variants, MetadataService metadataService)` Returns the best variant representation for a given resource according the the client preferences. A default language is provided in case the variants don't match the client preferences.
`Variant` | Conneg.`getPreferredVariant(java.util.List<? extends Variant> variants)` Returns the best variant representation for a given resource according the the client preferences. A default language is provided in case the variants don't match the client preferences.

Methods in org.restlet.engine.util with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`float` | Conneg.`scoreVariant(Variant variant)` Scores a variant relatively to enriched client preferences.

Method parameters in org.restlet.engine.util with type arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`static Variant` | ConnegUtils.`getPreferredVariant(ClientInfo clientInfo, java.util.List<? extends Variant> variants, MetadataService metadataService)` Returns the best variant representation for a given resource according the the client preferences. A default language is provided in case the variants don't match the client preferences.
`Variant` | Conneg.`getPreferredVariant(java.util.List<? extends Variant> variants)` Returns the best variant representation for a given resource according the the client preferences. A default language is provided in case the variants don't match the client preferences.

### Uses of Variant in org.restlet.ext.jackson

Subclasses of Variant in org.restlet.ext.jackson
Modifier and Type | Class and Description
--- | ---
`class` | `JacksonRepresentation<T>` Representation based on the Jackson library.

Methods in org.restlet.ext.jackson with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<java.lang.Class<?>>` | JacksonConverter.`getObjectClasses(Variant source)`
`float` | JacksonConverter.`score(java.lang.Object source, Variant target, UniformResource resource)`
`Representation` | JacksonConverter.`toRepresentation(java.lang.Object source, Variant target, UniformResource resource)`

### Uses of Variant in org.restlet.representation

Subclasses of Variant in org.restlet.representation
Modifier and Type | Class and Description
--- | ---
`class` | `AppendableRepresentation` Represents an appendable sequence of characters.
`class` | `ChannelRepresentation` Representation based on a NIO byte channel.
`class` | `CharacterRepresentation` Representation based on a BIO character stream.
`class` | `DigesterRepresentation` Representation capable of computing a digest.
`class` | `DigestRepresentation` Deprecated. See `DigesterRepresentation` instead.
`class` | `EmptyRepresentation` Empty representation with no content.
`class` | `FileRepresentation` Representation based on a static file.
`class` | `InputRepresentation` Transient representation based on a BIO input stream.
`class` | `ObjectRepresentation<T extends java.io.Serializable>` Representation based on a serializable Java object.
`class` | `OutputRepresentation` Representation based on a BIO output stream.
`class` | `ReadableRepresentation` Transient representation based on a readable NIO byte channel.
`class` | `ReaderRepresentation` Transient representation based on a BIO characters reader.
`class` | `Representation` Current or intended state of a resource.
`class` | `RepresentationInfo` Information about a representation.
`class` | `StreamRepresentation` Representation based on a BIO stream.
`class` | `StringRepresentation` Represents an Unicode string that can be converted to any character set supported by Java.
`class` | `WritableRepresentation` Representation based on a writable NIO byte channel.
`class` | `WriterRepresentation` Representation based on a BIO characters writer.

Methods in org.restlet.representation with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`boolean` | Variant.`includes(Variant other)` Indicates if the current variant includes the given variant.
`boolean` | Variant.`isCompatible(Variant other)` Indicates if the current variant is compatible with the given variant.

Constructors in org.restlet.representation with parameters of type Variant
Constructor and Description
`Representation(Variant variant, java.util.Date modificationDate)` Constructor from a variant.
`Representation(Variant variant, java.util.Date modificationDate, Tag tag)` Constructor from a variant.
`Representation(Variant variant, Tag tag)` Constructor from a variant.
`RepresentationInfo(Variant variant, java.util.Date modificationDate)` Constructor from a variant.
`RepresentationInfo(Variant variant, java.util.Date modificationDate, Tag tag)` Constructor from a variant.
`RepresentationInfo(Variant variant, Tag tag)` Constructor from a variant.

### Uses of Variant in org.restlet.resource

Methods in org.restlet.resource that return Variant
Modifier and Type | Method and Description
--- | ---
`Variant` | Resource.`getPreferredVariant()` Deprecated. Returns the preferred variant according to the client preferences specified in the request.
`protected Variant` | ServerResource.`getPreferredVariant(java.util.List<Variant> variants)` Returns the preferred variant among a list of available variants.

Methods in org.restlet.resource that return types with arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<Variant>` | Directory.`getIndexVariants(ReferenceList indexContent)` Returns the variant representations of a directory index.
`java.util.List<Variant>` | Resource.`getVariants()` Deprecated. Returns the modifiable list of variants.
`java.util.List<Variant>` | ServerResource.`getVariants()` Returns a modifiable list of exposed variants for the current request method.
`protected java.util.List<Variant>` | ServerResource.`getVariants(Method method)` Returns a modifiable list of exposed variants for the given method.

Methods in org.restlet.resource with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`protected Representation` | ServerResource.`delete(Variant variant)` Deletes the resource and all its representations.
`protected Representation` | ServerResource.`doHandle(Variant variant)` Effectively handles a call with content negotiation of the response entity.
`protected Representation` | ServerResource.`get(Variant variant)` Returns a full representation for a given variant.
`Representation` | Directory.`getIndexRepresentation(Variant variant, ReferenceList indexContent)` Returns an actual index representation for a given variant.
`protected RepresentationInfo` | ServerResource.`getInfo(Variant variant)` Returns information about the resource's representation.
`protected Representation` | ServerResource.`head(Variant variant)` Returns a representation whose metadata will be returned to the client.
`protected Representation` | ServerResource.`options(Variant variant)` Indicates the communication options available for this resource.
`protected Representation` | ServerResource.`post(Representation entity, Variant variant)` Posts a representation to the resource at the target URI reference.
`protected Representation` | ServerResource.`put(Representation representation, Variant variant)` Creates or updates a resource with the given representation as new state to be stored.
`Representation` | Resource.`represent(Variant variant)` Deprecated. Returns a full representation for a given variant previously returned via the getVariants() method.
`protected Representation` | UniformResource.`toRepresentation(java.lang.Object source, Variant target)` Converts an object into a representation based on client preferences.

Method parameters in org.restlet.resource with type arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`protected Variant` | ServerResource.`getPreferredVariant(java.util.List<Variant> variants)` Returns the preferred variant among a list of available variants.
`void` | Resource.`setVariants(java.util.List<Variant> variants)` Deprecated. Sets the modifiable list of variants.

### Uses of Variant in org.restlet.service

Methods in org.restlet.service that return types with arguments of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<? extends Variant>` | ConverterService.`getVariants(java.lang.Class<?> source, Variant target)` Returns the list of variants that can be converted from a given object class.

Methods in org.restlet.service with parameters of type Variant
Modifier and Type | Method and Description
--- | ---
`java.util.List<java.lang.Class<?>>` | ConverterService.`getObjectClasses(Variant source)` Returns the list of object classes that can be converted from a given variant.
`java.util.List<? extends Variant>` | ConverterService.`getVariants(java.lang.Class<?> source, Variant target)` Returns the list of variants that can be converted from a given object class.
`Representation` | ConverterService.`toRepresentation(java.lang.Object source, Variant target, UniformResource resource)` Converts a regular Java object into a Representation.

### Uses of Variant in org.restlet.util

Subclasses of Variant in org.restlet.util
Modifier and Type | Class and Description
--- | ---
`class` | `WrapperRepresentation` Representation wrapper.