org.apache.myfaces.shared_tomahawk.renderkit
Class ContentTypeUtils

java.lang.Object
  extended by org.apache.myfaces.shared_tomahawk.renderkit.ContentTypeUtils

public class ContentTypeUtils
extends Object

Author:
Leonardo Uribe

Field Summary
static String[] AJAX_XHTML_ALLOWED_CONTENT_TYPES
           
static String ANY_CONTENT_TYPE
           
static String APPLICATION_XML_CONTENT_TYPE
           
static String[] HTML_ALLOWED_CONTENT_TYPES
           
static String HTML_CONTENT_TYPE
           
static String TEXT_ANY_CONTENT_TYPE
           
static String TEXT_XML_CONTENT_TYPE
           
static String[] XHTML_ALLOWED_CONTENT_TYPES
           
static String XHTML_CONTENT_TYPE
           
 
Constructor Summary
ContentTypeUtils()
           
 
Method Summary
static String chooseWriterContentType(String contentTypeListString, String[] htmlContentTypes, String[] xhtmlContentTypes)
           
static boolean containsContentType(String contentType, String[] allowedContentTypes)
          Indicate if the passes content type match one of the options passed.
static String getContentTypeFromAcceptHeader(javax.faces.context.FacesContext context)
           
static String[] splitContentTypeListString(String contentTypeListString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_CONTENT_TYPE

public static final String HTML_CONTENT_TYPE
See Also:
Constant Field Values

TEXT_ANY_CONTENT_TYPE

public static final String TEXT_ANY_CONTENT_TYPE
See Also:
Constant Field Values

ANY_CONTENT_TYPE

public static final String ANY_CONTENT_TYPE
See Also:
Constant Field Values

HTML_ALLOWED_CONTENT_TYPES

public static final String[] HTML_ALLOWED_CONTENT_TYPES

XHTML_CONTENT_TYPE

public static final String XHTML_CONTENT_TYPE
See Also:
Constant Field Values

APPLICATION_XML_CONTENT_TYPE

public static final String APPLICATION_XML_CONTENT_TYPE
See Also:
Constant Field Values

TEXT_XML_CONTENT_TYPE

public static final String TEXT_XML_CONTENT_TYPE
See Also:
Constant Field Values

XHTML_ALLOWED_CONTENT_TYPES

public static final String[] XHTML_ALLOWED_CONTENT_TYPES

AJAX_XHTML_ALLOWED_CONTENT_TYPES

public static final String[] AJAX_XHTML_ALLOWED_CONTENT_TYPES
Constructor Detail

ContentTypeUtils

public ContentTypeUtils()
Method Detail

containsContentType

public static boolean containsContentType(String contentType,
                                          String[] allowedContentTypes)
Indicate if the passes content type match one of the options passed.


chooseWriterContentType

public static String chooseWriterContentType(String contentTypeListString,
                                             String[] htmlContentTypes,
                                             String[] xhtmlContentTypes)

splitContentTypeListString

public static String[] splitContentTypeListString(String contentTypeListString)

getContentTypeFromAcceptHeader

public static String getContentTypeFromAcceptHeader(javax.faces.context.FacesContext context)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.