Package org.apache.isis.runtimes.dflt.runtime.viewer.web

Examples of org.apache.isis.runtimes.dflt.runtime.viewer.web.WebAppSpecification


        // TODO: we could potentially offer pluggability here
        final EmbeddedWebServerInstaller webServerInstaller = installerLookup.embeddedWebServerInstaller(Isis.DEFAULT_EMBEDDED_WEBSERVER);
        final EmbeddedWebServer embeddedWebServer = webServerInstaller.createEmbeddedWebServer();
        for (final IsisViewer viewer : webViewers) {
            final WebAppSpecification webContainerRequirements = viewer.getWebAppSpecification();
            embeddedWebServer.addWebAppSpecification(webContainerRequirements);
        }
        embeddedWebServer.init();
    }
View Full Code Here


    public IsisViewer doCreateViewer() {
        return new EmbeddedWebViewer() {
            @Override
            public WebAppSpecification getWebAppSpecification() {

                final WebAppSpecification webAppSpec = new WebAppSpecification();
                webAppSpec.addServletSpecification(EncodingOverHttpRemotingServlet.class, REMOTING_SERVLET_MAPPED);

                return webAppSpec;
            }
        };
    }
View Full Code Here

    public IsisViewer doCreateViewer() {
        return new EmbeddedWebViewer() {
            @Override
            public WebAppSpecification getWebAppSpecification() {

                final WebAppSpecification webAppSpec = new WebAppSpecification();

                webAppSpec.addContextParams("isis.viewers", "html");

                webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(IsisSessionFilter.RESTRICTED_KEY, LOGON_PAGE_MAPPED), DYNAMIC_CONTENT);
                webAppSpec.addServletSpecification(LogonServlet.class, LOGON_PAGE_MAPPED);
                webAppSpec.addServletSpecification(ControllerServlet.class, DYNAMIC_CONTENT);

                webAppSpec.addFilterSpecification(ResourceCachingFilter.class, MapUtils.asMap("CacheTime", "86400"), STATIC_CONTENT);
                webAppSpec.addServletSpecification(ResourceServlet.class, STATIC_CONTENT);

                final String resourceBaseDir = getConfiguration().getString(HtmlViewerConstants.VIEWER_HTML_RESOURCE_BASE_KEY);
                if (resourceBaseDir != null) {
                    webAppSpec.addResourcePath(resourceBaseDir);
                }
                webAppSpec.addResourcePath("./src/main/resources");
                webAppSpec.addResourcePath("./src/main/webapp");
                webAppSpec.addResourcePath("./web");
                webAppSpec.addResourcePath(".");

                webAppSpec.setLogHint("open a web browser and browse to logon.app to connect");

                return webAppSpec;
            }
        };
    }
View Full Code Here

    @Override
    public IsisViewer doCreateViewer() {
        return new EmbeddedWebViewer() {
            @Override
            public WebAppSpecification getWebAppSpecification() {
                final WebAppSpecification requirements = new WebAppSpecification();
                requirements.addServletSpecification(MonitorServlet.class, "/monitor/*");
                return requirements;
            }
        };
    }
View Full Code Here

import org.apache.isis.viewer.json.viewer.authentication.AuthenticationSessionStrategyTrusted;

final class EmbeddedWebViewerJson extends EmbeddedWebViewer {
    @Override
    public WebAppSpecification getWebAppSpecification() {
        final WebAppSpecification webAppSpec = new WebAppSpecification();

        webAppSpec.addContextParams("isis.viewers", "json");

        webAppSpec.addContextParams(JsonViewerInstaller.JAVAX_WS_RS_APPLICATION, JsonApplication.class.getName());

        webAppSpec.addServletContextListener(ResteasyBootstrap.class);

        webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(IsisSessionFilter.AUTHENTICATION_SESSION_STRATEGY_KEY, AuthenticationSessionStrategyTrusted.class.getName()), JsonViewerInstaller.EVERYTHING);
        webAppSpec.addServletSpecification(HttpServletDispatcher.class, JsonViewerInstaller.ROOT);

        webAppSpec.addFilterSpecification(ResourceCachingFilter.class, JsonViewerInstaller.STATIC_CONTENT);
        webAppSpec.addServletSpecification(ResourceServlet.class, JsonViewerInstaller.STATIC_CONTENT);

        return webAppSpec;
    }
View Full Code Here

import org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap;

