Package org.lightfish.business.escalation.entity

Examples of org.lightfish.business.escalation.entity.Escalation


    public void notifyEscalationListeners() {
        for (BrowserWindow browserWindow : escalationBrowsers) {
            String channel = browserWindow.getChannel();
            try {
                if (channel != null && !channel.isEmpty()) {
                    Escalation snapshot = this.escalations.get(channel);

                    if (snapshot != null) {
                        sendToWindow(browserWindow, snapshot);
                    } else {
                        browserWindow.nothingToSay();
View Full Code Here


                            LOG.error("Cannot evaluate script: " + script, scriptException);
                        }
                        if (canBeConvertedToTrue(retVal)) {
                            String basicMessage = messageProcessor.processBasicMessage(script.getBasicMessage(), current);
                            String richMessage = messageProcessor.processRichMessage(script.getRichMessage(), current);
                            Escalation escalation = new Escalation.Builder()
                                    .channel(script.getName())
                                    .basicMessage(basicMessage)
                                    .richMessage(richMessage)
                                    .snapshot(current)
                                    .build();
View Full Code Here

        BrowserWindow window = mock(BrowserWindow.class);

        Writer writer = mock(Writer.class);
        when(window.getWriter()).thenReturn(writer);

        Escalation escalation = new Escalation();
        escalation.setChannel(escalationChannel);
        when(window.getChannel()).thenReturn(escalationChannel);

        this.cut.onEscalationBrowserRequest(window);
        this.cut.addEscalation(escalation);
        verify(window, never()).send();
View Full Code Here

    @Test
    public void broadcastChannelNofified() {
        final String escalationChannel = "duke";
        BrowserWindow window = mock(BrowserWindow.class);
        when(window.getChannel()).thenReturn("");
        Escalation escalation = new Escalation();
        escalation.setChannel(escalationChannel);
        this.cut.onEscalationBrowserRequest(window);
        this.cut.addEscalation(escalation);
        verify(window, never()).send();
        this.cut.notifyEscalationListeners();
        verify(window).send();
View Full Code Here

TOP

Related Classes of org.lightfish.business.escalation.entity.Escalation

Copyright © 2018 www.massapicom. 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.