public static Customization custom() { return On.setup().custom(); }
.html(new OAuthTokenHandler(provider, setup.custom(), DOMAIN, stateCheck, clientId, clientSecret, callbackUri));
public Booter entities() { setup.page(uri("entities")) .internal(true) .roles(Role.ADMINISTRATOR) .zone(CENTER) .menu(50, "Application", 30, "Entities") .mvc(new EntitiesHandler()); if (MscOpts.hasJPA()) { for (Class<?> type : JPA.getEntityJavaTypes()) { String uri = GUI.typeUri(type); BasicConfig zone = HttpUtils.zone(setup.custom(), setup.zone()); String contextPath = zone.entry("home").or(uri("")); X.scaffold(type) .internal(true) .baseUri(Msc.uri(contextPath, uri)) .roles(Role.ADMINISTRATOR) .on(setup); } } return this; }
public static Customization custom() { return setup().custom(); }
public static Customization custom() { return setup().custom(); }
public void reload() { reloaded = true; bootstrappedBeans.reset(); ioCContext.reset(); http().resetConfig(); defaults = new RouteOptions(); defaults.zone(zone); attributes().clear(); ViewResolver viewResolver = custom().viewResolver(); if (viewResolver instanceof AbstractViewResolver) { ((AbstractViewResolver) viewResolver).reset(); } }
public static void entities(Setup setup) { setup.page(uri("entities")).zone(CENTER).mvc(new EntitiesHandler()); if (MscOpts.hasJPA()) { for (Class<?> type : JPA.getEntityJavaTypes()) { String uri = GUI.typeUri(type); String contextPath = HttpUtils.zone(setup.custom(), setup.zone()).entry("home").or(uri("")); X.scaffold(setup, Msc.uri(contextPath, uri), type); } } }
private synchronized void listen() { if (!listening && !reloaded) { App.inferCallers(); listening = true; HttpProcessor proc = processor != null ? processor : http(); if (Env.dev() && !On.changes().isIgnored() && MscOpts.hasRapidoidWatch()) { proc = new AppRestartProcessor(this, proc); On.changes().byDefaultRestart(); } if (delegateAdminToApp()) { server = on().server(); } else if (delegateAppToAdmin()) { server = admin().server(); } if (server == null) { int targetPort; if (isAppOrAdminOnSameServer()) { targetPort = on().port(); server = proc.listen(on().address(), targetPort); } else { targetPort = port(); server = proc.listen(address(), targetPort); } Log.info("!Server has started", "setup", name(), "!home", "http://localhost:" + targetPort); Log.info("!Static resources will be served from the following locations", "setup", name(), "!locations", custom().staticFilesPath()); } } }