org.codehaus.enunciate.template.freemarker
Class UniqueContentTypesMethod

java.lang.Object
  extended by org.codehaus.enunciate.template.freemarker.UniqueContentTypesMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public class UniqueContentTypesMethod
extends java.lang.Object
implements freemarker.template.TemplateMethodModelEx

Get the set of all content types applicable to a set of resource methods.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
UniqueContentTypesMethod()
           
 
Method Summary
 java.lang.Object exec(java.util.List list)
           
protected  java.util.List<java.lang.String> findAllKnownTypesAcceptableTo(ResourceMethodMediaType mediaType)
          Find all types that the models knows about that are acceptable to the specified media type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueContentTypesMethod

public UniqueContentTypesMethod()
Method Detail

exec

public java.lang.Object exec(java.util.List list)
                      throws freemarker.template.TemplateModelException
Specified by:
exec in interface freemarker.template.TemplateMethodModel
Specified by:
exec in interface freemarker.template.TemplateMethodModelEx
Throws:
freemarker.template.TemplateModelException

findAllKnownTypesAcceptableTo

protected java.util.List<java.lang.String> findAllKnownTypesAcceptableTo(ResourceMethodMediaType mediaType)
Find all types that the models knows about that are acceptable to the specified media type.

Parameters:
mediaType - The content type.
Returns:
The supported types.