Package name.pehl.karaka.shared.model

Examples of name.pehl.karaka.shared.model.Durations


                @Override
                public void onFailure(Throwable caught)
                {
                    warn(activity, "Cannot load minutes for current month, week and/or day");
                    getView().updateDurations(new Durations());
                }
            });
        }
View Full Code Here


        int week = now.weekOfWeekyear().get();
        int day = now.dayOfMonth().get();
        Duration currentMonth = minutes(repository.findByYearMonth(year, month));
        Duration currentWeek = minutes(repository.findByYearWeek(year, week));
        Duration today = minutes(repository.findByYearMonthDay(year, month, day));
        Durations durations = new Durations(currentMonth, currentWeek, today);

        String url = uriInfo.getAbsolutePath().toASCIIString();
        LinkHeader linkHeader = new LinkHeader().addLink(null, SELF, url, null);
        return Response.ok(durations).header("Link", linkHeader.toString()).build();
    }
View Full Code Here

        method.send(new KarakaJsonCallback<Durations, GetDurationsResult>(minutesReader, resultCallback)
        {
            @Override
            protected GetDurationsResult extractResult(final Method method, JsonReader<Durations> reader, JSONObject json)
            {
                Durations durations = reader.read(json);
                durations.setLinks(readHeaderLinks(method));
                return new GetDurationsResult(durations);
            }
        });
    }
View Full Code Here

        doAnswer(getDurationsAnswer).when(getDurationsHandler).execute(any(GetDurationsAction.class),
                any(AsyncCallback.class), any(ExecuteCommand.class));

        cut.getDurationsCommand.execute();

        verify(view).updateDurations(new Durations());
    }
View Full Code Here

    // --------------------------------------------------------- helper methods

    @SuppressWarnings("unchecked")
    void prepareGetMinutes()
    {
        final GetDurationsResult getDurationsResult = new GetDurationsResult(new Durations(new Duration(1), new Duration(2),
                new Duration(3)));
        Answer<Object> getDurationsAnswer = new Answer<Object>()
        {
            @Override
            public Object answer(InvocationOnMock invocation)
View Full Code Here

    }


    void verifyGetDurations()
    {
        verify(view).updateDurations(new Durations(new Duration(1), new Duration(2), new Duration(3)));
    }
View Full Code Here

TOP

Related Classes of name.pehl.karaka.shared.model.Durations

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.