deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r865527 - in /websites/staging/deltaspike/trunk/content: ./ core.html projectstage.html
Date Thu, 13 Jun 2013 09:05:41 GMT
Author: buildbot
Date: Thu Jun 13 09:05:41 2013
New Revision: 865527

Log:
Staging update by buildbot for deltaspike

Added:
    websites/staging/deltaspike/trunk/content/projectstage.html
Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/core.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 13 09:05:41 2013
@@ -1 +1 @@
-1492578
+1492584

Modified: websites/staging/deltaspike/trunk/content/core.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/core.html (original)
+++ websites/staging/deltaspike/trunk/content/core.html Thu Jun 13 09:05:41 2013
@@ -84,14 +84,7 @@
 <li><a href="#deltaspike-configuration">DeltaSpike Configuration</a></li>
 <li><a href="#beanprovider">BeanProvider</a></li>
 <li><a href="#beanmanagerprovider">BeanManagerProvider</a></li>
-<li><a href="#type-safe-projectstage">Type-safe ProjectStage</a><ul>
-<li><a href="#custom-project-stages">Custom Project Stages</a></li>
-</ul>
-</li>
-<li><a href="#projectstageproducer-for-3rd-party-portable-extensions">ProjectStageProducer
(for 3rd party portable extensions)</a><ul>
-<li><a href="#setting-the-active-projectstage">Setting the active ProjectStage</a></li>
-</ul>
-</li>
+<li><a href="#type-safe-projectstage">Type-safe ProjectStage</a></li>
 <li><a href="#exclude">@Exclude</a><ul>
 <li><a href="#custom-expressioninterpreter">Custom ExpressionInterpreter</a></li>
 </ul>
@@ -215,66 +208,9 @@ If a simple but manual bean-lookup is ne
 
 
 <h2 id="type-safe-projectstage">Type-safe ProjectStage</h2>
