org.norther.tammi.spray.filter
Class DefaultLinkFilter

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
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Container, Manageable, MBeanDelegate, Refreshable, AccessController, SecureContainer, BranchingFilter, ContainerFilter, ContainerKeyFilter, KeyFilter, LinkFilter, SecureContainerFilter, SecureContainerKeyFilter, SecureFilter
Direct Known Subclasses:
DefaultPipeFilter

public class DefaultLinkFilter
extends DefaultBranchingFilter
implements LinkFilter

A default implementation of LinkFilter.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String LINK_KEY
          The 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.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
DefaultLinkFilter()
          Constructs a new filter.
DefaultLinkFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 void clear()
          Clears all MBeans from this registry.
 void clearLinkAnchors()
          Clears all link anchors.
 boolean containsLinkAnchor(String key)
          Checks whether the specified link key has an anchor.
 String getContainerKey(String ifname)
          Gets the key of an MBean of a specific class in this container.
 String getLinkAnchor(int index)
          Gets the indexed link anchor.
 String getLinkAnchor(String key)
          Gets the anchor of the specified link key.
 ObjectName getLinkName(String key)
          Gets the object name of the linked filter.
 long getRefreshed()
          Gets the last refresh timestamp.
 int indexOfLinkAnchor(String key)
          Gets the index of the anchor of specified link key.
 OrderedMap linkAnchorMap()
          Returns a read-only map of link anchors.
 OrderedMap linkAnchorMap(ServletRequest request, ServletResponse response, FilterChain chain)
          Returns a read-only map of link anchors for the specified request.
 void refresh()
          Refreshes the MBean.
 void remove(String key)
          Removes an MBean from this registry.
 void removeLinkAnchor(int index)
          Removes the indexed link anchor.
 void removeLinkAnchor(String key)
          Removes the anchor of the specified link key.
 void setLinkAnchor(int index, String key, String anchor)
          Sets the anchor of the specified link key at the specified index.
 void setLinkAnchor(String key, String anchor)
          Sets the anchor of the specified link key.
 void setLinkName(String key, ObjectName name)
          Sets the object name of the linked filter.
 void setLinkName(String key, String ifname, ObjectName name)
          Sets the interface and object name of the linked filter.
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultBranchingFilter
checkPermission, checkPermission, doFilter, getBranchKey, 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.BranchingFilter
checkPermission, checkPermission, getBranchKey, getDefaultKey, getFilter, setDefaultKey
 
Methods inherited from interface org.norther.tammi.core.base.Container
containsKey, get, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, 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
containsKey, get, getContainerKey, getContainerKey, getMBean, getMBeanInterface, getMBeanInterface, getObjectName, getObjectNames, getQueryPattern, registryKeySet, registryKeySet, registryKeySet, registryKeySet, registryMap, registrySize, 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
 

Field Detail

LINK_KEY

public static final String LINK_KEY
The link key.

See Also:
Constant Field Values
Constructor Detail

DefaultLinkFilter

public DefaultLinkFilter()
Constructs a new filter.


DefaultLinkFilter

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

Parameters:
key - the filter key.
Method Detail

getLinkName

public ObjectName getLinkName(String key)
Description copied from interface: LinkFilter
Gets the object name of the linked filter.

Specified by:
getLinkName in interface LinkFilter
Parameters:
key - the link key.
Returns:
the name or null.

setLinkName

public void setLinkName(String key,
                        ObjectName name)
Description copied from interface: LinkFilter
Sets the object name of the linked filter.

Specified by:
setLinkName in interface LinkFilter
Parameters:
key - the link key.
name - the object name or query pattern.

setLinkName

public void setLinkName(String key,
                        String ifname,
                        ObjectName name)
Description copied from interface: LinkFilter
Sets the interface and object name of the linked filter.

Specified by:
setLinkName in interface LinkFilter
Parameters:
key - the link key.
ifname - the class or interface name.
name - the object name or query pattern.

getLinkAnchor

public String getLinkAnchor(String key)
Description copied from interface: LinkFilter
Gets the anchor of the specified link key.

Specified by:
getLinkAnchor in interface LinkFilter
Parameters:
key - the link key.
Returns:
the anchor or null.

setLinkAnchor

public void setLinkAnchor(String key,
                          String anchor)
Description copied from interface: LinkFilter
Sets the anchor of the specified link key.

Specified by:
setLinkAnchor in interface LinkFilter
Parameters:
key - the link key.
anchor - the anchor.

containsLinkAnchor

public boolean containsLinkAnchor(String key)
Description copied from interface: LinkFilter
Checks whether the specified link key has an anchor.

Specified by:
containsLinkAnchor in interface LinkFilter
Parameters:
key - the link key.
Returns:
true for an anchor, false otherwise.

removeLinkAnchor

public void removeLinkAnchor(String key)
Description copied from interface: LinkFilter
Removes the anchor of the specified link key.

Specified by:
removeLinkAnchor in interface LinkFilter
Parameters:
key - the link key.

getLinkAnchor

public String getLinkAnchor(int index)
Description copied from interface: LinkFilter
Gets the indexed link anchor.

Specified by:
getLinkAnchor in interface LinkFilter
Parameters:
index - the index.
Returns:
the anchor or null.

setLinkAnchor

public void setLinkAnchor(int index,
                          String key,
                          String anchor)
Description copied from interface: LinkFilter
Sets the anchor of the specified link key at the specified index. If the key already has an anchor, it's not moved to the new index.

Specified by:
setLinkAnchor in interface LinkFilter
Parameters:
index - the index.
key - the link key.
anchor - the anchor.

indexOfLinkAnchor

public int indexOfLinkAnchor(String key)
Description copied from interface: LinkFilter
Gets the index of the anchor of specified link key.

Specified by:
indexOfLinkAnchor in interface LinkFilter
Parameters:
key - the link key.
Returns:
the index or -1.

removeLinkAnchor

public void removeLinkAnchor(int index)
Description copied from interface: LinkFilter
Removes the indexed link anchor.

Specified by:
removeLinkAnchor in interface LinkFilter
Parameters:
index - the index.

clearLinkAnchors

public void clearLinkAnchors()
Description copied from interface: LinkFilter
Clears all link anchors.

Specified by:
clearLinkAnchors in interface LinkFilter

linkAnchorMap

public OrderedMap linkAnchorMap()
Description copied from interface: LinkFilter
Returns a read-only map of link anchors.

Specified by:
linkAnchorMap in interface LinkFilter
Returns:
a map of link keys and anchors.

linkAnchorMap

public OrderedMap linkAnchorMap(ServletRequest request,
                                ServletResponse response,
                                FilterChain chain)
Description copied from interface: LinkFilter
Returns a read-only map of link anchors for the specified request.

Specified by:
linkAnchorMap in interface LinkFilter
Parameters:
request - the authenticated request.
response - the corresponding response.
chain - the active filter chain.
Returns:
a map of link keys and anchors.

getContainerKey

public String getContainerKey(String ifname)
Description copied from interface: Container
Gets the key of an MBean of a specific class in this container.

Specified by:
getContainerKey in interface Container
Overrides:
getContainerKey in class DefaultContainer
Parameters:
ifname - the class or interface name.
Returns:
the container key or null.

remove

public void remove(String key)
Description copied from interface: Container
Removes an MBean from this registry.

Specified by:
remove in interface Container
Overrides:
remove in class DefaultContainer
Parameters:
key - the registry key.

clear

public void clear()
Description copied from interface: Container
Clears all MBeans from this registry.

Specified by:
clear in interface Container
Overrides:
clear in class DefaultContainer

refresh

public void refresh()
Description copied from interface: Refreshable
Refreshes the MBean.

Specified by:
refresh in interface Refreshable

getRefreshed

public long getRefreshed()
Description copied from interface: Refreshable
Gets the last refresh timestamp.

Specified by:
getRefreshed in interface Refreshable
Returns:
the timestamp of the last refresh.


Copyright © 2004 The Norther Organization. All rights reserved.