Class UserId

java.lang.Object
net.commuty.parking.model.UserId

public class UserId
extends java.lang.Object

This identifies a user via one UserIdType and one identifier value.

A parking user is known in Commuty via one or more UserId. Each user id has a type of identifier (email, license plate,...) and the identification value.

For instance, a correct user id could be:

  • Method Summary

    Modifier and Type Method Description
    static UserId fromBadgeNumber​(java.lang.String badgeNumber)
    Creates a user id based on a badge number.
    static UserId fromCardholderId​(java.lang.String cardholderId)
    Creates a user id based on a cardholder identifier.
    static UserId fromEmail​(java.lang.String email)
    Creates a user id based on an email.
    static UserId fromIdentificationNumber​(java.lang.String identificationNumber)
    Creates a user id based on an identification number
    static UserId fromLicensePlate​(java.lang.String licensePlate)
    Creates a user id based on a license plate.
    static UserId fromPinCode​(java.lang.String pinCode)
    Creates a user id based on a pin code.
    static UserId fromQrCode​(java.lang.String qrCode)
    Creates a user id based on a generated qr code.
    static UserId fromWim26EncodedLicensePlate​(java.lang.String win26EncodedLicensePlate)
    Creates a user id based on a hash of a license plate using the Wiegand 26 bit protocol.
    static UserId fromWim64EncodedLicensePlate​(java.lang.String win64EncodedLicensePlate)
    Creates a user id based on a hash of a license plate using the Wiegand 64 bit protocol.
    java.lang.String getId()
    The value of the identifier.
    UserIdType getType()
    The identification type.
    boolean hasType​(UserIdType type)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • fromEmail

      public static UserId fromEmail​(java.lang.String email)
      Creates a user id based on an email.
    • fromLicensePlate

      public static UserId fromLicensePlate​(java.lang.String licensePlate)
      Creates a user id based on a license plate.
    • fromIdentificationNumber

      public static UserId fromIdentificationNumber​(java.lang.String identificationNumber)
      Creates a user id based on an identification number
    • fromQrCode

      public static UserId fromQrCode​(java.lang.String qrCode)
      Creates a user id based on a generated qr code.
    • fromBadgeNumber

      public static UserId fromBadgeNumber​(java.lang.String badgeNumber)
      Creates a user id based on a badge number.
    • fromCardholderId

      public static UserId fromCardholderId​(java.lang.String cardholderId)
      Creates a user id based on a cardholder identifier.
    • fromPinCode

      public static UserId fromPinCode​(java.lang.String pinCode)
      Creates a user id based on a pin code.
    • fromWim26EncodedLicensePlate

      public static UserId fromWim26EncodedLicensePlate​(java.lang.String win26EncodedLicensePlate)

      Creates a user id based on a hash of a license plate using the Wiegand 26 bit protocol.

      This is compatible with the "Wiegand Interface Module" device from Nedap.

      For more information, Click here to see the Wiegand Interface Module website.

    • fromWim64EncodedLicensePlate

      public static UserId fromWim64EncodedLicensePlate​(java.lang.String win64EncodedLicensePlate)

      Creates a user id based on a hash of a license plate using the Wiegand 64 bit protocol.

      This is compatible with the "Wiegand Interface Module" device from Nedap.

      For more information, Click here to see the Wiegand Interface Module website.

    • getId

      public java.lang.String getId()
      The value of the identifier.
    • getType

      public UserIdType getType()
      The identification type.
    • hasType

      public boolean hasType​(UserIdType type)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object