|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.util.ConnegUtils
public class ConnegUtils
Content negotiation utilities.
Method Summary | ||
---|---|---|
static
|
getPreferredMetadata(List<T> supported,
List<Preference<T>> preferences)
Returns the preferred metadata taking into account both metadata supported by the server and client preferences. |
|
static Variant |
getPreferredVariant(ClientInfo clientInfo,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T extends Metadata> T getPreferredMetadata(List<T> supported, List<Preference<T>> preferences)
supported
- The metadata supported by the server.preferences
- The client preferences.
public static Variant getPreferredVariant(ClientInfo clientInfo, List<? extends Variant> variants, MetadataService metadataService)
clientInfo
- The client preferences.variants
- The list of variants to compare.metadataService
- The metadata service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |