All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redora.configuration.rdo.gwt.mvp.AppActivityMapper Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
/*
* DO NOT CHANGE THIS FILE. Changes will be overwritten.
* -----------------------------------------------------
* This file is generated by Redora (www.redora.net) a source code generator.
* Copyright to this file belongs to You: the person or organization who has
* used Redora to generate this file.
* Redora is released under the open source Apache License, but this generated code
* can be released under any license or stay unreleased, as wished by the copyright
* owner.
* 
* Unless required by applicable law or agreed to in writing, this software
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
* , either express or implied.
*/
package redora.configuration.rdo.gwt.mvp;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
import redora.client.mvp.*;
import redora.configuration.rdo.gwt.model.*;
import redora.configuration.rdo.gwt.mvp.view.*;
import redora.configuration.rdo.gwt.model.*;

public class AppActivityMapper implements ActivityMapper {

    private ClientFactory clientFactory;

    public AppActivityMapper(ClientFactory clientFactory) {
        super();
        this.clientFactory = clientFactory;
    }

    @Override
    public Activity getActivity(Place place) {
        if (place instanceof BrowsePlace) {
            if ("redoratrash".equals(((redora.client.mvp.Place)place).name)) {
                return new BrowseActivity(RedoraTrash.class, clientFactory);
            } else if ("redoraconfiguration".equals(((redora.client.mvp.Place)place).name)) {
                return new BrowseActivity(RedoraConfiguration.class, clientFactory);
            } else if ("redoratrash".equals(((redora.client.mvp.Place)place).name)) {
                return new BrowseActivity(RedoraTrash.class, clientFactory);
            } else if ("redoraconfiguration".equals(((redora.client.mvp.Place)place).name)) {
                return new BrowseActivity(RedoraConfiguration.class, clientFactory);
            }
        } else if (place instanceof EditPlace) {
            if ("redoratrash".equals(((redora.client.mvp.Place)place).name)) {
                return new EditActivity(RedoraTrash.class, clientFactory);
            } else if ("redoraconfiguration".equals(((redora.client.mvp.Place)place).name)) {
                return new EditActivity(RedoraConfiguration.class, clientFactory);
            } else if ("redoratrash".equals(((redora.client.mvp.Place)place).name)) {
                return new EditActivity(RedoraTrash.class, clientFactory);
            } else if ("redoraconfiguration".equals(((redora.client.mvp.Place)place).name)) {
                return new EditActivity(RedoraConfiguration.class, clientFactory);
            }
        }
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy