Package de.espirit.firstspirit.transport
Class LayerMapper.LayerNameBasedLayerMapper
java.lang.Object
de.espirit.firstspirit.transport.LayerMapper.LayerNameBasedLayerMapper
- All Implemented Interfaces:
LayerMapper
,Serializable
- Enclosing interface:
- LayerMapper
public static final class LayerMapper.LayerNameBasedLayerMapper
extends Object
implements LayerMapper
Default implementation based on a given map mapping from source layer name to target layer name.
Not suitable for External Sync because source layer name is not available using external sync
use
LayerMapper.SchemaUidBasedLayerMapper
.- 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=source layer name, value= target layer name).@NotNull String
getLayer
(@NotNull LayerMapper.MappingContext mappingContext)
-
Method Details
-
from
public static LayerMapper.LayerNameBasedLayerMapper from(@NotNull @NotNull Map<String, String> mapping) Create an layer mapping instance from a givenMap
based on layer names (key=source layer name, value= target layer name).- Parameters:
mapping
- Mapping source layer name 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:
-