org.kohsuke.stapler
Class StaticViewFacet

java.lang.Object
  extended by org.kohsuke.stapler.Facet
      extended by org.kohsuke.stapler.StaticViewFacet

public class StaticViewFacet
extends Facet

Author:
Kohsuke Kawaguchi

Field Summary
 
Fields inherited from class org.kohsuke.stapler.Facet
LOGGER
 
Constructor Summary
StaticViewFacet(Collection<String> allowedExtensions)
           
StaticViewFacet(String... allowedExtensions)
           
 
Method Summary
 void addExtension(String ext)
           
 void buildViewDispatchers(MetaClass owner, 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, Object it, String viewName)
          Creates a RequestDispatcher that handles the given view, or return null if no such view was found.
protected  URL findResource(Klass c, String fileName)
          Determines if this resource can be served
 boolean handleIndexRequest(RequestImpl req, ResponseImpl rsp, 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

StaticViewFacet

public StaticViewFacet(String... allowedExtensions)

StaticViewFacet

public StaticViewFacet(Collection<String> allowedExtensions)
Method Detail

addExtension

public void addExtension(String ext)

buildViewDispatchers

public void buildViewDispatchers(MetaClass owner,
                                 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

findResource

protected URL findResource(Klass c,
                           String fileName)
Determines if this resource can be served


createRequestDispatcher

public javax.servlet.RequestDispatcher createRequestDispatcher(RequestImpl request,
                                                               Klass<?> type,
                                                               Object it,
                                                               String viewName)
                                                        throws 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:
IOException

handleIndexRequest

public boolean handleIndexRequest(RequestImpl req,
                                  ResponseImpl rsp,
                                  Object node,
                                  MetaClass nodeMetaClass)
                           throws 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:
IOException
javax.servlet.ServletException


Copyright © 2013. All Rights Reserved.