Sha256: 1037d4ccd50b64340ab3c0992e24118a50ae34d1a3ac1c9cf87286a152462e36

Contents?: true

Size: 841 Bytes

Versions: 5

Compression:

Stored size: 841 Bytes

Contents

package <%= base_package %>;

import <%= managed_package %>.ActivityFactory;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
import com.google.inject.Inject;

import de.mkristian.gwt.rails.Notice;

public class ActivityPlaceActivityMapper implements ActivityMapper {
    protected final ActivityFactory factory;
    protected final Notice notice;

    @Inject
    public ActivityPlaceActivityMapper(ActivityFactory factory, Notice notice) {
        this.notice = notice;
        this.factory = factory;
    }


    public Activity getActivity(Place place) {
        if (place instanceof ActivityPlace) {
            return ((ActivityPlace) place).create(factory);
        }
        notice.setText("nothing to see");
        return null;
    }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
resty-generators-0.4.0 lib/generators/resty/setup/templates/ActivityPlaceActivityMapper.java
resty-generators-0.3.3 lib/generators/resty/setup/templates/ActivityPlaceActivityMapper.java
resty-generators-0.3.2 lib/generators/resty/setup/templates/ActivityPlaceActivityMapper.java
resty-generators-0.3.1 lib/generators/resty/setup/templates/ActivityPlaceActivityMapper.java
resty-generators-0.3.0 lib/generators/resty/setup/templates/ActivityPlaceActivityMapper.java