incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r856361 - in /websites/staging/sling/trunk/content: ./ old-stuff/run-modes-org-apache-sling-runmode.html
Date Thu, 28 Mar 2013 19:56:23 GMT
Author: buildbot
Date: Thu Mar 28 19:56:23 2013
New Revision: 856361

Staging update by buildbot for sling

    websites/staging/sling/trunk/content/   (props changed)

Propchange: websites/staging/sling/trunk/content/
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 28 19:56:23 2013
@@ -1 +1 @@

Modified: websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html
--- websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html
+++ websites/staging/sling/trunk/content/old-stuff/run-modes-org-apache-sling-runmode.html
Thu Mar 28 19:56:23 2013
@@ -86,9 +86,13 @@
       <h1>Run Modes (</h1>
-      <p>{note}
-As of Sling 6 the <code></code> bundle is replaced by
the new <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html">Sling
Settings (</a> Bundle. For backwards compatibility this bundle
may still exist in your environment. New code should use the API of the new [Sling Settings
(] Bundle, though.
+      <div markdown="1" class="note">
+As of Sling 6 the <code></code> bundle is replaced
+by the new <a href="/documentation/bundles/sling-settings-org-apache-sling-settings.html">Sling
Settings (</a>
+Bundle. For backwards compatibility this bundle may still exist in your environment. New
code should use the API of the new
+Sling Settings Bundle, though.
 <h1 id="overview">Overview</h1>
 <p>Run modes are meant to define different sets of configuration parameters for various
Sling instances.</p>
 <p>In a web publishing environment, for example, one could use run modes like <em>staging,
production, dev, dmz</em> or combinations of such values.</p>
@@ -101,23 +105,23 @@ As of Sling 6 the <code>
 <p>This command-line parameter takes precedence over a similar definition (<em>,staging</em>)
that might be present in the <em></em> file found in the Sling
home directory.</p>
 <h1 id="getting-the-current-list-of-run-modes">Getting the current list of run modes</h1>
 <p>The <a href="">RunMode service</a> provides the current list of run
modes, examples:</p>
-<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV
class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>RunMode
examples</B></DIV><DIV class="codeContent panelContent">
-    RunMode r = ...get from BundleContext...
-    String [] currentRunModes = r.getCurrentRunModes();</p>
-<div class="codehilite"><pre><span class="n">String</span> <span
class="o">[]</span> <span class="n">expectedRunModes</span> <span
class="o">=</span> <span class="p">{</span> <span class="s">&quot;foo&quot;</span><span
class="p">,</span> <span class="s">&quot;wii&quot;</span> <span
-<span class="k">if</span><span class="p">(</span><span class="n">r</span><span
class="o">.</span><span class="n">isActive</span><span class="p">(</span><span
class="n">expectedRunModes</span><span class="p">))</span> <span class="p">{</span>
-  <span class="sr">//</span> <span class="n">at</span> <span class="n">least</span>
<span class="n">one</span> <span class="n">of</span> <span class="p">(</span><span
class="n">foo</span><span class="p">,</span><span class="n">wii</span><span
class="p">)</span> <span class="n">run</span> <span class="n">modes</span>
-  <span class="sr">//</span> <span class="n">is</span> <span class="n">active</span>
-<span class="p">}</span>
+<div class="codehilite"><pre><span class="n">RunMode</span> <span
class="n">r</span> <span class="o">=</span> <span class="o">...</span><span
class="na">get</span> <span class="n">from</span> <span class="n">BundleContext</span><span
+<span class="n">String</span> <span class="o">[]</span> <span
class="n">currentRunModes</span> <span class="o">=</span> <span class="n">r</span><span
class="o">.</span><span class="na">getCurrentRunModes</span><span
+<span class="n">String</span> <span class="o">[]</span> <span
class="n">expectedRunModes</span> <span class="o">=</span> <span class="o">{</span>
<span class="s">&quot;foo&quot;</span><span class="o">,</span>
<span class="s">&quot;wii&quot;</span> <span class="o">};</span>
+<span class="k">if</span><span class="o">(</span><span class="n">r</span><span
class="o">.</span><span class="na">isActive</span><span class="o">(</span><span
class="n">expectedRunModes</span><span class="o">))</span> <span class="o">{</span>
+  <span class="c1">// at least one of (foo,wii) run modes</span>
+  <span class="c1">// is active</span>
+<span class="o">}</span>
 <h1 id="see-also">See also</h1>
 <p>The RunMode service is used by the <a href="/documentation/bundles/jcr-installer-provider.html">jcrinstall</a>
 <h1 id="automated-tests">Automated tests</h1>
-<p>The <a href="">RunModeImplTest class</a> provides more info about run
modes parsing and usage.</p>
+<p>The <a href="">RunModeImplTest
class</a> provides more info about run modes parsing and usage.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1341376 by fmeschbe on Tue, 22 May 2012 09:41:06 +0000
+        Rev. 1462279 by fmeschbe on Thu, 28 Mar 2013 19:56:14 +0000
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project

View raw message