FileDocCategorySizeDatePackage
ACList.javaAPI DocphoneME MR2 API (J2ME)3736Wed May 02 18:00:38 BST 2007com.sun.satsa.acl

ACList

public class ACList extends PKCS15File
This class represents access control list (ACL).

Fields Summary
private byte[]
AID
AID for this ACL. Received from ACIF.
private Vector
ACF
This vector contains parsed objects from ACF.
private ACEntry
ACE
The list of ACEs.
private PINData[]
PINInfo
PIN information for APDU connection.
private Vector
pin_info
This vector contains PIN information
Constructors Summary
ACList(byte[] aid, Location location, AclFileSystem files)
Creates ACList object for the pointed aid, location and file system

param
aid byte[] application AID
param
location Location required location
param
files AclFileSystem requred file system


                                    
          
        super(location, files);
        AID = aid;
        ACF = new Vector();
        resetLoader(ACF, null, null);
        try {
            parseDF(location.path);
            if (ACF.size() != 0) {
                readACF();
            } else {
                ACE = null;
            }
        } catch (IOException e) {
            ACE = null;
        }
    
Methods Summary
public ACEntrygetACEntries()
Returns the list of ACEs.

return
the list of ACEs.

        return ACE;
    
voidgetPINs(boolean isAPDU, java.util.Vector result)
Places information about PINs into the vector.

param
isAPDU if true, place APDU PIN data, otherwise - JCRMI PIN data.
param
result the vector for results

        for (int i = 0; i < PINInfo.length; i++) {
            if (isAPDU == (PINInfo[i].commands instanceof Integer[])) {
                result.addElement(PINInfo[i]);
            }
        }
    
public booleanmatch(byte[] selectAPDU)
Verifies if this ACL describes permissions for AID in SELECT APDU.

param
selectAPDU SELECT APDU command data.
return
true if this ACL describes permissions for AID in SELECT APDU.

        return (AID == null) ||
            (AID.length == selectAPDU[4] &&
             Utils.byteMatch(AID, 0, AID.length,
                             selectAPDU, 5, AID.length));
    
private voidreadACF()
Reads ACE data from the ACF vector.

throws
TLVException if TLV error occurs

        ACE = new ACEntry(ACF, pin_info);
        PINInfo = new PINData[pin_info.size()];
        pin_info.copyInto(PINInfo);