final class EmbeddedWebViewerXhtml extends EmbeddedWebViewer {
    @Override
    public WebAppSpecification getWebAppSpecification() {
        final WebAppSpecification webAppSpec = new WebAppSpecification();

        webAppSpec.addContextParams("isis.viewers", "xhtml");

        webAppSpec.addContextParams(XhtmlViewerInstaller.JAVAX_WS_RS_APPLICATION, XhtmlApplication.class.getName());

        webAppSpec.addServletContextListener(ResteasyBootstrap.class);

        webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(
            IsisSessionFilter.AUTHENTICATION_SESSION_LOOKUP_STRATEGY_KEY,
            AuthenticationSessionLookupStrategyTrusted.class.getName()), XhtmlViewerInstaller.EVERYTHING);
        webAppSpec.addServletSpecification(HttpServletDispatcher.class, XhtmlViewerInstaller.ROOT);

        webAppSpec.addFilterSpecification(ResourceCachingFilter.class, XhtmlViewerInstaller.STATIC_CONTENT);
        webAppSpec.addServletSpecification(ResourceServlet.class, XhtmlViewerInstaller.STATIC_CONTENT);

        return webAppSpec;
    }
View Full Code Here

        // TODO: we could potentially offer pluggability here
        final EmbeddedWebServerInstaller webServerInstaller =
            installerLookup.embeddedWebServerInstaller(Isis.DEFAULT_EMBEDDED_WEBSERVER);
        final EmbeddedWebServer embeddedWebServer = webServerInstaller.createEmbeddedWebServer();
        for (final IsisViewer viewer : webViewers) {
            final WebAppSpecification webContainerRequirements = viewer.getWebAppSpecification();
            embeddedWebServer.addWebAppSpecification(webContainerRequirements);
        }
        embeddedWebServer.init();
    }
View Full Code Here

import org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap;

final class EmbeddedWebViewerJson extends EmbeddedWebViewer {
    @Override
    public WebAppSpecification getWebAppSpecification() {
        final WebAppSpecification webAppSpec = new WebAppSpecification();

        webAppSpec.addContextParams("isis.viewers", "json");

        webAppSpec.addContextParams(JsonViewerInstaller.JAVAX_WS_RS_APPLICATION, JsonApplication.class.getName());

        webAppSpec.addServletContextListener(ResteasyBootstrap.class);

        webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(
            IsisSessionFilter.AUTHENTICATION_SESSION_LOOKUP_STRATEGY_KEY,
            AuthenticationSessionLookupStrategyTrusted.class.getName()), JsonViewerInstaller.EVERYTHING);
        webAppSpec.addServletSpecification(HttpServletDispatcher.class, JsonViewerInstaller.ROOT);

        webAppSpec.addFilterSpecification(ResourceCachingFilter.class, JsonViewerInstaller.STATIC_CONTENT);
        webAppSpec.addServletSpecification(ResourceServlet.class, JsonViewerInstaller.STATIC_CONTENT);

        return webAppSpec;
    }
View Full Code Here

    public IsisViewer doCreateViewer() {
        return new EmbeddedWebViewer() {
            @Override
            public WebAppSpecification getWebAppSpecification() {

                final WebAppSpecification webAppSpec = new WebAppSpecification();

                webAppSpec.addContextParams("isis.viewers", "html");

                webAppSpec.addFilterSpecification(IsisSessionFilter.class,
                    MapUtils.asMap(IsisSessionFilter.LOGON_PAGE_KEY, LOGON_PAGE_MAPPED), DYNAMIC_CONTENT);
                webAppSpec.addServletSpecification(LogonServlet.class, LOGON_PAGE_MAPPED);
                webAppSpec.addServletSpecification(ControllerServlet.class, DYNAMIC_CONTENT);

                webAppSpec.addFilterSpecification(ResourceCachingFilter.class, MapUtils.asMap("CacheTime", "86400"),
                    STATIC_CONTENT);
                webAppSpec.addServletSpecification(ResourceServlet.class, STATIC_CONTENT);

                final String resourceBaseDir =
                    getConfiguration().getString(HtmlViewerConstants.VIEWER_HTML_RESOURCE_BASE_KEY);
                if (resourceBaseDir != null) {
                    webAppSpec.addResourcePath(resourceBaseDir);
                }
                webAppSpec.addResourcePath("./src/main/resources");
                webAppSpec.addResourcePath("./src/main/webapp");
                webAppSpec.addResourcePath("./web");
                webAppSpec.addResourcePath(".");

                webAppSpec.setLogHint("open a web browser and browse to logon.app to connect");

                return webAppSpec;
            }
        };
    }
View Full Code Here

    public IsisViewer doCreateViewer() {
        return new EmbeddedWebViewer() {
            @Override
            public WebAppSpecification getWebAppSpecification() {

                final WebAppSpecification webAppSpec = new WebAppSpecification();
                webAppSpec.addServletSpecification(EncodingOverHttpRemotingServlet.class, REMOTING_SERVLET_MAPPED);

                return webAppSpec;
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.viewer.web.WebAppSpecification

Copyright © 2018 www.massapicom. 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.