com.gwtplatform.dispatch.rest.delegates.rebind.Delegate.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dispatch-rest-delegates Show documentation
Show all versions of dispatch-rest-delegates Show documentation
Allow Rest-Dispatch resources to return their raw result type directly.
The newest version!
package $package;
import javax.inject.Inject;
import com.gwtplatform.dispatch.rest.client.RestDispatch;
import com.gwtplatform.dispatch.rest.client.core.StaticParametersFactory;
import com.gwtplatform.dispatch.rest.delegates.client.AbstractResourceDelegate;
#foreach ($import in $imports)
import $import;
#end
public class $impl extends AbstractResourceDelegate<$resourceType> implements $resourceType {
private final $resourceType resource;
#if(!$isSubResource)
public ${impl}() {
this(StaticParametersFactory.getRestDispatch(), new ${resourceImplType}());
}
@Inject
#end
public ${impl}(
RestDispatch dispatcher,
$resourceType resource) {
super(dispatcher);
this.resource = resource;
}
#foreach ($method in $methods)
$method.output
#end
@Override
protected $resourceType asResource() {
return this;
}
@Override
public $resourceType getResource() {
return resource;
}
@Override
protected $impl newInstance() {
return new ${impl}(dispatcher, resource);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy