org.kohsuke.stapler.jelly.groovy
Class GroovyFacet

java.lang.Object
  extended by org.kohsuke.stapler.Facet
      extended by org.kohsuke.stapler.jelly.groovy.GroovyFacet
All Implemented Interfaces:
JellyCompatibleFacet

@MetaInfServices(value=Facet.class)
public class GroovyFacet
extends Facet
implements JellyCompatibleFacet

Facet that brings in Groovy support on top of Jelly.

Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class org.kohsuke.stapler.Facet
LOGGER
 
Constructor Summary
GroovyFacet()
           
 
Method Summary
 void buildViewDispatchers(MetaClass owner, java.util.List<Dispatcher> dispatchers)
          Adds Dispatchers that look at one token and binds that to the views associated with the 'it' object.
 javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request, Klass type, java.lang.Object it, java.lang.String viewName)
          Creates a RequestDispatcher that handles the given view, or return null if no such view was found.
 java.util.Collection<java.lang.Class<GroovyClassTearOff>> getClassTearOffTypes()
           
 java.util.Collection<java.lang.String> getScriptExtensions()
          Gets the list of view script extensions, such as ".jelly".
 boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, java.lang.Object node, MetaClass nodeMetaClass)
          Attempts to route the HTTP request to the 'index' page of the 'it' object.
 
Methods inherited from class org.kohsuke.stapler.Facet
buildFallbackDispatchers, createRequestDispatcher, discover, discoverExtensions, getKlass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyFacet

public GroovyFacet()
Method Detail

buildViewDispatchers

public void buildViewDispatchers(MetaClass owner,
                                 java.util.List<Dispatcher> dispatchers)
Description copied from class: Facet
Adds Dispatchers that look at one token and binds that to the views associated with the 'it' object.

Specified by:
buildViewDispatchers in class Facet

getClassTearOffTypes

public java.util.Collection<java.lang.Class<GroovyClassTearOff>> getClassTearOffTypes()
Specified by:
getClassTearOffTypes in interface JellyCompatibleFacet

getScriptExtensions

public java.util.Collection<java.lang.String> getScriptExtensions()
Description copied from interface: JellyCompatibleFacet
Gets the list of view script extensions, such as ".jelly".

Specified by:
getScriptExtensions in interface JellyCompatibleFacet

createRequestDispatcher

public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request,
                                                               Klass type,
                                                               java.lang.Object it,
                                                               java.lang.String viewName)
                                                        throws java.io.IOException
Description copied from class: Facet
Creates a RequestDispatcher that handles the given view, or return null if no such view was found.

Overrides:
createRequestDispatcher in class Facet
type - If "it" is non-null, it.getClass(). Otherwise the class from which the view is searched.
Throws:
java.io.IOException

handleIndexRequest

public boolean handleIndexRequest(RequestImpl req,
                                  ResponseImpl rsp,
                                  java.lang.Object node,
                                  MetaClass nodeMetaClass)
                           throws java.io.IOException,
                                  javax.servlet.ServletException
Description copied from class: Facet
Attempts to route the HTTP request to the 'index' page of the 'it' object.

Specified by:
handleIndexRequest in class Facet
Returns:
true if the processing succeeds. Otherwise false.
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2012. All Rights Reserved.