org.norther.tammi.spray.db
Class DefaultRepositoryFilter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.root.db.DefaultRepositoryClient
          extended by org.norther.tammi.spray.db.DefaultRepositoryFilter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Manageable, MBeanDelegate, RepositoryClient, RepositoryFilter, KeyFilter, TerminationFilter

public class DefaultRepositoryFilter
extends DefaultRepositoryClient
implements RepositoryFilter

A default implementation of RepositoryFilter.

Version:
$Id: DefaultRepositoryFilter.java,v 1.5 2009/09/28 15:08:27 cvsimp Exp $
Author:
Marketta Priha
See Also:
Serialized Form

Field Summary
static String LOB_KEY
          The default key.
 
Fields inherited from class org.norther.tammi.root.db.DefaultRepositoryClient
AUTHENTICATED_SIGNATURE, DEFAULT_PERSISTER, KEY_SIGNATURE
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultRepositoryFilter()
          The default constructor.
DefaultRepositoryFilter(RepositoryFilter filter)
          Constructs a new filter adapter.
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 String getKey()
          Gets the filter key.
 String getKeyValue(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets the filter key value for the specified request.
 String[] getKeyValues(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets filter key values for the specified request.
 void init(FilterConfig config)
           
 boolean isLinkedKey()
          Checks whether the filter key is part of URL links built within filter chains including this filter.
 void setKey(String key)
          Sets the filter key.
 void setLinkedKey(boolean flag)
          Sets the linked key flag.
 
Methods inherited from class org.norther.tammi.root.db.DefaultRepositoryClient
acquirePersister, acquirePersister, acquirePersister, acquirePersister, acquirePersister, acquirePersister, createPermissionCriteria, createUserPermissionCriteria, createUserPermissionCriteria, createUserPermissionCriteria, getAuthenticatedPasswordKey, getAuthenticatedUsernameKey, getAuthenticationConnectionAlias, getConnection, getConnection, getConnectionAlias, getConnectionUsername, getInternalConnection, getPersisterClassName, getRepositoryClientMBean, isConnectionAuthenticated, setAuthenticationConnection, setConnectionAlias, setConnectionAuthenticated, setConnectionPassword, setConnectionUsername, setInternalConnection, setPersisterClassName
 
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.root.db.RepositoryClient
acquirePersister, acquirePersister, acquirePersister, acquirePersister, acquirePersister, acquirePersister, createPermissionCriteria, createUserPermissionCriteria, createUserPermissionCriteria, createUserPermissionCriteria, getAuthenticatedPasswordKey, getAuthenticatedUsernameKey, getAuthenticationConnectionAlias, getConnection, getConnection, getConnectionAlias, getConnectionUsername, getPersisterClassName, isConnectionAuthenticated, setAuthenticationConnection, setConnectionAlias, setConnectionAuthenticated, setConnectionPassword, setConnectionUsername, setPersisterClassName
 

Field Detail

LOB_KEY

public static final String LOB_KEY
The default key.

See Also:
Constant Field Values
Constructor Detail

DefaultRepositoryFilter

public DefaultRepositoryFilter()
The default constructor.


DefaultRepositoryFilter

public DefaultRepositoryFilter(RepositoryFilter filter)
Constructs a new filter adapter.

Parameters:
filter - the adaptee.
Method Detail

init

public void init(FilterConfig config)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter

getKey

public String getKey()
Description copied from interface: KeyFilter
Gets the filter key.

Specified by:
getKey in interface KeyFilter
Returns:
the filter key.

setKey

public void setKey(String key)
Description copied from interface: KeyFilter
Sets the filter key.

Specified by:
setKey in interface KeyFilter
Parameters:
key - the filter key.

isLinkedKey

public boolean isLinkedKey()
Description copied from interface: KeyFilter
Checks whether the filter key is part of URL links built within filter chains including this filter.

Specified by:
isLinkedKey in interface KeyFilter
Returns:
true for a linked key, otherwise false.

setLinkedKey

public void setLinkedKey(boolean flag)
Description copied from interface: KeyFilter
Sets the linked key flag. Linked keys and their values are automatically included in URL links built within filter chains including this filter.

Specified by:
setLinkedKey in interface KeyFilter
Parameters:
flag - the linked key flag.

getKeyValue

public String getKeyValue(ServletRequest request,
                          ServletResponse response,
                          FilterChain chain)
Description copied from interface: KeyFilter
Gets the filter key value for the specified request. By default, the method returns the last request parameter mapped to the filter key.

Specified by:
getKeyValue in interface KeyFilter
Parameters:
request - the request.
response - the response.
chain - the filter chain.
Returns:
the key value or null.

getKeyValues

public String[] getKeyValues(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain)
Description copied from interface: KeyFilter
Gets filter key values for the specified request. By default, the method returns request parameter values.

Specified by:
getKeyValues in interface KeyFilter
Parameters:
request - the request.
response - the response.
chain - the filter chain.
Returns:
the key values or null.

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws ServletException,
                     IOException
Specified by:
doFilter in interface Filter
Throws:
ServletException
IOException


Copyright © 2004 The Norther Organization. All rights reserved.