com.google.sitebricks.routing
Interface PageBook

All Known Implementing Classes:
DefaultPageBook

public interface PageBook

Author:
Dhanji R. Prasanna (dhanji@gmail.com)

Nested Class Summary
static interface PageBook.Page
           
static class PageBook.Routing
           
 
Method Summary
 PageBook.Page at(String uri, Class<?> myPageClass)
          Register a page class at the given contextual URI.
 void at(String uri, List<ActionDescriptor> actionDescriptor, Map<Class<? extends Annotation>,String> methodSet)
           
 PageBook.Page decorate(Class<?> pageClass)
          Indicates that the template for this class is to be inserted into a superclass template using @Decorated
 PageBook.Page embedAs(Class<?> pageClass, String as)
          Registers a page class as an embeddable.
 PageBook.Page forClass(Class<?> pageClass)
          Very similar to forInstance(Object), except that it takes a class literal instead and does NOT do super crawling.
 PageBook.Page forInstance(Object instance)
          Similar to get(java.lang.String) except that instead of returning a page for a URI, it returns the page matching the class of the provided instance, and uses the instance itself to deliver the page.
 PageBook.Page forName(String name)
           
 PageBook.Page get(String uri)
           
 Collection<List<PageBook.Page>> getPageMap()
           
 PageBook.Page nonCompilingGet(String uri)
          Same as get(java.lang.String) except guaranteed not to trigger a cascading compile of page bricks.
 PageBook.Page serviceAt(String uri, Class<?> pageClass)
          Same as at(java.lang.String, java.lang.Class) but registers a headless web service instead.
 

Method Detail

at

PageBook.Page at(String uri,
                 Class<?> myPageClass)
Register a page class at the given contextual URI.

Returns:
A PageBook.Page representing the given class without a compiled template applied.

get

PageBook.Page get(String uri)
Parameters:
uri - A contextual URI where a page (maybe) registered.
Returns:
A PageBook.Page object thatis capable of rend

forName

PageBook.Page forName(String name)

embedAs

PageBook.Page embedAs(Class<?> pageClass,
                      String as)
Registers a page class as an embeddable.

Parameters:
as - The annotation name to register this widget as. Example: "Hello" will make this page class available for embedding as
@Hello
.

decorate

PageBook.Page decorate(Class<?> pageClass)
Indicates that the template for this class is to be inserted into a superclass template using @Decorated

Parameters:
pageClass -

nonCompilingGet

PageBook.Page nonCompilingGet(String uri)
Same as get(java.lang.String) except guaranteed not to trigger a cascading compile of page bricks.


forInstance

PageBook.Page forInstance(Object instance)
Similar to get(java.lang.String) except that instead of returning a page for a URI, it returns the page matching the class of the provided instance, and uses the instance itself to deliver the page.

Parameters:
instance - An instance of some page registered by an @At annotation or similar method in this sitebricks app.

forClass

PageBook.Page forClass(Class<?> pageClass)
Very similar to forInstance(Object), except that it takes a class literal instead and does NOT do super crawling.


serviceAt

PageBook.Page serviceAt(String uri,
                        Class<?> pageClass)
Same as at(java.lang.String, java.lang.Class) but registers a headless web service instead.


getPageMap

Collection<List<PageBook.Page>> getPageMap()

at

void at(String uri,
        List<ActionDescriptor> actionDescriptor,
        Map<Class<? extends Annotation>,String> methodSet)


Copyright © 2014. All rights reserved.