Class FieldDefinitionImpl
- All Implemented Interfaces:
FieldDefinition
,io.vrap.rmf.base.client.ModelBase
Defines a Custom Field and its meta-information. This FieldDefinition is similar to an AttributeDefinition of Product Types.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Defines the visual representation of the field in user interfaces like the Merchant Center.getLabel()
A human-readable label for the field.getName()
Name of the Custom Field to define.Defines whether the field is required to have a value.getType()
Data type of the Custom Field to define.int
hashCode()
void
setInputHint
(TypeTextInputHint inputHint) Defines the visual representation of the field in user interfaces like the Merchant Center.void
setLabel
(LocalizedString label) A human-readable label for the field.void
Name of the Custom Field to define.void
setRequired
(Boolean required) Defines whether the field is required to have a value.void
Data type of the Custom Field to define.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.type.FieldDefinition
withFieldDefinition
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
FieldDefinitionImpl
public FieldDefinitionImpl()create empty instance
-
-
Method Details
-
getType
Data type of the Custom Field to define.
- Specified by:
getType
in interfaceFieldDefinition
- Returns:
- type
-
getName
Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same
name
in another Type, both FieldDefinitions must have the sametype
.- Specified by:
getName
in interfaceFieldDefinition
- Returns:
- name
-
getLabel
A human-readable label for the field.
- Specified by:
getLabel
in interfaceFieldDefinition
- Returns:
- label
-
getRequired
Defines whether the field is required to have a value.
- Specified by:
getRequired
in interfaceFieldDefinition
- Returns:
- required
-
getInputHint
Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.
- Specified by:
getInputHint
in interfaceFieldDefinition
- Returns:
- inputHint
-
setType
Description copied from interface:FieldDefinition
Data type of the Custom Field to define.
- Specified by:
setType
in interfaceFieldDefinition
- Parameters:
type
- value to be set
-
setName
Description copied from interface:FieldDefinition
Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same
name
in another Type, both FieldDefinitions must have the sametype
.- Specified by:
setName
in interfaceFieldDefinition
- Parameters:
name
- value to be set
-
setLabel
Description copied from interface:FieldDefinition
A human-readable label for the field.
- Specified by:
setLabel
in interfaceFieldDefinition
- Parameters:
label
- value to be set
-
setRequired
Description copied from interface:FieldDefinition
Defines whether the field is required to have a value.
- Specified by:
setRequired
in interfaceFieldDefinition
- Parameters:
required
- value to be set
-
setInputHint
Description copied from interface:FieldDefinition
Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.
- Specified by:
setInputHint
in interfaceFieldDefinition
- Parameters:
inputHint
- value to be set
-
equals
-
hashCode
public int hashCode()
-