DELTASPIKE-711 Add directory for documentation.
Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/88fdfaee Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/88fdfaee Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/88fdfaee Branch: refs/heads/master Commit: 88fdfaee36b7639af46ca0f811e4bac9dd63197d Parents: 86fb1ce Author: John D. Ament <johndam...@apache.org> Authored: Mon Sep 8 19:17:42 2014 -0400 Committer: John D. Ament <johndam...@apache.org> Committed: Mon Sep 8 19:18:07 2014 -0400 ---------------------------------------------------------------------- .../content/container-control-test.adoc | 157 ------------------- documentation/pom.xml | 4 +- .../main/asciidoc/container-control-test.adoc | 157 +++++++++++++++++++ .../asciidoc/releasenotes/deltaspike_1.0.2.ad | 84 ++++++++++ .../src/main/template/document.html.erb | 104 ++++++++++++ documentation/template/document.html.erb | 104 ------------ 6 files changed, 347 insertions(+), 263 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/content/container-control-test.adoc ---------------------------------------------------------------------- diff --git a/documentation/content/container-control-test.adoc b/documentation/content/container-control-test.adoc deleted file mode 100644 index fc420ed..0000000 --- a/documentation/content/container-control-test.adoc +++ /dev/null @@ -1,157 +0,0 @@ -= Container & Control - -:toc: - -== Introduction - -There are basically two parts: - - - The `CdiContainer` interface allows to boot and shutdown the CDI container in SE applications. - - The `ContextControl` interface allows to control the life-cycle of the built-in contexts of the CDI container. - -=== CdiContainer -You can use the `CdiContainerLoader` as a simple factory to gain access to the underlying `CdiContainer` implementation. This is of little interest for Java EE applications since the CDI Container -already gets properly booted and shut down by the Servlet container integration. - - -[source,java] ----- -// this will give you a CdiContainer for Weld or OWB, depending on the jar you added -CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer(); -// now we gonna boot the CDI container. This will trigger the classpath scan, etc -cdiContainer.boot(); -// and finally we like to start all built-in contexts -cdiContainer.getContextControl().startContexts(); -// now we can use CDI in our SE application. -// And there is not a single line of OWB or Weld specific code in your project! -// finally we gonna stop the container -cdiContainer.shutdown(); ----- - -=== ContextControl usage - -The `ContextControl` interface allows you to start and stop built-in standard Contexts like `@RequestScoped`, `@ConversationScoped`, `@SessionScoped`, etc. It is provided as `@Dependent` bean and can get injected in the classic CDI way. This is not only usable in Java SE projects but also very helpful in Servlets and Java EE containers. - -**Restarting the RequestContext in unit tests** - -In unit testing it can be necessary to test with attached and also with detached JPA entities. A very common approach for -JPA is the link: http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/1.0/html/Hibernate_Entity_Manager_Reference_Guide/transactions.html[entitymanager-per-request approach^] -and thus have a producer method which creates a `@RequestScoped EntityManager`. Since a single unit test is usually -treated as one ârequestâ a problem arises detaching entities. - -Using ContextControl to detach entities: - -[source,java] ----- -@Test -public void testMyBusinessLogic() -{ - doSomeJpaStuff() - MyEntity me = em.find(...); - ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class); - //stopping the request context will dispose the @RequestScoped EntityManager - ctxCtrl.stopContext(RequestScoped.class); - // and now immediately restart the context again - ctxCtrl.startContext(RequestScoped.class); - // the entity 'em' is now in a detached state! - doSomeStuffWithTheDetachedEntity(em); -} ----- - -Attaching a Request Context to a new thread in EE - -Accessing the `@RequestScoped` bean in a new thread will result in a `ContextNotActiveException`. The request-context usually gets started for a particular thread via a simple `ServletRequestListener`. So "no servlet-request" means that there is no Servlet-Context for the current (/new) Thread. -You might face such issues, if you would like to reuse business services in e.g. a Quartz Job. - -Controlling the request-context for a Quartz-Job: - -[source,java] ----- -public class CdiJob implements org.quartz.Job -{ - public void execute(JobExecutionContext context) throws JobExecutionException - { - ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class); - //this will implicitly bind a new RequestContext to the current thread - ctxCtrl.startContext(RequestScoped.class); - try - { - doYourWork(); - } - finally - { - //stop the RequestContext to ensure that all request-scoped beans get cleaned up. - ctxCtrl.stopContext(RequestScoped.class); - } - } -} ----- - -=== Embedded Servlet Support - -Starting with 1.0.2, you can use DeltaSpike to power embedded Servlet runtimes. This work is done via Servlet Listeners. The configuration is specific to each container, below are some examples. - -The two main listeners are `CdiServletRequestListener` and `CdiServletContextListener`. `CdiServletRequestListener` is responsible for starting a `RequestContext` on each incoming request. In most containers this is all you need. For Tomcat specifically, you need to use `CdiServletContextListener` which registers the `CdiServletRequestListener`. - -The main usecase for this feature is for lightweight embedded runtimes, microservices. For each of these, it is assumed that you are using the following start up code somewhere: - -[source,java] ----- -CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer(); -cdiContainer.boot(); -cdiContainer.getContextControl().startContexts(); ----- - -==== Jetty -For Jetty, you need to add an `EventListener` which will be your `CdiServletRequestListener`. The object must be instantiated. This must be done before the server is started. - -[source,java] ----- -Server server = new Server(port); -ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); -context.setContextPath("/"); -server.setHandler(context); -context.addEventListener(new CdiServletRequestListener()); -context.addServlet(new ServletHolder(new YourServlet()),"/*"); -server.start(); ----- - -==== Undertow -For Undertow, you register the `CdiServletRequestListener` via `ListenerInfo` by passing in the class to their builders. Then you add the `ListenerInfo` to your deployment before starting. - -[source,java] ----- -ServletInfo servletInfo = Servlets.servlet("YourServletName", YourServlet.class).setAsyncSupported(true) - .setLoadOnStartup(1).addMapping("/*"); -ListenerInfo listenerInfo = Servlets.listener(CdiServletRequestListener.class); // <1> -DeploymentInfo di = new DeploymentInfo() - .addListener(listenerInfo) // <2> - .setContextPath("/") - .addServlet(servletInfo).setDeploymentName("CdiSEServlet") - .setClassLoader(ClassLoader.getSystemClassLoader()); -DeploymentManager deploymentManager = Servlets.defaultContainer().addDeployment(di); -deploymentManager.deploy(); -Undertow server = Undertow.builder() - .addHttpListener(port, "localhost") - .setHandler(deploymentManager.start()) - .build(); -server.start(); ----- -<1> Register as a listener. -<2> Add to deployment - -==== Tomcat -For Tomcat, you need to register the `CdiServletContextListener` instead of the `CdiServletRequestListener`. It is added as an `ApplicationListener` by passing in the class name as a `String`. - -[source,java] ----- -Tomcat tomcat = new Tomcat(); -tomcat.setPort(port); -File base = new File("..."); -Context ctx = tomcat.addContext("/",base.getAbsolutePath()); -StandardContext standardContext = (StandardContext)ctx; -standardContext.addApplicationListener(CdiServletContextListener.class.getName()); -Wrapper wrapper = Tomcat.addServlet(ctx,"YourServlet",YourServlet.class.getName()); -wrapper.addMapping("/*"); -tomcat.start(); ----- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/pom.xml ---------------------------------------------------------------------- diff --git a/documentation/pom.xml b/documentation/pom.xml index ba1ede0..c7ceb7d 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -63,11 +63,11 @@ </execution> </executions> <configuration> - <sourceDirectory>content</sourceDirectory> + <sourceDirectory>src/main/asciidoc</sourceDirectory> <outputDirectory>${project.build.directory}/site</outputDirectory> <sourceHighlighter>coderay</sourceHighlighter> <backend>html</backend> - <templateDir>template</templateDir> + <templateDir>src/main/template</templateDir> <eruby>erb</eruby> <attributes> <toc>true</toc> http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/src/main/asciidoc/container-control-test.adoc ---------------------------------------------------------------------- diff --git a/documentation/src/main/asciidoc/container-control-test.adoc b/documentation/src/main/asciidoc/container-control-test.adoc new file mode 100644 index 0000000..fc420ed --- /dev/null +++ b/documentation/src/main/asciidoc/container-control-test.adoc @@ -0,0 +1,157 @@ += Container & Control + +:toc: + +== Introduction + +There are basically two parts: + + - The `CdiContainer` interface allows to boot and shutdown the CDI container in SE applications. + - The `ContextControl` interface allows to control the life-cycle of the built-in contexts of the CDI container. + +=== CdiContainer +You can use the `CdiContainerLoader` as a simple factory to gain access to the underlying `CdiContainer` implementation. This is of little interest for Java EE applications since the CDI Container +already gets properly booted and shut down by the Servlet container integration. + + +[source,java] +---- +// this will give you a CdiContainer for Weld or OWB, depending on the jar you added +CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer(); +// now we gonna boot the CDI container. This will trigger the classpath scan, etc +cdiContainer.boot(); +// and finally we like to start all built-in contexts +cdiContainer.getContextControl().startContexts(); +// now we can use CDI in our SE application. +// And there is not a single line of OWB or Weld specific code in your project! +// finally we gonna stop the container +cdiContainer.shutdown(); +---- + +=== ContextControl usage + +The `ContextControl` interface allows you to start and stop built-in standard Contexts like `@RequestScoped`, `@ConversationScoped`, `@SessionScoped`, etc. It is provided as `@Dependent` bean and can get injected in the classic CDI way. This is not only usable in Java SE projects but also very helpful in Servlets and Java EE containers. + +**Restarting the RequestContext in unit tests** + +In unit testing it can be necessary to test with attached and also with detached JPA entities. A very common approach for +JPA is the link: http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Server/1.0/html/Hibernate_Entity_Manager_Reference_Guide/transactions.html[entitymanager-per-request approach^] +and thus have a producer method which creates a `@RequestScoped EntityManager`. Since a single unit test is usually +treated as one ârequestâ a problem arises detaching entities. + +Using ContextControl to detach entities: + +[source,java] +---- +@Test +public void testMyBusinessLogic() +{ + doSomeJpaStuff() + MyEntity me = em.find(...); + ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class); + //stopping the request context will dispose the @RequestScoped EntityManager + ctxCtrl.stopContext(RequestScoped.class); + // and now immediately restart the context again + ctxCtrl.startContext(RequestScoped.class); + // the entity 'em' is now in a detached state! + doSomeStuffWithTheDetachedEntity(em); +} +---- + +Attaching a Request Context to a new thread in EE + +Accessing the `@RequestScoped` bean in a new thread will result in a `ContextNotActiveException`. The request-context usually gets started for a particular thread via a simple `ServletRequestListener`. So "no servlet-request" means that there is no Servlet-Context for the current (/new) Thread. +You might face such issues, if you would like to reuse business services in e.g. a Quartz Job. + +Controlling the request-context for a Quartz-Job: + +[source,java] +---- +public class CdiJob implements org.quartz.Job +{ + public void execute(JobExecutionContext context) throws JobExecutionException + { + ContextControl ctxCtrl = BeanProvider.getContextualReference(ContextControl.class); + //this will implicitly bind a new RequestContext to the current thread + ctxCtrl.startContext(RequestScoped.class); + try + { + doYourWork(); + } + finally + { + //stop the RequestContext to ensure that all request-scoped beans get cleaned up. + ctxCtrl.stopContext(RequestScoped.class); + } + } +} +---- + +=== Embedded Servlet Support + +Starting with 1.0.2, you can use DeltaSpike to power embedded Servlet runtimes. This work is done via Servlet Listeners. The configuration is specific to each container, below are some examples. + +The two main listeners are `CdiServletRequestListener` and `CdiServletContextListener`. `CdiServletRequestListener` is responsible for starting a `RequestContext` on each incoming request. In most containers this is all you need. For Tomcat specifically, you need to use `CdiServletContextListener` which registers the `CdiServletRequestListener`. + +The main usecase for this feature is for lightweight embedded runtimes, microservices. For each of these, it is assumed that you are using the following start up code somewhere: + +[source,java] +---- +CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer(); +cdiContainer.boot(); +cdiContainer.getContextControl().startContexts(); +---- + +==== Jetty +For Jetty, you need to add an `EventListener` which will be your `CdiServletRequestListener`. The object must be instantiated. This must be done before the server is started. + +[source,java] +---- +Server server = new Server(port); +ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); +context.setContextPath("/"); +server.setHandler(context); +context.addEventListener(new CdiServletRequestListener()); +context.addServlet(new ServletHolder(new YourServlet()),"/*"); +server.start(); +---- + +==== Undertow +For Undertow, you register the `CdiServletRequestListener` via `ListenerInfo` by passing in the class to their builders. Then you add the `ListenerInfo` to your deployment before starting. + +[source,java] +---- +ServletInfo servletInfo = Servlets.servlet("YourServletName", YourServlet.class).setAsyncSupported(true) + .setLoadOnStartup(1).addMapping("/*"); +ListenerInfo listenerInfo = Servlets.listener(CdiServletRequestListener.class); // <1> +DeploymentInfo di = new DeploymentInfo() + .addListener(listenerInfo) // <2> + .setContextPath("/") + .addServlet(servletInfo).setDeploymentName("CdiSEServlet") + .setClassLoader(ClassLoader.getSystemClassLoader()); +DeploymentManager deploymentManager = Servlets.defaultContainer().addDeployment(di); +deploymentManager.deploy(); +Undertow server = Undertow.builder() + .addHttpListener(port, "localhost") + .setHandler(deploymentManager.start()) + .build(); +server.start(); +---- +<1> Register as a listener. +<2> Add to deployment + +==== Tomcat +For Tomcat, you need to register the `CdiServletContextListener` instead of the `CdiServletRequestListener`. It is added as an `ApplicationListener` by passing in the class name as a `String`. + +[source,java] +---- +Tomcat tomcat = new Tomcat(); +tomcat.setPort(port); +File base = new File("..."); +Context ctx = tomcat.addContext("/",base.getAbsolutePath()); +StandardContext standardContext = (StandardContext)ctx; +standardContext.addApplicationListener(CdiServletContextListener.class.getName()); +Wrapper wrapper = Tomcat.addServlet(ctx,"YourServlet",YourServlet.class.getName()); +wrapper.addMapping("/*"); +tomcat.start(); +---- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/src/main/asciidoc/releasenotes/deltaspike_1.0.2.ad ---------------------------------------------------------------------- diff --git a/documentation/src/main/asciidoc/releasenotes/deltaspike_1.0.2.ad b/documentation/src/main/asciidoc/releasenotes/deltaspike_1.0.2.ad new file mode 100644 index 0000000..c895ca8 --- /dev/null +++ b/documentation/src/main/asciidoc/releasenotes/deltaspike_1.0.2.ad @@ -0,0 +1,84 @@ += DeltaSpike Release Notes v1.0.2 + +:toc: + +== Announcement + +The DeltaSpike team is proud to announce the release of v1.0.2. See http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/ANNOUNCE-Release-of-Apache-DeltaSpike-1-0-2-td4658671.html[our release announcement email^] for additional information. + +Please read our http://deltaspike.apache.org/documentation.html#getting-started[setup guide^] to add DeltaSpike to your application. + +== Highlights + +=== Code Changes + + - Improvements in CDI Container Control module, in a few scenarios you could generate `NullPointerExceptions` in case of bad configuration + - Added a platform inspecific Servlet Listener for container control in embedded servlet runtimes + - Performance improvements in our JSF module + - Re-use of StringBuilder for ClientWindow generation + - Re-use of Maps for actionUrls + - When shutting down via `CdiContainer.shutdown` it will attempt to stop all contexts for you + - Improvements in JSF and Security integration, including + - Removed duplicate handling of exceptions + - Guarding against cases when `FacesContext` is null + - The data module now includes valid OSGi headers + +=== Documentation Changes + +Several important documentation changes went in as well + + - Fix the Bean Validation module's package name when specifying the `ConstraintValidatorFactory` + - Document how to handle prevention of double form submission + +== Credits & Thanks + + - Thanks to all those that contributed via https://www.openhub.net/p/DeltaSpike/contributors?query=&sort=latest_commit[OpenHub^] + - Thanks to those who reviewed and http://markmail.org/message/uvq62i4iioapkto2[voted^] on the release + +== Full Release Notes +++++ +<h3> Bug +</h3> +<ul> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-637'>DELTASPIKE-637</a>] - duplicated handling of AccessDeniedException + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-672'>DELTASPIKE-672</a>] - Wrong Bean Validation artifactId on documentation + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-679'>DELTASPIKE-679</a>] - NPE in BeanManagerProvider if parentClassLoader is null + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-681'>DELTASPIKE-681</a>] - Handling AccessDeniedException will run the secured method + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-684'>DELTASPIKE-684</a>] - No OSGi headers in deltaspike-partial-bean-module-api + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-685'>DELTASPIKE-685</a>] - Guard against null FacesContext in Exception Handler Bridge + </li> +</ul> + +<h3> Improvement +</h3> +<ul> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-506'>DELTASPIKE-506</a>] - [perf] use a shared StringBuilder + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-509'>DELTASPIKE-509</a>] - [perf] cache map in DefaultClientWindow#getQueryURLParameters + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-653'>DELTASPIKE-653</a>] - Provide a platform inspecific servlet listener + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-665'>DELTASPIKE-665</a>] - Add utility method to always get new context control. + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-666'>DELTASPIKE-666</a>] - Improve BeanManager consistency + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-669'>DELTASPIKE-669</a>] - Try to shutdown contexts when shutting down container + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-676'>DELTASPIKE-676</a>] - ServletContext is available for injection before EventBridgeContextListener + </li> +</ul> + +<h3> Task +</h3> +<ul> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-641'>DELTASPIKE-641</a>] - Document prevent double submit feature + </li> + <li>[<a href='https://issues.apache.org/jira/browse/DELTASPIKE-689'>DELTASPIKE-689</a>] - release notes for v1.0.2 + </li> +</ul> +++++ \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/src/main/template/document.html.erb ---------------------------------------------------------------------- diff --git a/documentation/src/main/template/document.html.erb b/documentation/src/main/template/document.html.erb new file mode 100644 index 0000000..781b518 --- /dev/null +++ b/documentation/src/main/template/document.html.erb @@ -0,0 +1,104 @@ +<%#encoding:UTF-8%><!DOCTYPE html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<meta name="description" content="deltaspike-generate-pages"> +<meta name="author" content="chm"> + +<title><%= document.name %></title> + +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> + +<!-- Styles --> + +<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet"> +<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet"> + +<style type="text/css"> +<%= ::Asciidoctor::HTML5.default_coderay_stylesheet %> +body { + padding-top: 60px; + padding-bottom: 40px; +} +</style> +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-36103647-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + </script> +</head> + +<body> + + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container"> + <a class="btn btn-navbar" data-toggle="collapse" + data-target=".nav-collapse"> <span class="icon-bar"></span> <span + class="icon-bar"></span> <span class="icon-bar"></span> + </a> <a class="brand logocolor" + href="http://deltaspike.apache.org/index.html">Apache + DeltaSpike</a> + <div class="nav-collapse"> + <ul class="nav"> + <li class="active"><a + href="http://deltaspike.apache.org/index.html">Home</a></li> + <li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li> + <li><a href="http://deltaspike.apache.org/source.html">Source</a></li> + <li><a href="http://deltaspike.apache.org/download.html">Download</a></li> + <li><a href="http://deltaspike.apache.org/community.html">Community</a></li> + <!-- <li><a href="./support.html">Support</a></li> --> + <li><a href="http://deltaspike.apache.org/news.html">News</a></li> + <li><a + href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li> + </ul> + </div> + <!--/.nav-collapse --> + <form id="search-form" action="http://www.google.com/search" + method="get" class="navbar-search pull-right"> + <input value="deltaspike.apache.org" name="sitesearch" + type="hidden"> <input class="search-query" name="q" + id="query" type="text"> + </form> + </div> + </div> + </div> + + <div class="container"> + <div class="row"> + <div class="span12"> + <div class="page-title"> + <h1><%= document.name %></h1> + </div> + + <div id="toc" class="<%= attr 'toc-class', 'toc' %>"> + <%= ::Asciidoctor::HTML5::DocumentTemplate.outline(self, (attr :toclevels, 3).to_i) %> + <hr> + + <%= document.content %> + </div> + + <hr> + + <footer> + <p>Copyright © 2011-2014 The Apache Software Foundation, + Licensed under the Apache License, Version 2.0.</p> + <p>Apache and the Apache feather logo are trademarks of The + Apache Software Foundation.</p> + </footer> + + </div> + <!-- /.container --> + +</body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/88fdfaee/documentation/template/document.html.erb ---------------------------------------------------------------------- diff --git a/documentation/template/document.html.erb b/documentation/template/document.html.erb deleted file mode 100644 index 781b518..0000000 --- a/documentation/template/document.html.erb +++ /dev/null @@ -1,104 +0,0 @@ -<%#encoding:UTF-8%><!DOCTYPE html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - -<meta charset="utf-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="description" content="deltaspike-generate-pages"> -<meta name="author" content="chm"> - -<title><%= document.name %></title> - -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - -<!-- Styles --> - -<link href="http://deltaspike.apache.org/resources/css/bootstrap.css" rel="stylesheet"> -<link href="http://deltaspike.apache.org/resources/css/bootstrap-responsive.css" rel="stylesheet"> - -<style type="text/css"> -<%= ::Asciidoctor::HTML5.default_coderay_stylesheet %> -body { - padding-top: 60px; - padding-bottom: 40px; -} -</style> -<script type="text/javascript"> - - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-36103647-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - - </script> -</head> - -<body> - - <div class="navbar navbar-fixed-top"> - <div class="navbar-inner"> - <div class="container"> - <a class="btn btn-navbar" data-toggle="collapse" - data-target=".nav-collapse"> <span class="icon-bar"></span> <span - class="icon-bar"></span> <span class="icon-bar"></span> - </a> <a class="brand logocolor" - href="http://deltaspike.apache.org/index.html">Apache - DeltaSpike</a> - <div class="nav-collapse"> - <ul class="nav"> - <li class="active"><a - href="http://deltaspike.apache.org/index.html">Home</a></li> - <li><a href="http://deltaspike.apache.org/documentation">Documentation</a></li> - <li><a href="http://deltaspike.apache.org/source.html">Source</a></li> - <li><a href="http://deltaspike.apache.org/download.html">Download</a></li> - <li><a href="http://deltaspike.apache.org/community.html">Community</a></li> - <!-- <li><a href="./support.html">Support</a></li> --> - <li><a href="http://deltaspike.apache.org/news.html">News</a></li> - <li><a - href="http://deltaspike.apache.org/migration-guide.html">Migration</a></li> - </ul> - </div> - <!--/.nav-collapse --> - <form id="search-form" action="http://www.google.com/search" - method="get" class="navbar-search pull-right"> - <input value="deltaspike.apache.org" name="sitesearch" - type="hidden"> <input class="search-query" name="q" - id="query" type="text"> - </form> - </div> - </div> - </div> - - <div class="container"> - <div class="row"> - <div class="span12"> - <div class="page-title"> - <h1><%= document.name %></h1> - </div> - - <div id="toc" class="<%= attr 'toc-class', 'toc' %>"> - <%= ::Asciidoctor::HTML5::DocumentTemplate.outline(self, (attr :toclevels, 3).to_i) %> - <hr> - - <%= document.content %> - </div> - - <hr> - - <footer> - <p>Copyright © 2011-2014 The Apache Software Foundation, - Licensed under the Apache License, Version 2.0.</p> - <p>Apache and the Apache feather logo are trademarks of The - Apache Software Foundation.</p> - </footer> - - </div> - <!-- /.container --> - -</body> -</html> \ No newline at end of file