Examples of ChannelMapping


Examples of org.fluxtream.core.domain.ChannelMapping

    private JSONObject retrievePhotoHistory(UpdateInfo updateInfo, long from,
      long to, int page) throws Exception {

        List<ChannelMapping> mappings = bodyTrackHelper.getChannelMappings(updateInfo.apiKey, ObjectType.getObjectType(updateInfo.apiKey.getConnector(),"photo").value());
        if (mappings.size() == 0){
            ChannelMapping mapping = new ChannelMapping();
            mapping.deviceName = "Flickr";
            mapping.channelName = "photo";
            mapping.timeType = ChannelMapping.TimeType.local;
            mapping.channelType = ChannelMapping.ChannelType.photo;
            mapping.guestId = updateInfo.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

    }

    private void initChannelMapping(UpdateInfo updateInfo) {
        List<ChannelMapping> mappings = bodyTrackHelper.getChannelMappings(updateInfo.apiKey);
        if (mappings.size() == 0){
            ChannelMapping mapping = new ChannelMapping();
            mapping.deviceName = "lastfm";
            mapping.channelName = "tracks";
            mapping.timeType = ChannelMapping.TimeType.gmt;
            mapping.channelType = ChannelMapping.ChannelType.timespan;
            mapping.guestId = updateInfo.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

        initChannelMapping(apiKey, connectorSettings.calendars);
    }

    private void initChannelMapping(ApiKey apiKey, final List<CalendarConfig> calendarConfigs) {
        bodyTrackHelper.deleteChannelMappings(apiKey);
        ChannelMapping mapping = new ChannelMapping();
        mapping.deviceName = "google_calendar";
        mapping.channelName = "events";
        mapping.timeType = ChannelMapping.TimeType.gmt;
        mapping.channelType = ChannelMapping.ChannelType.timespan;
        mapping.guestId = apiKey.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

    }

    private void setChannelMapping(ApiKey apiKey, final List<NotebookConfig> notebookConfigs) {
        bodyTrackHelper.deleteChannelMappings(apiKey);

        ChannelMapping mapping = new ChannelMapping();
        mapping.deviceName = "Evernote";
        mapping.channelName = "note";
        mapping.timeType = ChannelMapping.TimeType.gmt;
        mapping.channelType = ChannelMapping.ChannelType.timespan;
        mapping.guestId = apiKey.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

        // format (yyyy-mm-dd).  The list returned by getDatesSince includes the date passed in (in this case fullUpdateStartDate)
        // but getDatesBefore does not, so fullUpdateStartDate is processed as a full update.

        List<ChannelMapping> mappings = bodyTrackHelper.getChannelMappings(updateInfo.apiKey);
        if (mappings.size() == 0){
            ChannelMapping mapping = new ChannelMapping();
            mapping.deviceName = "moves";
            mapping.channelName = "data";
            mapping.timeType = ChannelMapping.TimeType.gmt;
            mapping.channelType = ChannelMapping.ChannelType.timespan;
            mapping.guestId = updateInfo.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

    private void setChannelMapping(final UpdateInfo updateInfo) {
        List<ChannelMapping> mappings = bodyTrackHelper.getChannelMappings(updateInfo.apiKey);
        if (mappings.size() != 0)
            return;
        System.out.println("reconfiguring channel mapping");
        ChannelMapping mapping = new ChannelMapping();
        mapping.deviceName = "Jawbone_UP";
        mapping.channelName = "sleep";
        mapping.timeType = ChannelMapping.TimeType.gmt;
        mapping.channelType = ChannelMapping.ChannelType.timespan;
        mapping.guestId = updateInfo.apiKey.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

        // namely when the updater is updating tweets for the first time.
        if (updateInfo.objectTypes().get(0)!=ObjectType.getObjectType(updateInfo.apiKey.getConnector(), "tweet"))
            return;
        List<ChannelMapping> mappings = bodyTrackHelper.getChannelMappings(updateInfo.apiKey);
        if (mappings==null||mappings.size() == 0){
            ChannelMapping mapping = new ChannelMapping();
            mapping.deviceName = "twitter";
            mapping.channelName = "activity";
            mapping.timeType = ChannelMapping.TimeType.gmt;
            mapping.channelType = ChannelMapping.ChannelType.timespan;
            mapping.guestId = updateInfo.getGuestId();
View Full Code Here

Examples of org.fluxtream.core.domain.ChannelMapping

                        call_logChannelExists = true;
                    if (mapping.deviceName.equals("sms_backup") && mapping.channelName.equals("photo"))
                        photoChannelExists = true;
                }
                if (!call_logChannelExists){
                    ChannelMapping mapping = new ChannelMapping();
                    mapping.deviceName = "sms_backup";
                    mapping.channelName = "call_log";
                    mapping.timeType = ChannelMapping.TimeType.gmt;
                    mapping.channelType = ChannelMapping.ChannelType.timespan;
                    mapping.guestId = updateInfo.getGuestId();
                    mapping.apiKeyId = updateInfo.apiKey.getId();
                    mapping.objectTypeId = type.value();
                    bodyTrackHelper.persistChannelMapping(mapping);

                    ChannelStyle channelStyle = new ChannelStyle();
                    channelStyle.timespanStyles = new MainTimespanStyle();
                    channelStyle.timespanStyles.defaultStyle = new TimespanStyle();
                    channelStyle.timespanStyles.defaultStyle.fillColor = "green";
                    channelStyle.timespanStyles.defaultStyle.borderColor = "#006000";
                    channelStyle.timespanStyles.defaultStyle.borderWidth = 2;
                    channelStyle.timespanStyles.defaultStyle.top = 0.0;
                    channelStyle.timespanStyles.defaultStyle.bottom = 1.0;

                    bodyTrackHelper.setBuiltinDefaultStyle(updateInfo.getGuestId(),"sms_backup","call_log",channelStyle);

                }
                if (!photoChannelExists){
                    ChannelMapping mapping;
                    mapping = new ChannelMapping();
                    mapping.deviceName = "sms_backup";
                    mapping.channelName = "photo";
                    mapping.timeType = ChannelMapping.TimeType.gmt;
                    mapping.channelType = ChannelMapping.ChannelType.photo;
                    mapping.guestId = updateInfo.getGuestId();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.