@Override public void updateInstallation(Installation installationToUpdate, Installation postedInstallation) { // copy the "updateable" values: mergeCategories(installationToUpdate, postedInstallation.getCategories()); installationToUpdate.setDeviceToken(postedInstallation.getDeviceToken()); installationToUpdate.setAlias(postedInstallation.getAlias()); installationToUpdate.setDeviceType(postedInstallation.getDeviceType()); installationToUpdate.setOperatingSystem(postedInstallation .getOperatingSystem()); installationToUpdate.setOsVersion(postedInstallation.getOsVersion()); installationToUpdate.setEnabled(postedInstallation.isEnabled()); installationToUpdate.setPlatform(postedInstallation.getPlatform()); // update it: updateInstallation(installationToUpdate); // unsubscribe Android devices from topics that device should no longer be subscribed to if (installationToUpdate.getVariant().getType() == VariantType.ANDROID) { unsubscribeOldTopics(installationToUpdate); } }