Interface IUnionValueDescriptor
-
- All Superinterfaces:
IAttributeConfigurable<IValueDescriptor<Object,IUnionValueBuilder>>,IValueDescriptor<Object,IUnionValueBuilder>,Serializable
public interface IUnionValueDescriptor extends IValueDescriptor<Object,IUnionValueBuilder>
AIValueDescriptorfor 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 Deprecated Methods Modifier and Type Method Description IUnionValueDescriptorBuilderconfigure()Creates a new builder pre-configured with the settings of this descriptor.default EValueTypegetBaseType()Gets the basic type of the value described by this value descriptor.ObjectgetDefaultValueDiscriminator()Deprecated.IDiscriminatedUnionMember<?,?>getDefaultValueUnionMember()Deprecated.Just useIValueDescriptor.getDefaultValue().Class<?>getDiscriminatorClass()Deprecated.There is no discriminator anymore.default Class<Object>getJavaClass()Gets the Java class of the values described by this descriptor.List<IValueDescriptor<?,?>>getUnionValueDescriptorList()Gets a map between each union discriminator and the value descriptor for its value.Map<?,IValueDescriptor<?,?>>getUnionValueDescriptors()Deprecated.UsegetUnionValueDescriptorList()instead.IUnionValueDescriptorwithAddedAttribute(String key, Object value)Gets a new instance with the attribute at the given key changed to the given value.IUnionValueDescriptorwithAddedAttributes(Map<String,Object> newAttributes)Gets a new instance with the attributes changed to the given map of attributes.IUnionValueDescriptorwithAttributes(Map<String,Object> attributes)Gets a new instance with the attributes changed to the given map of attributes.IUnionValueDescriptorwithDefaultValue(Object defaultValue)Gets a new value descriptor with the default value changed to the given value.IUnionValueDescriptorwithDescription(String description)Deprecated.-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.IAttributeConfigurable
getAttribute, getAttribute, getBooleanAttribute, getBooleanAttribute, getFloatAttribute, getFloatAttribute, getIntegerAttribute, getIntegerAttribute, getStringAttribute, getStringAttribute
-
Methods inherited from interface de.xima.fc.interfaces.workflow.value.IValueDescriptor
acceptsValue, acceptsValue, asAny, asBoolean, asConst, asFloat, asInteger, asLargeString, asList, asList, asMap, asMap, asNull, asRecord, asString, asTuple, asUnion, asUnion, asVoid, builder, builder, getAttributes, getDefaultValue, getDescription, getFullType, getFullTypeWithRestrictions, getKnownProperties, getKnownProperties, intersect, is, match, unwrap
-
-
-
-
Method Detail
-
configure
IUnionValueDescriptorBuilder configure()
Description copied from interface:IValueDescriptorCreates a new builder pre-configured with the settings of this descriptor. Lets you e.g. add additional properties.- Specified by:
configurein interfaceIValueDescriptor<Object,IUnionValueBuilder>- Returns:
- A new builder pre-configured with the settings of this descriptor.
-
getBaseType
default EValueType getBaseType()
Description copied from interface:IValueDescriptorGets the basic type of the value described by this value descriptor.- Specified by:
getBaseTypein interfaceIValueDescriptor<Object,IUnionValueBuilder>- Returns:
- The value's basic type.
-
getDefaultValueDiscriminator
@Deprecated Object getDefaultValueDiscriminator()
Deprecated.UseIValueDescriptor.getDefaultValue(). There is no discriminator anymore.Gets the discriminator value for the default value.- Returns:
- Always null, unless a deprecated legacy method was used to set a default value with a discriminator.
- Since:
- 8.1.0
-
getDefaultValueUnionMember
@Deprecated IDiscriminatedUnionMember<?,?> getDefaultValueUnionMember()
Deprecated.Just useIValueDescriptor.getDefaultValue(). There is no discriminator anymore.Gets thegetDefaultValueDiscriminator()and theIValueDescriptor.getDefaultValue()combined in aIDiscriminatedUnionMember.- Returns:
- Always union member with its discriminator being null, unless a deprecated legacy method was used to set a default value with a discriminator.
- Since:
- 8.1.0
-
getDiscriminatorClass
@Deprecated Class<?> getDiscriminatorClass()
Deprecated.There is no discriminator anymore.Gets the type of the union discriminator.- Returns:
- Always
Object.class - Since:
- 8.1.0
-
getJavaClass
default Class<Object> getJavaClass()
Description copied from interface:IValueDescriptorGets the Java class of the values described by this descriptor.- Specified by:
getJavaClassin interfaceIValueDescriptor<Object,IUnionValueBuilder>- Returns:
- The value's Java class.
-
getUnionValueDescriptorList
List<IValueDescriptor<?,?>> getUnionValueDescriptorList()
Gets a map between each union discriminator and the value descriptor for its value.- Returns:
- A map with the union value descriptors.
-
getUnionValueDescriptors
@Deprecated Map<?,IValueDescriptor<?,?>> getUnionValueDescriptors()
Deprecated.UsegetUnionValueDescriptorList()instead.Gets a map between each union discriminator and the value descriptor for its value.- Returns:
- Always an empty map, unless a deprecated legacy method was used to set the union value descriptors.
-
withAddedAttribute
IUnionValueDescriptor withAddedAttribute(String key, Object value)
Description copied from interface:IAttributeConfigurableGets a new instance with the attribute at the given key changed to the given value.- Specified by:
withAddedAttributein interfaceIAttributeConfigurable<IValueDescriptor<Object,IUnionValueBuilder>>- Parameters:
key- The attribute key.value- The attribute value.- Returns:
- A new instance with the new attribute.
-
withAddedAttributes
IUnionValueDescriptor withAddedAttributes(Map<String,Object> newAttributes)
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Preserves other existing attributes and only adds or replaces the given ones.- Specified by:
withAddedAttributesin interfaceIAttributeConfigurable<IValueDescriptor<Object,IUnionValueBuilder>>- Parameters:
newAttributes- The new attributes to add (or replace).- Returns:
- A new instance with the current attributes plus the given attributes.
-
withAttributes
IUnionValueDescriptor withAttributes(Map<String,Object> attributes)
Description copied from interface:IAttributeConfigurableGets a new instance with the attributes changed to the given map of attributes. Replaces all existing attributes.- Specified by:
withAttributesin interfaceIAttributeConfigurable<IValueDescriptor<Object,IUnionValueBuilder>>- Parameters:
attributes- The new attributes.- Returns:
- A new instance with the given attributes.
-
withDefaultValue
IUnionValueDescriptor withDefaultValue(Object defaultValue)
Description copied from interface:IValueDescriptorGets a new value descriptor with the default value changed to the given value.- Specified by:
withDefaultValuein interfaceIValueDescriptor<Object,IUnionValueBuilder>- 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
@Deprecated IUnionValueDescriptor withDescription(String description)
Deprecated.Description copied from interface:IValueDescriptorGets a new value descriptor with the description changed to the given description.- Specified by:
withDescriptionin interfaceIValueDescriptor<Object,IUnionValueBuilder>- Parameters:
description- The new description.- Returns:
- A new descriptor with the given description.
-
-