incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r856363 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/sling-settings-org-apache-sling-settings.html
Date Thu, 28 Mar 2013 19:59:32 GMT
Author: buildbot
Date: Thu Mar 28 19:59:32 2013
New Revision: 856363

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/sling-settings-org-apache-sling-settings.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 28 19:59:32 2013
@@ -1 +1 @@
-1462280
+1462282

Modified: websites/staging/sling/trunk/content/documentation/bundles/sling-settings-org-apache-sling-settings.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/sling-settings-org-apache-sling-settings.html
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/sling-settings-org-apache-sling-settings.html
Thu Mar 28 19:59:32 2013
@@ -129,17 +129,17 @@
 <p>This command-line parameter takes precedence over a similar definition (<code>sling.run.modes=dev,staging</code>)
that might be present in the <code>sling.properties</code> file found in the Sling
home directory.</p>
 <h3 id="getting-the-run-modes-of-the-sling-instance">Getting the Run Modes of the Sling
instance</h3>
 <p>The <code>SlingSettings</code> service provides the Run Modes of the
running Sling instance, 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">
-    SlingSettings settings = ...get from BundleContext...
-    Set<String> currentRunModes = settings.getRunModes();</p>
-<div class="codehilite"><pre><span class="n">Set</span><span class="sr">&lt;String&gt;</span>
<span class="n">expectedRunModes</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">HashSet</span><span class="sr">&lt;String&gt;</span><span
class="p">();</span>
-<span class="k">if</span><span class="p">(</span><span class="n">expectedRunModes</span><span
class="o">.</span><span class="n">removeAll</span><span class="p">(</span><span
class="n">currentRunModes</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">SlingSettings</span>
<span class="n">settings</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 class="o">...</span>
+<span class="n">Set</span><span class="o">&lt;</span><span
class="n">String</span><span class="o">&gt;</span> <span class="n">currentRunModes</span>
<span class="o">=</span> <span class="n">settings</span><span class="o">.</span><span
class="na">getRunModes</span><span class="o">();</span>
+
+<span class="n">Set</span><span class="o">&lt;</span><span
class="n">String</span><span class="o">&gt;</span> <span class="n">expectedRunModes</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">HashSet</span><span
class="o">&lt;</span><span class="n">String</span><span class="o">&gt;();</span>
+<span class="k">if</span><span class="o">(</span><span class="n">expectedRunModes</span><span
class="o">.</span><span class="na">removeAll</span><span class="o">(</span><span
class="n">currentRunModes</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>
 </pre></div>
       <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. 1462282 by fmeschbe on Thu, 28 Mar 2013 19:59:26 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project



Mime
View raw message