From 5e796ce81ff224bc6874a5e2de5fa0f00d7012d3 Mon Sep 17 00:00:00 2001 From: Dan Jasek Date: Wed, 14 Dec 2016 18:29:35 -0700 Subject: [PATCH] Break out the mapping strategy construction functionality to allow users to insert their own strategies. --- .../ma/glasnost/orika/MappingStrategyFactory.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 core/src/main/java/ma/glasnost/orika/MappingStrategyFactory.java diff --git a/core/src/main/java/ma/glasnost/orika/MappingStrategyFactory.java b/core/src/main/java/ma/glasnost/orika/MappingStrategyFactory.java new file mode 100644 index 00000000..e5aa638d --- /dev/null +++ b/core/src/main/java/ma/glasnost/orika/MappingStrategyFactory.java @@ -0,0 +1,15 @@ +package ma.glasnost.orika; + +import ma.glasnost.orika.impl.mapping.strategy.MappingStrategyRecorder; + +public interface MappingStrategyFactory { + /** + * Identifies if a mapping strategy can be applied to a scenario with the given context. + */ + boolean isApplicable(MappingStrategyRecorder data); + + /** + * Builds the mapping strategy to be applied to the given context. + */ + MappingStrategy build(MappingStrategyRecorder data); +}