PageMixer demonstration with Struts

pagemixer.filter
Class UserFilter

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
        |
        +--jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
              |
              +--pagemixer.filter.UserFilter
All Implemented Interfaces:
CommonConstants, jp.ne.dti.lares.foozy.pagemixer.mixer.Consumer, UserConstants

public class UserFilter
extends jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
implements UserConstants

Filter for "User" of struts-mailreader.

This filter consists of below filters

See main(java.lang.String[]) to use as stand-alone application.

Below HTML files are good to examine filter behavior according to User properties.

- src/demo/struts/war/WEB-INF/page/mainMenu.*.html
this filter insets text for "fullName" property into region between <span class="user-fullName"> and corresponded </span>.
- src/demo/struts/war/WEB-INF/page/subscription.*.html
this filter insets text for "username" property into region between <span class="user-username"> and corresponded </span>.


Inner Class Summary
static class UserFilter.Factory
          Factory for "CommonFilter".
static class UserFilter.FromAddressText
          Filter to inset "fromAddress" filed value of "User".
static class UserFilter.FullNameText
          Filter to inset "fullName" filed value of "User".
static class UserFilter.ReplyToAddressText
          Filter to inset "replyToAddress" filed value of "User".
static class UserFilter.UsernameText
          Filter to inset "username" filed value of "User".
 
Inner classes inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
jp.ne.dti.lares.foozy.pagemixer.mixer.Filter.Factory
 
Fields inherited from interface common.UserConstants
CLASS_FROM_ADDRESS, CLASS_FULL_NAME, CLASS_REPLY_TO_ADDRESS, CLASS_SUBSCRIPTIONS, CLASS_USERNAME, KEY_USER, NAME_KEY_USER
 
Fields inherited from interface common.CommonConstants
CLASS_STRUTS_ACTION
 
Constructor Summary
UserFilter()
          Create filter for "User" of struts-mailreader.
 
Method Summary
static void main(java.lang.String[] args)
          Invoke as stand-alone application.
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
add, add, add, addFactories, addFilters, consume, flush, push, push, push, pushFactories, pushFilters
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.mixer.Filter
addCleanup, clear, connectTo, getConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserFilter

public UserFilter()
Create filter for "User" of struts-mailreader.
Method Detail

main

public static void main(java.lang.String[] args)
Invoke as stand-alone application.

Usage of this class is shown below.

 pagemixer.filter.UserFilter
     {Template.html}
     {UserDatabase.xml}
     {UserName}
 
{Template.html}
file path of template HTML to be processed by this filter.
{UserDatabase.xml}
XML file for MemoryUserDatabase of Struts mail-reader demo application.
{UserName}
name of user to be handled.

Please see description of pagemixer.filter about class path requirement to execute this class.


PageMixer demonstration with Struts