Class DirectoryEntry

java.lang.Object
com.gemalto.mfs.mwsdk.dcm.ppse.DirectoryEntry

public final class DirectoryEntry extends Object
Represents a Directory Entry (Tag 61) within the PPSE FCI Issuer Discretionary Data. Each directory entry contains information about a payment application.
  • 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 InternalComponentException
      Constructs 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 Entry
      lockStatus - Directory Entry Locked or Unlocked
      additionalTags - Map of additional tags not explicitly defined
      Throws:
      InternalComponentException - if additionalTags do 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

      @NonNull public Map<ByteBuffer,byte[]> 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 set
      key - The tag key
      Throws:
      InternalComponentException - if key or value do 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

      @NonNull public Aid.LockStatus getLockStatus()
      Retrieves the current locking state of the directory entry.
      Returns:
      A Aid.LockStatus representing the current state.
    • setLockStatus

      public void setLockStatus(@Nullable Aid.LockStatus lockStatus)
      Updates the locking state for this directory entry.
      Parameters:
      lockStatus - The new Aid.LockStatus to apply. If null is provided, the status is set to Aid.LockStatus.UNLOCKED