*
* @param pageURLRewriter application specific PageURLRewriter.
*/
public void setPageURLRewriter(PageURLRewriter pageURLRewriter) {
// Get global rewriter (this is never null).
RuntimePageURLRewriter globalRewriter = Volantis.getInstance().getPageURLRewriter();
// If global rewriter contains user-defined rewriter and application
// specific rewriter is specified, combine them both into single
// rewriter. Otherwise, use one or none of them.
if ((pageURLRewriter != null) && globalRewriter.isUserDefinedRewriter()) {
this.pageURLRewriter = new CombinedPageURLRewriter(
globalRewriter, pageURLRewriter);
} else {
this.pageURLRewriter = globalRewriter.isUserDefinedRewriter() ?
globalRewriter : pageURLRewriter;
}
}