org.optaplanner.openshift.employeerostering.shared.skill.SkillRestServiceBuilder Maven / Gradle / Ivy
The newest version!
package org.optaplanner.openshift.employeerostering.shared.skill;
import com.github.nmorel.gwtjackson.client.ObjectMapper;
import com.github.nmorel.gwtjackson.client.ObjectReader;
import com.github.nmorel.gwtjackson.rest.api.RestCallback;
import com.github.nmorel.gwtjackson.rest.api.RestRequestBuilder;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Void;
import java.util.List;
/**
* Generated REST service builder for {@link org.optaplanner.openshift.employeerostering.shared.skill.SkillRestService}.
*/
public final class SkillRestServiceBuilder {
private static ObjectReader1 objectreader1;
private static ObjectReader2 objectreader2;
private static ObjectMapper1 objectmapper1;
private SkillRestServiceBuilder() {
}
private static ObjectReader1 getObjectReader1() {
if (objectreader1 == null) {
objectreader1 = GWT.create(ObjectReader1.class);
}
return objectreader1;
}
private static ObjectReader2 getObjectReader2() {
if (objectreader2 == null) {
objectreader2 = GWT.create(ObjectReader2.class);
}
return objectreader2;
}
private static ObjectMapper1 getObjectMapper1() {
if (objectmapper1 == null) {
objectmapper1 = GWT.create(ObjectMapper1.class);
}
return objectmapper1;
}
public static final RestRequestBuilder> getSkillList(final Integer tenantId) {
return new RestRequestBuilder>()
.method(RequestBuilder.GET)
.url("/tenant/{tenantId}/skill/")
.addPathParam("tenantId", tenantId)
.responseConverter(getObjectReader1());
}
public static final Request getSkillList(final Integer tenantId, RestCallback> _callback_) {
return getSkillList(tenantId)
.callback(_callback_)
.send();
}
public static final RestRequestBuilder getSkill(final Integer tenantId, final Long id) {
return new RestRequestBuilder()
.method(RequestBuilder.GET)
.url("/tenant/{tenantId}/skill/{id}")
.addPathParam("tenantId", tenantId)
.addPathParam("id", id)
.responseConverter(getObjectMapper1());
}
public static final Request getSkill(final Integer tenantId, final Long id, RestCallback _callback_) {
return getSkill(tenantId, id)
.callback(_callback_)
.send();
}
public static final RestRequestBuilder addSkill(final Integer tenantId, final Skill skill) {
return new RestRequestBuilder()
.method(RequestBuilder.POST)
.url("/tenant/{tenantId}/skill/add")
.body(skill)
.bodyConverter(getObjectMapper1())
.addPathParam("tenantId", tenantId)
.responseConverter(getObjectMapper1());
}
public static final Request addSkill(final Integer tenantId, final Skill skill, RestCallback _callback_) {
return addSkill(tenantId, skill)
.callback(_callback_)
.send();
}
public static final RestRequestBuilder updateSkill(final Integer tenantId, final Skill skill) {
return new RestRequestBuilder()
.method(RequestBuilder.POST)
.url("/tenant/{tenantId}/skill/update")
.body(skill)
.bodyConverter(getObjectMapper1())
.addPathParam("tenantId", tenantId)
.responseConverter(getObjectMapper1());
}
public static final Request updateSkill(final Integer tenantId, final Skill skill, RestCallback _callback_) {
return updateSkill(tenantId, skill)
.callback(_callback_)
.send();
}
public static final RestRequestBuilder removeSkill(final Integer tenantId, final Long id) {
return new RestRequestBuilder()
.method(RequestBuilder.DELETE)
.url("/tenant/{tenantId}/skill/{id}")
.addPathParam("tenantId", tenantId)
.addPathParam("id", id)
.responseConverter(getObjectReader2());
}
public static final Request removeSkill(final Integer tenantId, final Long id, RestCallback _callback_) {
return removeSkill(tenantId, id)
.callback(_callback_)
.send();
}
interface ObjectReader1 extends ObjectReader> {
}
interface ObjectReader2 extends ObjectReader {
}
interface ObjectMapper1 extends ObjectMapper {
}
}