|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
SportPageProperties defines the common interface for all classes which can use the Velocity Context to generate an instance of the class through the BeanFactory. Unfortunately, an interface cannot specify a static method, so the best I can do is outline it here in the comments.
To take advantage of the runtime Context object, these classes
must provide a static getInstance
method which returns
a new, singleton, or otherwise generated class instance.
For example, in the XML-parsing JDOMFile class, the factory method needs to extract the SAX parser class from the runtime properties, and also needs to get at the global cache map for these documents. The global properties arestored in the Velocity context as the ExtendedProperties object assigned to the GLOBAL_VAR property:
import org.apache.velocity.context.Context; ... private JDOMFile( Context context ) { this((ExtendedProperties) context .get(GLOBAL_VAR, null)); }
Naming conventions:
$Log: SportPageProperties.java,v $ Revision 1.7 2002/01/28 21:50:04 garym Improved critical error recovery; headlines now use backup script feed Revision 1.6 2002/01/28 07:01:36 garym Implement JDOM transform caching and document parse thread. Revision 1.5 2002/01/27 06:39:57 garym Added XSL transform and XML output to JDOMFile Revision 1.4 2002/01/26 06:46:29 garym authorization bug in lineups Revision 1.3 2002/01/24 21:50:32 garym updated the userguide Revision 1.2 2002/01/24 19:50:20 garym Major restructuring of beans and pagehandlers Revision 1.1 2002/01/16 23:09:24 garym Implemented the JDBC pool support and sql property beans Revision 1.1 2002/01/16 00:56:26 garym current site on cbc.ca/olympics; checkpoint release
BeanFactory
Field Summary | |
static java.lang.String |
BEAN_SUFFIX
|
static java.lang.String |
BEANFACTORY_VAR
|
static java.lang.String |
CONTEXT_VAR
|
static java.lang.String |
DATE_VAR
|
static java.lang.String |
DEFAULT_EXTS
|
static java.lang.String |
DEFAULT_INDEXES
|
static java.lang.String |
DEFAULT_PAGE_SUFFIX
|
static java.lang.String |
DEFAULT_SAX_DRIVER_CLASS
|
static java.lang.String |
DEFAULT_TIMEZONE
|
static java.lang.String |
DEFAULT_TOPIC
|
static java.lang.String |
DOM_VAR
|
static java.lang.String |
ERROR_TEMPLATE_VAR
|
static java.lang.String |
EXCEPTION_VAR
|
static java.lang.String |
EXTENSIONS_VAR
|
static java.lang.String |
FALSE
|
static java.lang.String |
GLOBAL_VAR
|
static java.lang.String |
HOME_PROPERTY
|
static java.lang.String |
INCLUDE_EXTS_PROPERTY
|
static java.lang.String |
INCLUDE_VAR
|
static java.lang.String |
INDEX_INDICATOR_VAR
|
static java.lang.String |
INDEX_TEMPLATE_VAR
|
static java.lang.String |
LAYOUT_TEMPLATE_VAR
|
static java.lang.String |
MACRO_LIB_PROPERTY
|
static java.lang.String |
MISSING_TEMPLATE_VAR
|
static java.lang.String |
OUTPUT_VAR
|
static long |
PAGE_EXPIRE
|
static java.lang.String |
PAGE_TEMPLATE_VAR
|
static java.lang.String |
PANIC_404_PAGE
|
static java.lang.String |
PANIC_404_PROPERTY
|
static java.lang.String |
PANIC_500_PAGE
|
static java.lang.String |
PANIC_500_PROPERTY
|
static java.lang.String |
PARAM_PARSER_VAR
|
static java.lang.String |
PATH_VAR
|
static java.lang.String |
REQUEST_VAR
|
static java.lang.String |
RESPONSE_VAR
|
static java.lang.String |
SAX_CLASS_PROPERTY
|
static java.lang.String |
SERVLET_DEBUG
|
static java.lang.String |
SERVLET_LOGCONF_PROPERTY
|
static java.lang.String |
SQL_SUFFIX
|
static java.lang.String |
TEMPLATE_PATHS_PROPERTY
|
static java.lang.String |
TIMEZONE_PROPERTY
|
static java.lang.String |
TRUE
|
static java.lang.String |
URI_VAR
|
static java.lang.String |
VELOCITY_LOGFILE_DEFAULT
|
static java.lang.String |
VELOCITY_LOGFILE_PROPERTY
|
static java.lang.String |
XML_EXTS
|
static java.lang.String |
XML_EXTS_PROPERTY
|
static java.lang.String |
XML_PATHS_PROPERTY
|
static java.lang.String |
XML_SUFFIX
|
static java.lang.String |
XSL_EXTS
|
static java.lang.String |
XSL_EXTS_PROPERTY
|
static java.lang.String |
XSL_PATHS_PROPERTY
|
Field Detail |
public static final java.lang.String TRUE
public static final java.lang.String FALSE
public static final java.lang.String SERVLET_LOGCONF_PROPERTY
public static final java.lang.String SERVLET_DEBUG
public static final java.lang.String TIMEZONE_PROPERTY
public static final java.lang.String HOME_PROPERTY
public static final java.lang.String TEMPLATE_PATHS_PROPERTY
public static final java.lang.String MACRO_LIB_PROPERTY
public static final java.lang.String VELOCITY_LOGFILE_PROPERTY
public static final java.lang.String VELOCITY_LOGFILE_DEFAULT
public static final java.lang.String SAX_CLASS_PROPERTY
public static final java.lang.String DEFAULT_SAX_DRIVER_CLASS
public static final java.lang.String XML_PATHS_PROPERTY
public static final java.lang.String XSL_PATHS_PROPERTY
public static final java.lang.String GLOBAL_VAR
public static final java.lang.String CONTEXT_VAR
public static final java.lang.String RESPONSE_VAR
public static final java.lang.String REQUEST_VAR
public static final java.lang.String OUTPUT_VAR
public static final java.lang.String URI_VAR
public static final java.lang.String INDEX_INDICATOR_VAR
public static final java.lang.String INDEX_TEMPLATE_VAR
public static final java.lang.String PAGE_TEMPLATE_VAR
public static final java.lang.String MISSING_TEMPLATE_VAR
public static final java.lang.String ERROR_TEMPLATE_VAR
public static final java.lang.String LAYOUT_TEMPLATE_VAR
public static final java.lang.String EXTENSIONS_VAR
public static final java.lang.String PATH_VAR
public static final java.lang.String DATE_VAR
public static final java.lang.String EXCEPTION_VAR
public static final java.lang.String PARAM_PARSER_VAR
public static final java.lang.String BEANFACTORY_VAR
public static final java.lang.String INCLUDE_EXTS_PROPERTY
public static final java.lang.String INCLUDE_VAR
public static final java.lang.String XML_EXTS_PROPERTY
public static final java.lang.String XSL_EXTS_PROPERTY
public static final java.lang.String XML_EXTS
public static final java.lang.String XSL_EXTS
public static final java.lang.String DOM_VAR
public static final java.lang.String DEFAULT_TOPIC
public static final java.lang.String DEFAULT_INDEXES
public static final java.lang.String DEFAULT_PAGE_SUFFIX
public static final java.lang.String DEFAULT_EXTS
public static final java.lang.String XML_SUFFIX
public static final java.lang.String BEAN_SUFFIX
public static final java.lang.String SQL_SUFFIX
public static final java.lang.String DEFAULT_TIMEZONE
public static final long PAGE_EXPIRE
public static final java.lang.String PANIC_404_PROPERTY
public static final java.lang.String PANIC_404_PAGE
public static final java.lang.String PANIC_500_PROPERTY
public static final java.lang.String PANIC_500_PAGE
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Javadocs generated Tue Apr 23 01:08:36 EDT 2002 by garym@maya.dyndns.org
Copyright © 2002 Canadian Broadcasting Corp