Interface IUnionValueDescriptor<D>
-
- Type Parameters:
D
- Type of the union discriminator.
- All Superinterfaces:
IValueDescriptor<Object,IUnionValueBuilder<D>>
,Serializable
public interface IUnionValueDescriptor<D> extends IValueDescriptor<Object,IUnionValueBuilder<D>>
AIValueDescriptor
for a union value. The value must conform to the restrictions of at least one value descriptor.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IUnionValueDescriptorBuilder<D>
configure()
Creates a new builder pre-configured with the settings of this descriptor.default EValueType
getBaseType()
D
getDefaultValueDiscriminator()
IDiscriminatedUnionMember<D,?>
getDefaultValueUnionMember()
Class<D>
getDiscriminatorClass()
default Class<?>
getJavaClass()
Map<D,IValueDescriptor<?,?>>
getUnionValueDescriptors()
IUnionValueDescriptor<D>
withDefaultValue(Object defaultValue)
IUnionValueDescriptor<D>
withDescription(String description)
-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.IValueDescriptor
acceptsValue, asAny, asBoolean, asConst, asFloat, asInteger, asLargeString, asList, asList, asMap, asMap, asNull, asRecord, asString, asTuple, asUnion, asUnion, asVoid, builder, getDefaultValue, getDescription, getFullType, getKnownProperties, getKnownProperties, intersect, is, unwrap
-
-
-
-
Method Detail
-
configure
IUnionValueDescriptorBuilder<D> configure()
Description copied from interface:IValueDescriptor
Creates a new builder pre-configured with the settings of this descriptor. Lets you e.g. add additional properties.- Specified by:
configure
in interfaceIValueDescriptor<Object,IUnionValueBuilder<D>>
- Returns:
- A new builder pre-configured with the settings of this descriptor.
-
getBaseType
default EValueType getBaseType()
- Specified by:
getBaseType
in interfaceIValueDescriptor<Object,IUnionValueBuilder<D>>
- Returns:
- The basic type of value described by this value descriptor.
-
getDefaultValueDiscriminator
D getDefaultValueDiscriminator()
- Returns:
- The discriminator value for the default value.
- Since:
- 8.1.0
-
getDefaultValueUnionMember
IDiscriminatedUnionMember<D,?> getDefaultValueUnionMember()
- Returns:
- The
getDefaultValueDiscriminator()
and theIValueDescriptor.getDefaultValue()
combined in aIDiscriminatedUnionMember
. - Since:
- 8.1.0
-
getDiscriminatorClass
Class<D> getDiscriminatorClass()
- Returns:
- The type of the union discriminator.
- Since:
- 8.1.0
-
getJavaClass
default Class<?> getJavaClass()
- Specified by:
getJavaClass
in interfaceIValueDescriptor<Object,IUnionValueBuilder<D>>
- Returns:
- The Java class of the values described by this descriptor.
-
getUnionValueDescriptors
Map<D,IValueDescriptor<?,?>> getUnionValueDescriptors()
- Returns:
- A map between each union discriminator and the value descriptor for the its value.
-
withDefaultValue
IUnionValueDescriptor<D> withDefaultValue(Object defaultValue)
- Specified by:
withDefaultValue
in interfaceIValueDescriptor<Object,IUnionValueBuilder<D>>
- Parameters:
defaultValue
- The new default value. May be changed when it does not conform to the restrictions imposed by this descriptor.- Returns:
- A new descriptor with the default value.
-
withDescription
IUnionValueDescriptor<D> withDescription(String description)
- Specified by:
withDescription
in interfaceIValueDescriptor<Object,IUnionValueBuilder<D>>
- Parameters:
description
- The new description.- Returns:
- A new descriptor with the given description.
-
-