org.jlot.client.remote.StatsPushRestCommand Maven / Gradle / Ivy
package org.jlot.client.remote;
import org.jlot.api.JlotApiUrls;
import org.jlot.client.remote.rest.AbstractLoginRestCommand;
import org.jlot.core.form.StatsForm;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@Component
public class StatsPushRestCommand extends AbstractLoginRestCommand
{
@Override
protected Boolean executeInternal ( StatsForm statsForm )
{
String urlParam = statsForm.getProjectName();
RestTemplate restTemplate = getRestTemplate();
return restTemplate.postForObject(getUrl(), statsForm, Boolean.class, urlParam);
}
@Override
protected String getPath ( )
{
return JlotApiUrls.STATS;
}
}