Search in sources :

Example 6 with SettingsValues

use of com.redhat.cloud.notifications.routers.models.SettingsValues in project notifications-backend by RedHatInsights.

the class UserConfigResourceTest method createSettingsValue.

private SettingsValues createSettingsValue(String bundle, String application, Boolean daily, Boolean instant) {
    ApplicationSettingsValue applicationSettingsValue = new ApplicationSettingsValue();
    applicationSettingsValue.notifications.put(DAILY, daily);
    applicationSettingsValue.notifications.put(INSTANT, instant);
    BundleSettingsValue bundleSettingsValue = new BundleSettingsValue();
    bundleSettingsValue.applications.put(application, applicationSettingsValue);
    SettingsValues settingsValues = new SettingsValues();
    settingsValues.bundles.put(bundle, bundleSettingsValue);
    return settingsValues;
}
Also used : ApplicationSettingsValue(com.redhat.cloud.notifications.routers.models.SettingsValues.ApplicationSettingsValue) BundleSettingsValue(com.redhat.cloud.notifications.routers.models.SettingsValues.BundleSettingsValue) SettingsValues(com.redhat.cloud.notifications.routers.models.SettingsValues)

Aggregations

SettingsValues (com.redhat.cloud.notifications.routers.models.SettingsValues)6 EmailSubscriptionType (com.redhat.cloud.notifications.models.EmailSubscriptionType)3 ApplicationSettingsValue (com.redhat.cloud.notifications.routers.models.SettingsValues.ApplicationSettingsValue)3 BundleSettingsValue (com.redhat.cloud.notifications.routers.models.SettingsValues.BundleSettingsValue)3 RhIdPrincipal (com.redhat.cloud.notifications.auth.principal.rhid.RhIdPrincipal)2 Application (com.redhat.cloud.notifications.models.Application)2 Bundle (com.redhat.cloud.notifications.models.Bundle)2 EmailSubscription (com.redhat.cloud.notifications.models.EmailSubscription)2 SettingsValueJsonForm (com.redhat.cloud.notifications.routers.models.SettingsValueJsonForm)2 UserConfigPreferences (com.redhat.cloud.notifications.routers.models.UserConfigPreferences)2 BadRequestException (javax.ws.rs.BadRequestException)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 EntityTag (javax.ws.rs.core.EntityTag)2 Response (javax.ws.rs.core.Response)2 Operation (org.eclipse.microprofile.openapi.annotations.Operation)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Constants (com.redhat.cloud.notifications.Constants)1