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

com.gwtplatform.dispatch.rest.rebind.action.Action.vm Maven / Gradle / Ivy

There is a newer version: 1.6
Show newest version
package $package;

import javax.ws.rs.core.HttpHeaders;

import com.gwtplatform.dispatch.rest.client.AbstractRestAction;
import com.gwtplatform.dispatch.rest.client.parameters.HttpParameterFactory;
import com.gwtplatform.dispatch.rest.shared.HttpMethod;
import com.gwtplatform.dispatch.rest.shared.HttpParameter.Type;

public class $impl extends AbstractRestAction<$result> {
    public ${impl}(
            HttpParameterFactory httpParameterFactory,
            String defaultDateFormat#generateAppendedMethodSignature($parameters)) {
        super(httpParameterFactory, defaultDateFormat, HttpMethod.$httpVerb, "$path");

#foreach($param in $httpParameters)
        addParam(Type.$param.type.getAssociatedType(), "$param.name", $param.variableName#if($param.dateFormat.isPresent()), "$param.dateFormat.get()"#end);
#end
#if($bodyParameterName)
        setBodyParam($bodyParameterName);
#end
#if($contentType)
        addParam(Type.HEADER, HttpHeaders.CONTENT_TYPE, "$contentType");
#end
    }

    @Override
    public boolean isSecured() {
        return $secured;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy