org.codehaus.enunciate.template.strategies.rest
Class ResourceMethodsByPathLoopStrategy

java.lang.Object
  extended by net.sf.jelly.apt.strategies.TemplateStrategyControl<B>
      extended by net.sf.jelly.apt.strategies.TemplateBlockStrategy<B>
          extended by net.sf.jelly.apt.strategies.TemplateLoopStrategy<L,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
              extended by org.codehaus.enunciate.template.strategies.EnunciateTemplateLoopStrategy<java.util.List<ResourceMethod>>
                  extended by org.codehaus.enunciate.template.strategies.rest.ResourceMethodsByPathLoopStrategy
All Implemented Interfaces:
net.sf.jelly.apt.strategies.TemplateStrategy<net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>

public class ResourceMethodsByPathLoopStrategy
extends EnunciateTemplateLoopStrategy<java.util.List<ResourceMethod>>

Strategy for looping through all sets of resource methods, grouped by path.

Author:
Ryan Heaton

Constructor Summary
ResourceMethodsByPathLoopStrategy()
           
 
Method Summary
protected  java.util.Iterator<java.util.List<ResourceMethod>> getLoop(net.sf.jelly.apt.TemplateModel model)
           
 java.lang.String getVar()
          The variable into which to store the current REST endpoint.
 boolean isIncludeExcludedFromDocs()
          Whether to include resource methods that have been excluded from the docs.
 boolean isIncludeExcludedFromIDL()
          Whether to include resource methods that have been excluded from the IDL.
 void setIncludeExcludedFromDocs(boolean includeExcludedFromDocs)
          Whether to include resource methods that have been excluded from the docs.
 void setIncludeExcludedFromIDL(boolean includeExcludedFromIDL)
          Whether to include resource methods that have been excluded from the IDL.
protected  void setupModelForLoop(net.sf.jelly.apt.TemplateModel model, java.util.List<ResourceMethod> resources, int index)
           
 void setVar(java.lang.String var)
          The variable into which to store the current REST endpoint.
 
Methods inherited from class org.codehaus.enunciate.template.strategies.EnunciateTemplateLoopStrategy
getAnnotationProcessorEnvironment, getIdsToJsonSchemas, getModel, getNamespacesToPrefixes, getNamespacesToSchemas, getNamespacesToWSDLs, isVerbose, lookupPrefix, lookupSchema, lookupWSDL
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateLoopStrategy
preProcess, processBody
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateBlockStrategy
postProcess
 
Methods inherited from class net.sf.jelly.apt.strategies.TemplateStrategyControl
invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceMethodsByPathLoopStrategy

public ResourceMethodsByPathLoopStrategy()
Method Detail

getLoop

protected java.util.Iterator<java.util.List<ResourceMethod>> getLoop(net.sf.jelly.apt.TemplateModel model)
                                                              throws net.sf.jelly.apt.TemplateException
Specified by:
getLoop in class net.sf.jelly.apt.strategies.TemplateLoopStrategy<java.util.List<ResourceMethod>,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
Throws:
net.sf.jelly.apt.TemplateException

setupModelForLoop

protected void setupModelForLoop(net.sf.jelly.apt.TemplateModel model,
                                 java.util.List<ResourceMethod> resources,
                                 int index)
                          throws net.sf.jelly.apt.TemplateException
Overrides:
setupModelForLoop in class net.sf.jelly.apt.strategies.TemplateLoopStrategy<java.util.List<ResourceMethod>,net.sf.jelly.apt.freemarker.FreemarkerTemplateBlock>
Throws:
net.sf.jelly.apt.TemplateException

getVar

public java.lang.String getVar()
The variable into which to store the current REST endpoint.

Returns:
The variable into which to store the current REST endpoint.

setVar

public void setVar(java.lang.String var)
The variable into which to store the current REST endpoint.

Parameters:
var - The variable into which to store the current REST endpoint.

isIncludeExcludedFromDocs

public boolean isIncludeExcludedFromDocs()
Whether to include resource methods that have been excluded from the docs.

Returns:
Whether to include resource methods that have been excluded from the docs.
See Also:
ExcludeFromDocumentation

setIncludeExcludedFromDocs

public void setIncludeExcludedFromDocs(boolean includeExcludedFromDocs)
Whether to include resource methods that have been excluded from the docs.

Parameters:
includeExcludedFromDocs - Whether to include resource methods that have been excluded from the docs.

isIncludeExcludedFromIDL

public boolean isIncludeExcludedFromIDL()
Whether to include resource methods that have been excluded from the IDL.

Returns:
Whether to include resource methods that have been excluded from the IDL.
See Also:
ExcludeFromDocumentation.excludeFromIDL()

setIncludeExcludedFromIDL

public void setIncludeExcludedFromIDL(boolean includeExcludedFromIDL)
Whether to include resource methods that have been excluded from the IDL.

Parameters:
includeExcludedFromIDL - Whether to include resource methods that have been excluded from the IDL.