Interface RidValidator<T>

  • Type Parameters:
    T - is of custom type

    public interface RidValidator<T>
    This interface provide method for RID validation.
    Author:
    Ritesh Sinha, Abhishek Kumar
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean validateId​(T id)
      This method validate given RID only against specified generation logic.
      boolean validateId​(T id, int centerIdLength, int machineIdLength, int sequenceLength, int timeStampLength)
      This method validate given RID against specified generation logic.
      boolean validateId​(T id, T centerId, T machineId)
      This method validate given RID against specified generation logic.
      boolean validateId​(T id, T centerId, T machineId, int centerIdLength, int machineIdLength, int sequenceLength, int timeStampLength)
      This method validate given RID against specified generation logic.
    • Method Detail

      • validateId

        boolean validateId​(T id,
                           T centerId,
                           T machineId)
        This method validate given RID against specified generation logic.
        Parameters:
        id - the RID.
        centerId - the centerId.
        machineId - the dongleId.
        Returns:
        true if RID satisfied the specified generation logic.
      • validateId

        boolean validateId​(T id)
        This method validate given RID only against specified generation logic.
        Parameters:
        id - the RID.
        Returns:
        true if RID satisfied the specified generation logic.
      • validateId

        boolean validateId​(T id,
                           T centerId,
                           T machineId,
                           int centerIdLength,
                           int machineIdLength,
                           int sequenceLength,
                           int timeStampLength)
        This method validate given RID against specified generation logic.
        Parameters:
        id - the rid
        centerId - the center id
        machineId - the machine id
        centerIdLength - the center id length
        machineIdLength - the machine id length
        sequenceLength - length of the sequence
        timeStampLength - timeStamp length
        Returns:
        true if RID satisfied the specified generation logic.
      • validateId

        boolean validateId​(T id,
                           int centerIdLength,
                           int machineIdLength,
                           int sequenceLength,
                           int timeStampLength)
        This method validate given RID against specified generation logic.
        Parameters:
        id - the rid
        centerIdLength - the center id length
        machineIdLength - the machine id length
        sequenceLength - length of the sequence
        timeStampLength - timeStamp length
        Returns:
        true if RID satisfied the specified generation logic.