ariba.ui.aribaweb.util
Class AWStaticSiteGenerator

java.lang.Object
  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 aribaweb.org static website.


Nested Class Summary
static class AWStaticSiteGenerator.ExtendedDefaultApplication
           
static interface AWStaticSiteGenerator.Naming
           
 
Constructor Summary
AWStaticSiteGenerator(java.io.File 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

AWStaticSiteGenerator

public AWStaticSiteGenerator(java.io.File outputDir)
Method Detail

formatUrlForResource

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

note

public java.lang.String note(AWComponent component)

didCreateRequestContext

public void didCreateRequestContext(AWRequestContext requestContext)

processFromRoot

public void processFromRoot(AWComponent startPage)

main

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


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