Package de.espirit.firstspirit.transport
Class LayerMapper.SchemaUidBasedLayerMapper
java.lang.Object
de.espirit.firstspirit.transport.LayerMapper.SchemaUidBasedLayerMapper
- All Implemented Interfaces:
LayerMapper
,Serializable
- Enclosing interface:
- LayerMapper
public static final class LayerMapper.SchemaUidBasedLayerMapper
extends Object
implements LayerMapper
Default implementation of a layer mapper using a given map mapping schema uid
to target layer name.
- Since:
- 5.2.513
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.transport.LayerMapper
LayerMapper.LayerNameBasedLayerMapper, LayerMapper.MappingContext, LayerMapper.SchemaUidBasedLayerMapper
-
Field Summary
Fields inherited from interface de.espirit.firstspirit.transport.LayerMapper
CREATE_NEW_DEFAULT_LAYER, CREATE_NEW_DEFAULT_LAYER_MAPPER
-
Method Summary
Modifier and TypeMethodDescriptionCreate an layer mapping instance from a givenMap
based on layer names (key=schema uid, value= target layer name).@NotNull String
getLayer
(@NotNull LayerMapper.MappingContext mappingContext)
-
Method Details
-
from
public static LayerMapper.SchemaUidBasedLayerMapper from(@NotNull @NotNull Map<String, String> mapping) Create an layer mapping instance from a givenMap
based on layer names (key=schema uid, value= target layer name).- Parameters:
mapping
- Mapping schema uid to target layer name.- Since:
- 5.2.513
-
getLayer
@NotNull public @NotNull String getLayer(@NotNull @NotNull LayerMapper.MappingContext mappingContext) Gets thename
of thelayer
to be used for the given schema. ReturnLayerMapper.CREATE_NEW_DEFAULT_LAYER
to force creation of a newdefault layer
in the target project which should be used for the transported schema.- Specified by:
getLayer
in interfaceLayerMapper
- Parameters:
mappingContext
- mapping data related to the transported schema- Returns:
- The
name
of thelayer
to be used. - Since:
- 5.2.513
- See Also:
-