Examples of SystemNotification


Examples of com.sparc.knappsack.components.entities.SystemNotification

        futureDate.add(Calendar.DATE, 1);

        Calendar anotherFutureDate = Calendar.getInstance();
        anotherFutureDate.add(Calendar.DATE, 4);

        SystemNotification systemNotification1 = createSystemNotification(true, new Date(), futureDate.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);
        SystemNotification systemNotification2 = createSystemNotification(true, futureDate.getTime(), anotherFutureDate.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);

        List<SystemNotificationModel> models = systemNotificationService.getAllModels(true);
        assertNotNull(models);
        assertEquals(models.size(), 1);
        assertEquals(models.get(0).getId(), systemNotification1.getId());
View Full Code Here

Examples of com.sparc.knappsack.components.entities.SystemNotification

        futureDate.add(Calendar.DATE, 1);

        Calendar anotherFutureDate = Calendar.getInstance();
        anotherFutureDate.add(Calendar.DATE, 4);

        SystemNotification systemNotification1 = createSystemNotification(true, new Date(), futureDate.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);
        SystemNotification systemNotification2 = createSystemNotification(true, futureDate.getTime(), anotherFutureDate.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);

        List<SystemNotificationModel> models = systemNotificationService.getAllForTypes(false, SystemNotificationType.MAINTENANCE);
        assertNotNull(models);
        assertEquals(models.size(), 2);
        for (SystemNotificationModel model : models) {
View Full Code Here

Examples of com.sparc.knappsack.components.entities.SystemNotification

        Calendar twentyDaysFuture = Calendar.getInstance();
        twentyDaysFuture.setTime(now);
        twentyDaysFuture.add(Calendar.DATE, 20);

        SystemNotification systemNotification1 = createSystemNotification(true, now, tenDaysFuture.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);
        SystemNotification systemNotification2 = createSystemNotification(true, fifteenDaysFuture.getTime(), twentyDaysFuture.getTime(), "test message", SystemNotificationType.MAINTENANCE, SystemNotificationSeverity.INFO);

        List<SystemNotificationModel> models = systemNotificationService.getAllForTypes(true, SystemNotificationType.MAINTENANCE);
        assertNotNull(models);
        assertEquals(models.size(), 1);
        assertEquals(models.get(0).getId(), systemNotification1.getId());
View Full Code Here

Examples of com.sparc.knappsack.components.entities.SystemNotification

        assertEquals(models.get(0).getId(), systemNotification1.getId());
        assertEquals(models.get(0).getNotificationType(), systemNotification1.getNotificationType());
    }

    private SystemNotification createSystemNotification(boolean allPages, Date startDate, Date endDate, String message, SystemNotificationType notificationType, SystemNotificationSeverity notificationSeverity) {
        SystemNotification systemNotification = new SystemNotification();
        systemNotification.setAllPages(allPages);
        systemNotification.setStartDate(startDate);
        systemNotification.setEndDate(endDate);
        systemNotification.setMessage(message);
        systemNotification.setNotificationType(notificationType);
        systemNotification.setNotificationSeverity(notificationSeverity);

        systemNotificationService.add(systemNotification);
        assertNotNull(systemNotification.getId());
        assertTrue(systemNotificationService.doesEntityExist(systemNotification.getId()));

        return systemNotification;
    }
View Full Code Here

Examples of io.lumify.core.model.systemNotification.SystemNotification

        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
        Date startDate = sdf.parse(startDateParameter);
        String endDateParameter = getOptionalParameter(request, END_DATE_PARAMETER_NAME);
        Date endDate = endDateParameter != null ? sdf.parse(endDateParameter) : null;

        SystemNotification notification = systemNotificationRepository.createNotification(severity, title, message, startDate, endDate);

        if (notification.isActive()) {
            workQueueRepository.pushSystemNotification(notification);
        }

        respondWithSuccessJson(response);
    }
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.