This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 75922fb rendering fixes
75922fb is described below
commit 75922fb2359ae9ddbf07b0f624ce319acd0e487c
Author: Robert Munteanu <[email protected]>
AuthorDate: Wed Jul 18 14:21:55 2018 +0200
rendering fixes
---
.../context-aware-configuration.html | 9 +++++++--
documentation/bundles/discovery-api-and-impl.html | 4 ++--
documentation/bundles/log-tracers.html | 4 ++--
documentation/bundles/metrics.html | 10 +++++-----
.../sling-settings-org-apache-sling-settings.html | 4 ++--
documentation/development/logging.html | 22 +++++++++++-----------
documentation/development/sling-mock.html | 5 ++---
.../the-sling-engine/service-authentication.html | 7 +++----
documentation/the-sling-engine/servlets.html | 10 +++++-----
.../wrap-or-decorate-resources.html | 6 +++---
.../how-to-manage-events-in-sling.html | 22 +++++++++++-----------
.../tutorials-how-tos/jackrabbit-persistence.html | 8 ++++----
old-stuff/run-modes-org-apache-sling-runmode.html | 4 ++--
13 files changed, 59 insertions(+), 56 deletions(-)
diff --git
a/documentation/bundles/context-aware-configuration/context-aware-configuration.html
b/documentation/bundles/context-aware-configuration/context-aware-configuration.html
index ef6c965..7863f97 100644
---
a/documentation/bundles/context-aware-configuration/context-aware-configuration.html
+++
b/documentation/bundles/context-aware-configuration/context-aware-configuration.html
@@ -219,7 +219,12 @@ public class MyTest {
...
</code></pre>
<p>In you project define a test dependency (additionally the sling-mock
dependency is required):</p>
-<p> #!xml <dependency> <groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>
<scope>test</scope> </dependency></p>
+<pre><code><!-- TODO syntax marker (#!xml) disabled --><dependency>
+ <groupId>org.apache.sling</groupId>
+
<artifactId>org.apache.sling.testing.caconfig-mock-plugin</artifactId>
+ <scope>test</scope>
+</dependency>
+</code></pre>
<p>Full example: <a
href="https://github.com/apache/sling/blob/trunk/testing/mocks/caconfig-mock-plugin/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java">Apache
Sling Context-Aware Configuration Mock Plugin Test</a></p>
<h1><a href="#customizing-the-configuration-lookup"
name="customizing-the-configuration-lookup">Customizing the configuration
lookup</a></h1>
<p>The Context-Aware Configuration implementation provides a set of Service
Provider Interfaces (SPI) that allows you to overlay, enhance or replace the
default implementation and adapt it to your needs.</p>
@@ -245,7 +250,7 @@ public class MyTest {
</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Wed Jul 18 08:57:34 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/discovery-api-and-impl.html
b/documentation/bundles/discovery-api-and-impl.html
index 74ceb71..b5b8f01 100644
--- a/documentation/bundles/discovery-api-and-impl.html
+++ b/documentation/bundles/discovery-api-and-impl.html
@@ -223,7 +223,7 @@ public class SamplePropertyProvider implements
PropertyProvider {
<p><code>discovery.impl</code> requires the, eventually consistent, underlying
repository to propagate changes within reasonable time: in less than the
configured heartbeat timeout. If heartbeats for some reason are not becoming
visible by peers in the cluster within that time, <code>discovery.impl</code>
will consider that peer instance as dead. At which point it will first send a
TOPOLOGY_CHANGING event to all listeners to make them aware that something is
changing in the topology, and [...]
<p>Given the voting is happening through the repository as well, one could
imagine a situation where the repository delays can cause a topology to be
"pseudo partitioned" into two or more parts, each one agreeing on a set of
instances in that sub-cluster (one requirement for such a scenario being that
the delays must be asymmetric, ie changes from a subset of instances propagate
slow, while the remaining changes propagate fast - ie. two different sets of
delays in the cluster). Such a si [...]
<p>The following is an illustration of the impact of large cluster delays:</p>
-<p></p>
+<p><img src="discovery-impl-split-brain.png" alt="discovery.impl split brain"
/></p>
<p>In discovery.impl 1.2.2 several improvements have been done to avoid
pseudo-network partitioning including the following: (see SLING-3432 for more
in-depth details)</p>
<ul>
<li>SLING-5195 : monitor the HeartbeatHandler for long-running
session.saves.</li>
@@ -296,7 +296,7 @@ public class SamplePropertyProvider implements
PropertyProvider {
<p>This is the base bundle solely used by discovery.impl and discovery.oak and
contains exactly the mentioned properties and announcement
handling.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">stefan-egli</span>
on <span class="comment">Tue Jul 17 17:08:10 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/log-tracers.html
b/documentation/bundles/log-tracers.html
index 3a3c975..3297c8e 100644
--- a/documentation/bundles/log-tracers.html
+++ b/documentation/bundles/log-tracers.html
@@ -239,7 +239,7 @@ Transfer-Encoding: chunked
-u admin:admin http://localhost:4512/assets.html/content/dam -o /dev/null
</code></pre>
<p>Below is a json output for GET request</p>
- <pre><code>:<!-- TODO syntax marker (::javascript) disabled -->{
+ <pre><code><!-- TODO syntax marker (::javascript) disabled -->{
"method": "GET",
"time": 15140,
"timestamp": 1461574009024,
@@ -290,7 +290,7 @@ Transfer-Encoding: chunked
</code></pre></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/metrics.html
b/documentation/bundles/metrics.html
index 186f8cb..7bfcbb5 100644
--- a/documentation/bundles/metrics.html
+++ b/documentation/bundles/metrics.html
@@ -99,7 +99,7 @@
<li>Inventory Plugin which dumps the Metric state in plain text format</li>
</ul>
<h2><a href="#basic-usage" name="basic-usage">Basic Usage</a></h2>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->import
org.apache.sling.metrics.Counter;
+<pre><code><!-- TODO syntax marker (::java) disabled -->import
org.apache.sling.metrics.Counter;
import org.apache.sling.metrics.MetricsService;
@Reference
@@ -145,11 +145,11 @@ public void onSessionCreation(){
<p>It also allows us to later extend the type of data collected. For e.g. we
can also collect <a
href="https://jackrabbit.apache.org/api/2.6/org/apache/jackrabbit/api/stats/TimeSeries.html">TimerSeries</a>
type of data for each metric without modifying the caller logic.</p>
<h3><a href="#access-to-dropwizard-metrics-api"
name="access-to-dropwizard-metrics-api">Access to Dropwizard Metrics
API</a></h3>
<p>Sling Metrics bundle also registers the <code>MetricRegistry</code>
instance with OSGi service registry. The instance registered has a service
property <code>name</code> set to <code>sling</code> (so as allow
distinguishing from any other registered <code>MetricRegistry</code> instance).
It can be used to get direct access to Dropwizard Metric API if required.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->@Reference(target =
"(name=sling)")
+<pre><code><!-- TODO syntax marker (::java) disabled -->@Reference(target =
"(name=sling)")
private MetricRegistry registry;
</code></pre>
<p>Also the wrapper Metric instance can be converted to actual instance via
<code>adaptTo</code> calls.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->import
org.apache.sling.commons.metrics.Counter
+<pre><code><!-- TODO syntax marker (::java) disabled -->import
org.apache.sling.commons.metrics.Counter
Counter counter = metricService.counter("login");
com.codahale.metrics.Counter =
counter.adaptTo(com.codahale.metrics.Counter.class)
@@ -160,7 +160,7 @@ com.codahale.metrics.Counter =
counter.adaptTo(com.codahale.metrics.Counter.clas
<p>The plugin lists all Metric instances from any <code>MetricRegistry</code>
instance found in the OSGi service registry. If the <code>MetricRegistry</code>
service has a <code>name</code> property defined then that would be prefixed to
the Metric names from that registry. This allows use of same name in different
registry instances.</p>
<h2><a href="#installation" name="installation">Installation</a></h2>
<p>Add following Maven dependency to your pom.xml:</p>
-<pre><code>:<!-- TODO syntax marker (::xml) disabled --><dependency>
+<pre><code><!-- TODO syntax marker (::xml) disabled --><dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.metrics</artifactId>
<version>1.0.0</version>
@@ -169,7 +169,7 @@ com.codahale.metrics.Counter =
counter.adaptTo(com.codahale.metrics.Counter.clas
<p>Or download from <a
href="http://sling.apache.org/downloads.cgi">here</a></p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git
a/documentation/bundles/sling-settings-org-apache-sling-settings.html
b/documentation/bundles/sling-settings-org-apache-sling-settings.html
index 8aeefef..2848edd 100644
--- a/documentation/bundles/sling-settings-org-apache-sling-settings.html
+++ b/documentation/bundles/sling-settings-org-apache-sling-settings.html
@@ -192,7 +192,7 @@
<p>Remember to look at the <code>RunModeImplTest</code> mentioned above for
details, and feel free to enhance it with useful examples.</p>
<h3><a href="#getting-the-run-modes-of-the-sling-instance"
name="getting-the-run-modes-of-the-sling-instance">Getting the Run Modes of the
Sling instance</a></h3>
<p>The <code>SlingSettings</code> service provides the Run Modes of the
running Sling instance as in this example:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->SlingSettings
settings = ...get from BundleContext...
+<pre><code><!-- TODO syntax marker (::java) disabled -->SlingSettings settings
= ...get from BundleContext...
Set<String> currentRunModes = settings.getRunModes();
Set<String> expectedRunModes = new HashSet<String>(){{
add("foo");add("wii"); }};
@@ -204,7 +204,7 @@ if(expectedRunModes.removeAll(currentRunModes)) {
<p>Getting run modes in this way is usually not needed, it's better to define
bundles or configurations that are only valid in specific run modes, rather
than making decisions in code based on run modes.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Fri Jul 13 11:08:10 2018 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/development/logging.html
b/documentation/development/logging.html
index 725d853..3678eb4 100644
--- a/documentation/development/logging.html
+++ b/documentation/development/logging.html
@@ -356,7 +356,7 @@
http://localhost:8080/system/console/slinglog/tailer.txt?tail=1000&grep=luce
<p>The following sections provide more details.</p>
<h3><a href="#turbofilters-as-osgi-services"
name="turbofilters-as-osgi-services">TurboFilters as OSGi Services</a></h3>
<p><a href="http://logback.qos.ch/manual/filters.html#TurboFilter">Logback
TurboFilters</a> operate globally and are invoked for every Logback call. To
register an OSGi <code>TurboFilter</code>, just to register an service that
implements the <code>ch.qos.logback.classic.turbo.TurboFilter</code>
interface.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->import import
ch.qos.logback.classic.turbo.MatchingFilter;
+<pre><code><!-- TODO syntax marker (::java) disabled -->import import
ch.qos.logback.classic.turbo.MatchingFilter;
SimpleTurboFilter stf = new SimpleTurboFilter();
ServiceRegistration sr =
bundleContext.registerService(TurboFilter.class.getName(), stf, null);
@@ -375,7 +375,7 @@ private static class SimpleTurboFilter extends
MatchingFilter {
<p>As these filters are invoked for every call they must execute quickly.</p>
<h3><a href="#filters-as-osgi-services"
name="filters-as-osgi-services">Filters as OSGi services</a></h3>
<p><a href="http://logback.qos.ch/manual/filters.html">Logback Filters</a> are
attached to appenders and are used to determine if any LoggingEvent needs to be
passed to the appender. When registering a filter the bundle needs to configure
a service property <code>appenders</code> which refers to list of appender
names to which the Filter must be attached</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->import
ch.qos.logback.core.filter.Filter;
+<pre><code><!-- TODO syntax marker (::java) disabled -->import
ch.qos.logback.core.filter.Filter;
SimpleFilter stf = new SimpleFilter();
Dictionary<String, Object> props = new Hashtable<String, Object>();
@@ -396,7 +396,7 @@ private static class SimpleFilter extends
Filter<ILoggingEvent> {
<p>If the <code>appenders</code> value is set to <code>*</code> then the
filter would be registered with all the appenders (<code>Since 4.0.4</code>)</p>
<h3><a href="#appenders-as-osgi-services"
name="appenders-as-osgi-services">Appenders as OSGi services</a></h3>
<p><a href="http://logback.qos.ch/manual/appenders.html">Logback Appenders</a>
handle the logging events produced by Logback. To register an OSGi
<code>Appender</code>, just register a service that implements the
<code>ch.qos.logback.core.Appender</code> interface. Such a service must have a
<code>loggers</code> service property, which refers to list of logger names to
which the Appender must be attached.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled
-->Dictionary<String,Object> props = new Hashtable<String,
Object>();
+<pre><code><!-- TODO syntax marker (::java) disabled
-->Dictionary<String,Object> props = new Hashtable<String,
Object>();
String[] loggers = {
"foo.bar:DEBUG",
@@ -410,7 +410,7 @@ sr =
bundleContext.registerService(Appender.class.getName(),this,props);
<p>Logback supports including parts of a configuration file from another file
(See <a
href="http://logback.qos.ch/manual/configuration.html#fileInclusion">File
Inclusion</a>). This module extends that support by allowing other bundles to
provide config fragments. There are two ways to achieve that, described
below.</p>
<h4><a href="#logback-config-fragments-as-string-objects"
name="logback-config-fragments-as-string-objects">Logback config fragments as
String objects</a></h4>
<p>If you have the config as string then you can register that String instance
as a service with property <code>logbackConfig</code> set to true. The Sling
Logback Extension monitors such objects and passes them to logback.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->Properties props =
new Properties();
+<pre><code><!-- TODO syntax marker (::java) disabled -->Properties props = new
Properties();
props.setProperty("logbackConfig","true");
String config = "<included>\n" +
@@ -432,7 +432,7 @@ registration =
context.registerService(String.class.getName(),config,props);
<p>If the config needs to be updated just re-register the service so that
changes are picked up.</p>
<h4><a href="#logback-config-fragments-as-configprovider-instances"
name="logback-config-fragments-as-configprovider-instances">Logback config
fragments as ConfigProvider instances</a></h4>
<p>Another way to provide config fragments is with services that implement the
<code>org.apache.sling.commons.log.logback.ConfigProvider</code> interface.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->@Component
+<pre><code><!-- TODO syntax marker (::java) disabled -->@Component
@Service
public class ConfigProviderExample implements ConfigProvider {
public InputSource getConfigSource() {
@@ -441,7 +441,7 @@ public class ConfigProviderExample implements
ConfigProvider {
}
</code></pre>
<p>If the config changes then sending an OSGi event with the
<code>org/apache/sling/commons/log/RESET</code> topic resets the Logback
runtime.</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled
-->eventAdmin.sendEvent(new
Event("org/apache/sling/commons/log/RESET",new Properties()));
+<pre><code><!-- TODO syntax marker (::java) disabled
-->eventAdmin.sendEvent(new
Event("org/apache/sling/commons/log/RESET",new Properties()));
</code></pre>
<h3><a href="#external-config-file" name="external-config-file">External
Config File</a></h3>
<p>Logback can be configured with an external file. The file name can be
specified through</p>
@@ -450,7 +450,7 @@ public class ConfigProviderExample implements
ConfigProvider {
<li>OSGi Framework Properties - Logback support also looks for a file named
according to the OSGi framwork
<code>org.apache.sling.commons.log.configurationFile</code> property.</li>
</ol>
<p>If you are providing an external config file then to support OSGi
integration you need to add following action entry:</p>
-<pre><code>:<!-- TODO syntax marker (::xml) disabled --><newRule
pattern="*/configuration/osgi"
+<pre><code><!-- TODO syntax marker (::xml) disabled --><newRule
pattern="*/configuration/osgi"
actionClass="org.apache.sling.commons.log.logback.OsgiAction"/>
<newRule pattern="*/configuration/appender-ref-osgi"
actionClass="org.apache.sling.commons.log.logback.OsgiAppenderRefAction"/>
@@ -473,7 +473,7 @@ org.apache.sling.commons.log.file.number=I"7"
org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy HH:mm:ss.SSS}
*{4}* [{2}] {3} {5}"
</code></pre>
<p>The Logback appender would be named <code>logs/error.log</code>. To
extend/override the config in a Logback config create an appender with the name
<code>logs/error.log</code>:</p>
-<pre><code>:<!-- TODO syntax marker (::xml) disabled --><appender
name="/logs/error.log"
class="ch.qos.logback.core.FileAppender">
+<pre><code><!-- TODO syntax marker (::xml) disabled --><appender
name="/logs/error.log"
class="ch.qos.logback.core.FileAppender">
<file>${sling.home}/logs/error.log</file>
<encoder>
<pattern>%d %-5level %X{sling.userId:-NA} [%thread] %logger{30}
%marker- %msg %n</pattern>
@@ -487,7 +487,7 @@
org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}
<ol>
<li>
<p>Update the api version in the pom:</p>
- <pre><code>:<!-- TODO syntax marker (::xml) disabled
--><dependencies>
+ <pre><code><!-- TODO syntax marker (::xml) disabled --><dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -500,7 +500,7 @@
org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}
</li>
<li>
<p>Add an <code>Import-Package</code> instruction with a custom version
range: </p>
- <pre><code>:<!-- TODO syntax marker (::xml) disabled --><build>
+ <pre><code><!-- TODO syntax marker (::xml) disabled --><build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
@@ -612,7 +612,7 @@
org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}
</code></pre></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Fri Jul 13 11:08:10 2018 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/development/sling-mock.html
b/documentation/development/sling-mock.html
index c3e70d9..be9ec45 100644
--- a/documentation/development/sling-mock.html
+++ b/documentation/development/sling-mock.html
@@ -359,8 +359,7 @@ assertArrayEquals(TEST_DATA, response.getOutput());
<h3><a href="#import-resource-data-from-json-file-in-classpath"
name="import-resource-data-from-json-file-in-classpath">Import resource data
from JSON file in classpath</a></h3>
<p>With the <code>ContentLoader</code> it is possible to import structured
resource and property data from a JSON file stored in the classpath beneath the
unit tests. This data can be used as text fixture for unit tests.</p>
<p>Example JSON data:</p>
-<pre><code>#!json
-{
+<pre><code>{
"jcr:primaryType": "app:Page",
"jcr:content": {
"jcr:primaryType": "app:PageContent",
@@ -436,7 +435,7 @@ public SlingContext context = new
SlingContextBuilder().plugin(MY_PLUGIN).build(
</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Robert
Munteanu</span> on <span class="comment">Wed Nov 22 23:22:38 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Wed Jul 18 09:27:08 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/the-sling-engine/service-authentication.html
b/documentation/the-sling-engine/service-authentication.html
index 6427328..75e4350 100644
--- a/documentation/the-sling-engine/service-authentication.html
+++ b/documentation/the-sling-engine/service-authentication.html
@@ -111,8 +111,7 @@
<p>A Service may be comprised of multiple parts, so each part of the service
may be further identified by a <em>Subservice Name</em>. This Subservice Name
is optional, though. Examples of <em>Subservice Name</em> are names for
subsystems in a Message Transfer System such as accepting messages, queueing
messages, delivering messages.</p>
<p>Ultimately, the combination of the <em>Service Name</em> and <em>Subservice
Name</em> defines the <em>Service ID</em>. It is the <em>Service ID</em> which
is finally mapped to a Resource Resolver and/or JCR Repository user ID for
authentication.</p>
<p>Thus the actual service identification (service ID) is defined as:</p>
-<pre><code>#!text
-service-id = service-name [ ":" subservice-name ] .
+<pre><code>service-id = service-name [ ":" subservice-name ] .
</code></pre>
<p>The <code>service-name</code> is the symbolic name of the bundle providing
the service.</p>
<h3><a href="#example-tenant-administration"
name="example-tenant-administration">Example: Tenant Administration</a></h3>
@@ -162,7 +161,7 @@ service-id = service-name [ ":" subservice-name ]
.
</code></pre>
<p>The according user must exist at the point in time where
<code>ResourceResolverFactory.getServiceResourceResolver(...)</code> or
<code>SlingRepository.loginService(...)</code> is called. If you rely on one of
those methods in your <code>activate</code> method of an OSGi component you
should make sure that you defer starting your OSGi component until the
according service user mapping is in place. For that you can reference the OSGi
service <code>ServiceUserMapped</code> (see Section < [...]
<p>Example OSGi DS Component</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->@Component(
+<pre><code><!-- TODO syntax marker (::java) disabled -->@Component(
reference = {
// this waits with the activation of this component until a service
user mapping with the service name = current bundle's id and the sub
service name 'my-subservice-name' is available.
// you can leave out "target" if the sub service name is not
used.
@@ -251,7 +250,7 @@ whitelist.bundles.regexp="^PAXEXAM.*$"
</table></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:36:08 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Wed Jul 18 09:27:08 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/the-sling-engine/servlets.html
b/documentation/the-sling-engine/servlets.html
index 0c4f527..52f8d39 100644
--- a/documentation/the-sling-engine/servlets.html
+++ b/documentation/the-sling-engine/servlets.html
@@ -156,7 +156,7 @@
<ol>
<li>
<p>OSGi DS 1.4 (R7) component property type annotations for Sling Servlets
(recommended)</p>
- <pre><code>:<!-- TODO syntax marker (::java) disabled -->@Component(
+ <pre><code><!-- TODO syntax marker (::java) disabled -->@Component(
service = { Servlet.class },
@SlingServletResourceTypes(
resourceTypes="/apps/my/type",
@@ -172,7 +172,7 @@ public class MyServlet extends SlingSafeMethodsServlet {
}
</code></pre>
<p>This is only supported though with if you use
<code>bnd-maven-plugin</code> and use Sling which is at least compliant with
OSGi R6 (DS 1.3). There is no actual run-time dependency to OSGi R7! The
configuration for the <code>bnd-maven-plugin</code> should look like this in
your <code>pom.xml</code></p>
- <pre><code>:<!-- TODO syntax marker (::xml) disabled --><build>
+ <pre><code><!-- TODO syntax marker (::xml) disabled --><build>
...
<plugins>
<plugin>
@@ -207,7 +207,7 @@ public class MyServlet extends SlingSafeMethodsServlet {
</li>
<li>
<p>Simple OSGi DS 1.2 annotations (use only if you cannot use approach
1.)</p>
- <pre><code>:<!-- TODO syntax marker (::java) disabled -->@Component(
+ <pre><code><!-- TODO syntax marker (::java) disabled -->@Component(
service = { Servlet.class },
property = {
SLING_SERVLET_RESOURCE_TYPES + "=/apps/my/type"
@@ -227,7 +227,7 @@ public class MyServlet extends SlingSafeMethodsServlet {
</li>
<li>
<p>The <code>@SlingServlet</code> annotation (evaluated by
maven-scr-plugin, use only if you can neither use 1. nor 2.)</p>
- <pre><code>:<!-- TODO syntax marker (::java) disabled -->@SlingServlet(
+ <pre><code><!-- TODO syntax marker (::java) disabled -->@SlingServlet(
resourceTypes = "/apps/my/type",
selectors = "hello",
extensions = "html",
@@ -305,7 +305,7 @@ sling.servlet.extensions = [ "html",
"txt", "json"
<p>Error handling support is described on the <a
href="/documentation/the-sling-engine/errorhandling.html">Errorhandling</a>
page.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Thu Jun 21 16:47:41 2018 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/the-sling-engine/wrap-or-decorate-resources.html
b/documentation/the-sling-engine/wrap-or-decorate-resources.html
index fc422d8..385c4b9 100644
--- a/documentation/the-sling-engine/wrap-or-decorate-resources.html
+++ b/documentation/the-sling-engine/wrap-or-decorate-resources.html
@@ -95,7 +95,7 @@
<p>The Sling API provides an easy way to wrap or decorate a resource before
returning. Use cases for this could for example be * overwrite resource
type/resource super type (for example based on the resource path) * add
metadata</p>
<p>## </p>
<p>To add a resource decorator just register one or more services which
implement the interface <code>ResourceDecorator</code></p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->interface
ResourceDecorator {
+<pre><code><!-- TODO syntax marker (::java) disabled -->interface
ResourceDecorator {
/** Optionally decorate the supplied Resource */
Resource decorate(Resource)
@@ -106,14 +106,14 @@
</code></pre>
<p>The registered decorators will be called from the resource resolver for
each resource returned. If the service decorates the resource it should return
the new resource (often using a <code>ResourceWrapper</code> to wrap the
original Resource). If the service does not want to decorate the resource, it
should return the original resource or null. </p>
<p>Starting with version 2.1.0 of the JCR Resource bundle, the two-argument
<code>decorate</code> method is not called anymore. Implementors of this
interface targeting both newer and older versions of this bundle are advised to
implement this method as:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->public Resource
decorate(Resource resource, HttpServletRequest request) {
+<pre><code><!-- TODO syntax marker (::java) disabled -->public Resource
decorate(Resource resource, HttpServletRequest request) {
return this.decorate(resource);
}
</code></pre>
<p>And use some other mechanism (e.g. a <code>ThreadLocal</code>) to obtain
the current request if necessary.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:36:08 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
b/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
index 0388b5f..2fe2180 100644
--- a/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
+++ b/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html
@@ -120,20 +120,20 @@
<h2><a href="#listening-to-osgi-events"
name="listening-to-osgi-events">Listening to OSGI Events</a></h2>
<p>To listen to OSGi events in Sling you just need to register an
<strong>org.osgi.service.event.EventHandler</strong> service with an
<strong>event.topics</strong> property that describes which event topics the
handler is interested in.</p>
<p>To listen to a Sling <strong>resource added</strong> events, for example,
you'll set the <em>event.topics</em> property to
<strong>org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED</strong> in
the class annotations:</p>
-<pre><code> :<!-- TODO syntax marker (::java) disabled -->
@Property(name=org.osgi.service.event.EventConstants.EVENT_TOPIC,
+<pre><code> <!-- TODO syntax marker (::java) disabled -->
@Property(name=org.osgi.service.event.EventConstants.EVENT_TOPIC,
value=org.apache.sling.api.SlingConstants.TOPIC_RESOURCE_ADDED)
</code></pre>
<p>The javadocs of the TOPIC_ constants in the <a
href="/apidocs/sling6/org/apache/sling/api/SlingConstants.html">org.apache.sling.api.SlingConstants</a>
class lists and explains the available event topics available in Sling.</p>
<h2><a href="#starting-a-job" name="starting-a-job">Starting a job</a></h2>
<p>To start a job, the <em>JobManager</em> service can be used. It needs a job
topic and a payload. In our case we define our dropbox job topic and give the
resource path as the payload:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled --> final String
resourcePath = ...; // path to the resource to handle
+<pre><code><!-- TODO syntax marker (::java) disabled --> final String
resourcePath = ...; // path to the resource to handle
final Map<String, Object> payload = new HashMap<String,
Object>();
payload.put("resourcePath", resourcePath);
// start job
this.jobManager.addJob(JOB_TOPIC, payload);
</code></pre>
<p>To receive the resource event, the service needs to implement the
<strong>org.osgi.service.event.EventHandler</strong> interface and register it
as an EventHandler service:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled
-->@Component(immediate=true) // immediate should only be used in rare cases
(see below)
+<pre><code><!-- TODO syntax marker (::java) disabled
-->@Component(immediate=true) // immediate should only be used in rare cases
(see below)
@Service(value=EventHandler.class)
public class DropBoxService implements EventHandler {
...
@@ -141,11 +141,11 @@ public class DropBoxService implements EventHandler {
</code></pre>
<p>Usually a service should be lazy and therefore not declare itself to be
immediate (in the Component annotation). However as this service is an event
handler and might receive a lot of events even concurrently, it is advised to
set the immediate flag to true on the component. Otherwise our event handler
would be created and destroyed with every event coming in.</p>
<p>To start the job we need a reference to the JobManager:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->@Reference
+<pre><code><!-- TODO syntax marker (::java) disabled -->@Reference
private JobManager jobManager;
</code></pre>
<p>The job topic for dropbox job events needs to be defined:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->/** The job topic for
dropbox job events. */
+<pre><code><!-- TODO syntax marker (::java) disabled -->/** The job topic for
dropbox job events. */
public static final String JOB_TOPIC =
"com/sling/eventing/dropbox/job";
</code></pre>
<p>The <strong>org.osgi.service.event.EventHandler#handleEvent(Event
event)</strong> method needs to be implemented:</p>
@@ -164,7 +164,7 @@ public static final String JOB_TOPIC =
"com/sling/eventing/dropbox/job"
</li>
</ul>
<p>For example:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->public void
handleEvent(final Event event) {
+<pre><code><!-- TODO syntax marker (::java) disabled -->public void
handleEvent(final Event event) {
// get the resource event information
final String propPath = (String)
event.getProperty(SlingConstants.PROPERTY_PATH);
final String propResType = (String)
event.getProperty(SlingConstants.PROPERTY_RESOURCE_TYPE);
@@ -184,11 +184,11 @@ public static final String JOB_TOPIC =
"com/sling/eventing/dropbox/job"
<h2><a href="#consuming-job-events" name="consuming-job-events">Consuming Job
Events</a></h2>
<p>Now that you have implemented a service that starts a job when a file is
uploaded to <strong>/tmp/dropbox</strong>, you will implement the service
<strong>DropBoxEventHandler</strong> that processes those jobs and moves the
files to a location according to their MIME types.</p>
<p>To process to the job that have been defined before the property
<strong>job.topics</strong> needs to be set to
<strong>DropBoxService.JOB_TOPIC</strong> in the class annotations:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled
-->@Property(name="job.topics",
+<pre><code><!-- TODO syntax marker (::java) disabled
-->@Property(name="job.topics",
value=DropBoxService.JOB_TOPIC)
</code></pre>
<p>In addition the service needs to implement the
<strong>org.apache.sling.event.jobs.consumer.JobConsumer</strong> interface:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->public class
DropBoxEventHandler implements JobConsumer {
+<pre><code><!-- TODO syntax marker (::java) disabled -->public class
DropBoxEventHandler implements JobConsumer {
</code></pre>
<p>Some class fields need to be defined:</p>
<ul>
@@ -197,7 +197,7 @@ public static final String JOB_TOPIC =
"com/sling/eventing/dropbox/job"
<li>The destination paths of the files.</li>
</ul>
<p>For example:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->/** Default log. */
+<pre><code><!-- TODO syntax marker (::java) disabled -->/** Default log. */
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@Reference
@@ -217,7 +217,7 @@ private final static String OTHER_PATH =
"/dropbox/other/";
<li>The file is moved to the new location by using a JCR session (as the
Sling Resource API doesn't support move atm)</li>
</ul>
<p>or in Java Code:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->public JobResult
process(final Job job) {
+<pre><code><!-- TODO syntax marker (::java) disabled -->public JobResult
process(final Job job) {
ResourceResolver adminResolver = null;
try {
adminResolver =
resolverFactory.getAdministrativeResourceResolver(null);
@@ -260,7 +260,7 @@ private final static String OTHER_PATH =
"/dropbox/other/";
<p>The complete code for the <strong>DropBoxEventHandler</strong> service is
available <a
href="DropBoxEventHandler.java">here</a>.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/tutorials-how-tos/jackrabbit-persistence.html
b/documentation/tutorials-how-tos/jackrabbit-persistence.html
index baa111e..d423012 100644
--- a/documentation/tutorials-how-tos/jackrabbit-persistence.html
+++ b/documentation/tutorials-how-tos/jackrabbit-persistence.html
@@ -116,14 +116,14 @@ see <a href="http://jackrabbit.apache.org/oak/docs/">The
Jackrabbit Oak document
<ol>
<li>Get the JDBC driver for your database from the driver provider</li>
<li>Wrap the JDBC driver library into an OSGi bundle:
- <pre><code>:<!-- TODO syntax marker (::sh) disabled --># Example for
PostgreSQL JDBC 3 driver 8.4-701
+ <pre><code><!-- TODO syntax marker (::sh) disabled --># Example for
PostgreSQL JDBC 3 driver 8.4-701
$ java -jar bnd.jar wrap postgresql-8.4-701.jdbc3.jar
$ mv postgresql-8.4-701.jdbc3.bar postgresql-8.4-701.jdbc3-bnd.jar
</code></pre>
</li>
<li>
<p>Deploy the driver to your local Maven 2 Repository (Required if adding
the JDBC driver to a Maven build, e.g. using the Sling Launchpad Plugin)</p>
- <pre><code>:<!-- TODO syntax marker (::sh) disabled -->$ mvn
install:install-file \
+ <pre><code><!-- TODO syntax marker (::sh) disabled -->$ mvn
install:install-file \
-DgroupId=postgresql -DartifactId=postgresql -Dversion=8.4.701.jdbc3 \
-Dpackaging=jar -Dfile=postgresql-8.4-701.jdbc3-bnd.jar
</code></pre>
@@ -144,7 +144,7 @@ $ mv postgresql-8.4-701.jdbc3.bar
postgresql-8.4-701.jdbc3-bnd.jar
<p>To prepare a repository.xml file before first startup, use the <a
href="https://svn.apache.org/repos/asf/sling/attic/jackrabbit-server/src/main/resources/repository.xml"><code>repository.xml</code></a>
as a template and modify it by replacing the
<code><PersistenceManager></code> elements to refer to the selected
persistence manager.</p>
<p>If the file already exists, you can modifiy this existing file and there is
no need to get the original from the SVN repository.</p>
<p>For example to use PostgreSQL instead of Derby modify the
<code><PersistenceManager></code> elements as follows:</p>
-<pre><code>:<!-- TODO syntax marker (::xml) disabled --><Repository>
+<pre><code><!-- TODO syntax marker (::xml) disabled --><Repository>
...
<Workspace name="${wsp.name}">
...
@@ -182,7 +182,7 @@ $ mv postgresql-8.4-701.jdbc3.bar
postgresql-8.4-701.jdbc3-bnd.jar
<p>This description is based on Tony Giaccone's description <a
href="http://markmail.org/message/wlbfrukmjjsl33hh">Swapping Postgres for
Derby</a> sent to the Sling Users mailing list.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Robert
Munteanu</span> on <span class="comment">Wed Nov 22 22:30:38 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/old-stuff/run-modes-org-apache-sling-runmode.html
b/old-stuff/run-modes-org-apache-sling-runmode.html
index 646a9bb..517a3ba 100644
--- a/old-stuff/run-modes-org-apache-sling-runmode.html
+++ b/old-stuff/run-modes-org-apache-sling-runmode.html
@@ -109,7 +109,7 @@ Sling Settings Bundle, though.
<p>This command-line parameter takes precedence over a similar definition
(*sling.run.modes=dev,staging*) that might be present in the
<em>sling.properties</em> file found in the Sling home directory.</p>
<h1><a href="#getting-the-current-list-of-run-modes"
name="getting-the-current-list-of-run-modes">Getting the current list of run
modes</a></h1>
<p>The [RunMode service]({{
refs.http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/runmode/src/main/java/org/apache/sling/runmode/RunMode.java.path
}}) provides the current list of run modes, examples:</p>
-<pre><code>:<!-- TODO syntax marker (::java) disabled -->RunMode r = ...get
from BundleContext...
+<pre><code><!-- TODO syntax marker (::java) disabled -->RunMode r = ...get
from BundleContext...
String [] currentRunModes = r.getCurrentRunModes();
String [] expectedRunModes = { "foo", "wii" };
@@ -122,7 +122,7 @@ if(r.isActive(expectedRunModes)) {
<p>The RunMode service is used by the [jcrinstall]({{
refs.jcr-installer-provider.path }}) services.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Bertrand
Delacretaz</span> on <span class="comment">Fri Sep 29 15:57:01 2017 +0200</span>
+ Last modified by <span class="author">Thomas
Wolfart</span> on <span class="comment">Tue Jul 17 21:15:24 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>