You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by bu...@apache.org on 2013/06/13 09:31:57 UTC

svn commit: r865520 - in /websites/staging/deltaspike/trunk/content: ./ core.html

Author: buildbot
Date: Thu Jun 13 07:31:57 2013
New Revision: 865520

Log:
Staging update by buildbot for deltaspike

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 07:31:57 2013
@@ -1 +1 @@
-1492550
+1492554

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 07:31:57 2013
@@ -92,18 +92,6 @@
 <li><a href="#setting-the-active-projectstage">Setting the active ProjectStage</a></li>
 </ul>
 </li>
-<li><a href="#low-level-configurations">Low-level configurations</a><ul>
-<li><a href="#configresolver">ConfigResolver</a></li>
-<li><a href="#propertyfileconfig">PropertyFileConfig</a></li>
-<li><a href="#configsource">ConfigSource</a></li>
-<li><a href="#reordering-of-the-default-order-of-config-sources">Reordering of the default order of Config-Sources</a></li>
-<li><a href="#custom-config-sources">Custom Config-Sources</a></li>
-</ul>
-</li>
-<li><a href="#type-safe-config">Type-safe config</a><ul>
-<li><a href="#configproperty">@ConfigProperty</a></li>
-</ul>
-</li>
 <li><a href="#exclude">@Exclude</a><ul>
 <li><a href="#custom-expressioninterpreter">Custom ExpressionInterpreter</a></li>
 </ul>
@@ -287,45 +275,6 @@ E.g.:</p>
 </pre></div>
 
 
-<h2 id="low-level-configurations">Low-level configurations</h2>
-<h3 id="configresolver">ConfigResolver</h3>
-<p>In some cases low-level configs are needed e.g. during the bootstrapping process of the CDI container. (Currently it's e.g. used for configuring the value of the current project-stage, configured values which can be used in the expressions for <code>@Exclude</code>,...) Usually it isn't used by users directly, but DeltaSpike needs such a low-level approach for several features. Therefore it's possible to use a so called <code>ConfigResolver</code> which resolves and caches <code>ConfigSource</code>s per application.
-The method <code>ConfigResolver#getPropertyValue</code> allows to provide a string based key and returns the configured value as <code>String</code> or <code>null</code> if no value has been found (<code>#getAllPropertyValues</code> has a similar contract but it returns a list which might be empty if there are no configured values for the given key). Optionally it's possible to provide a default value which gets retured instead of <code>null</code>.</p>
-<p>Simple lookup in the low-level config:</p>
-<div class="codehilite"><pre><span class="n">ConfigResolver</span><span class="o">.</span><span class="na">getPropertyValue</span><span class="o">(</span><span class="s">&quot;myKey&quot;</span><span class="o">);</span>
-</pre></div>
-
-
-<h3 id="propertyfileconfig">PropertyFileConfig</h3>
-<p>TODO</p>
-<h3 id="configsource">ConfigSource</h3>
-<p>A <code>ConfigResolver</code> uses all configured implementations of <code>ConfigSource</code> to lookup the property in question.</p>
-<p>Per default there are implementations for the following config sources (listed in the lookup order):</p>
-<ul>
-<li>System properties</li>
-<li>Environment properties</li>
-<li>JNDI values</li>
-<li>Properties file values (apache-deltaspike.properties)</li>
-</ul>
-<p><strong>It's possible to change this order and to add custom config sources.</strong></p>
-<p><strong>Note:</strong> Important Hints esp. for custom implementations:
-  - The config-source with the highest ordinal gets used first.
-  - If a custom implementation should be invoked <em>before</em> the default implementations, use an ordinal-value &gt; 400
-  - If a custom implementation should be invoked <em>after</em> the default implementations, use an ordinal-value &lt; 100</p>
-<h3 id="reordering-of-the-default-order-of-config-sources">Reordering of the default order of Config-Sources</h3>
-<p>To change the lookup order, you have to configure the ordinal in the corresponding config source (e.g. to change the config ordinal of the config source for system properties, you have to set the system property with the ordinal key 'deltaspike_ordinal' and the new value).</p>
-<p>Example with <code>/META-INF/apache-deltaspike.properties</code>: If the properties file/s should be used <strong>before</strong> the other implementations, you have to configure an ordinal &gt; 400. That means, you have to add e.g. <code>deltaspike_ordinal=401</code>.</p>
-<p><strong>Hint:</strong></p>
-<p>In case of <strong>property files</strong> which are supported by default (<code>/META-INF/apache-deltaspike.properties</code>) every file is handled as independent config-source, but all of them have ordinal 400 by default (and can be reordered in a fine-grained manner).</p>
-<h3 id="custom-config-sources">Custom Config-Sources</h3>
-<p>To add a custom config-source, you have to implement the interface <code>ConfigSourceProvider</code> (and <code>ConfigSource</code>) and activate the implementation of <code>ConfigSourceProvider</code> with the std. SPI mechanism provided by Java via the <code>ServiceLoader</code> (that means you have to create <code>/META-INF/services/org.apache.deltaspike.core.spi.config.ConfigSourceProvider</code> which contains the fully qualified class name of the custom implementation/s).</p>
-<p>If you have a simple standalone <code>ConfigSource</code> you can also register it directly by creating a file <code>/META-INF/services/org.apache.deltaspike.core.spi.config.ConfigSource</code> which contains the fully qualified class name of your <code>ConfigSource</code>.
-Please note that a single <code>ConfigSource</code> should be either registered directly or via a <code>ConfigSourceProvider</code>, but never both ways. </p>
-<p><strong>Important Hint:</strong></p>
-<p>Have a look at the abstract base-implementation of <code>ConfigSource</code> DeltaSpike is using internally, if a custom implementation should load the ordinal value from the config-source like the default implementations provided by DeltaSpike do.</p>
-<h2 id="type-safe-config">Type-safe config</h2>
-<h3 id="configproperty">@ConfigProperty</h3>
-<p>TODO</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>