-<p>Project stages allow to use implementations depending on the current environment.
E.g. you can implement a bean which creates sample-data for system tests which gets activated
only in case of project-stage <code>SystemTest</code>.</p>
-<p><em>Besides custom project-stages</em> it's possible to use the following
pre-defined project-stages:</p>
-<ul>
-<li>UnitTest</li>
-<li>Development</li>
-<li>SystemTest</li>
-<li>IntegrationTest</li>
-<li>Staging</li>
-<li>Production</li>
-</ul>
-<p>The core provides a pluggable and type-safe approach for using project stages in
a project (it's also used within the framework). Furthermore, <code>@Exclude</code>
allows to use e.g. implementations annotated with <code>javax.enterprise.inject.Alternative</code>
for specific project-stages. Besides the out-of-the-box project-stages it's possible to implement
<em>custom but type-safe</em> project-stages which will be exposed by DeltaSpike.</p>
-<p>Resolving and using the Project-Stage:</p>
-<div class="codehilite"><pre><span class="nd">@Inject</span>
-<span class="kd">private</span> <span class="n">ProjectStage</span>
<span class="n">projectStage</span><span class="o">;</span>
-
-<span class="c1">//...</span>
-
-<span class="kt">boolean</span> <span class="n">isDevProjectStage</span>
<span class="o">=</span> <span class="n">ProjectStage</span><span
class="o">.</span><span class="na">Development</span><span class="o">.</span><span
class="na">equals</span><span class="o">(</span><span class="k">this</span><span
class="o">.</span><span class="na">projectStage</span><span class="o">);</span>
-</pre></div>
-
-
-<h3 id="custom-project-stages">Custom Project Stages</h3>
-<p>It's possible to provide custom project stage implementations.
-Therefore, you have to provide an implementation of the <code>ProjectStageHolder</code>
interface.
-In this class you nest the custom project-stage implementations which have to be <code>public
static final class</code> and it's required to extend <code>ProjectStage</code>.
-It's required to provide a <code>public static final</code> instance even though,
you won't use it directly.</p>
-<p>ProjectStageHolder for custom project stage implementations:</p>
-<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">CustomProjectStageHolder</span>
<span class="kd">implements</span> <span class="n">ProjectStageHolder</span>
-<span class="o">{</span>
-    <span class="kd">public</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="kd">class</span> <span
class="nc">CustomProjectStage</span> <span class="kd">extends</span>
<span class="n">ProjectStage</span>
-    <span class="o">{</span>
-        <span class="kd">private</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="kt">long</span> <span
class="n">serialVersionUID</span> <span class="o">=</span> <span class="mi">1029094387976167179L</span><span
class="o">;</span>
-    <span class="o">}</span>
-
-    <span class="kd">public</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="n">CustomProjectStage</span>
<span class="n">CustomProjectStage</span> <span class="o">=</span>
<span class="k">new</span> <span class="n">CustomProjectStage</span><span
class="o">();</span>
-<span class="o">}</span>
-</pre></div>
-
-
-<p>Configure your custom <code>ProjectStageHolder</code> in <code>META-INF/services/org.apache.deltaspike.core.api.projectstage.ProjectStageHolder</code>.
The file has to provide the <em>fully qualified</em> class name of the custom
implementation of the <code>ProjectStageHolder</code> interface.</p>
-<p>Usage of a custom project stage:</p>
-<div class="codehilite"><pre><span class="n">ProjectStage</span>
<span class="n">customProjectStage</span><span class="o">;</span>
-<span class="n">customProjectStage</span> <span class="o">=</span>
<span class="n">ProjectStage</span><span class="o">.</span><span
class="na">valueOf</span><span class="o">(</span><span class="s">&quot;CustomProjectStage&quot;</span><span
class="o">);</span>
-<span class="c1">//or</span>
-<span class="n">customProjectStage</span> <span class="o">=</span>
<span class="n">CustomProjectStageHolder</span><span class="o">.</span><span
class="na">CustomProjectStage</span><span class="o">;</span>
-<span class="c1">//or</span>
-<span class="nd">@Exclude</span><span class="o">(</span><span
class="n">ifProjectStage</span> <span class="o">=</span> <span class="n">CustomProjectStageHolder</span><span
class="o">.</span><span class="na">CustomProjectStage</span><span
class="o">.</span><span class="na">class</span><span class="o">)</span>
-</pre></div>
-
-
-<h2 id="projectstageproducer-for-3rd-party-portable-extensions">ProjectStageProducer
(for 3rd party portable extensions)</h2>
-<p><code>ProjectStageProducer</code> provides the producer method which
allows to inject the current project-stage. However, in some cases it's needed to use project-stages
also during the bootstrapping process of the CDI container and you can't use injection. In
such cases you can use <code>ProjectStageProducer.getInstance().getProjectStage()</code>
to resolve the current project-stage. This helper also contains helpers for unit-tests - e.g.
<code>#setProjectStage</code>. However, those methods shouldn't be needed for
users (we just need them for testing different project-stage scenarios).</p>
-<h3 id="setting-the-active-projectstage">Setting the active ProjectStage</h3>
-<p>For setting the ProjectStage which shall get used in your application you can specify
-it in a few ways. The underlying mechanism used to determine the string is the ConfigResolver.
-E.g.:</p>
-<div class="codehilite"><pre><span class="o">-</span><span class="n">Dorg</span><span
class="o">.</span><span class="na">apache</span><span class="o">.</span><span
class="na">deltaspike</span><span class="o">.</span><span class="na">ProjectStage</span><span
class="o">=</span><span class="n">Development</span>
-</pre></div>
-
-
+<p>The <a href="projectstage.html">DeltaSpike ProjectStage</a> mechanism
allows
+to use configuration and implementations depending on the
+server environment you currently run on.</p>
 <h2 id="exclude">@Exclude</h2>
 <p>With <code>@Exclude</code> it's possible to annotate beans which should
be ignored by CDI even if they are in a CDI enabled archive.</p>
 <p>Excluding a bean in any case:</p>

Added: websites/staging/deltaspike/trunk/content/projectstage.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/projectstage.html (added)
+++ websites/staging/deltaspike/trunk/content/projectstage.html Thu Jun 13 09:05:41 2013
@@ -0,0 +1,201 @@
+<!DOCTYPE html>
+<html lang="en">
+<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>Apache DeltaSpike - DeltaSpike ProjectStage</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 &quot;License&quot;); 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 &quot;AS IS&quot; 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="./resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        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" href="index.html"><img src="./resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./index.html">Home</a></li>
+                        <li><a href="./documentation.html">Documentation</a></li>
+                        <li><a href="./source.html">Source</a></li>
+                        <!-- <li><a href="./download.html">Download</a></li>
-->
+                        <li><a href="./community.html">Community</a></li>
+                        <!-- <li><a href="./support.html">Support</a></li>
 -->
