Class SecureList<E>
- java.lang.Object
-
- org.exoplatform.commons.utils.secure.SecureList<E>
-
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>
public class SecureList<E> extends Object implements List<E>
SecureList is a wrapper over given List instance providing additional security check. To be able to modify this list, invoking code must have permission given in SecureList's constructor orAllPermission.- Version:
- $Id: SecureList.java 34360 2009-07-22 23:58:59Z nzamosenchuk $
- Author:
- Nikolay Zamosenchuk
-
-
Constructor Summary
Constructors Constructor Description SecureList(Permission permission)SecureList(List<E> list, Permission permission)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E pd)booleanadd(E pd)booleanaddAll(int index, Collection<? extends E> pds)booleanaddAll(Collection<? extends E> pds)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> coll)booleanequals(Object o)Eget(int index)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<E>iterator()intlastIndexOf(Object o)ListIterator<E>listIterator()ListIterator<E>listIterator(int index)Eremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> pds)booleanretainAll(Collection<?> pds)Eset(int index, E pd)intsize()List<E>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
SecureList
public SecureList(Permission permission)
-
SecureList
public SecureList(List<E> list, Permission permission)
-
-
Method Detail
-
add
public boolean add(E pd)
-
addAll
public boolean addAll(Collection<? extends E> pds)
-
addAll
public boolean addAll(int index, Collection<? extends E> pds)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> coll)
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<E>
-
listIterator
public ListIterator<E> listIterator()
- Specified by:
listIteratorin interfaceList<E>
-
listIterator
public ListIterator<E> listIterator(int index)
- Specified by:
listIteratorin interfaceList<E>
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> pds)
-
retainAll
public boolean retainAll(Collection<?> pds)
-
size
public int size()
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
-