com.coi.tools.os.win
Class AccessControlList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by com.coi.tools.os.win.AccessControlList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class AccessControlList
extends java.util.ArrayList

Data container for access control lists used by the registry stuff in the java and in the native part. DO NOT CHANGE METHODE SIGNATURES etc. without addapt the native methods RegistryImpl.modifyKeyACL and RegistryImpl.getKeyACL.

Author:
Klaus Bartz
See Also:
Serialized Form

Nested Class Summary
static class AccessControlList.AccessControlEntry
          This class holds a representation of MS Windows ACEs.
 
Field Summary
private  java.util.ArrayList<AccessControlList.AccessControlEntry> permissions
           
private static long serialVersionUID
          Required (serializable)
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AccessControlList()
          Default constructor.
 
Method Summary
 AccessControlList.AccessControlEntry getACE(int num)
          Returns the access control entry related to the given id.
 int getACECount()
          Returns number of access control entries.
 void setACE(java.lang.String owner, int allowed, int denied)
          Creates an ACE entry in the permission array with the given values.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Required (serializable)

See Also:
Constant Field Values

permissions

private java.util.ArrayList<AccessControlList.AccessControlEntry> permissions
Constructor Detail

AccessControlList

public AccessControlList()
Default constructor.

Method Detail

setACE

public void setACE(java.lang.String owner,
                   int allowed,
                   int denied)
Creates an ACE entry in the permission array with the given values.

Parameters:
owner - owner of the ACE
allowed - access allowed mask
denied - access denied mask

getACE

public AccessControlList.AccessControlEntry getACE(int num)
Returns the access control entry related to the given id.

Parameters:
num - id in the internal permisson array.
Returns:
the access control entry for the given id

getACECount

public int getACECount()
Returns number of access control entries.

Returns:
number of access control entries