Package name.pehl.karaka.client.rest

Examples of name.pehl.karaka.client.rest.UrlBuilder



    @Override
    protected Resource resourceFor(DeleteActivityAction action)
    {
        UrlBuilder urlBuilder = new UrlBuilder().module("rest").path("activities", action.getActivity().getId());
        return new Resource(urlBuilder.toUrl());
    }
View Full Code Here



    @Override
    protected Resource resourceFor(StopActivityAction action)
    {
        UrlBuilder urlBuilder = new UrlBuilder().module("rest").path("activities", action.getActivity().getId(), "stop");
        return new Resource(urlBuilder.toUrl());
    }
View Full Code Here


    @Override
    protected Resource resourceFor(GetTagsAction action)
    {
        return new Resource(new UrlBuilder().module("rest").path("tags").toUrl());
    }
View Full Code Here


    @Override
    protected Resource resourceFor(FindActivityAction action)
    {
        return new Resource(new UrlBuilder().module("rest").path("activities").query("q", action.getQuery()).toUrl());
    }
View Full Code Here

    @Override
    protected Resource resourceFor(StartActivityAction action)
    {
        Activity activity = action.getActivity();
        UrlBuilder urlBuilder = new UrlBuilder().module("rest").path("activities");
        if (activity.isTransient())
        {
            urlBuilder.path("start");
        }
        else
        {
            urlBuilder = urlBuilder.path(activity.getId(), "start");
        }
        return new Resource(urlBuilder.toUrl());
    }
View Full Code Here

    }

    @Override
    protected Resource resourceFor(SaveActivityAction action)
    {
        UrlBuilder urlBuilder = new UrlBuilder().module("rest").path("activities");
        if (!action.getActivity().isTransient())
        {
            urlBuilder = urlBuilder.path(action.getActivity().getId());
        }
        return new Resource(urlBuilder.toUrl());
    }
View Full Code Here

TOP

Related Classes of name.pehl.karaka.client.rest.UrlBuilder

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.