com.arsdigita.cms
Class ContentSectionServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.arsdigita.web.BaseServlet
              extended bycom.arsdigita.web.BaseApplicationServlet
                  extended bycom.arsdigita.cms.ContentSectionServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ContentSectionServlet
extends com.arsdigita.web.BaseApplicationServlet

See Also:
Serialized Form

Field Summary
static String CONTENT_ITEM
           
static String CONTENT_SECTION
           
static String FILE_SUFFIX
           
static String INDEX_FILE
           
static String MEDIA_TYPE
           
static String PREVIEW
          The context for previewing items
static Map s_itemResolverCache
           
static String XML_MODE
           
static String XML_SUFFIX
           
 
Fields inherited from class com.arsdigita.web.BaseApplicationServlet
APPLICATION_ID_ATTRIBUTE, APPLICATION_ID_PARAMETER, versionId
 
Fields inherited from class com.arsdigita.web.BaseServlet
REQUEST_URL_ATTRIBUTE
 
Constructor Summary
ContentSectionServlet()
           
 
Method Summary
protected  void doService(javax.servlet.http.HttpServletRequest sreq, javax.servlet.http.HttpServletResponse sresp, com.arsdigita.web.Application app)
           
 ContentItem getItem(ContentSection section, String url)
           
 ContentItem getItem(ContentSection section, String url, ItemResolver itemResolver)
           
 ItemResolver getItemResolver(ContentSection section)
          Fetches the ItemResolver for a content section.
static ContentItem itemURLCacheGet(ContentSection section, String sURL)
          Fetches the ContentItem published at that URL from the cache
static void itemURLCachePut(ContentSection section, String sURL, ContentItem item)
          Maps the content item to the URL in a cache
static void itemURLCacheRemove(ContentSection section, String sURL)
          Removes the cache entry for the URL, sURL
 
Methods inherited from class com.arsdigita.web.BaseApplicationServlet
doService
 
Methods inherited from class com.arsdigita.web.BaseServlet
destroy, doDestroy, doGet, doInit, doPost, getUserContext, init
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_itemResolverCache

public static Map s_itemResolverCache

PREVIEW

public static final String PREVIEW
The context for previewing items

See Also:
Constant Field Values

FILE_SUFFIX

public static final String FILE_SUFFIX
See Also:
Constant Field Values

INDEX_FILE

public static final String INDEX_FILE
See Also:
Constant Field Values

CONTENT_ITEM

public static final String CONTENT_ITEM
See Also:
Constant Field Values

CONTENT_SECTION

public static final String CONTENT_SECTION
See Also:
Constant Field Values

XML_SUFFIX

public static final String XML_SUFFIX
See Also:
Constant Field Values

XML_MODE

public static final String XML_MODE
See Also:
Constant Field Values

MEDIA_TYPE

public static final String MEDIA_TYPE
See Also:
Constant Field Values
Constructor Detail

ContentSectionServlet

public ContentSectionServlet()
Method Detail

doService

protected void doService(javax.servlet.http.HttpServletRequest sreq,
                         javax.servlet.http.HttpServletResponse sresp,
                         com.arsdigita.web.Application app)
                  throws javax.servlet.ServletException,
                         IOException
Throws:
javax.servlet.ServletException
IOException
See Also:
(HttpServletRequest, HttpServletResponse, Application)

getItemResolver

public ItemResolver getItemResolver(ContentSection section)
Fetches the ItemResolver for a content section. Checks cache first.

Parameters:
section - The content section
Returns:
The ItemResolver associated with the content section

getItem

public ContentItem getItem(ContentSection section,
                           String url,
                           ItemResolver itemResolver)

getItem

public ContentItem getItem(ContentSection section,
                           String url)

itemURLCachePut

public static void itemURLCachePut(ContentSection section,
                                   String sURL,
                                   ContentItem item)
Maps the content item to the URL in a cache

Parameters:
section - the content section in which the content item is published
sURL - the URL at which the content item s published
item - the content item at the URL

itemURLCacheRemove

public static void itemURLCacheRemove(ContentSection section,
                                      String sURL)
Removes the cache entry for the URL, sURL

Parameters:
section - the content section in which to remove the key
sURL - the cache entry key to remove

itemURLCacheGet

public static ContentItem itemURLCacheGet(ContentSection section,
                                          String sURL)
Fetches the ContentItem published at that URL from the cache

Parameters:
section - the content section in which the content item is published
sURL - the URL for the item to fetch
Returns:
the ContentItem in the cache, or null


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC