Interface LegacySamSelectionExtension
-
- All Superinterfaces:
org.eclipse.keypop.reader.selection.spi.CardSelectionExtension
public interface LegacySamSelectionExtension extends org.eclipse.keypop.reader.selection.spi.CardSelectionExtension
Extends theCardSelectionExtension
interface of the "Keypop Reader API" to provide means to define optional commands to be executed during the selection phase such as the "Unlock" command.An instance of this interface can be obtained via the method
LegacySamApiFactory.createLegacySamSelectionExtension()
.- Since:
- 0.3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LegacySamSelectionExtension
prepareReadAllCountersStatus()
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of all counters.LegacySamSelectionExtension
prepareReadCounterStatus(int counterNumber)
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of a counter.LegacySamSelectionExtension
prepareReadSystemKeyParameters(SystemKeyType systemKeyType)
Schedules the execution of a "Read Key Parameters" command for a system key.LegacySamSelectionExtension
setUnlockData(java.lang.String unlockData)
Sets the unlock data to be used to unlock a SAM C1 (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.LegacySamSelectionExtension
setUnlockData(java.lang.String unlockData, LegacySam.ProductType productType)
Sets the unlock data to be used to unlock a SAM (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.
-
-
-
Method Detail
-
setUnlockData
LegacySamSelectionExtension setUnlockData(java.lang.String unlockData)
Sets the unlock data to be used to unlock a SAM C1 (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.The "Unlock" command will be executed only after a successful filtering.
- Parameters:
unlockData
- Unlock data as a 16- or 32-character hexadecimal string.- Returns:
- The current instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided unlock data is null, malformed or out of range.- Since:
- 0.1.0
-
setUnlockData
LegacySamSelectionExtension setUnlockData(java.lang.String unlockData, LegacySam.ProductType productType)
Sets the unlock data to be used to unlock a SAM (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.The "Unlock" command will be executed only after a successful filtering.
- Parameters:
unlockData
- Unlock data as a 16- or 32-character hexadecimal string.productType
- The targeted product type.- Returns:
- The current instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided unlock data or product type is null, malformed or out of range.- Since:
- 0.3.0
-
prepareReadSystemKeyParameters
LegacySamSelectionExtension prepareReadSystemKeyParameters(SystemKeyType systemKeyType)
Schedules the execution of a "Read Key Parameters" command for a system key.Once this command is processed, the result is accessible with
LegacySam.getSystemKeyParameter(SystemKeyType)
.- Parameters:
systemKeyType
- The type of system key.- Returns:
- The current instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided argument is null.- Since:
- 0.3.0
-
prepareReadCounterStatus
LegacySamSelectionExtension prepareReadCounterStatus(int counterNumber)
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of a counter.Note: the status of each counter of the record to which the targeted counter belongs will be read. The number of commands actually transmitted to the SAM will be optimized before to be transmitted.
- Parameters:
counterNumber
- The number of the counter whose status is to be read (in range [0..26]).- Returns:
- The current instance.
- Throws:
java.lang.IllegalArgumentException
- If the provided argument is out of range.- Since:
- 0.3.0
-
prepareReadAllCountersStatus
LegacySamSelectionExtension prepareReadAllCountersStatus()
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of all counters.- Returns:
- The current instance.
- Since:
- 0.3.0
-
-