Examples of Activities


Examples of com.amazonaws.services.simpleworkflow.flow.annotations.Activities

    }

    private void addActivities(Object implementation, Class<?> interfaze, Map<String, Method> methods,
            ParentInterfaceOptions parentOptions, DataConverter converter, Set<ActivityType> addedTypes)
            throws SecurityException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        Activities activitiesAnnotation = interfaze.getAnnotation(Activities.class);
        for (Class<?> parent : interfaze.getInterfaces()) {
            addActivities(implementation, parent, methods, parentOptions, converter, addedTypes);
        }
        if (activitiesAnnotation != null) {
            String interfaceName = interfaze.getSimpleName();
            if (!nullOrEmpty(activitiesAnnotation.activityNamePrefix())) {
                parentOptions.setPrefix(activitiesAnnotation.activityNamePrefix());
            }
            if (!nullOrEmpty(activitiesAnnotation.version())) {
                parentOptions.setVersion(activitiesAnnotation.version());
            }
            converter = (converter == null) ? createConverter(activitiesAnnotation.dataConverter()) : converter;
            ActivityRegistrationOptions interfaceRegistrationOptionsAnnotation = interfaze.getAnnotation(ActivityRegistrationOptions.class);
            SkipTypeRegistration interfaceSkipTypeRegistrationAnnotation = interfaze.getAnnotation(SkipTypeRegistration.class);
            if (interfaceRegistrationOptionsAnnotation != null) {
                if (interfaceSkipTypeRegistrationAnnotation != null) {
                    throw new IllegalArgumentException(
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.annotations.Activities

    }

    private void addActivities(Object implementation, Class<?> interfaze, Map<String, Method> methods,
            ParentInterfaceOptions parentOptions, DataConverter converter, Set<ActivityType> addedTypes)
            throws SecurityException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        Activities activitiesAnnotation = interfaze.getAnnotation(Activities.class);
        for (Class<?> parent : interfaze.getInterfaces()) {
            addActivities(implementation, parent, methods, parentOptions, converter, addedTypes);
        }
        if (activitiesAnnotation != null) {
            String interfaceName = interfaze.getSimpleName();
            if (!nullOrEmpty(activitiesAnnotation.activityNamePrefix())) {
                parentOptions.setPrefix(activitiesAnnotation.activityNamePrefix());
            }
            if (!nullOrEmpty(activitiesAnnotation.version())) {
                parentOptions.setVersion(activitiesAnnotation.version());
            }
            converter = (converter == null) ? createConverter(activitiesAnnotation.dataConverter()) : converter;
            ActivityRegistrationOptions interfaceRegistrationOptionsAnnotation = interfaze.getAnnotation(ActivityRegistrationOptions.class);
            SkipTypeRegistration interfaceSkipTypeRegistrationAnnotation = interfaze.getAnnotation(SkipTypeRegistration.class);
            if (interfaceRegistrationOptionsAnnotation != null) {
                if (interfaceSkipTypeRegistrationAnnotation != null) {
                    throw new IllegalArgumentException(
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.annotations.Activities

    }

    private void addActivities(Object implementation, Class<?> interfaze, Map<String, Method> methods,
            ParentInterfaceOptions parentOptions, DataConverter converter, Set<ActivityType> addedTypes)
            throws SecurityException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        Activities activitiesAnnotation = interfaze.getAnnotation(Activities.class);
        for (Class<?> parent : interfaze.getInterfaces()) {
            addActivities(implementation, parent, methods, parentOptions, converter, addedTypes);
        }
        if (activitiesAnnotation != null) {
            String interfaceName = interfaze.getSimpleName();
            if (!nullOrEmpty(activitiesAnnotation.activityNamePrefix())) {
                parentOptions.setPrefix(activitiesAnnotation.activityNamePrefix());
            }
            if (!nullOrEmpty(activitiesAnnotation.version())) {
                parentOptions.setVersion(activitiesAnnotation.version());
            }
            converter = (converter == null) ? createConverter(activitiesAnnotation.dataConverter()) : converter;
            ActivityRegistrationOptions interfaceRegistrationOptionsAnnotation = interfaze.getAnnotation(ActivityRegistrationOptions.class);
            SkipTypeRegistration interfaceSkipTypeRegistrationAnnotation = interfaze.getAnnotation(SkipTypeRegistration.class);
            if (interfaceRegistrationOptionsAnnotation != null) {
                if (interfaceSkipTypeRegistrationAnnotation != null) {
                    throw new IllegalArgumentException(
View Full Code Here

Examples of com.fitbit.api.common.model.activities.Activities

                                resource.getCollectionType(),
                                resource.getDate(),
                                APIFormat.JSON
                        );

                Activities entity = (Activities) entityCache.get(credentials, cacheKeyWithUserId);
                if (null != entity) {
                    log.info("Evicting entity " + cacheKeyWithUserId);
                    entityCache.remove(credentials, cacheKeyWithUserId);
                } else {
                    log.info("There is no cached version of entity " + cacheKeyWithUserId);
View Full Code Here

Examples of com.fitbit.api.common.model.activities.Activities

    protected void showHome(RequestContext context, HttpServletRequest request, HttpServletResponse response) {
        List<String> errors = new ArrayList<String>();
        if (isAuthorized(context, request)) {
            // User has token credentials. Use them to get and display user's activities and foods:
            try {
                Activities activities = context.getApiClientService().getActivities(context.getOurUser(), context.getParsedLocalDate());
                request.setAttribute("activities", activities);
            } catch (FitbitAPIException e) {
                errors.add(e.getMessage());
                log.error(e);
            }
View Full Code Here

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

{
    @Inject ActivityConverter activityConverter;

    public Activities toModel(DateMidnight date, TimeUnit timeunit, List<Activity> activities)
    {
        Activities result = new Activities(date.getYear(), date.getMonthOfYear(), date.getWeekOfWeekyear(),
                date.getDayOfMonth(), timeunit);
        switch (timeunit)
        {
            case MONTH:
                result.getWeeks().addAll(groupByWeeks(date, activities));
                break;
            case WEEK:
                result.getDays().addAll(groupByDays(date, activities));
                break;
            case DAY:
                for (Activity activity : activities)
                {
                    result.add(activityConverter.toModel(activity));
                }
                break;
            default:
                break;
        }
View Full Code Here

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

    @GET
    @Path("/{year:\\d{4}}/{month:\\d{1,2}}")
    public Response activitiesForYearMonth(@PathParam("year") int year, @PathParam("month") int month)
    {
        DateMidnight yearMonth = new DateMidnight(year, month, 1, settings.get().getTimeZone());
        Activities activities = activitiesConverter.toModel(yearMonth, MONTH,
                repository.findByYearMonth(yearMonth.year().get(), yearMonth.monthOfYear().get()));
        return addLinksForYearMonth(activities, yearMonth);
    }
View Full Code Here

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

    @GET
    @Path("/relative/{month:[+-]?\\d+}")
    public Response activitiesForRelativeMonth(@PathParam("month") int month)
    {
        DateMidnight absolute = absoluteMonth(month);
        Activities activities = activitiesConverter.toModel(absolute, MONTH,
                repository.findByYearMonth(absolute.year().get(), absolute.monthOfYear().get()));
        return addLinksForYearMonth(activities, absolute);
    }
View Full Code Here

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

    @GET
    @Path("/currentMonth")
    public Response activitiesForCurrentMonth()
    {
        DateMidnight now = now(settings.get().getTimeZone());
        Activities activities = activitiesConverter.toModel(now, MONTH,
                repository.findByYearMonth(now.year().get(), now.monthOfYear().get()));
        return addLinksForYearMonth(activities, now);
    }
View Full Code Here

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

    public Response activitiesForYearWeek(@PathParam("year") int year, @PathParam("week") int week)
    {
        DateMidnight yearWeek = new MutableDateTime(settings.get().getTimeZone()).year().set(year).weekOfWeekyear()
                .set(week)
                .toDateTime().toDateMidnight();
        Activities activities = activitiesConverter.toModel(yearWeek, WEEK,
                repository.findByYearWeek(yearWeek.year().get(), yearWeek.weekOfWeekyear().get()));
        return addLinksForYearWeek(activities, yearWeek);
    }
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.