PageMixer demonstration with Struts

pagemixer.filter
Class SubscriptionFormFilter

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

public class SubscriptionFormFilter
extends jp.ne.dti.lares.foozy.pagemixer.mixer.FilterPipeline
implements SubscriptionFormConstants

Filter for "SubscriptionForm" 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 properties of SubscriptionForm.

- src/demo/struts/war/WEB-INF/page/subscription.*.html
this filter (1)insets value attributes for "action"/"host"/"username"/"autoConnect" properties, (2)insets checked attribute for "type" property, (3)insets text for "host" property, and (4)trims part of HTML for "action" property.


Inner Class Summary
static class SubscriptionFormFilter.ActionAttr
          Filter to inset "action" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.AutoConnectAttr
          Filter to inset "autoConnect" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.Factory
          Factory for "CommonFilter".
static class SubscriptionFormFilter.HostAttr
          Filter to inset "host" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.HostText
          Filter to inset "host" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.TrimCreate
          Filter to trim part of token sequence by "action" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.TrimDelete
          Filter to trim part of token sequence by "action" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.TrimEdit
          Filter to trim part of token sequence by "action" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.TypeSelect
          Filter to inset "type" filed value of "SubscriptionForm".
static class SubscriptionFormFilter.TypeSelectWrap
          Filter to wrap SubscriptionFormFilter.TypeSelect.
static class SubscriptionFormFilter.UsernameAttr
          Filter to inset "username" filed value of "SubscriptionForm".
 
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.SubscriptionFormConstants
CLASS_ACTION_CREATE, CLASS_ACTION_DELETE, CLASS_ACTION_EDIT, CLASS_HOST, KEY_FORM, NAME_ACTION, NAME_AUTO_CONNECT, NAME_HOST, NAME_SUBSCRIPTION_FORM, NAME_TYPE, NAME_USERNAME
 
Fields inherited from interface common.CommonConstants
CLASS_STRUTS_ACTION
 
Constructor Summary
SubscriptionFormFilter()
          Create filter for "SubscriptionForm" 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

SubscriptionFormFilter

public SubscriptionFormFilter()
Create filter for "SubscriptionForm" 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.SubscriptionFormFilter
     {Template.html}
     {ServletName} {web.xml}
     {struts-config.xml} [{prefix} {struts-config.xml} ....] -
     {prefix} {action}
     [[{name}[={value}]] ....]
 
{Template.html}
file path of template HTML to be processed by this filter.
{ServletName}
name of Struts ActionServlet in your web.xml.
{web.xml}
path to web.xml, in which mapping information of Struts ActionServlet is described.
{struts-config.xml}
"struts-config.xml" file for "default"(= "" prefix) module.
{prefix} {struts-config.xml}
module prefix and "struts-config.xml" for that module. You can specify some pairs of module configuration. You can use "-"(hypen) as prefix of default module instead of ""(empty string), because some shell script wrapping will cause emtpy string argument discarding.
{prefix} {action}
module prefix and path of action for pseudo request. This selects module/action configurations for population of ActionForm bean. You can use "-"(hypen) as prefix of default module instead of ""(empty string).
{name}[={value}]
name and value of request parameter. This not only sets ActionForm properties, but also stores ParameterKey(jp.ne.dti.lares.foozy.pagemixer.serlvet) into context. ""(empty string) is used, if you does not specify "=".

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


PageMixer demonstration with Struts