diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-25 23:50:42 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-25 23:50:42 -0800 |
commit | 34a5823cb19d4b957da1c0bdda426eb8e76950d2 (patch) | |
tree | 7d4b0efb5614e9c0aa0adac8f6b8a5c08041fa50 /src/org/traccar/MainModule.java | |
parent | e037b4a39ccc2c93bf738b391b02add31a310d4e (diff) | |
download | trackermap-server-34a5823cb19d4b957da1c0bdda426eb8e76950d2.tar.gz trackermap-server-34a5823cb19d4b957da1c0bdda426eb8e76950d2.tar.bz2 trackermap-server-34a5823cb19d4b957da1c0bdda426eb8e76950d2.zip |
Refactor copy attributes handler
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r-- | src/org/traccar/MainModule.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java index cd5f2568e..34ece8658 100644 --- a/src/org/traccar/MainModule.java +++ b/src/org/traccar/MainModule.java @@ -43,6 +43,7 @@ import org.traccar.geolocation.GoogleGeolocationProvider; import org.traccar.geolocation.MozillaGeolocationProvider; import org.traccar.geolocation.OpenCellIdGeolocationProvider; import org.traccar.geolocation.UnwiredGeolocationProvider; +import org.traccar.handler.CopyAttributesHandler; import org.traccar.handler.DistanceHandler; import org.traccar.handler.EngineHoursHandler; import org.traccar.handler.FilterHandler; @@ -237,6 +238,15 @@ public class MainModule extends AbstractModule { return null; } + @Singleton + @Provides + public static CopyAttributesHandler provideCopyAttributesHandler(Config config, IdentityManager identityManager) { + if (config.getBoolean(Keys.PROCESSING_COPY_ATTRIBUTES_ENABLE)) { + return new CopyAttributesHandler(identityManager); + } + return null; + } + @Override protected void configure() { binder().requireExplicitBindings(); |