Examples of StaticResourceHandler


Examples of io.lumify.miniweb.handlers.StaticResourceHandler

    }

    public void registerJavaScript(String scriptResourceName) {
        String resourcePath = "/js" + scriptResourceName;
        if (devMode) {
            get(resourcePath, new StaticResourceHandler(this.getClass(), scriptResourceName, "application/javascript"));
            pluginsJsResources.add(resourcePath);
        } else {
            pluginsJsResourceHandler.appendResource(scriptResourceName);
        }
    }
View Full Code Here

Examples of io.lumify.miniweb.handlers.StaticResourceHandler

        config.setConfigurables(this.googleConfig, "oauth.google");
    }

    @Override
    public void init(WebApp app, ServletContext servletContext, Handler authenticationHandler) {
        StaticResourceHandler jsHandler = new StaticResourceHandler(this.getClass(), "/oauth/authentication.js", "application/javascript");
        StaticResourceHandler lessHandler = new StaticResourceHandler(this.getClass(), "/oauth/less/oauth.less", "text/plain");
        StaticResourceHandler loginTemplateHandler = new StaticResourceHandler(this.getClass(), "/oauth/templates/login.hbs", "text/plain");

        app.get("/jsc/configuration/plugins/authentication/authentication.js", jsHandler);
        app.get("/jsc/configuration/plugins/authentication/templates/login.hbs", loginTemplateHandler);
        app.get("/jsc/configuration/plugins/authentication/less/oauth.less", lessHandler);
        app.get("/jsc/configuration/plugins/authentication/img/twitter.png", new StaticResourceHandler(this.getClass(), "/oauth/img/twitter.png", "image/png"));
        app.get("/jsc/configuration/plugins/authentication/img/google.png", new StaticResourceHandler(this.getClass(), "/oauth/img/google.png", "image/png"));

        app.get("/oauth/twitter", new Twitter(this.twitterConfig, this.userRepository));
        app.get("/oauth/google", new Google(this.googleConfig, this.userRepository));
    }
View Full Code Here

Examples of io.lumify.miniweb.handlers.StaticResourceHandler

    public void init(WebApp app, ServletContext servletContext, Handler authenticationHandler) {
        Class<? extends Handler> authenticationHandlerClass = authenticationHandler.getClass();
        Class<? extends Handler> csrfHandlerClass = LumifyCsrfHandler.class;

        app.get("/jsc/io/lumify/web/devTools/less/vertex-editor.less",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/less/vertex-editor.less", "text/less"));
        app.get("/jsc/io/lumify/web/devTools/templates/vertex-editor.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/vertex-editor.hbs", "text/html"));
        app.registerJavaScript("/io/lumify/web/devTools/vertex-editor-plugin.js");
        app.registerResourceBundle("/io/lumify/web/devTools/messages.properties");

        app.get("/jsc/io/lumify/web/devTools/templates/requeue.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/requeue.hbs", "text/html"));
        app.registerJavaScript("/io/lumify/web/devTools/requeue-plugin.js");

        app.get("/jsc/io/lumify/web/devTools/templates/ontology-upload.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/ontology-upload.hbs", "text/html"));
        app.registerJavaScript("/io/lumify/web/devTools/ontology-upload-plugin.js");

        app.get("/jsc/io/lumify/web/devTools/templates/ontology-edit.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/ontology-edit.hbs", "text/html"));
        app.registerJavaScript("/io/lumify/web/devTools/ontology-edit-plugin.js");

        app.get("/jsc/io/lumify/web/devTools/templates/user.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/user.hbs", "text/html"));
        app.get("/jsc/io/lumify/web/devTools/templates/user-details.hbs",
                new StaticResourceHandler(getClass(), "/io/lumify/web/devTools/templates/user-details.hbs", "text/html"));
        app.registerJavaScript("/io/lumify/web/devTools/user-plugin.js");

        app.post("/user/auth/add", authenticationHandlerClass, csrfHandlerClass, AdminPrivilegeFilter.class, UserAddAuthorization.class);
        app.post("/user/auth/remove", authenticationHandlerClass, csrfHandlerClass, AdminPrivilegeFilter.class, UserRemoveAuthorization.class);
        app.post("/user/delete", authenticationHandlerClass, csrfHandlerClass, AdminPrivilegeFilter.class, UserDelete.class);
View Full Code Here

Examples of io.lumify.miniweb.handlers.StaticResourceHandler

import javax.servlet.ServletContext;

public class UsernameOnlyWebAppPlugin implements WebAppPlugin {
    @Override
    public void init(WebApp app, ServletContext servletContext, Handler authenticationHandler) {
        StaticResourceHandler jsHandler = new StaticResourceHandler(this.getClass(), "/username-only/authentication.js", "application/javascript");
        StaticResourceHandler loginTemplateHandler = new StaticResourceHandler(this.getClass(), "/username-only/templates/login.hbs", "text/plain");
        StaticResourceHandler lessHandler = new StaticResourceHandler(this.getClass(), "/username-only/less/login.less", "text/plain");

        app.get("/jsc/configuration/plugins/authentication/authentication.js", jsHandler);
        app.get("/jsc/configuration/plugins/authentication/templates/login.hbs", loginTemplateHandler);
        app.get("/jsc/configuration/plugins/authentication/less/login.less", lessHandler);
View Full Code Here

Examples of org.richfaces.resource.optimizer.resource.handler.impl.StaticResourceHandler

            cpResources = getClasspathVfs(projectCP);

            Collection<VirtualFile> resourceRoots = ResourceUtil.getResourceRoots(cpResources, webResources);
            log.debug("resourceRoots: " + resourceRoots);
            scanStaticResources(resourceRoots);
            StaticResourceHandler staticResourceHandler = new StaticResourceHandler(resourceRoots);
            ResourceFactory resourceFactory = new ResourceFactoryImpl(staticResourceHandler);

            scanDynamicResources(cpResources, resourceFactory);

            DynamicResourceHandler dynamicResourceHandler = new DynamicResourceHandler(staticResourceHandler, resourceFactory);
View Full Code Here

Examples of org.richfaces.resource.optimizer.resource.handler.impl.StaticResourceHandler

            cpResources = getClasspathVfs(projectCP);

            Collection<VirtualFile> resourceRoots = ResourceUtil.getResourceRoots(cpResources, webResources);
            getLog().debug("resourceRoots: " + resourceRoots);
            scanStaticResources(resourceRoots);
            StaticResourceHandler staticResourceHandler = new StaticResourceHandler(resourceRoots);
            ResourceFactory resourceFactory = new ResourceFactoryImpl(staticResourceHandler);

            scanDynamicResources(cpResources, resourceFactory);

            DynamicResourceHandler dynamicResourceHandler = new DynamicResourceHandler(staticResourceHandler, resourceFactory);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.