org.norther.tammi.spray.media
Class DefaultMediaContentKeyFilter<M extends MediaProvider>

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.base.DefaultContainer<V>
          extended by org.norther.tammi.spray.filter.DefaultContainerFilter<M>
              extended by org.norther.tammi.spray.media.DefaultMediaContentFilter<M>
                  extended by org.norther.tammi.spray.media.AbstractMediaContentKeyFilter<M>
                      extended by org.norther.tammi.spray.media.DefaultMediaContentKeyFilter<M>
Type Parameters:
M - the registered provider type.
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Container<M>, Manageable, MBeanDelegate, ContainerFilter<M>, KeyFilter, TerminationFilter, ContentFilter, MediaContentFilter<M>, MediaContentKeyFilter<M>

public class DefaultMediaContentKeyFilter<M extends MediaProvider>
extends AbstractMediaContentKeyFilter<M>
implements MediaContentKeyFilter<M>

A default implementation of MediaContentKeyFilter.

Version:
$Id: DefaultMediaContentKeyFilter.java,v 1.6 2009/09/28 15:08:26 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String CONTENT_KEY
          The default key.
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultMediaContentKeyFilter()
          Contructs a new filter.
DefaultMediaContentKeyFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 int getTemporaryExpirationTime()
          Gets the temporary expiration time in seconds.
 void setTemporaryContent(String path, byte[] content)
          Sets temporary content to this filter.
 void setTemporaryExpirationTime(int t)
          Sets the temporary expiration time in seconds.
 void setTemporaryResource(String path, Resource<?> res)
          Sets temporary resource to this filter.
 
Methods inherited from class org.norther.tammi.spray.media.AbstractMediaContentKeyFilter
getContentPath, getFilter, getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from class org.norther.tammi.spray.media.DefaultMediaContentFilter
clearFixedPaths, doFilter, fixedKeySet, getFixedPath, getMaxAge, getMediaProvider, getResource, isLocalizedContent, removeFixedPath, setFixedPath, setLocalizedContent, setMaxAge
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultContainerFilter
destroy, 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.spray.media.MediaContentFilter
clearFixedPaths, fixedKeySet, getFixedPath, getMaxAge, isLocalizedContent, removeFixedPath, setFixedPath, setLocalizedContent, setMaxAge
 
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
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 

Field Detail

CONTENT_KEY

public static final String CONTENT_KEY
The default key.

See Also:
Constant Field Values
Constructor Detail

DefaultMediaContentKeyFilter

public DefaultMediaContentKeyFilter()
Contructs a new filter.


DefaultMediaContentKeyFilter

public DefaultMediaContentKeyFilter(String key)
Constructs a new filter with a key.

Parameters:
key - the filter key.
Method Detail

getTemporaryExpirationTime

public int getTemporaryExpirationTime()
Description copied from interface: MediaContentKeyFilter
Gets the temporary expiration time in seconds.

Specified by:
getTemporaryExpirationTime in interface MediaContentKeyFilter<M extends MediaProvider>
Returns:
the secs.

setTemporaryExpirationTime

public void setTemporaryExpirationTime(int t)
Description copied from interface: MediaContentKeyFilter
Sets the temporary expiration time in seconds.

Specified by:
setTemporaryExpirationTime in interface MediaContentKeyFilter<M extends MediaProvider>
Parameters:
t - the secs.

setTemporaryContent

public void setTemporaryContent(String path,
                                byte[] content)
Description copied from interface: MediaContentKeyFilter
Sets temporary content to this filter.

Specified by:
setTemporaryContent in interface MediaContentKeyFilter<M extends MediaProvider>
Parameters:
path - the content path.
content - the content.

setTemporaryResource

public void setTemporaryResource(String path,
                                 Resource<?> res)
Description copied from interface: MediaContentKeyFilter
Sets temporary resource to this filter.

Specified by:
setTemporaryResource in interface MediaContentKeyFilter<M extends MediaProvider>
Parameters:
path - the content path.
res - the resource.


Copyright © 2004 The Norther Organization. All rights reserved.