Package pt.gov.cartaodecidadao
Class PTEID_Pin
- java.lang.Object
-
- pt.gov.cartaodecidadao.PTEID_Object
-
- pt.gov.cartaodecidadao.PTEID_Pin
-
public class PTEID_Pin extends PTEID_Object
Class that represent one Pin.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanchangePin(java.lang.String csPin1, java.lang.String csPin2, PTEID_ulwrapper ulRemaining, java.lang.String PinName, boolean bShowDlg)Ask the card to change the pin.
if csPin1 or csPin2 are empty, a popup will ask for the codes.
voiddelete()longgetFlags()Get the flags of the pinlonggetId()Get the id of the pinlonggetIndex()Get the index of the pinjava.lang.StringgetLabel()Get the label of the pinjava.lang.StringgetLabelById(long id)Get the label of the pin by IdlonggetPinRef()Get the pinref value of the pinintgetTriesLeft()Return the remaining tries for entering the correct pin.
longgetType()Get the type of the pinPTEID_PinUsagegetUsageCode()Get the usage code of the pinbooleanisVerified()Check the current verification status of the PIN
booleanunlockPin(java.lang.String pszPuk, java.lang.String pszNewPin, PTEID_ulwrapper triesLeft, long flags)booleanverifyPin(java.lang.String csPin, PTEID_ulwrapper ulRemaining, boolean bShowDlg)Ask the card to verify the pin.
-
-
-
Field Detail
-
AUTH_PIN
public static final long AUTH_PIN
PIN reference value for the authentication PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
SIGN_PIN
public static final long SIGN_PIN
PIN reference value for the signature PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
ADDR_PIN
public static final long ADDR_PIN
PIN reference value for the address PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
-
Method Detail
-
delete
public void delete()
- Overrides:
deletein classPTEID_Object
-
getIndex
public long getIndex() throws PTEID_ExceptionGet the index of the pin- Throws:
PTEID_Exception
-
getType
public long getType() throws PTEID_ExceptionGet the type of the pin- Throws:
PTEID_Exception
-
getId
public long getId() throws PTEID_ExceptionGet the id of the pin- Throws:
PTEID_Exception
-
getPinRef
public long getPinRef() throws PTEID_ExceptionGet the pinref value of the pin- Throws:
PTEID_Exception
-
getUsageCode
public PTEID_PinUsage getUsageCode() throws PTEID_Exception
Get the usage code of the pin- Throws:
PTEID_Exception
-
getFlags
public long getFlags() throws PTEID_ExceptionGet the flags of the pin- Throws:
PTEID_Exception
-
getLabel
public java.lang.String getLabel() throws PTEID_ExceptionGet the label of the pin- Throws:
PTEID_Exception
-
getLabelById
public java.lang.String getLabelById(long id)
Get the label of the pin by Id
-
unlockPin
public boolean unlockPin(java.lang.String pszPuk, java.lang.String pszNewPin, PTEID_ulwrapper triesLeft, long flags) throws PTEID_Exception- Throws:
PTEID_Exception
-
getTriesLeft
public int getTriesLeft() throws PTEID_ExceptionReturn the remaining tries for entering the correct pin.
- Returns:
- the number of remaining tries in the other case
- Throws:
PTEID_Exception
-
isVerified
public boolean isVerified() throws PTEID_ExceptionCheck the current verification status of the PIN
- Returns:
- true if the PIN has already been successfully presented during the current card session or false otherwise
- Throws:
PTEID_Exception
-
verifyPin
public boolean verifyPin(java.lang.String csPin, PTEID_ulwrapper ulRemaining, boolean bShowDlg) throws PTEID_ExceptionAsk the card to verify the pin.
- Parameters:
csPin- is the pin code to verify (if csPin is empty, a popup will ask for the code)ulRemaining- return the remaining tries (only if verifying failed)bShowDlg- flag used to either show or not a dialog where the user inserts the pin (default=true)
- Returns:
- true if success and false if failed
- Throws:
PTEID_Exception
-
changePin
public boolean changePin(java.lang.String csPin1, java.lang.String csPin2, PTEID_ulwrapper ulRemaining, java.lang.String PinName, boolean bShowDlg) throws PTEID_ExceptionAsk the card to change the pin.
if csPin1 or csPin2 are empty, a popup will ask for the codes.
- Parameters:
csPin1- is the old pin codecsPin2- is the new pin codeulRemaining- return the remaining tries (only when operation failed)
- Returns:
- true if success and false if failed
- Throws:
PTEID_Exception
-
-