4546474849505152535455
{ 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"); }
4950515253545556575859
{ urlBuilder.path("start"); } else { urlBuilder = urlBuilder.path(activity.getId(), "start"); } return new Resource(urlBuilder.toUrl()); } @Override
4445464748495051525354
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()); } @Override