Package com.gemalto.mfs.mwsdk.dcm.ppse
Class DirectoryEntry
java.lang.Object
com.gemalto.mfs.mwsdk.dcm.ppse.DirectoryEntry
Represents a Directory Entry (Tag 61) within the PPSE FCI Issuer Discretionary Data.
Each directory entry contains information about a payment application.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryEntry(byte[] aid, byte[] label, byte[] kernelId, byte[] asrpd, byte[] priority, Aid.LockStatus lockStatus, Map<ByteBuffer, byte[]> additionalTags) Constructs a DirectoryEntry with explicit values. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getAdditionalTag(byte[] key) Gets an additional tag value for the specified key.Map<ByteBuffer,byte[]> Returns a deep copy of additional tags.byte[]Gets the Application Identifier (AID).byte[]getAsrpd()Gets the Additional Service Response Protocol Data (ASRPD).byte[]Gets the Kernel Identifier.byte[]getLabel()Gets the Application Label.Retrieves the current locking state of the directory entry.byte[]Gets the Priority indicator.voidsetAdditionalTag(byte[] key, byte[] value) Sets an additional tag with the specified key and value.voidsetApplicationIdentifier(byte[] aid) Sets the Application Identifier (AID).voidsetAsrpd(byte[] asrpd) Sets the Additional Service Response Protocol Data (ASRPD).voidsetKernelIdentifier(byte[] kernelId) Sets the Kernel Identifier.voidsetLabel(byte[] label) Sets the Application Label.voidsetLockStatus(Aid.LockStatus lockStatus) Updates the locking state for this directory entry.voidsetPriority(byte[] priority) Sets the Priority indicator.
-
Constructor Details
-
DirectoryEntry
public DirectoryEntry(@NonNull byte[] aid, @Nullable byte[] label, @Nullable byte[] kernelId, @Nullable byte[] asrpd, @Nullable byte[] priority, @Nullable Aid.LockStatus lockStatus, @NonNull Map<ByteBuffer, byte[]> additionalTags) throws InternalComponentExceptionConstructs a DirectoryEntry with explicit values.- Parameters:
aid- Application Identifier (Tag 4F)label- Application Label (Tag 50)kernelId- Kernel Identifier (Tag 9F2A)asrpd- Additional Service Response Protocol Data (Tag 9F0A)priority- Priority of this directory EntrylockStatus- Directory Entry Locked or UnlockedadditionalTags- Map of additional tags not explicitly defined- Throws:
InternalComponentException- ifadditionalTagsdo not follow BER-TLV rules
-
-
Method Details
-
getApplicationIdentifier
@Nullable public byte[] getApplicationIdentifier()Gets the Application Identifier (AID).- Returns:
- The AID as a byte array (Tag 4F)
-
setApplicationIdentifier
public void setApplicationIdentifier(@NonNull byte[] aid) Sets the Application Identifier (AID).- Parameters:
aid- The AID to set
-
getLabel
@Nullable public byte[] getLabel()Gets the Application Label.- Returns:
- The label as a byte array (Tag 50), or null if not set
-
setLabel
public void setLabel(@Nullable byte[] label) Sets the Application Label.- Parameters:
label- The label to set, or null to clear
-
getKernelIdentifier
@Nullable public byte[] getKernelIdentifier()Gets the Kernel Identifier.- Returns:
- The kernel identifier as a byte array (Tag 9F2A), or null if not set
-
setKernelIdentifier
public void setKernelIdentifier(@Nullable byte[] kernelId) Sets the Kernel Identifier.- Parameters:
kernelId- The kernel identifier to set, or null to clear
-
getAsrpd
@Nullable public byte[] getAsrpd()Gets the Additional Service Response Protocol Data (ASRPD).- Returns:
- The ASRPD as a byte array (Tag 9F0A), or null if not set
-
setAsrpd
public void setAsrpd(@Nullable byte[] asrpd) Sets the Additional Service Response Protocol Data (ASRPD).- Parameters:
asrpd- The ASRPD to set, or null to clear
-
getPriority
@Nullable public byte[] getPriority()Gets the Priority indicator.- Returns:
- The priority as a byte array (Tag 87), or null if not set
-
setPriority
public void setPriority(@Nullable byte[] priority) Sets the Priority indicator.- Parameters:
priority- The priority to set
-
getAdditionalTags
Returns a deep copy of additional tags.- Returns:
- Map of additional tags. Any changes to this map will not be reflected in the final DirectoryEntry. Use
setAdditionalTag(byte[], byte[])instead
-
setAdditionalTag
public void setAdditionalTag(@NonNull byte[] key, @Nullable byte[] value) throws InternalComponentException Sets an additional tag with the specified key and value.- Parameters:
value- The tag value to setkey- The tag key- Throws:
InternalComponentException- ifkeyorvaluedo not follow BER-TLV rules
-
getAdditionalTag
@Nullable public byte[] getAdditionalTag(@NonNull byte[] key) Gets an additional tag value for the specified key.- Parameters:
key- The tag key- Returns:
- The tag value, or null if not found
-
getLockStatus
Retrieves the current locking state of the directory entry.- Returns:
- A
Aid.LockStatusrepresenting the current state.
-
setLockStatus
Updates the locking state for this directory entry.- Parameters:
lockStatus- The newAid.LockStatusto apply. Ifnullis provided, the status is set toAid.LockStatus.UNLOCKED
-