Created
November 15, 2011 00:50
-
-
Save christiangoudreau/1365739 to your computer and use it in GitHub Desktop.
Tokenizers / ActivityMapper
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
@WithTokenizers({WelcomePlace.Tokenizer.class}) | |
public interface AdminPlaceHistoryMapper extends PlaceHistoryMapper { | |
} | |
public class ContentActivityMapper implements ActivityMapper { | |
private final Provider<WelcomeActivity> appActivityProvider; | |
@Inject | |
public ContentActivityMapper(final Provider<WelcomeActivity> appActivityProvider) { | |
this.appActivityProvider = appActivityProvider; | |
} | |
@Override | |
public Activity getActivity(Place place) { | |
if (place instanceof WelcomePlace) { | |
return appActivityProvider.get().withPlace(place); | |
} | |
return appActivityProvider.get().withPlace(place); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment