|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.base.DefaultContainer
org.norther.tammi.spray.filter.AbstractContainerFilter
org.norther.tammi.spray.media.AbstractMediaContentFilter
public abstract class AbstractMediaContentFilter
An abstract implementation of MediaContentFilter.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
AbstractMediaContentFilter()
Contructs a new filter. |
|
| Method Summary | |
|---|---|
void |
clearFixedPaths()
Clears all fixed content paths. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
|
Set |
fixedKeySet()
Returns a read-only set of fixed path keys. |
protected String |
getContentPath(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the path info as the content path without the service key and value, if any. |
protected String |
getFixedPath(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the fixed path mapped to the path info as the content path. |
String |
getFixedPath(String key)
Gets a fixed content path. |
protected Resource |
getResource(String type,
String path,
boolean cached,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the resource. |
protected MediaProvider |
getResourceProvider(String type)
Gets the type specific provider. |
void |
removeFixedPath(String key)
Removes a fixed content path. |
void |
setFixedPath(String key,
String path)
Sets a fixed content path. |
| Methods inherited from class org.norther.tammi.spray.filter.AbstractContainerFilter |
|---|
destroy, getFilter, getFilterConfig, getRequestMap, getSessionMap, init |
| Methods inherited from class org.norther.tammi.core.base.DefaultContainer |
|---|
clear, containsKey, get, getContainerKey, getContainerKey, getContainerKey, getMBean, getMBeanHandle, getMBeanHandles, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, remove, setMBeanInterface, setQueryPattern, setQueryPattern |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.base.Container |
|---|
clear, containsKey, get, getContainerKey, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, remove, setMBeanInterface, setQueryPattern, setQueryPattern |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Constructor Detail |
|---|
public AbstractMediaContentFilter()
| Method Detail |
|---|
public String getFixedPath(String key)
MediaContentFilter
getFixedPath in interface MediaContentFilterkey - the path key.
public void setFixedPath(String key,
String path)
MediaContentFilter
setFixedPath in interface MediaContentFilterkey - the path key.path - a fixed content path.public void removeFixedPath(String key)
MediaContentFilter
removeFixedPath in interface MediaContentFilterkey - the path key.public void clearFixedPaths()
MediaContentFilter
clearFixedPaths in interface MediaContentFilterpublic Set fixedKeySet()
MediaContentFilter
fixedKeySet in interface MediaContentFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws ServletException,
IOException
doFilter in interface FilterdoFilter in class AbstractContainerFilterServletException
IOExceptionprotected MediaProvider getResourceProvider(String type)
type - the Mime type.
NullPointerException - if type is null.
protected Resource getResource(String type,
String path,
boolean cached,
ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ConstructionException,
AccessDeniedException
type - the content type.path - the resource path.cached - true if caching is enabled, false otherwise.request - the request.response - the response.chain - the filter chain.
IOException - on I/O errors.
ConstructionException - on resource errors.
AccessDeniedException - for access restrictions.
protected String getContentPath(ServletRequest request,
ServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
protected String getFixedPath(ServletRequest request,
ServletResponse response,
FilterChain chain)
request - the request.response - the response.chain - the filter chain.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||