org.apache.shiro.web.filter.mgt
Class SimpleNamedFilterList

java.lang.Object
  extended by org.apache.shiro.web.filter.mgt.SimpleNamedFilterList
All Implemented Interfaces:
Iterable<Filter>, Collection<Filter>, List<Filter>, NamedFilterList

public class SimpleNamedFilterList
extends Object
implements NamedFilterList

Simple NamedFilterList implementation that is supported by a backing List instance and a simple name property. All List method implementations are immediately delegated to the wrapped backing list.

Since:
1.0

Constructor Summary
SimpleNamedFilterList(String name)
          Creates a new SimpleNamedFilterList instance with the specified name, defaulting to a new ArrayList instance as the backing list.
SimpleNamedFilterList(String name, List<Filter> backingList)
          Creates a new SimpleNamedFilterList instance with the specified name and backingList.
 
Method Summary
 boolean add(Filter filter)
           
 void add(int index, Filter filter)
           
 boolean addAll(Collection<? extends Filter> c)
           
 boolean addAll(int index, Collection<? extends Filter> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 Filter get(int index)
           
 String getName()
          Returns the configuration-unique name assigned to this Filter list.
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<Filter> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<Filter> listIterator()
           
 ListIterator<Filter> listIterator(int index)
           
 FilterChain proxy(FilterChain orig)
          Returns a new FilterChain instance that will first execute this list's Filters (in list order) and end with the execution of the given filterChain instance.
 Filter remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Filter set(int index, Filter filter)
           
protected  void setName(String name)
           
 int size()
           
 List<Filter> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

SimpleNamedFilterList

public SimpleNamedFilterList(String name)
Creates a new SimpleNamedFilterList instance with the specified name, defaulting to a new ArrayList instance as the backing list.

Parameters:
name - the name to assign to this instance.
Throws:
IllegalArgumentException - if name is null or empty.

SimpleNamedFilterList

public SimpleNamedFilterList(String name,
                             List<Filter> backingList)
Creates a new SimpleNamedFilterList instance with the specified name and backingList.

Parameters:
name - the name to assign to this instance.
backingList - the list instance used to back all of this class's List method implementations.
Throws:
IllegalArgumentException - if name is null or empty.
NullPointerException - if the backing list is null.
Method Detail

setName

protected void setName(String name)

getName

public String getName()
Description copied from interface: NamedFilterList
Returns the configuration-unique name assigned to this Filter list.

Specified by:
getName in interface NamedFilterList
Returns:
the configuration-unique name assigned to this Filter list.

proxy

public FilterChain proxy(FilterChain orig)
Description copied from interface: NamedFilterList
Returns a new FilterChain instance that will first execute this list's Filters (in list order) and end with the execution of the given filterChain instance.

Specified by:
proxy in interface NamedFilterList
Parameters:
orig - the FilterChain instance to execute after this list's Filters have executed.
Returns:
a new FilterChain instance that will first execute this list's Filters (in list order) and end with the execution of the given filterChain instance.

add

public boolean add(Filter filter)
Specified by:
add in interface Collection<Filter>
Specified by:
add in interface List<Filter>

add

public void add(int index,
                Filter filter)
Specified by:
add in interface List<Filter>

addAll

public boolean addAll(Collection<? extends Filter> c)
Specified by:
addAll in interface Collection<Filter>
Specified by:
addAll in interface List<Filter>

addAll

public boolean addAll(int index,
                      Collection<? extends Filter> c)
Specified by:
addAll in interface List<Filter>

clear

public void clear()
Specified by:
clear in interface Collection<Filter>
Specified by:
clear in interface List<Filter>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Filter>
Specified by:
contains in interface List<Filter>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<Filter>
Specified by:
containsAll in interface List<Filter>

get

public Filter get(int index)
Specified by:
get in interface List<Filter>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<Filter>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Filter>
Specified by:
isEmpty in interface List<Filter>

iterator

public Iterator<Filter> iterator()
Specified by:
iterator in interface Iterable<Filter>
Specified by:
iterator in interface Collection<Filter>
Specified by:
iterator in interface List<Filter>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<Filter>

listIterator

public ListIterator<Filter> listIterator()
Specified by:
listIterator in interface List<Filter>

listIterator

public ListIterator<Filter> listIterator(int index)
Specified by:
listIterator in interface List<Filter>

remove

public Filter remove(int index)
Specified by:
remove in interface List<Filter>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Filter>
Specified by:
remove in interface List<Filter>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<Filter>
Specified by:
removeAll in interface List<Filter>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<Filter>
Specified by:
retainAll in interface List<Filter>

set

public Filter set(int index,
                  Filter filter)
Specified by:
set in interface List<Filter>

size

public int size()
Specified by:
size in interface Collection<Filter>
Specified by:
size in interface List<Filter>

subList

public List<Filter> subList(int fromIndex,
                            int toIndex)
Specified by:
subList in interface List<Filter>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Filter>
Specified by:
toArray in interface List<Filter>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<Filter>
Specified by:
toArray in interface List<Filter>


Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.