Project Wonder 5.0

er.extensions.appserver
Interface ERXResponseRewriter.Delegate

Enclosing class:
ERXResponseRewriter

public static interface ERXResponseRewriter.Delegate

The delegate that is called prior to adding resources into the page, which gives you a chance to deny the addition, or rewrite the addition to a custom resource.

Author:
mschrag

Method Summary
 boolean responseRewriterShouldAddResource(java.lang.String framework, java.lang.String fileName)
          Called prior to adding resources at all.
 ERXResponseRewriter.Resource responseRewriterWillAddResource(java.lang.String framework, java.lang.String fileName)
          Provides the ability to override the requested framework and fileName with a custom alternative.
 

Method Detail

responseRewriterShouldAddResource

boolean responseRewriterShouldAddResource(java.lang.String framework,
                                          java.lang.String fileName)
Called prior to adding resources at all. Returning false will skip the addition completely.

Parameters:
framework - the requested framework of the addition (can be null)
fileName - the requested fileName of the addition (can be a URL, absolute path, or relative resource path)
Returns:
true if the resource should be added

responseRewriterWillAddResource

ERXResponseRewriter.Resource responseRewriterWillAddResource(java.lang.String framework,
                                                             java.lang.String fileName)
Provides the ability to override the requested framework and fileName with a custom alternative. For example, if you want to replace all "Ajax" "prototype.js" imports, you can provide your own alternative "app" "prototype.js".

Parameters:
framework - the requested framework of the addition (can be null)
fileName - the requested fileName of the addition (can be a URL, absolute path, or relative resource path)
Returns:
an alternative Resource, or null to use the requested resource

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.