All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gwtplatform.dispatch.rest.delegates.rebind.Delegate.vm Maven / Gradle / Ivy

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