use of org.orcid.jaxb.model.record_v2.Preferences in project ORCID-Source by ORCID.
the class ValidateV2RC2SamplesTest method testUnmarshallPreferences.
@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
Preferences preferences = (Preferences) unmarshallFromPath("/record_2.0_rc2/samples/preferences-2.0_rc2.xml", Preferences.class, "/record_2.0_rc2/preferences-2.0_rc2.xsd");
assertNotNull(preferences);
assertNotNull(preferences.getLocale());
assertEquals(Locale.EN, preferences.getLocale());
}
use of org.orcid.jaxb.model.record_v2.Preferences in project ORCID-Source by ORCID.
the class ValidateV2_1SamplesTest method testUnmarshallPreferences.
@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
Preferences preferences = (Preferences) unmarshallFromPath("/record_2.1/samples/read_samples/preferences-2.1.xml", Preferences.class, "/record_2.1/preferences-2.1.xsd");
assertNotNull(preferences);
assertNotNull(preferences.getLocale());
assertEquals(Locale.EN, preferences.getLocale());
}
use of org.orcid.jaxb.model.record_v2.Preferences in project ORCID-Source by ORCID.
the class ValidateV2SamplesTest method testMarshallPreferences.
@Test
public void testMarshallPreferences() throws JAXBException, SAXException, URISyntaxException {
Preferences object = (Preferences) unmarshallFromPath("/record_2.0/samples/read_samples/preferences-2.0.xml", Preferences.class);
marshall(object, "/record_2.0/preferences-2.0.xsd");
}
use of org.orcid.jaxb.model.record_v2.Preferences in project ORCID-Source by ORCID.
the class ValidateV2RC4SamplesTest method testUnmarshallPreferences.
@Test
public void testUnmarshallPreferences() throws SAXException, URISyntaxException {
Preferences preferences = (Preferences) unmarshallFromPath("/record_2.0_rc4/samples/preferences-2.0_rc4.xml", Preferences.class, "/record_2.0_rc4/preferences-2.0_rc4.xsd");
assertNotNull(preferences);
assertNotNull(preferences.getLocale());
assertEquals(Locale.EN, preferences.getLocale());
}
use of org.orcid.jaxb.model.record_v2.Preferences in project k-9 by k9mail.
the class NotificationActionService method startService.
@Override
public int startService(Intent intent, int startId) {
Timber.i("NotificationActionService started with startId = %d", startId);
String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT_UUID);
Preferences preferences = Preferences.getPreferences(this);
Account account = preferences.getAccount(accountUuid);
if (account == null) {
Timber.w("Could not find account for notification action.");
return START_NOT_STICKY;
}
MessagingController controller = MessagingController.getInstance(getApplication());
String action = intent.getAction();
if (ACTION_MARK_AS_READ.equals(action)) {
markMessagesAsRead(intent, account, controller);
} else if (ACTION_DELETE.equals(action)) {
deleteMessages(intent, controller);
} else if (ACTION_ARCHIVE.equals(action)) {
archiveMessages(intent, account, controller);
} else if (ACTION_SPAM.equals(action)) {
markMessageAsSpam(intent, account, controller);
} else if (ACTION_DISMISS.equals(action)) {
Timber.i("Notification dismissed");
}
cancelNotifications(intent, account, controller);
return START_NOT_STICKY;
}
Aggregations