forked from elaatifi/orika
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow user customized MappingStrategies
Break out the mapping strategy construction functionality to allow users to insert their own strategies.
- Loading branch information
Dan Jasek
committed
Sep 22, 2016
1 parent
465c383
commit 300e914
Showing
9 changed files
with
222 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
core/src/main/java/ma/glasnost/orika/MappingStrategyFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.