+                        <li><a href="./news.html">News</a></li>
+                        <li><a href="./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>DeltaSpike ProjectStage</h1>
+              </div>
+              <div class="toc">
+<ul>
+<li><a href="#introduction">Introduction</a><ul>
+<li><a href="#custom-project-stages">Custom Project Stages</a></li>
+<li><a href="#projectstageproducer-for-3rd-party-portable-extensions">ProjectStageProducer
(for 3rd party portable extensions)</a><ul>
+<li><a href="#setting-the-active-projectstage">Setting the active ProjectStage</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<hr />
+<h1 id="introduction">Introduction</h1>
+<p>Project stages allow to use implementations depending on the current environment.
+E.g. you can implement a bean which creates sample-data for system tests which
+gets activated only in case of project-stage <code>SystemTest</code>.</p>
+<p><em>Besides custom project-stages</em> it's possible to use the following
pre-defined project-stages:</p>
+<ul>
+<li>UnitTest</li>
+<li>Development</li>
+<li>SystemTest</li>
+<li>IntegrationTest</li>
+<li>Staging</li>
+<li>Production</li>
+</ul>
+<p>The core provides a pluggable and type-safe approach for using project stages in
a project
+(it's also used within the framework). Furthermore, <code>@Exclude</code> allows
to use e.g. i
+mplementations annotated with <code>javax.enterprise.inject.Alternative</code>
for specific project-stages.
+Besides the out-of-the-box project-stages it's possible to implement <em>custom but
type-safe</em>
+project-stages which will be exposed by DeltaSpike.</p>
+<p>Resolving and using the Project-Stage:</p>
+<div class="codehilite"><pre><span class="nd">@Inject</span>
+<span class="kd">private</span> <span class="n">ProjectStage</span>
<span class="n">projectStage</span><span class="o">;</span>
+
+<span class="c1">//...</span>
+
+<span class="kt">boolean</span> <span class="n">isDevProjectStage</span>
<span class="o">=</span> <span class="n">ProjectStage</span><span
class="o">.</span><span class="na">Development</span><span class="o">.</span><span
class="na">equals</span><span class="o">(</span><span class="k">this</span><span
class="o">.</span><span class="na">projectStage</span><span class="o">);</span>
+</pre></div>
+
+
+<h3 id="custom-project-stages">Custom Project Stages</h3>
+<p>It's possible to provide custom project stage implementations.
+Therefore, you have to provide an implementation of the <code>ProjectStageHolder</code>
interface.
+In this class you nest the custom project-stage implementations which have to be
+<code>public static final class</code> and it's required to extend <code>ProjectStage</code>.
+It's required to provide a <code>public static final</code> instance even though,
you won't use it directly.</p>
+<p>ProjectStageHolder for custom project stage implementations:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kd">class</span> <span class="nc">CustomProjectStageHolder</span>
<span class="kd">implements</span> <span class="n">ProjectStageHolder</span>
+<span class="o">{</span>
+    <span class="kd">public</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="kd">class</span> <span
class="nc">CustomProjectStage</span> <span class="kd">extends</span>
<span class="n">ProjectStage</span>
+    <span class="o">{</span>
+        <span class="kd">private</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="kt">long</span> <span
class="n">serialVersionUID</span> <span class="o">=</span> <span class="mi">1029094387976167179L</span><span
class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="kd">static</span>
<span class="kd">final</span> <span class="n">CustomProjectStage</span>
<span class="n">CustomProjectStage</span> <span class="o">=</span>
<span class="k">new</span> <span class="n">CustomProjectStage</span><span
class="o">();</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Configure your custom <code>ProjectStageHolder</code> in
+<code>META-INF/services/org.apache.deltaspike.core.api.projectstage.ProjectStageHolder</code>.
+The file has to provide the <em>fully qualified</em> class name of the custom
implementation
+of the <code>ProjectStageHolder</code> interface.</p>
+<p>Usage of a custom project stage:</p>
+<div class="codehilite"><pre><span class="n">ProjectStage</span>
<span class="n">customProjectStage</span><span class="o">;</span>
+<span class="n">customProjectStage</span> <span class="o">=</span>
<span class="n">ProjectStage</span><span class="o">.</span><span
class="na">valueOf</span><span class="o">(</span><span class="s">&quot;CustomProjectStage&quot;</span><span
class="o">);</span>
+<span class="c1">//or</span>
+<span class="n">customProjectStage</span> <span class="o">=</span>
<span class="n">CustomProjectStageHolder</span><span class="o">.</span><span
class="na">CustomProjectStage</span><span class="o">;</span>
+<span class="c1">//or</span>
+<span class="nd">@Exclude</span><span class="o">(</span><span
class="n">ifProjectStage</span> <span class="o">=</span> <span class="n">CustomProjectStageHolder</span><span
class="o">.</span><span class="na">CustomProjectStage</span><span
class="o">.</span><span class="na">class</span><span class="o">)</span>
+</pre></div>
+
+
+<h2 id="projectstageproducer-for-3rd-party-portable-extensions">ProjectStageProducer
(for 3rd party portable extensions)</h2>
+<p><code>ProjectStageProducer</code> provides the producer method which
allows to inject the current project-stage.
+However, in some cases it's needed to use project-stages also during the bootstrapping process
+of the CDI container and you can't use injection. In such cases you can use
+<code>ProjectStageProducer.getInstance().getProjectStage()</code> to resolve
the current project-stage.
+This helper also contains helpers for unit-tests - e.g. <code>#setProjectStage</code>.
However,
+those methods shouldn't be needed for users
+(we just need them for testing different project-stage scenarios).</p>
+<h3 id="setting-the-active-projectstage">Setting the active ProjectStage</h3>
+<p>For setting the ProjectStage which shall get used in your application you can specify
+it in a few ways. The underlying mechanism used to determine the string is the ConfigResolver.
+E.g.:</p>
+<div class="codehilite"><pre><span class="o">-</span><span class="n">Dorg</span><span
class="o">.</span><span class="na">apache</span><span class="o">.</span><span
class="na">deltaspike</span><span class="o">.</span><span class="na">ProjectStage</span><span
class="o">=</span><span class="n">Development</span>
+</pre></div>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 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 -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./resources/js/prettyfy.js"></script> -->
+    <script src="./resources/js/prettyprint.js"></script>
+    <script src="./resources/js/jquery.js"></script>
+    <script src="./resources/js/bootstrap-transition.js"></script>
+    <script src="./resources/js/bootstrap-alert.js"></script>
+    <script src="./resources/js/bootstrap-modal.js"></script>
+    <script src="./resources/js/bootstrap-dropdown.js"></script>
+    <script src="./resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./resources/js/bootstrap-tab.js"></script>
+    <script src="./resources/js/bootstrap-tooltip.js"></script>
+    <script src="./resources/js/bootstrap-popover.js"></script>
+    <script src="./resources/js/bootstrap-button.js"></script>
+    <script src="./resources/js/bootstrap-collapse.js"></script>
+    <script src="./resources/js/bootstrap-carousel.js"></script>
+    <script src="./resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>



Mime
View raw message