Package com.iabtcf.utils
Enum 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description intgetEnd(BitReader bbv)Returns the offset of the next field.intgetLength()Returns the length of a non-dynamic field.intgetLength(BitReader bbv)Returns the length of the field.intgetOffset(BitReader bbv)Returns the offset of the field.protected booleanisDynamic()Determines whether the field is dynamic, that is, it depends on the particular consent string being processed.static FieldDefsvalueOf(String name)Returns the enum constant of this type with the specified name.static FieldDefs[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CORE_VERSION
-
CORE_CREATED
-
CORE_LAST_UPDATED
-
CORE_CMP_ID
-
CORE_CMP_VERSION
-
CORE_CONSENT_SCREEN
-
CORE_CONSENT_LANGUAGE
-
CORE_VENDOR_LIST_VERSION
-
CORE_TCF_POLICY_VERSION
-
CORE_IS_SERVICE_SPECIFIC
-
CORE_USE_NON_STANDARD_STOCKS
-
CORE_SPECIAL_FEATURE_OPT_INS
-
CORE_PURPOSES_CONSENT
-
CORE_PURPOSES_LI_TRANSPARENCY
-
CORE_PURPOSE_ONE_TREATMENT
-
CORE_PUBLISHER_CC
-
CORE_VENDOR_MAX_VENDOR_ID
-
CORE_VENDOR_IS_RANGE_ENCODING
-
CORE_VENDOR_BITRANGE_FIELD
-
CORE_VENDOR_LI_MAX_VENDOR_ID
-
CORE_VENDOR_LI_IS_RANGE_ENCODING
-
CORE_VENDOR_LI_BITRANGE_FIELD
-
CORE_NUM_PUB_RESTRICTION
-
CORE_PUB_RESTRICTION_ENTRY
-
OOB_SEGMENT_TYPE
-
DV_MAX_VENDOR_ID
-
DV_IS_RANGE_ENCODING
-
DV_VENDOR_BITRANGE_FIELD
-
AV_MAX_VENDOR_ID
-
AV_IS_RANGE_ENCODING
-
AV_VENDOR_BITRANGE_FIELD
-
PPTC_SEGMENT_TYPE
-
PPTC_PUB_PURPOSES_CONSENT
-
PPTC_PUB_PURPOSES_LI_TRANSPARENCY
-
PPTC_NUM_CUSTOM_PURPOSES
-
PPTC_CUSTOM_PURPOSES_CONSENT
-
PPTC_CUSTOM_PURPOSES_LI_TRANSPARENCY
-
NUM_ENTRIES
-
IS_A_RANGE
-
START_OR_ONLY_VENDOR_ID
-
END_VENDOR_ID
-
TIMESTAMP
-
PURPOSE_ID
-
RESTRICTION_TYPE
-
CHAR
-
V1_VERSION
-
V1_CREATED
-
V1_LAST_UPDATED
-
V1_CMP_ID
-
V1_CMP_VERSION
-
V1_CONSENT_SCREEN
-
V1_CONSENT_LANGUAGE
-
V1_VENDOR_LIST_VERSION
-
V1_PURPOSES_ALLOW
-
V1_VENDOR_MAX_VENDOR_ID
-
V1_VENDOR_IS_RANGE_ENCODING
-
V1_VENDOR_BITRANGE_FIELD
-
V1_VENDOR_DEFAULT_CONSENT
-
V1_VENDOR_NUM_ENTRIES
-
V1_PPC_PUBLISHER_PURPOSES_VERSION
-
V1_PPC_STANDARD_PURPOSES_ALLOWED
-
V1_PPC_NUMBER_CUSTOM_PURPOSES
-
V1_PPC_CUSTOM_PURPOSES_BITFIELD
-
-
Method Details
-
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
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 nameNullPointerException- 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
Returns the length of the field. -
getOffset
Returns the offset of the field. -
getEnd
Returns the offset of the next field.
-