org.jasig.portal.io
Class ChannelTitleIncorporationWiterFilter

java.lang.Object
  extended by java.io.Writer
      extended by org.jasig.portal.io.AbstractTokenReplacementFilter
          extended by org.jasig.portal.io.ChannelTitleIncorporationWiterFilter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class ChannelTitleIncorporationWiterFilter
extends AbstractTokenReplacementFilter

Provides for streaming token replacement with a character stream.

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
static int MAX_CHANNEL_ID_LENGTH
           
static String TITLE_TOKEN_PREFIX
           
static String TITLE_TOKEN_SUFFIX
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
ChannelTitleIncorporationWiterFilter(Writer wrappedWriter, ChannelManager channelManager, IUserLayoutManager userLayoutManager)
           
 
Method Summary
protected  String replaceToken(String channelId)
          Called when a token is found and needs to be replaced.
 
Methods inherited from class org.jasig.portal.io.AbstractTokenReplacementFilter
close, flush, write, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE_TOKEN_PREFIX

public static final String TITLE_TOKEN_PREFIX
See Also:
Constant Field Values

MAX_CHANNEL_ID_LENGTH

public static final int MAX_CHANNEL_ID_LENGTH
See Also:
Constant Field Values

TITLE_TOKEN_SUFFIX

public static final String TITLE_TOKEN_SUFFIX
See Also:
Constant Field Values
Constructor Detail

ChannelTitleIncorporationWiterFilter

public ChannelTitleIncorporationWiterFilter(Writer wrappedWriter,
                                            ChannelManager channelManager,
                                            IUserLayoutManager userLayoutManager)
Parameters:
wrappedWriter - Writer to delegate writing to.
channelManager - Used to load the dynamic channel title.
userLayoutManager - Used to access the default title if no dynamic title is provided.
Method Detail

replaceToken

protected String replaceToken(String channelId)
Description copied from class: AbstractTokenReplacementFilter
Called when a token is found and needs to be replaced.

Specified by:
replaceToken in class AbstractTokenReplacementFilter
Parameters:
channelId - The found token (text between prefix and suffix)
Returns:
The string to replace the prefix + token + suffix with.


Copyright © 2010 Jasig. All Rights Reserved.