org.jlot.client.remote.ProjectAddRestCommand Maven / Gradle / Ivy
package org.jlot.client.remote;
import org.jlot.api.JlotApiUrls;
import org.jlot.client.remote.rest.AbstractLoginRestCommand;
import org.jlot.core.dto.ProjectDTO;
import org.jlot.core.form.ProjectForm;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@Component
public class ProjectAddRestCommand extends AbstractLoginRestCommand
{
@Override
protected ProjectDTO executeInternal ( ProjectForm projectForm )
{
RestTemplate restTemplate = getRestTemplate();
return restTemplate.postForObject(getUrl(), projectForm, ProjectDTO.class);
}
@Override
protected String getPath ( )
{
return JlotApiUrls.PROJECTS;
}
}