org.webpieces.plugins.properties.PropertiesRoutes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-properties Show documentation
Show all versions of plugin-properties Show documentation
Webpieces database backed property store
package org.webpieces.plugins.properties;
import static org.webpieces.router.api.routes.Port.HTTPS;
import org.webpieces.ctx.api.HttpMethod;
import org.webpieces.plugins.backend.BackendRoutes;
import org.webpieces.router.api.routebldr.RouteBuilder;
import org.webpieces.router.api.routebldr.ScopedRouteBuilder;
public class PropertiesRoutes extends BackendRoutes {
@Override
public void configure(RouteBuilder baseBldr, ScopedRouteBuilder scopedRouter1) {
ScopedRouteBuilder scopedRouter = scopedRouter1.getScopedRouteBuilder("/secure");
scopedRouter.addRoute(HTTPS, HttpMethod.GET, "/properties", "PropertiesController.main", PropertiesRouteId.MAIN_PROPERTIES);
scopedRouter.addRoute(HTTPS, HttpMethod.GET, "/bean/{category}/{name}", "PropertiesController.bean", PropertiesRouteId.BEAN_ROUTE);
scopedRouter.addRoute(HTTPS, HttpMethod.POST, "/bean/{category}/{name}", "PropertiesController.postBean", PropertiesRouteId.POST_BEAN_CHANGES);
}
}