org.apache.shindig.protocol
Class ContentTypes

java.lang.Object
  extended by org.apache.shindig.protocol.ContentTypes

public final class ContentTypes
extends Object

Common mime content types and utilities


Nested Class Summary
static class ContentTypes.InvalidContentTypeException
           
 
Field Summary
static Set<String> ALLOWED_ATOM_CONTENT_TYPES
          Allowed alternatives to application/atom+xml
static Set<String> ALLOWED_JSON_CONTENT_TYPES
          Allowed alternatives to application/json, including types listed in JSON-RPC spec.
static Set<String> ALLOWED_MULTIPART_CONTENT_TYPES
           
static Set<String> ALLOWED_XML_CONTENT_TYPES
          Allowed alternatives to application/xml
static Set<String> FORBIDDEN_CONTENT_TYPES
          Content types that are forbidden for REST & RPC calls
static String MULTIPART_FORM_CONTENT_TYPE
           
static String OUTPUT_ATOM_CONTENT_TYPE
           
static String OUTPUT_JSON_CONTENT_TYPE
           
static String OUTPUT_XML_CONTENT_TYPE
           
 
Method Summary
static void checkContentTypes(Set<String> allowedContentTypes, String contentType)
           
static String extractMimePart(String contentType)
          Extract the mime part from an Http Content-Type header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOWED_JSON_CONTENT_TYPES

public static final Set<String> ALLOWED_JSON_CONTENT_TYPES
Allowed alternatives to application/json, including types listed in JSON-RPC spec.


ALLOWED_XML_CONTENT_TYPES

public static final Set<String> ALLOWED_XML_CONTENT_TYPES
Allowed alternatives to application/xml


ALLOWED_ATOM_CONTENT_TYPES

public static final Set<String> ALLOWED_ATOM_CONTENT_TYPES
Allowed alternatives to application/atom+xml


FORBIDDEN_CONTENT_TYPES

public static final Set<String> FORBIDDEN_CONTENT_TYPES
Content types that are forbidden for REST & RPC calls


MULTIPART_FORM_CONTENT_TYPE

public static final String MULTIPART_FORM_CONTENT_TYPE
See Also:
Constant Field Values

ALLOWED_MULTIPART_CONTENT_TYPES

public static final Set<String> ALLOWED_MULTIPART_CONTENT_TYPES

OUTPUT_JSON_CONTENT_TYPE

public static final String OUTPUT_JSON_CONTENT_TYPE
See Also:
Constant Field Values

OUTPUT_XML_CONTENT_TYPE

public static final String OUTPUT_XML_CONTENT_TYPE
See Also:
Constant Field Values

OUTPUT_ATOM_CONTENT_TYPE

public static final String OUTPUT_ATOM_CONTENT_TYPE
See Also:
Constant Field Values
Method Detail

extractMimePart

public static String extractMimePart(String contentType)
Extract the mime part from an Http Content-Type header


checkContentTypes

public static void checkContentTypes(Set<String> allowedContentTypes,
                                     String contentType)
                              throws ContentTypes.InvalidContentTypeException
Throws:
ContentTypes.InvalidContentTypeException


Copyright © 2007-2012. All Rights Reserved.