Class AWStaticSiteGenerator

  extended by ariba.ui.aribaweb.util.AWStaticSiteGenerator

public class AWStaticSiteGenerator
extends java.lang.Object

Used to statically render a site by internally "spidering". How it works: - As page is rendered, actions are *immediately evaluated* to get the destination component. - The URL for the action results are then determined (by asking the component its Naming.staticPath() (if it knows how to determine is static URL from its state) or using the template name (if not). - Components with previously unseeing URLs are enqueued for generation as well. - Resources urls (for .css, .js, and images) trigger callbacks. Their files are copied and an aliased url (relative to the current component's relative path) is returned. - Referenced .css files are scanned for additional resource ("url(...)") references, and these are processed as well. Limitations: This is only intended for a limited class of (essentially stateless) navigation only sites. E.g.: - No Dynamic forms - No components that update internal state and return same component (e.g. internal tab sets) Note that this class does have a main() and can be used to generate a site for an appropriately formatted source directory (without compiling it), as long as the site uses only static .awls, expr, and inline groovy. This support is used to generate the static website.

Nested Class Summary
static class AWStaticSiteGenerator.ExtendedDefaultApplication
static interface AWStaticSiteGenerator.Naming
Constructor Summary
AWStaticSiteGenerator( outputDir)
Method Summary
 void didCreateRequestContext(AWRequestContext requestContext)
 java.lang.String formatUrlForResource(java.lang.String urlPrefix, AWResource resource, boolean forCache)
static void main(java.lang.String[] args)
 java.lang.String note(AWComponent component)
 void processFromRoot(AWComponent startPage)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AWStaticSiteGenerator( outputDir)
Method Detail


public java.lang.String formatUrlForResource(java.lang.String urlPrefix,
                                             AWResource resource,
                                             boolean forCache)


public java.lang.String note(AWComponent component)


public void didCreateRequestContext(AWRequestContext requestContext)


public void processFromRoot(AWComponent startPage)


public static void main(java.lang.String[] args)

AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.