Package org.fusesource.restygwt.client

Examples of org.fusesource.restygwt.client.Method



    @Override
    protected Method methodFor(DeleteActivityAction action, Resource resource)
    {
        return new Method(resource, DELETE.name()).header(HEADER_CONTENT_TYPE, CONTENT_TYPE_JSON);
    }
View Full Code Here



    @Override
    protected Method methodFor(StopActivityAction action, Resource resource)
    {
        return new Method(resource, PUT.name()).header(HEADER_CONTENT_TYPE, CONTENT_TYPE_JSON);
    }
View Full Code Here

    @Override
    protected Method methodFor(StartActivityAction action, Resource resource)
    {
        Activity activity = action.getActivity();
        Method method = new Method(resource, PUT.name()).header(HEADER_CONTENT_TYPE, CONTENT_TYPE_JSON);
        if (action.getActivity().isTransient())
        {
            method = method.text(activityWriter.toJson(activity));
        }
        return method;
    }
View Full Code Here

    }

    @Override
    protected Method methodFor(SaveActivityAction action, Resource resource)
    {
        Method method;
        if (action.getActivity().isTransient())
        {
            method = new Method(resource, POST.name());
        }
        else
        {
            method = new Method(resource, PUT.name());
        }
        method = method.header(HEADER_CONTENT_TYPE, CONTENT_TYPE_JSON).text(activityWriter.toJson(action.getActivity()));
        return method;
    }
View Full Code Here

TOP

Related Classes of org.fusesource.restygwt.client.Method

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.