ca.cbc.sportwire.servlet.pagehandlers
Class PageHandlerFactory
java.lang.Object
|
+--ca.cbc.sportwire.servlet.pagehandlers.PageHandlerFactory
- public class PageHandlerFactory
- extends java.lang.Object
PageHandlerFactory.java: Return the appropriate page
handler instance depending on the context of the request.
Created: Wed Dec 5 22:59:57 2001
$Log: PageHandlerFactory.java,v $
Revision 1.6 2002/01/24 19:50:21 garym
Major restructuring of beans and pagehandlers
Revision 1.5 2002/01/14 21:51:46 garym
bug fixes in topics and config files migration to Extended Properties
Revision 1.4 2001/12/23 17:55:23 garym
Allow for multiple SportPage apps on one JVM
Revision 1.3 2001/12/06 16:29:51 garym
Implemented DOM object support and the Bio page handler
Revision 1.2 2001/12/06 07:26:39 garym
Genertes simple layouts; page parts in Properties
Revision 1.1 2001/12/06 04:58:00 garym
DefaultPage now take template parts from properties
- Version:
- $Id: PageHandlerFactory.java,v 1.6 2002/01/24 19:50:21 garym Exp $
- Author:
- Gary Lawrence Murphy
Field Summary |
(package private) static org.apache.log4j.Category |
cat
|
Method Summary |
static java.lang.String |
capLast(java.lang.String pkg)
capLast : A utility function that capitalizes the
last token in a dot-seperated string of tokens. |
protected static PageHandler |
findHandler(org.apache.commons.collections.ExtendedProperties sc,
java.lang.String pathinfo)
getHandler : Takes the propsective fully qualified
Java class name and tries to load that class as a
PageHandler ; if the load fails, the last token is
stripped off, the new last token capitalized, and the method
calls itself recursively. |
static PageHandler |
getHandler(org.apache.commons.collections.ExtendedProperties sc,
java.lang.String uri)
|
private static java.lang.String |
parentPackage(java.lang.String path)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
cat
static org.apache.log4j.Category cat
PageHandlerFactory
private PageHandlerFactory()
parentPackage
private static java.lang.String parentPackage(java.lang.String path)
capLast
public static java.lang.String capLast(java.lang.String pkg)
capLast
: A utility function that capitalizes the
last token in a dot-seperated string of tokens. This is used
to turn a path into a java classname.
- Parameters:
pkg
- a String
package name- Returns:
- a
String
findHandler
protected static PageHandler findHandler(org.apache.commons.collections.ExtendedProperties sc,
java.lang.String pathinfo)
getHandler
: Takes the propsective fully qualified
Java class name and tries to load that class as a
PageHandler
; if the load fails, the last token is
stripped off, the new last token capitalized, and the method
calls itself recursively. If it runs out without finding a
valid handler, BasicPageHandler
is returned.
- Parameters:
pathinfo
- a dot-separated String
- Returns:
- a
PageHandler
getHandler
public static final PageHandler getHandler(org.apache.commons.collections.ExtendedProperties sc,
java.lang.String uri)