Interface IUnionValueDescriptorBuilder
- All Superinterfaces:
org.apache.commons.lang3.builder.Builder<IUnionValueDescriptor>, IValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>
public interface IUnionValueDescriptorBuilder
extends IValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>
A
IValueDescriptorBuilder for creating a union value descriptor. Use
IValueDescriptorFactory.unionBuilder() to create a builder.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault IUnionValueDescriptorBuilderadd(IValueDescriptor<?, ?> descriptor) Adds a discriminated union member to the list of a members of the union.add(IValueDescriptorCreator creator) Adds a discriminated union member to the list of a members of the union.default IUnionValueDescriptorBuilderadd(Object ignoredDiscriminator, IValueDescriptor<?, ?> descriptor) Deprecated.add(Object ignoredDiscriminator, IValueDescriptorCreator creator) Deprecated.Useadd(IValueDescriptorCreator)instead.default IUnionValueDescriptorBuilderaddAndUseAsDefault(IValueDescriptor<?, ?> descriptor) Adds a discriminated union member to the list of a members of the union.Adds a discriminated union member to the list of a members of the union.default IUnionValueDescriptorBuilderaddAndUseAsDefault(Object ignoredDiscriminator, IValueDescriptor<?, ?> descriptor) Deprecated.UseaddAndUseAsDefault(IValueDescriptor)instead.addAndUseAsDefault(Object ignoredDiscriminator, IValueDescriptorCreator creator) Deprecated.UseaddAndUseAsDefault(IValueDescriptorCreator)instead.addAttribute(String key, Object value) Adds a custom attribute to the value descriptor.addAttributes(Map<String, Object> attributes) Adds custom attributes to the value descriptor.attributes(Map<String, Object> attributes) Set the custom attributes for the value descriptor.defaultValue(Object value) Sets the default value of the union.description(String description) Deprecated.Methods inherited from interface org.apache.commons.lang3.builder.Builder
build
-
Method Details
-
add
@CanIgnoreReturnValue @Deprecated default IUnionValueDescriptorBuilder add(Object ignoredDiscriminator, IValueDescriptor<?, ?> descriptor) Deprecated.Useadd(IValueDescriptor)instead. The discriminator is ignored.Adds a discriminated union member to the list of a members of the union.- Parameters:
ignoredDiscriminator- Unused.descriptor- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
add
Adds a discriminated union member to the list of a members of the union.- Parameters:
descriptor- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
add
@CanIgnoreReturnValue @Deprecated IUnionValueDescriptorBuilder add(Object ignoredDiscriminator, IValueDescriptorCreator creator) Deprecated.Useadd(IValueDescriptorCreator)instead. The discriminator is ignored.Adds a discriminated union member to the list of a members of the union.- Parameters:
ignoredDiscriminator- Unused.creator- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
add
Adds a discriminated union member to the list of a members of the union.- Parameters:
creator- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
@CanIgnoreReturnValue @Deprecated default IUnionValueDescriptorBuilder addAndUseAsDefault(Object ignoredDiscriminator, IValueDescriptor<?, ?> descriptor) Deprecated.UseaddAndUseAsDefault(IValueDescriptor)instead. The discriminator is ignored.Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Parameters:
ignoredDiscriminator- Unused.descriptor- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
@CanIgnoreReturnValue default IUnionValueDescriptorBuilder addAndUseAsDefault(IValueDescriptor<?, ?> descriptor) Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Parameters:
descriptor- Value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
@CanIgnoreReturnValue @Deprecated IUnionValueDescriptorBuilder addAndUseAsDefault(Object ignoredDiscriminator, IValueDescriptorCreator creator) Deprecated.UseaddAndUseAsDefault(IValueDescriptorCreator)instead. The discriminator is ignored.Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Parameters:
ignoredDiscriminator- Unused.creator- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAndUseAsDefault
@CanIgnoreReturnValue IUnionValueDescriptorBuilder addAndUseAsDefault(IValueDescriptorCreator creator) Adds a discriminated union member to the list of a members of the union. Uses the member as the default value when no explicit value is provided.- Parameters:
creator- Value creator for the value descriptor for the value at the given discriminator.- Returns:
- This value descriptor builder for chaining method calls.
-
addAttribute
Description copied from interface:IValueDescriptorBuilderAdds a custom attribute to the value descriptor. This can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
addAttributein interfaceIValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>- Parameters:
key- The attribute key.value- The attribute value.- Returns:
- This builder instance for chaining method calls.
- See Also:
-
addAttributes
Description copied from interface:IValueDescriptorBuilderAdds custom attributes to the value descriptor. These can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
addAttributesin interfaceIValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>- Returns:
- This builder instance for chaining method calls.
- See Also:
-
attributes
Description copied from interface:IValueDescriptorBuilderSet the custom attributes for the value descriptor. These can be used to store additional metadata about the value that is not covered by the standard properties of the descriptor. The exact meaning of the attributes depends on the context in which the descriptor is used.See
StandardValueDescriptorAttributesfor some standard attribute keys and values you can use.- Specified by:
attributesin interfaceIValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>- Returns:
- This builder instance for chaining method calls.
- See Also:
-
defaultValue
Sets the default value of the union. The value must conform to one of the union members that were or will be added before callingBuilder.build().- Parameters:
value- The default value.- Returns:
- This value descriptor builder for chaining method calls.
-
description
Deprecated.Description copied from interface:IValueDescriptorBuilderSets the description for the value. This description can be used in UIs to provide additional information about the value to users. It can be either a localized message or an I18N key that will be resolved at runtime.- Specified by:
descriptionin interfaceIValueDescriptorBuilder<Object, IUnionValueBuilder, IUnionValueDescriptor>- Parameters:
description- The description for the value.- Returns:
- This builder instance for chaining method calls.
-
add(IValueDescriptor)instead.