|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.LockableImpl
com.arsdigita.cms.dispatcher.ServiceDispatcher
The Service Dispatcher handles common services shared across all CMS instances. This dispatcher is called by the Subsite dispatcher.
Here are the steps for a request to http://yourserver/cms-service/cheese:
A client sends a request to the web server, which passes it on to the global ACS dispatcher.
The global ACS dispatcher examines the first part of the URL, notices that the Content Center application is mounted at /cms-service and hands the request to the CMS Service dispatcher.
The CMS Service dispatcher determines whether a Page has been registered to the URL /cheese.
If no Page is registered to the URL /cheese,
then the CMS Service dispatcher hands the request to the
JSPApplicationDispatcher
,
which serves JSPs and static content from the
/packages/cms/www.
Nested Class Summary | |
protected static class |
ServiceDispatcher.PageClassConfigHandler
SAX event handler class for parsing configuration file. |
Field Summary | |
static String |
versionId
|
Constructor Summary | |
ServiceDispatcher()
|
Method Summary | |
protected void |
addResource(String url,
String className)
Map a page to a URL. |
protected void |
checkUserAccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
com.arsdigita.dispatcher.RequestContext actx)
Deprecated. subclasses of ResourceHandler should check the permissions directly on the ContentItem being served. This method currently acts as a no-op |
void |
dispatch(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
com.arsdigita.dispatcher.RequestContext actx)
Handles requests made to the Content Center package. |
protected ResourceHandler |
getResource(String url)
Fetch a page based on the URL stub. |
protected org.xml.sax.helpers.DefaultHandler |
newParseConfigHandler(Map map)
Expirimental Returns a SAX event handler object for setting up a MapDispatcher using an XML config file. |
protected void |
redirectToLoginPage(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Redirects the client to the login page, setting the return url to the current request URI. |
static void |
releaseResource(String url)
Release the page at the specified URL. |
void |
requireTrailingSlash(String url)
Adds a URL to the list of URLs that are required to have trailing slashes. |
void |
setNotFoundDispatcher(com.arsdigita.dispatcher.Dispatcher d)
sets the default page to display if no page can be found for the URL in the page map on dispatch. |
Methods inherited from class com.arsdigita.util.LockableImpl |
isLocked, lock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public ServiceDispatcher()
Method Detail |
public void dispatch(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, com.arsdigita.dispatcher.RequestContext actx) throws IOException, javax.servlet.ServletException
dispatch
in interface com.arsdigita.dispatcher.Dispatcher
request
- The HTTP requestresponse
- The HTTP responseactx
- The request context
IOException
javax.servlet.ServletException
public final void setNotFoundDispatcher(com.arsdigita.dispatcher.Dispatcher d)
public void requireTrailingSlash(String url)
protected ResourceHandler getResource(String url) throws javax.servlet.ServletException
url
- The URL stub following the site-node URL
javax.servlet.ServletException
protected void addResource(String url, String className)
url
- The URLclassName
- The name of the ResourceHandler classpublic static void releaseResource(String url)
url
- The URLprotected void checkUserAccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, com.arsdigita.dispatcher.RequestContext actx) throws javax.servlet.ServletException
request
- The HTTP requestresponse
- The HTTP responseactx
- The request context
javax.servlet.ServletException
protected void redirectToLoginPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException
javax.servlet.ServletException
- If there is an exception thrown while
trying to redirect, wrap that exception in a ServletExceptionprotected org.xml.sax.helpers.DefaultHandler newParseConfigHandler(Map map)
map
- A map to configure
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |