org.norther.tammi.spray.media
Class DefaultServiceFilter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.base.DefaultContainer
          extended by org.norther.tammi.core.security.DefaultSecureContainer
              extended by org.norther.tammi.spray.filter.AbstractSecureContainerFilter
                  extended by org.norther.tammi.spray.filter.AbstractSecureContainerKeyFilter
                      extended by org.norther.tammi.spray.filter.DefaultSecureContainerKeyFilter
                          extended by org.norther.tammi.spray.filter.DefaultBranchingFilter
                              extended by org.norther.tammi.spray.filter.DefaultLinkFilter
                                  extended by org.norther.tammi.spray.locale.DefaultPipeFilter
                                      extended by org.norther.tammi.spray.media.DefaultServiceFilter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Localizer, Container, Manageable, MBeanDelegate, Refreshable, CacheClient, FallbackMap, FallbackResources, ResourceMap, AccessController, SecureContainer, BranchingFilter, ContainerFilter, ContainerKeyFilter, KeyFilter, LinkFilter, SecureContainerFilter, SecureContainerKeyFilter, SecureFilter, PipeFilter, ResourceFilter, ServiceFilter

public class DefaultServiceFilter
extends DefaultPipeFilter
implements ServiceFilter

A default implementation of ServiceFilter.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String SERVICE_KEY
          The service key.
 
Fields inherited from class org.norther.tammi.spray.locale.DefaultPipeFilter
PIPE_KEY
 
Fields inherited from class org.norther.tammi.spray.filter.DefaultLinkFilter
LINK_KEY
 
Fields inherited from class org.norther.tammi.spray.filter.DefaultBranchingFilter
BRANCH_KEY
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.acorn.locale.Localizer
ANY_NAME
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultServiceFilter()
          Constructs a new filter.
DefaultServiceFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 String getBranchKey(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets the branch key of the selected branch for the specified request.
 String getContentKey()
          Gets the content filter key.
 boolean isMediaPriority()
          Checks whether media content has priority over other services.
 void setContentKey(String key)
          Sets the content filter key.
 void setMediaPriority(boolean flag)
          Sets whether media content has priority over other services and the content key applied to the requested service instead of the default key when an explicit service is not specified, the path info of the request is not empty and it contains a valid media type extension, which is not terminal's default extension.
 
Methods inherited from class org.norther.tammi.spray.locale.DefaultPipeFilter
clearCached, clearResourceBundleNames, expireCached, expireFraction, getCache, getDefaultBaseName, getFallbackBaseName, getFallbackBundle, getFallbackBundle, getFallbackResourcesName, getPlugInBaseName, getRefreshed, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceFinderName, isCachingDisabled, qualifierSet, refresh, removeCache, removeResourceBundleName, resolveFallbackBundle, resolveFallbackBundle, resolveFallbackBundleName, resolveFallbackResource, resolveLocalizedObject, resolveLocalizedObject, resolveLocalizedResource, resolveLocalizedResource, resolveLocalizedString, resolveLocalizedString, resolveLocalizedStrings, resolveLocalizedStrings, resolveResourceBundle, resolveResourceBundle, resolveResourceBundleName, setCachingDisabled, setDefaultBaseName, setFallbackResourcesName, setResourceBundleName, setResourceFinderName
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultLinkFilter
clear, clearLinkAnchors, containsLinkAnchor, getContainerKey, getLinkAnchor, getLinkAnchor, getLinkName, indexOfLinkAnchor, linkAnchorMap, linkAnchorMap, remove, removeLinkAnchor, removeLinkAnchor, setLinkAnchor, setLinkAnchor, setLinkName, setLinkName
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultBranchingFilter
checkPermission, checkPermission, doFilter, getDefaultKey, getFilter, setDefaultKey
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultSecureContainerKeyFilter
getFilter
 
Methods inherited from class org.norther.tammi.spray.filter.AbstractSecureContainerKeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from class org.norther.tammi.spray.filter.AbstractSecureContainerFilter
checkPermission, checkPermission, checkPermission, destroy, getFilterConfig, getRequestMap, getSessionMap, init
 
Methods inherited from class org.norther.tammi.core.security.DefaultSecureContainer
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions
 
Methods inherited from class org.norther.tammi.core.base.DefaultContainer
containsKey, get, getContainerKey, getContainerKey, getMBean, getMBeanHandle, getMBeanHandles, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, 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.filter.LinkFilter
clearLinkAnchors, containsLinkAnchor, getLinkAnchor, getLinkAnchor, getLinkName, indexOfLinkAnchor, linkAnchorMap, linkAnchorMap, removeLinkAnchor, removeLinkAnchor, setLinkAnchor, setLinkAnchor, setLinkName, setLinkName
 
Methods inherited from interface org.norther.tammi.spray.filter.BranchingFilter
checkPermission, checkPermission, getDefaultKey, getFilter, setDefaultKey
 
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, doFilter, init
 
Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter
checkPermission, checkPermission, checkPermission
 
Methods inherited from interface org.norther.tammi.core.security.AccessController
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
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, doFilter, init
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.core.locale.ResourceMap
clearResourceBundleNames, getDefaultBaseName, getFallbackResourcesName, getPlugInBaseName, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceFinderName, qualifierSet, removeResourceBundleName, resolveResourceBundle, resolveResourceBundle, resolveResourceBundleName, setDefaultBaseName, setFallbackResourcesName, setResourceBundleName, setResourceFinderName
 
Methods inherited from interface org.norther.tammi.acorn.locale.Localizer
resolveLocalizedObject, resolveLocalizedObject, resolveLocalizedResource, resolveLocalizedResource, resolveLocalizedString, resolveLocalizedString, resolveLocalizedStrings, resolveLocalizedStrings
 
Methods inherited from interface org.norther.tammi.core.cache.CacheClient
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled
 
Methods inherited from interface org.norther.tammi.core.locale.FallbackResources
getFallbackBaseName, getFallbackBundle, getFallbackBundle, resolveFallbackBundle, resolveFallbackBundle, resolveFallbackBundleName, resolveFallbackResource
 

Field Detail

SERVICE_KEY

public static final String SERVICE_KEY
The service key.

See Also:
Constant Field Values
Constructor Detail

DefaultServiceFilter

public DefaultServiceFilter()
Constructs a new filter.


DefaultServiceFilter

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

Parameters:
key - the filter key.
Method Detail

getBranchKey

public String getBranchKey(ServletRequest request,
                           ServletResponse response,
                           FilterChain chain)
Description copied from interface: BranchingFilter
Gets the branch key of the selected branch for the specified request.

Specified by:
getBranchKey in interface BranchingFilter
Overrides:
getBranchKey in class DefaultBranchingFilter
Parameters:
request - the request to process.
response - the response to return.
chain - the current filter chain.
Returns:
the branch key to apply or null.

getContentKey

public String getContentKey()
Description copied from interface: ServiceFilter
Gets the content filter key.

Specified by:
getContentKey in interface ServiceFilter
Returns:
the content key or null.

setContentKey

public void setContentKey(String key)
Description copied from interface: ServiceFilter
Sets the content filter key. The content key is applied to media content handled by one of the content filter MBeans.

Specified by:
setContentKey in interface ServiceFilter
Parameters:
key - the content key.

isMediaPriority

public boolean isMediaPriority()
Description copied from interface: ServiceFilter
Checks whether media content has priority over other services.

Specified by:
isMediaPriority in interface ServiceFilter
Returns:
true if priority, false otherwise.

setMediaPriority

public void setMediaPriority(boolean flag)
Description copied from interface: ServiceFilter
Sets whether media content has priority over other services and the content key applied to the requested service instead of the default key when an explicit service is not specified, the path info of the request is not empty and it contains a valid media type extension, which is not terminal's default extension.

Specified by:
setMediaPriority in interface ServiceFilter
Parameters:
flag - true if priority, false otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.