Fields Summary |
---|
public static final int | CMD_VERIFYPIN operation constant. |
public static final int | CMD_CHANGEPIN operation constant. |
public static final int | CMD_DISABLEPIN operation constant. |
public static final int | CMD_ENABLEPIN operation constant. |
public static final int | CMD_UNBLOCKPIN operation constant. |
public static final int | CMD_COUNTThe number of supported PIN commands. |
static final int | CHECKFlag that indicates that the object contains permissions. |
static final int | ALLOWFlag that indicates that MIDlet suite have full access. |
static final int | DISALLOWFlag that indicates that MIDlet suite have not access. |
int | typeVerifier type. |
Vector | permissionsThe list of permissions. |
private PINData[] | pinsArray of PIN data for this permission. |
protected ACSlot | parentParent ACSlot object, contains PIN attributes. |
protected PINAttributes | attr1Attributes of the first PIN to be entered. |
protected PINAttributes | attr2Attributes of the second PIN or null. |
Methods Summary |
---|
protected void | checkPINOperation(int pinID, int unblockPinID, int action)Verifies that PIN operation is supported, finds PIN attributes.
if (pins == null) {
throw new SecurityException();
}
boolean found = false;
for (int i = 0; i < pins.length; i++) {
found |= (pins[i].id == pinID);
}
attr1 = parent.getPINAttributes(pinID);
if (! found || attr1 == null || ! attr1.check(action)) {
throw new SecurityException();
}
if (action == CMD_UNBLOCK) {
attr2 = parent.getPINAttributes(unblockPinID);
if (attr2 == null || ! attr2.isUnblockingPIN()) {
throw new SecurityException();
}
} else {
attr2 = null;
}
|
public java.lang.Object[] | enterPIN(com.sun.midp.security.SecurityToken securityToken, int action)Requests the user to enter the PIN value(s).
PINEntryDialog dialog;
try {
dialog = new PINEntryDialog(securityToken, action, attr1,
attr2);
} catch (InterruptedException e) {
throw new SecurityException("Interrupted");
}
dialog.waitForAnswer();
return dialog.getPINs();
|
java.lang.Object | getPINCommand(int pinID, int action)Get PIN command for specified ID and operation.
for (int i = 0; i < pins.length; i++) {
if (pins[i].id == pinID && pins[i].commands[action] != null) {
return pins[i].commands[action];
}
}
return null;
|
public void | setPINData(PINData[] data)Set PIN data for this permission.
pins = data;
|
public void | setPermissions(java.util.Vector permissions)Set the list of permissions.
this.permissions = permissions;
|
public void | setType(int type)Set type of the permission.
this.type = type;
|