Class ACLImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<ACE>
-
- org.nuxeo.ecm.core.api.security.impl.ACLImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<ACE>
,Collection<ACE>
,List<ACE>
,RandomAccess
,ACL
public class ACLImpl extends ArrayList<ACE> implements ACL
An ACL implementation.- Author:
- Bogdan Stefanescu
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
Fields inherited from interface org.nuxeo.ecm.core.api.security.ACL
INHERITED_ACL, LOCAL_ACL
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(ACE ace)
Add an ACE.boolean
blockInheritance(String username)
Block the inheritance.Object
clone()
Returns a recursive copy of the ACL sharing no mutable substructure with the original.ACE[]
getACEs()
Returns the ACEs defined by this list as an array.protected List<ACE>
getAdminEverythingACES()
String
getName()
Gets the ACL name.boolean
isReadOnly()
boolean
removeByUsername(String username)
Remove all ACEs forusername
.boolean
replace(ACE oldACE, ACE newACE)
Replace theoldACE
withnewACE
, only if theoldACE
exists.void
replacePermission(String oldPerm, String newPerm)
Replaces a permission with another in this ACL.void
setACEs(ACE[] aces)
Sets the ACEs defined by this ACL.boolean
unblockInheritance()
Unblock the inheritance.-
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
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
add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
getACEs
public ACE[] getACEs()
Description copied from interface:ACL
Returns the ACEs defined by this list as an array.
-
setACEs
public void setACEs(ACE[] aces)
Description copied from interface:ACL
Sets the ACEs defined by this ACL.
-
isReadOnly
public boolean isReadOnly()
-
blockInheritance
public boolean blockInheritance(String username)
Description copied from interface:ACL
Block the inheritance.- Specified by:
blockInheritance
in interfaceACL
- Parameters:
username
- the user blocking the inheritance- Returns:
- true if the ACL was changed.
-
unblockInheritance
public boolean unblockInheritance()
Description copied from interface:ACL
Unblock the inheritance.- Specified by:
unblockInheritance
in interfaceACL
- Returns:
- true if the ACL was changed.
-
replace
public boolean replace(ACE oldACE, ACE newACE)
Description copied from interface:ACL
Replace theoldACE
withnewACE
, only if theoldACE
exists.The
newACE
keeps the same index asoldACE
.
-
removeByUsername
public boolean removeByUsername(String username)
Description copied from interface:ACL
Remove all ACEs forusername
.- Specified by:
removeByUsername
in interfaceACL
- Returns:
- true if the ACL was changed.
-
replacePermission
public void replacePermission(String oldPerm, String newPerm)
Description copied from interface:ACL
Replaces a permission with another in this ACL.- Specified by:
replacePermission
in interfaceACL
- Parameters:
oldPerm
- the old permissionnewPerm
- the new permission
-
-