Interface AbstractMappingConfigItem<M extends AbstractMappingType>
- Type Parameters:
M- Type of the mapping bean.
- All Known Implementing Classes:
AutoAssignMappingConfigItem,InboundMappingConfigItem,MappingConfigItem,MetadataMappingConfigItem,ObjectTemplateMappingConfigItem
public interface AbstractMappingConfigItem<M extends AbstractMappingType>
Functionality common to all "mapping config items". In the form of a mixin, as the superclass is
ConfigurationItem.-
Method Summary
Modifier and TypeMethodDescription<X extends ConfigurationItem<T>>
Xdefault voidcheckNamespace(@NotNull QName name, String expectedNamespace) <X extends Serializable & Cloneable,CI extends ConfigurationItem<X>>
CIdefault voidconfigCheck(boolean value, String template, Object... arguments) Checks the value, and if it's `false`, emits aConfigurationException.default @NotNull ConfigurationExceptionconfigException(String template, Object... arguments) default @NotNull ConfigurationExceptionconfigException(Throwable cause, String template, Object... arguments) default <V> VconfigNonNull(V value, String template, Object... arguments) AsconfigCheck(boolean, String, Object...), but checks that the value is not null.default @NotNull QNameenforceNamespace(@NotNull QName name, @NotNull String requiredNamespace) Just likeQNameUtil.enforceNamespace(QName, String)but throwingConfigurationException.@NotNull Stringdefault @NotNull StringgetLocalPart(@NotNull QName name, String expectedNamespace) default @Nullable StringgetName()default booleandefault booleanisStrong()default <C extends Collection<?>>
Cdefault <C extends Collection<?>>
Cdefault <V> VEven more shortened version.@NotNull ConfigurationItemOriginorigin()SeeConfigurationItem.origin.default @NotNull ConfigurationItemOrigindefault <C extends Containerable>
@NotNull OriginProvider<C>originProviderFor(@NotNull ItemPath path) default voiddefault voiddefault <CI extends ConfigurationItem<M>>
CIsetTargetIfMissing(@NotNull ItemPath path, Class<CI> clazz) See LensUtil.setMappingTargetdefault <C> Csingle(Collection<? extends C> collection, String template, Object... arguments) default @NotNull ItemNamesingleNameRequired(ItemPathType name, Object itemDesc) value()SeeConfigurationItem.value.
-
Method Details
-
setTargetIfMissing
@NotNull default <CI extends ConfigurationItem<M>> CI setTargetIfMissing(@NotNull @NotNull ItemPath path, Class<CI> clazz) See LensUtil.setMappingTarget -
getName
-
isStrong
default boolean isStrong() -
setDefaultStrong
default void setDefaultStrong() -
setDefaultRelativityAbsolute
default void setDefaultRelativityAbsolute() -
isEnabled
default boolean isEnabled() -
value
SeeConfigurationItem.value. -
origin
SeeConfigurationItem.origin. -
as
-
child
@Contract("null, _, _ -> null; !null, _, _ -> !null") <X extends Serializable & Cloneable,CI extends ConfigurationItem<X>> CI child(@Nullable X value, @NotNull @NotNull Class<CI> clazz, Object... pathSegments) -
fullDescription
-
configCheck
@Contract("false, _, _ -> fail") default void configCheck(boolean value, String template, Object... arguments) throws ConfigurationException Checks the value, and if it's `false`, emits aConfigurationException. Note thatConfigurationItem.DESCcan be used as a placeholder forfullDescription()in the `arguments`.- Throws:
ConfigurationException
-
checkNamespace
default void checkNamespace(@NotNull @NotNull QName name, String expectedNamespace) throws ConfigurationException - Throws:
ConfigurationException
-
enforceNamespace
@NotNull default @NotNull QName enforceNamespace(@NotNull @NotNull QName name, @NotNull @NotNull String requiredNamespace) throws ConfigurationException Just likeQNameUtil.enforceNamespace(QName, String)but throwingConfigurationException.- Throws:
ConfigurationException
-
getLocalPart
@NotNull default @NotNull String getLocalPart(@NotNull @NotNull QName name, String expectedNamespace) throws ConfigurationException - Throws:
ConfigurationException
-
configException
@NotNull default @NotNull ConfigurationException configException(Throwable cause, String template, Object... arguments) -
configException
@NotNull default @NotNull ConfigurationException configException(String template, Object... arguments) -
configNonNull
@Contract("null, _, _ -> fail") @NotNull default <V> V configNonNull(V value, String template, Object... arguments) throws ConfigurationException AsconfigCheck(boolean, String, Object...), but checks that the value is not null.- Throws:
ConfigurationException
-
nonNull
@Contract("null, _ -> fail") @NotNull default <V> V nonNull(V value, Object itemDesc) throws ConfigurationException Even more shortened version.- Throws:
ConfigurationException
-
nonEmpty
@NotNull default <C extends Collection<?>> C nonEmpty(C collection, Object itemDescription) throws ConfigurationException - Throws:
ConfigurationException
-
nonEmpty
@NotNull default <C extends Collection<?>> C nonEmpty(C collection, String template, Object... arguments) throws ConfigurationException - Throws:
ConfigurationException
-
singleNameRequired
@NotNull default @NotNull ItemName singleNameRequired(ItemPathType name, Object itemDesc) throws ConfigurationException - Throws:
ConfigurationException
-
single
@Nullable default <C> C single(Collection<? extends C> collection, String template, Object... arguments) throws ConfigurationException - Throws:
ConfigurationException
-
originProviderFor
@NotNull default <C extends Containerable> @NotNull OriginProvider<C> originProviderFor(@NotNull @NotNull ItemPath path) -
originFor
-