org.jlot.client.remote.ProjectDeleteRestCommand 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.ProjectForm;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@Component
public class ProjectDeleteRestCommand extends AbstractLoginRestCommand
{
@Override
protected Boolean executeInternal ( ProjectForm projectForm )
{
String urlParam = projectForm.getName();
RestTemplate restTemplate = getRestTemplate();
restTemplate.delete(getUrl(), urlParam);
return true;
}
@Override
protected String getPath ( )
{
return JlotApiUrls.PROJECT;
}
}