public IntegrationConfigItem clone() { IntegrationConfigItem clone = new IntegrationConfigItem(); clone.contents.putAll(contents); return clone; } }
public IntegrationConfig clone() { IntegrationConfig clone = new IntegrationConfig(); clone.apptentive = apptentive != null ? apptentive.clone() : null; clone.amazonAwsSns = amazonAwsSns != null ? amazonAwsSns.clone() : null; clone.urbanAirship = urbanAirship != null ? urbanAirship.clone() : null; clone.parse = parse != null ? parse.clone() : null; clone.listener = listener; return clone; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IntegrationConfig that = (IntegrationConfig) o; if (apptentive != null ? !apptentive.equals(that.apptentive) : that.apptentive != null) return false; if (amazonAwsSns != null ? !amazonAwsSns.equals(that.amazonAwsSns) : that.amazonAwsSns != null) return false; if (urbanAirship != null ? !urbanAirship.equals(that.urbanAirship) : that.urbanAirship != null) return false; return parse != null ? parse.equals(that.parse) : that.parse == null; }
public void setPushIntegration(int pushProvider, String token) { ApptentiveLog.v(CONVERSATION, "Setting push provider: %d with token %s", pushProvider, token); IntegrationConfig integrationConfig = getDevice().getIntegrationConfig(); IntegrationConfigItem item = new IntegrationConfigItem(); item.setToken(token); switch (pushProvider) { case Apptentive.PUSH_PROVIDER_APPTENTIVE: integrationConfig.setApptentive(item); break; case Apptentive.PUSH_PROVIDER_PARSE: integrationConfig.setParse(item); break; case Apptentive.PUSH_PROVIDER_URBAN_AIRSHIP: integrationConfig.setUrbanAirship(item); break; case Apptentive.PUSH_PROVIDER_AMAZON_AWS_SNS: integrationConfig.setAmazonAwsSns(item); break; default: ApptentiveLog.e(CONVERSATION, "Invalid pushProvider: %d", pushProvider); break; } }
@Override public int hashCode() { int result = apptentive != null ? apptentive.hashCode() : 0; result = 31 * result + (amazonAwsSns != null ? amazonAwsSns.hashCode() : 0); result = 31 * result + (urbanAirship != null ? urbanAirship.hashCode() : 0); result = 31 * result + (parse != null ? parse.hashCode() : 0); return result; }
public IntegrationConfigItem(JSONObject old) { String oldToken = old.optString(KEY_TOKEN, null); setToken(oldToken); }
public com.apptentive.android.sdk.model.CustomData toJson() { try { com.apptentive.android.sdk.model.CustomData ret = new com.apptentive.android.sdk.model.CustomData(); if (apptentive != null) { ret.put(INTEGRATION_APPTENTIVE_PUSH, apptentive.toJson()); } if (amazonAwsSns != null) { ret.put(INTEGRATION_AWS_SNS, amazonAwsSns.toJson()); } if (urbanAirship != null) { ret.put(INTEGRATION_URBAN_AIRSHIP, urbanAirship.toJson()); } if (parse != null) { ret.put(INTEGRATION_PARSE, parse.toJson()); } return ret; } catch (JSONException e) { logException(e); } return null; }
while (it.hasNext()) { String key = (String) it.next(); IntegrationConfigItem item = new IntegrationConfigItem(integrationConfigOld); switch (key) { case INTEGRATION_APPTENTIVE_PUSH:
listenerFired = false; data.getDevice().getIntegrationConfig().setAmazonAwsSns(new IntegrationConfigItem()); assertTrue(listenerFired); listenerFired = false; listenerFired = false; data.getDevice().getIntegrationConfig().setAmazonAwsSns(new IntegrationConfigItem()); assertTrue(listenerFired); listenerFired = false;