PageMixer demonstration with Servlet

pagemixer.servlet
Class CustomContextFactory

java.lang.Object
  |
  +--jp.ne.dti.lares.foozy.pagemixer.servlet.ContextFactory
        |
        +--pagemixer.servlet.CustomContextFactory
All Implemented Interfaces:
LocaleConstants, LocaleKeys, ServletConstants, ServletKeys

public class CustomContextFactory
extends jp.ne.dti.lares.foozy.pagemixer.servlet.ContextFactory
implements LocaleKeys, ServletKeys

Custom implementation of "ContextFactory".


Fields inherited from interface common.LocaleKeys
KEY_LOCALE_ENTRY, KEY_LOCALE_ENTRY_PROVIDER, KEY_PARAM_LOCALE, KEY_SESSION_LOCALE
 
Fields inherited from interface common.LocaleConstants
CLASS_LOCALE, CLASS_LOCALE_ENTRY, PARAM_LOCALE, REQUEST_LOCALE_ENTRY, REQUEST_LOCALE_ENTRY_PROVIDER, SESSION_LOCALE
 
Fields inherited from interface common.ServletKeys
KEY_BASE_HREF
 
Fields inherited from interface common.ServletConstants
INIT_AUTH_PASSWORD, INIT_AUTH_USERNAME, INIT_PAGE_AUTH, INIT_PAGE_SHOP_BASKET, INIT_PAGE_TOP, REQUEST_BASE_HREF
 
Constructor Summary
CustomContextFactory()
          Constructor.
 
Method Summary
 jp.ne.dti.lares.foozy.pagemixer.mixer.ConsumerContext create(javax.servlet.http.HttpServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create ConsumerContext.
 
Methods inherited from class jp.ne.dti.lares.foozy.pagemixer.servlet.ContextFactory
cleanup, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomContextFactory

public CustomContextFactory()
Constructor.
Method Detail

create

public jp.ne.dti.lares.foozy.pagemixer.mixer.ConsumerContext create(javax.servlet.http.HttpServlet servlet,
                                                                    javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)
                                                             throws java.io.IOException
Create ConsumerContext.

You can customize ConsumerContext creation procedure, for example:

This implementation returns one containing values shown below:

"ListDataProvider" identified by KEY_LOCALE_ENTRY_PROVIDER
this provider contains "Locale" objects from HTTP request header
String identified by KEY_BASE_HREF
this is for "href" value of "base" tag
Overrides:
create in class jp.ne.dti.lares.foozy.pagemixer.servlet.ContextFactory
Parameters:
servlet - of current request
request - of current request to Servlet
response - of current request to Servlet

PageMixer demonstration with Servlet