org.norther.tammi.spray.media
Interface MediaContentFilter<M extends MediaProvider>

Type Parameters:
M - the registered provider type.
All Superinterfaces:
Container<M>, ContainerFilter<M>, ContentFilter, Filter, TerminationFilter
All Known Subinterfaces:
MediaContentKeyFilter<M>
All Known Implementing Classes:
AbstractMediaContentKeyFilter, DefaultMediaContentFilter, DefaultMediaContentKeyFilter

public interface MediaContentFilter<M extends MediaProvider>
extends ContainerFilter<M>, ContentFilter, TerminationFilter

An interface to filters processing requests referring to media content. MIME type specific media providers registered to the container resolve media content.

Version:
$Id: MediaContentFilter.java,v 1.8 2009/09/30 20:16:02 cvsimp Exp $
Author:
Ilkka Priha

Method Summary
 void clearFixedPaths()
          Clears all fixed content paths.
 Set<String> fixedKeySet()
          Returns a read-only set of fixed path keys.
 String getFixedPath(String key)
          Gets a fixed content path.
 int getMaxAge()
          Gets the max caching age of content i clients.
 boolean isLocalizedContent()
          Gets the localized content flag.
 void removeFixedPath(String key)
          Removes a fixed content path.
 void setFixedPath(String key, String path)
          Sets a fixed content path.
 void setLocalizedContent(boolean flag)
          Sets the localized content flag.
 void setMaxAge(int secs)
          Sets the max caching age of content in clients.
 
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 org.norther.tammi.spray.media.ContentFilter
getContentPath
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 

Method Detail

isLocalizedContent

boolean isLocalizedContent()
Gets the localized content flag.

Returns:
the localized content flag.

setLocalizedContent

void setLocalizedContent(boolean flag)
Sets the localized content flag. Localized media content names are formed by inserting the locale string between the plain name and the extension.

Parameters:
flag - the localized content flag.

getMaxAge

int getMaxAge()
Gets the max caching age of content i clients.

Returns:
the max age in seconds.

setMaxAge

void setMaxAge(int secs)
Sets the max caching age of content in clients.

Parameters:
secs - the max age in seconds (-1 = forever).

getFixedPath

String getFixedPath(String key)
Gets a fixed content path.

Parameters:
key - the path key.
Returns:
a fixed content path.

setFixedPath

void setFixedPath(String key,
                  String path)
Sets a fixed content path.

Parameters:
key - the path key.
path - a fixed content path.

removeFixedPath

void removeFixedPath(String key)
Removes a fixed content path.

Parameters:
key - the path key.

clearFixedPaths

void clearFixedPaths()
Clears all fixed content paths.


fixedKeySet

Set<String> fixedKeySet()
Returns a read-only set of fixed path keys.

Returns:
a set of fixed keys.


Copyright © 2004 The Norther Organization. All rights reserved.