|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.core.base.DefaultContainer<V> org.norther.tammi.core.security.DefaultSecureContainer<V> org.norther.tammi.spray.filter.DefaultSecureContainerFilter<V> org.norther.tammi.spray.filter.DefaultSecureContainerKeyFilter<F> org.norther.tammi.spray.filter.DefaultBranchFilter<F>
F
- the registered filter type.public class DefaultBranchFilter<F extends Filter>
A default implementation of BranchFilter applying the filter key first to request attributes and then to request parameters to obtain the mapped name of the filter branch.
Field Summary | |
---|---|
static String |
BRANCH_KEY
The branch key. |
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
|
DefaultBranchFilter()
Constructs a new filter. |
protected |
DefaultBranchFilter(KeyFilter filter)
Constructs a new filter with a filter adaptee. |
|
DefaultBranchFilter(String key)
Constructs a new filter with a key. |
Method Summary | |
---|---|
boolean |
checkPermission(Principal principal,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Checks whether or not the specified principal has an execute permission to the selected branch. |
boolean |
checkPermission(ServletRequest request,
ServletResponse response,
FilterChain chain)
Checks whether or not the specified request has an execute permission to the selected branch. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
Invokes a filter mapped to the branch key. |
String |
getBranch(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the name of the selected branch for the specified request. |
String |
getDefaultBranch()
Gets the default branch key. |
Filter |
getFilter(String name)
Gets referent of the filter MBean of the specified branch. |
void |
setDefaultBranch(String name)
Sets the default branch name. |
Methods inherited from class org.norther.tammi.spray.filter.DefaultSecureContainerKeyFilter |
---|
getFilter, getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
Methods inherited from class org.norther.tammi.spray.filter.DefaultSecureContainerFilter |
---|
checkPermission, destroy, getFilterConfig, getRequestMap, getSessionMap, init |
Methods inherited from class org.norther.tammi.core.security.DefaultSecureContainer |
---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
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.filter.SecureFilter |
---|
checkPermission |
Methods inherited from interface org.norther.tammi.core.security.AccessController |
---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
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.filter.KeyFilter |
---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
Methods inherited from interface javax.servlet.Filter |
---|
destroy, init |
Field Detail |
---|
public static final String BRANCH_KEY
Constructor Detail |
---|
public DefaultBranchFilter()
public DefaultBranchFilter(String key)
key
- the filter key.protected DefaultBranchFilter(KeyFilter filter)
filter
- the filter adaptee.Method Detail |
---|
public String getDefaultBranch()
BranchFilter
getDefaultBranch
in interface BranchFilter<F extends Filter>
public void setDefaultBranch(String name)
BranchFilter
setDefaultBranch
in interface BranchFilter<F extends Filter>
name
- the branch name.public Filter getFilter(String name)
BranchFilter
getFilter
in interface BranchFilter<F extends Filter>
name
- the branch name.
public String getBranch(ServletRequest request, ServletResponse response, FilterChain chain)
BranchFilter
getBranch
in interface BranchFilter<F extends Filter>
request
- the request to process.response
- the response to return.chain
- the current filter chain.
public boolean checkPermission(ServletRequest request, ServletResponse response, FilterChain chain)
BranchFilter
checkPermission
in interface BranchFilter<F extends Filter>
request
- the authenticated request.response
- the corresponding response.chain
- the active filter chain.
public boolean checkPermission(Principal principal, ServletRequest request, ServletResponse response, FilterChain chain)
BranchFilter
checkPermission
in interface BranchFilter<F extends Filter>
principal
- the authenticated principal.request
- the request of the branch.response
- the corresponding response.chain
- the active filter chain.
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException
doFilter
in interface Filter
doFilter
in class DefaultSecureContainerFilter<F extends Filter>
request
- the request to process.response
- the response to return.chain
- the current filter chain.
ServletException
- for servlet errors.
IOException
- for general errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |