webpiecesxxxxxpackage.json.JsonRoutes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of WEBPIECESxAPPNAME Show documentation
Show all versions of WEBPIECESxAPPNAME Show documentation
Someone forgot to fill this in. See http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property
package webpiecesxxxxxpackage.json;
import static org.webpieces.ctx.api.HttpMethod.GET;
import static org.webpieces.ctx.api.HttpMethod.POST;
import static org.webpieces.router.api.routes.Port.BOTH;
import org.webpieces.router.api.routebldr.DomainRouteBuilder;
import org.webpieces.router.api.routebldr.RouteBuilder;
import org.webpieces.router.api.routes.Routes;
public class JsonRoutes implements Routes {
@Override
public void configure(DomainRouteBuilder domainRouteBldr) {
RouteBuilder bldr = domainRouteBldr.getAllDomainsRouteBuilder();
bldr.addStreamRoute(BOTH, POST, "/json/streaming", "JsonController.myStream", JsonRouteId.STREAMING_ROUTE);
bldr.addContentRoute(BOTH, GET , "/json/read", "JsonController.readOnly");
bldr.addContentRoute(BOTH, GET , "/json/{id}", "JsonController.jsonRequest", JsonRouteId.READ);
bldr.addContentRoute(BOTH, POST , "/json", "JsonController.postJson");
bldr.addContentRoute(BOTH, GET , "/json/async/{id}", "JsonController.asyncJsonRequest");
bldr.addContentRoute(BOTH, POST, "/json/async/{id}", "JsonController.postAsyncJson");
bldr.addContentRoute(BOTH, GET , "/json/throw/{id}", "JsonController.throwNotFound");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy