org.norther.tammi.spray.filter
Interface LinkFilter

All Superinterfaces:
AccessController, BranchingFilter, Container, ContainerFilter, ContainerKeyFilter, Filter, KeyFilter, Refreshable, SecureContainerFilter, SecureContainerKeyFilter, SecureFilter
All Known Subinterfaces:
HostFilter, PipeFilter, ServiceFilter
All Known Implementing Classes:
DefaultHostFilter, DefaultLinkFilter, DefaultPipeFilter, DefaultServiceFilter

public interface LinkFilter
extends BranchingFilter, Refreshable

LinkFilter extends BranchingFilter by proviving support to represent its branches as links to the corresponding filters.

Author:
Ilkka Priha

Method Summary
 void clearLinkAnchors()
          Clears all link anchors.
 boolean containsLinkAnchor(String key)
          Checks whether the specified link key has an anchor.
 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.
 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 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 iface, ObjectName name)
          Sets the interface and object name of the linked filter.
 
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
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.base.Refreshable
getRefreshed, refresh
 

Method Detail

getLinkName

ObjectName getLinkName(String key)
Gets the object name of the linked filter.

Parameters:
key - the link key.
Returns:
the name or null.

setLinkName

void setLinkName(String key,
                 ObjectName name)
Sets the object name of the linked filter.

Parameters:
key - the link key.
name - the object name or query pattern.
Throws:
NullPointerException - for null values.

setLinkName

void setLinkName(String key,
                 String iface,
                 ObjectName name)
Sets the interface and object name of the linked filter.

Parameters:
key - the link key.
iface - the class or interface name.
name - the object name or query pattern.
Throws:
NullPointerException - for null values.

getLinkAnchor

String getLinkAnchor(String key)
Gets the anchor of the specified link key.

Parameters:
key - the link key.
Returns:
the anchor or null.

setLinkAnchor

void setLinkAnchor(String key,
                   String anchor)
Sets the anchor of the specified link key.

Parameters:
key - the link key.
anchor - the anchor.
Throws:
NullPointerException - for null values.
IllegalArgumentException - if the key is not registered.

containsLinkAnchor

boolean containsLinkAnchor(String key)
Checks whether the specified link key has an anchor.

Parameters:
key - the link key.
Returns:
true for an anchor, false otherwise.

removeLinkAnchor

void removeLinkAnchor(String key)
Removes the anchor of the specified link key.

Parameters:
key - the link key.

getLinkAnchor

String getLinkAnchor(int index)
Gets the indexed link anchor.

Parameters:
index - the index.
Returns:
the anchor or null.
Throws:
IndexOutOfBoundsException - if the index is out of range.

setLinkAnchor

void setLinkAnchor(int index,
                   String key,
                   String anchor)
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.

Parameters:
index - the index.
key - the link key.
anchor - the anchor.
Throws:
NullPointerException - for null values.
IllegalArgumentException - if the key is not registered.
IndexOutOfBoundsException - if the index is out of range.

indexOfLinkAnchor

int indexOfLinkAnchor(String key)
Gets the index of the anchor of specified link key.

Parameters:
key - the link key.
Returns:
the index or -1.

removeLinkAnchor

void removeLinkAnchor(int index)
Removes the indexed link anchor.

Parameters:
index - the index.
Throws:
IndexOutOfBoundsException - if the index is out of range.

clearLinkAnchors

void clearLinkAnchors()
Clears all link anchors.


linkAnchorMap

OrderedMap linkAnchorMap()
Returns a read-only map of link anchors.

Returns:
a map of link keys and anchors.

linkAnchorMap

OrderedMap linkAnchorMap(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain)
Returns a read-only map of link anchors for the specified request.

Parameters:
request - the authenticated request.
response - the corresponding response.
chain - the active filter chain.
Returns:
a map of link keys and anchors.


Copyright © 2004 The Norther Organization. All rights reserved.