{
rewriters.clear();
if ( rewriters.size() > 0 && _log.isInfoEnabled() )
{
InternalStringBuilder message = new InternalStringBuilder();
message.append( "Register exclusive URLRewriter, \"");
message.append( rewriter.getClass().getName() );
message.append( "\". This removes any other URLRewriter objects already registered in the chain." );
_log.info( message.toString() );
}
}
rewriters.add( index, rewriter );
}
}
else
{
if ( _log.isInfoEnabled() )
{
InternalStringBuilder message = new InternalStringBuilder();
message.append( "Cannot register URLRewriter, \"");
message.append( rewriter.getClass().getName() );
message.append( "\". The URLRewriter, \"" );
message.append( rewriters.get( 0 ).getClass().getName() );
message.append( "\", is already registered and does not allow other rewriters." );
_log.info( message.toString() );
}
return false;
}