to.etc.domui.state
Class PageMaker

java.lang.Object
  extended by to.etc.domui.state.PageMaker

public class PageMaker
extends java.lang.Object

This static class helps with constructing pages from NodeContainer classes that are marked as being usable as pages. Parking class which holds the code to create a page class, including all embellishments.

Author:
Frits Jalvingh Created on Jun 23, 2008

Constructor Summary
PageMaker()
           
 
Method Summary
static Page findPageInConversation(IRequestContext rctx, java.lang.Class<? extends UrlPage> clz, java.lang.String cid)
          This tries to locate the specified page class in the conversation specified, and returns null if the page cannot be located.
static
<T extends UrlPage>
java.lang.reflect.Constructor<T>
getBestPageConstructor(java.lang.Class<T> clz, boolean hasparam)
           
static java.lang.Class<? extends ConversationContext> getConversationType(java.lang.reflect.Constructor<? extends UrlPage> clz)
          From a page constructor, get the Conversation class to use.
static
<T extends UrlPage>
java.lang.reflect.Constructor<T>
getPageConstructor(java.lang.Class<T> clz, java.lang.Class<? extends ConversationContext> ccclz, boolean hasparam)
          Finds the best constructor to use for the given page and the given conversation context.
static boolean pageAcceptsParameters(Page pg, PageParameters papa)
          FIXME Move to WindowSession?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageMaker

public PageMaker()
Method Detail

findPageInConversation

public static Page findPageInConversation(IRequestContext rctx,
                                          java.lang.Class<? extends UrlPage> clz,
                                          java.lang.String cid)
                                   throws java.lang.Exception
This tries to locate the specified page class in the conversation specified, and returns null if the page cannot be located. It is a helper function to allow access to components from Parts etc.

Throws:
java.lang.Exception

pageAcceptsParameters

public static boolean pageAcceptsParameters(Page pg,
                                            PageParameters papa)
                                     throws java.lang.Exception
FIXME Move to WindowSession?

Parameters:
pg -
papa -
Returns:
Throws:
java.lang.Exception

getBestPageConstructor

public static <T extends UrlPage> java.lang.reflect.Constructor<T> getBestPageConstructor(java.lang.Class<T> clz,
                                                                                          boolean hasparam)

getPageConstructor

public static <T extends UrlPage> java.lang.reflect.Constructor<T> getPageConstructor(java.lang.Class<T> clz,
                                                                                      java.lang.Class<? extends ConversationContext> ccclz,
                                                                                      boolean hasparam)
Finds the best constructor to use for the given page and the given conversation context.

Parameters:
clz -
ccclz -
hasparam -
Returns:

getConversationType

public static java.lang.Class<? extends ConversationContext> getConversationType(java.lang.reflect.Constructor<? extends UrlPage> clz)
From a page constructor, get the Conversation class to use.

Parameters:
clz -
Returns: