com.endeca.infront.content.source
Class AbstractContentSource
java.lang.Object
com.endeca.infront.content.source.AbstractContentSource
- All Implemented Interfaces:
- ContentSource
- Direct Known Subclasses:
- AuthoringContentSource, LiveContentSource
public abstract class AbstractContentSource
- extends Object
- implements ContentSource
Base implementation of the ContentSource interface.
Provides an empty destroy()
method and a working
implementation of resolveContent(HttpServletRequest)
which makes use of the abstract
ContentSource.resolveContent(String)
method.
Constructor Summary |
AbstractContentSource(String defaultSiteRootPath)
Constructs a content source with the given default site root path. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultSiteRootPath
protected String defaultSiteRootPath
AbstractContentSource
public AbstractContentSource(String defaultSiteRootPath)
- Constructs a content source with the given default site root path.
- Parameters:
defaultSiteRootPath
- If a valid content URI cannot be
extracted from the request in the
resolveContent(HttpServletRequest)
method, it will
attempt to resolve the content URI using this default site root
path.
resolveContent
public ContentLocator resolveContent(HttpServletRequest request)
throws ContentException
- Attempts to resolve content based on the given request.
If a valid content URI cannot be extracted from the request, we
will attempt to resolve the content URI using the default site
root path that was provided when this object was constructed.
- Specified by:
resolveContent
in interface ContentSource
- Parameters:
request
- The HttpServletRequest
containing the content URI.
- Returns:
- a
ContentLocator
with the information that was inferred from the HttpServletRequest
.
- Throws:
ContentException
- Thrown when there is an error accessing or forming content.
destroy
public void destroy()
- Empty implementation of the destroy method
- Specified by:
destroy
in interface ContentSource
Copyright © 2012. All Rights Reserved.