Added JavaDocs to our custom ActivityManager implementations

This commit is contained in:
Steffen Schaefer committed 2016-06-21 11:25:17 +02:00
1 parent 036cb1626d
commit b6422c3d04
4 files changed
+30

No files matched your search

@@ -5,6 +5,10 @@ import com.google.gwt.activity.shared.ActivityMapper;
import com.google.web.bindery.event.shared.EventBus;
import com.sap.sailing.gwt.home.shared.app.SailingActivityManager;
/**
* Ensures that {@link DesktopResettableNavigationPathDisplay} will be correcly informed about the Activity type when
* the current activity changes.
*/
public class DesktopActivityManager extends SailingActivityManager<DesktopResettableNavigationPathDisplay> {
public DesktopActivityManager(ActivityMapper mapper, EventBus eventBus) {
@@ -5,6 +5,13 @@ import com.google.gwt.activity.shared.ActivityMapper;
import com.google.web.bindery.event.shared.EventBus;
import com.sap.sse.gwt.client.mvp.CustomActivityManager;
/**
* Specific {@link CustomActivityManager} that controls a {@link ResettableNavigationPathDisplay} by resetting the
* navigation path before activation of an activity. With that, there is no wrong path in the navigation path if an
* acitivity defines a navigation path by itself.
*
* @param <NPD> the concrete {@link ResettableNavigationPathDisplay} used by this ActivityManager.
*/
public class SailingActivityManager<NPD extends ResettableNavigationPathDisplay> extends CustomActivityManager {
private NPD navigationPathDisplay;
@@ -1,9 +1,14 @@
package com.sap.sse.gwt.client.mvp;
import com.google.gwt.activity.shared.ActivityManager;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
import com.google.web.bindery.event.shared.EventBus;
/**
* Custom {@link ActivityManager} implementation that fires a {@link PlaceChangedEvent} on the given {@link EventBus}
* whenever the current place changed.
*/
public class CustomActivityManager extends DelegatingActivityManager {
private EventBus eventBus;
@@ -10,6 +10,10 @@ import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;
/**
* Custom {@link ActivityManager} implementation that allows hooking into the lifecycle.
*
*/
public class DelegatingActivityManager extends ActivityManager {
private final ActivityManager realActivityManager;
@@ -35,9 +39,19 @@ public class DelegatingActivityManager extends ActivityManager {
realActivityManager.setDisplay(display);
}
/**
* To be overwritten by sublcasses to hook into the lifecycle.
*
* @param activity the activity to be started
*/
protected void beforeActivityStart(Activity activity) {
}
/**
* To be overwritten by sublcasses to hook into the lifecycle.
*
* @param activity the place that has been started
*/
protected void afterPlaceActivation(Place place) {
}