Enum FieldDefs

java.lang.Object
java.lang.Enum<FieldDefs>
com.iabtcf.utils.FieldDefs
All Implemented Interfaces:
Serializable, Comparable<FieldDefs>, java.lang.constant.Constable

public enum FieldDefs
extends Enum<FieldDefs>
This enum defines all V1 and V2 consent string fields with their offsets and lengths. Since some fields have dynamic values, the offset and length methods are a function of ByteBitVector allowing a dynamic field access to the consent string. The enum takes care to cache the lengths and offsets of fields when appropriate. Whenever possible, static field lengths and offsets are cached by the enum using the MemoizingFunction. Due to the dynamic nature of some fields, computing the offsets and lengths can only be done at runtime when a consent string is parsed. For such fields, their values are cached by the ByteBitVector used to parse the consent string. All fields following a dynamic field are treated as a dynamic field.
  • Enum Constant Details

    • CORE_VERSION

      public static final FieldDefs CORE_VERSION
    • CORE_CREATED

      public static final FieldDefs CORE_CREATED
    • CORE_LAST_UPDATED

      public static final FieldDefs CORE_LAST_UPDATED
    • CORE_CMP_ID

      public static final FieldDefs CORE_CMP_ID
    • CORE_CMP_VERSION

      public static final FieldDefs CORE_CMP_VERSION
    • CORE_VENDOR_LIST_VERSION

      public static final FieldDefs CORE_VENDOR_LIST_VERSION
    • CORE_TCF_POLICY_VERSION

      public static final FieldDefs CORE_TCF_POLICY_VERSION
    • CORE_IS_SERVICE_SPECIFIC

      public static final FieldDefs CORE_IS_SERVICE_SPECIFIC
    • CORE_USE_NON_STANDARD_STOCKS

      public static final FieldDefs CORE_USE_NON_STANDARD_STOCKS
    • CORE_SPECIAL_FEATURE_OPT_INS

      public static final FieldDefs CORE_SPECIAL_FEATURE_OPT_INS
    • CORE_PURPOSES_LI_TRANSPARENCY

      public static final FieldDefs CORE_PURPOSES_LI_TRANSPARENCY
    • CORE_PURPOSE_ONE_TREATMENT

      public static final FieldDefs CORE_PURPOSE_ONE_TREATMENT
    • CORE_PUBLISHER_CC

      public static final FieldDefs CORE_PUBLISHER_CC
    • CORE_VENDOR_MAX_VENDOR_ID

      public static final FieldDefs CORE_VENDOR_MAX_VENDOR_ID
    • CORE_VENDOR_IS_RANGE_ENCODING

      public static final FieldDefs CORE_VENDOR_IS_RANGE_ENCODING
    • CORE_VENDOR_BITRANGE_FIELD

      public static final FieldDefs CORE_VENDOR_BITRANGE_FIELD
    • CORE_VENDOR_LI_MAX_VENDOR_ID

      public static final FieldDefs CORE_VENDOR_LI_MAX_VENDOR_ID
    • CORE_VENDOR_LI_IS_RANGE_ENCODING

      public static final FieldDefs CORE_VENDOR_LI_IS_RANGE_ENCODING
    • CORE_VENDOR_LI_BITRANGE_FIELD

      public static final FieldDefs CORE_VENDOR_LI_BITRANGE_FIELD
    • CORE_NUM_PUB_RESTRICTION

      public static final FieldDefs CORE_NUM_PUB_RESTRICTION
    • CORE_PUB_RESTRICTION_ENTRY

      public static final FieldDefs CORE_PUB_RESTRICTION_ENTRY
    • OOB_SEGMENT_TYPE

      public static final FieldDefs OOB_SEGMENT_TYPE
    • DV_MAX_VENDOR_ID

      public static final FieldDefs DV_MAX_VENDOR_ID
    • DV_IS_RANGE_ENCODING

      public static final FieldDefs DV_IS_RANGE_ENCODING
    • DV_VENDOR_BITRANGE_FIELD

      public static final FieldDefs DV_VENDOR_BITRANGE_FIELD
    • AV_MAX_VENDOR_ID

      public static final FieldDefs AV_MAX_VENDOR_ID
    • AV_IS_RANGE_ENCODING

      public static final FieldDefs AV_IS_RANGE_ENCODING
    • AV_VENDOR_BITRANGE_FIELD

      public static final FieldDefs AV_VENDOR_BITRANGE_FIELD
    • PPTC_SEGMENT_TYPE

      public static final FieldDefs PPTC_SEGMENT_TYPE
    • PPTC_PUB_PURPOSES_LI_TRANSPARENCY

      public static final FieldDefs PPTC_PUB_PURPOSES_LI_TRANSPARENCY
    • PPTC_NUM_CUSTOM_PURPOSES

      public static final FieldDefs PPTC_NUM_CUSTOM_PURPOSES
    • PPTC_CUSTOM_PURPOSES_LI_TRANSPARENCY

      public static final FieldDefs PPTC_CUSTOM_PURPOSES_LI_TRANSPARENCY
    • NUM_ENTRIES

      public static final FieldDefs NUM_ENTRIES
    • IS_A_RANGE

      public static final FieldDefs IS_A_RANGE
    • START_OR_ONLY_VENDOR_ID

      public static final FieldDefs START_OR_ONLY_VENDOR_ID
    • END_VENDOR_ID

      public static final FieldDefs END_VENDOR_ID
    • TIMESTAMP

      public static final FieldDefs TIMESTAMP
    • PURPOSE_ID

      public static final FieldDefs PURPOSE_ID
    • RESTRICTION_TYPE

      public static final FieldDefs RESTRICTION_TYPE
    • CHAR

      public static final FieldDefs CHAR
    • V1_VERSION

      public static final FieldDefs V1_VERSION
    • V1_CREATED

      public static final FieldDefs V1_CREATED
    • V1_LAST_UPDATED

      public static final FieldDefs V1_LAST_UPDATED
    • V1_CMP_ID

      public static final FieldDefs V1_CMP_ID
    • V1_CMP_VERSION

      public static final FieldDefs V1_CMP_VERSION
    • V1_VENDOR_LIST_VERSION

      public static final FieldDefs V1_VENDOR_LIST_VERSION
    • V1_PURPOSES_ALLOW

      public static final FieldDefs V1_PURPOSES_ALLOW
    • V1_VENDOR_MAX_VENDOR_ID

      public static final FieldDefs V1_VENDOR_MAX_VENDOR_ID
    • V1_VENDOR_IS_RANGE_ENCODING

      public static final FieldDefs V1_VENDOR_IS_RANGE_ENCODING
    • V1_VENDOR_BITRANGE_FIELD

      public static final FieldDefs V1_VENDOR_BITRANGE_FIELD
    • V1_VENDOR_NUM_ENTRIES

      public static final FieldDefs V1_VENDOR_NUM_ENTRIES
    • V1_PPC_PUBLISHER_PURPOSES_VERSION

      public static final FieldDefs V1_PPC_PUBLISHER_PURPOSES_VERSION
    • V1_PPC_STANDARD_PURPOSES_ALLOWED

      public static final FieldDefs V1_PPC_STANDARD_PURPOSES_ALLOWED
    • V1_PPC_NUMBER_CUSTOM_PURPOSES

      public static final FieldDefs V1_PPC_NUMBER_CUSTOM_PURPOSES
    • V1_PPC_CUSTOM_PURPOSES_BITFIELD

      public static final FieldDefs V1_PPC_CUSTOM_PURPOSES_BITFIELD
  • Method Details

    • values

      public static FieldDefs[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static FieldDefs valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isDynamic

      protected boolean isDynamic()
      Determines whether the field is dynamic, that is, it depends on the particular consent string being processed.
    • getLength

      public int getLength()
      Returns the length of a non-dynamic field.
    • getLength

      public int getLength​(BitReader bbv)
      Returns the length of the field.
    • getOffset

      public int getOffset​(BitReader bbv)
      Returns the offset of the field.
    • getEnd

      public int getEnd​(BitReader bbv)
      Returns the offset of the next field.