Examples of WebappSpecification


Examples of co.cask.cdap.api.webapp.WebappSpecification

    // Emits the received specification with programs.
    emit(new ApplicationWithPrograms(o, programs.build()));
  }

  private WebappSpecification createWebappSpec(final String name) {
    return new WebappSpecification() {
      @Override
      public String getClassName() {
        return "";
      }
View Full Code Here

Examples of org.apache.isis.core.runtime.viewer.web.WebAppSpecification

import org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyTrusted;

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

        webAppSpec.addServletContextListener(IsisWebAppBootstrapper.class);
       
        webAppSpec.addContextParams("isis.viewers", "restfulobjects");

        webAppSpec.addContextParams(RestfulObjectsViewerInstaller.JAVAX_WS_RS_APPLICATION, RestfulObjectsApplication.class.getName());

        webAppSpec.addFilterSpecification(IsisSessionFilter.class,
                MapUtil.<String,String>asMap(
                        IsisSessionFilter.AUTHENTICATION_SESSION_STRATEGY_KEY, AuthenticationSessionStrategyTrusted.class.getName(),
                        IsisSessionFilter.WHEN_NO_SESSION_KEY, IsisSessionFilter.WhenNoSession.CONTINUE.name().toLowerCase()),
                RestfulObjectsViewerInstaller.EVERYTHING);

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

       
        webAppSpec.addServletContextListener(ResteasyBootstrap.class);
        webAppSpec.addServletSpecification(HttpServletDispatcher.class, RestfulObjectsViewerInstaller.ROOT);


        return webAppSpec;
    }
View Full Code Here

Examples of org.apache.isis.core.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

Examples of org.apache.isis.core.runtime.viewer.web.WebAppSpecification

    @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

Examples of org.apache.isis.core.runtime.viewer.web.WebAppSpecification

    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

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

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

    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

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

    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

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

    @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

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

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
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.