diff -b -B -r ./contributing.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/contributing.html 94c94 <

Non-Programmers

--- >

Non-Programmers

96c96 <

Programmers

--- >

Programmers

diff -b -B -r ./documentation/apidocs.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/apidocs.html 93c93 <

Sling API Documentation

--- >

Sling API Documentation

diff -b -B -r ./documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/accessing-filesystem-resources-extensions-fsresource.html 98c98 <

Introduction

--- >

Introduction

106c106 <

Resource Types

--- >

Resource Types

113c113 <

Adapters

--- >

Adapters

120c120 <

Configuration

--- >

Configuration

132,134c132,134 < Parameter < Name < Description --- > Parameter > Name > Description 139,141c139,141 < File System Root < provider.file < File system directory mapped to the virtual resource tree. This property must not be an empty string. If the path is relative it is resolved against sling.home or the current working directory. The path may be a file or folder. If the path does not address an existing file or folder, an empty folder is created. --- > File System Root > provider.file > File system directory mapped to the virtual resource tree. This property must not be an empty string. If the path is relative it is resolved against sling.home or the current working directory. The path may be a file or folder. If the path does not address an existing file or folder, an empty folder is created. 144,146c144,146 < Provider Root < provider.root (2.x), provider.roots (1.x) < Location in the virtual resource tree where the file system resources are mapped in. This property must not be an empty string. Only one path is supported. --- > Provider Root > provider.root (2.x), provider.roots (1.x) > Location in the virtual resource tree where the file system resources are mapped in. This property must not be an empty string. Only one path is supported. 149,151c149,151 < File system layout < provider.fs.mode < File system layout mode for files, folders and content. --- > File system layout > provider.fs.mode > File system layout mode for files, folders and content. 154,156c154,156 < Init. Content Options < provider.initial.content.import.options < Import options for Sling-Initial-Content file system layout. Supported options: overwrite, ignoreImportProviders. --- > Init. Content Options > provider.initial.content.import.options > Import options for Sling-Initial-Content file system layout. Supported options: overwrite, ignoreImportProviders. 159,161c159,161 < FileVault Filter < provider.filevault.filterxml.path < Path to META-INF/vault/filter.xml when using FileVault XML file system layout. --- > FileVault Filter > provider.filevault.filterxml.path > Path to META-INF/vault/filter.xml when using FileVault XML file system layout. 164,166c164,166 < Check Interval < provider.checkinterval < If the interval has a value higher than 100, the provider will check the file system for changes periodically. This interval defines the period in milliseconds (the default is 1000). If a change is detected, resource events are sent through the event admin. --- > Check Interval > provider.checkinterval > If the interval has a value higher than 100, the provider will check the file system for changes periodically. This interval defines the period in milliseconds (the default is 1000). If a change is detected, resource events are sent through the event admin. 169,171c169,171 < Cache Size < provider.cache.size < Max. number of content files cached in memory. --- > Cache Size > provider.cache.size > Max. number of content files cached in memory. 175c175 <

FILES_FOLDERS file system layout

--- >

FILES_FOLDERS file system layout

182c182 <

INITIAL_CONTENT file system layout

--- >

INITIAL_CONTENT file system layout

200c200 <

FILEVAULT_XML file system layout

--- >

FILEVAULT_XML file system layout

diff -b -B -r ./documentation/bundles/apache-sling-eventing-and-job-handling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/apache-sling-eventing-and-job-handling.html 96c96 <

Overview

--- >

Overview

109c109 <

Jobs (Guarantee of Processing)

--- >

Jobs (Guarantee of Processing)

130,131c130,131 < props.put("item1", "/something"); < props.put("count", 5); --- > props.put("item1", "/something"); > props.put("count", 5); 133c133 < jobManager.addJob("my/special/jobtopic", props); --- > jobManager.addJob("my/special/jobtopic", props); 139,141c139,141 <

JobBuilder

<

Instead of creating the jobs by calling JobManager.addJob("my/special/jobtopic", props); the JobBuilder can be used, which is retrieved via JobManager.createJob("my/special/jobtopic"). The last method being called on the JobBuilder must be add(...), which finally adds the job to the queue.

<

Scheduled Jobs

--- >

JobBuilder

>

Instead of creating the jobs by calling JobManager.addJob("my/special/jobtopic", props); the JobBuilder can be used, which is retrieved via JobManager.createJob("my/special/jobtopic"). The last method being called on the JobBuilder must be add(...), which finally adds the job to the queue.

>

Scheduled Jobs

156c156 < ScheduleBuilder scheduleBuilder = jobManager.startJob("my/special/jobtopic").schedule(); --- > ScheduleBuilder scheduleBuilder = jobManager.startJob("my/special/jobtopic").schedule(); 165c165 <

Job Consumers

--- >

Job Consumers

174c174 < @Property(name=JobConsumer.PROPERTY_TOPICS, value="my/special/jobtopic",) --- > @Property(name=JobConsumer.PROPERTY_TOPICS, value="my/special/jobtopic",) 184,185c184,185 <

Job Executors

<

If the job consumer needs more features like providing progress information or adding more information of the processing,JobExecutor should be implemented.
A job executor is a service processing a job. It registers itself as an OSGi service together with a property defining which topics this consumer can process:

--- >

Job Executors

>

If the job consumer needs more features like providing progress information or adding more information of the processing,*JobExecutor* should be implemented.
A job executor is a service processing a job. It registers itself as an OSGi service together with a property defining which topics this consumer can process:

194c194 < @Property(name=JobExecutor.PROPERTY_TOPICS, value="my/special/jobtopic",) --- > @Property(name=JobExecutor.PROPERTY_TOPICS, value="my/special/jobtopic",) 202c202 < context.getJobContext().log("Job initialized"); --- > context.getJobContext().log("Job initialized"); 206c206 < context.getJobContext().log("2 steps completed."); --- > context.getJobContext().log("2 steps completed."); 210c210 < context.getJobContext().log("Job Stopped after 4 steps."); --- > context.getJobContext().log("Job Stopped after 4 steps."); 215c215 < context.getJobContext().log("Job finished."); --- > context.getJobContext().log("Job finished."); 221,222c221,222 <

JobExecutionContext can be used by executor to update job execution progress, add job logs, build a JobExecutionResult and to check if job is still active by jobExecutionContext.isStopped(). The executor can return job result "succeeded" by calling JobExecutionContext.result(successMsg).succeeded(), job result "failed" by calling JobExecutionContext.result(errorMessage).failed() and job result "cancelled" by calling JobExecutionContext.result(message).cancelled(). The Job interface allows to query the topic, the result message, progress, logs, the payload and additional information about the current job.

<

Job Handling

--- >

JobExecutionContext can be used by executor to update job execution progress, add job logs, build a JobExecutionResult and to check if job is still active by jobExecutionContext.isStopped(). The executor can return job result "succeeded" by calling JobExecutionContext.result(successMsg).succeeded(), job result "failed" by calling JobExecutionContext.result(errorMessage).failed() and job result "cancelled" by calling JobExecutionContext.result(message).cancelled(). The Job interface allows to query the topic, the result message, progress, logs, the payload and additional information about the current job.

>

Job Handling

225c225 <

Queue Configurations

--- >

Queue Configurations

230,231c230,231 < Property Name < Description --- > Property Name > Description 236,237c236,237 < queue.name < The name of the queue. If matching is used for topics, the value {0} can be used for replacing the matched part. --- > queue.name > The name of the queue. If matching is used for topics, the value {0} can be used for replacing the matched part. 240,241c240,241 < queue.type < The type of the queue: ORDERED, UNORDERED, TOPIC_ROUND_ROBIN --- > queue.type > The type of the queue: ORDERED, UNORDERED, TOPIC_ROUND_ROBIN 244,245c244,245 < queue.topics < A list of topics processed by this queue. Either the concrete topic is specified or the topic string ends with /* or /. If a star is at the end all topics and sub topics match, with a dot only direct sub topics match. --- > queue.topics > A list of topics processed by this queue. Either the concrete topic is specified or the topic string ends with /* or /. If a star is at the end all topics and sub topics match, with a dot only direct sub topics match. 248,249c248,249 < queue.maxparallel < How many jobs can be processed in parallel? -1 for number of processors. --- > queue.maxparallel > How many jobs can be processed in parallel? -1 for number of processors. 252,253c252,253 < queue.retries < How often the job should be retried in case of failure (i.e. Job did not finish with succeeded or cancelled result). -1 for endless retries. In case of exceptions there is no retry. --- > queue.retries > How often the job should be retried in case of failure (i.e. Job did not finish with succeeded or cancelled result). -1 for endless retries. In case of exceptions there is no retry. 256,257c256,257 < queue.retrydelay < The waiting time in milliseconds between job retries. --- > queue.retrydelay > The waiting time in milliseconds between job retries. 260,261c260,261 < queue.priority < The thread priority: NORM, MIN, or MAX --- > queue.priority > The thread priority: NORM, MIN, or MAX 264,265c264,265 < service.ranking < A ranking for this configuration. --- > service.ranking > A ranking for this configuration. 270c270 <

Ordered Queues

--- >

Ordered Queues

272c272 <

Unordered Queues (or Parallel queues)

--- >

Unordered Queues (or Parallel queues)

274c274 <

Topic-Round-Robin Queues

--- >

Topic-Round-Robin Queues

276c276 <

Job Distributing

--- >

Job Distributing

280c280 <

Job Creation Patterns

--- >

Job Creation Patterns

282c282 <

Jobs based on user action

--- >

Jobs based on user action

284c284 <

Jobs based on observation / events

--- >

Jobs based on observation / events

286c286 <

Distributed Events

--- >

Distributed Events

288c288 <

Basic Principles

--- >

Basic Principles

297c297 <

Event Distribution Across Application Nodes (Cluster)

--- >

Event Distribution Across Application Nodes (Cluster)

300c300 <

Sending Scheduled Events

--- >

Sending Scheduled Events

diff -b -B -r ./documentation/bundles/bundle-resources-extensions-bundleresource.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/bundle-resources-extensions-bundleresource.html 98,101c98,101 <

Introduction

<

The Bundle Resource Provider provides access to files/directories included in an OSGi bundle through the Sling ResourceResolver.

<

Configuration

<

If a bundle wants to provide resources, it must specify the Bundle manifest header Sling-Bundle-Resources containing a list of absolute paths. The paths are separated by comma. Without any additional information such a path is mapped 1:1 meaning that the specified path is used as the root resource path and the corresponding resource is at the same path in the bundle.

--- >

Introduction

>

The Bundle Resource Provider provides access to files/directories included in an OSGi bundle through the Sling ResourceResolver.

>

Configuration

>

If a bundle wants to provide resources, it must specify the Bundle manifest header Sling-Bundle-Resources containing a list of absolute paths. The paths are separated by comma. Without any additional information such a path is mapped 1:1 meaning that the specified path is used as the root resource path and the corresponding resource is at the same path in the bundle.

114c114 <

Resource Types

--- >

Resource Types

120c120 <

Defining Resources Through JSON

--- >

Defining Resources Through JSON

129,133c129,133 < "sling:resourceType" : "products", < "sling" : { < "sling:resourceType" : "product", < "name" : "sling", < "title : "Apache Sling" --- > "sling:resourceType" : "products", > "sling" : { > "sling:resourceType" : "product", > "name" : "sling", > "title : "Apache Sling" 139c139 <

Adapters

--- >

Adapters

145c145 <

Capability

--- >

Capability

148c148 < osgi.extender;osgi.extender="org.apache.sling.bundleresource";version:Version="1.1" --- > osgi.extender;osgi.extender="org.apache.sling.bundleresource";version:Version="1.1" 153c153 < osgi.extender;filter:="(&(osgi.extender=org.apache.sling.bundleresource)(version<=1.1.0)(!(version>=2.0.0)))" --- > osgi.extender;filter:="(&(osgi.extender=org.apache.sling.bundleresource)(version<=1.1.0)(!(version>=2.0.0)))" 157c157 <

WebConsole Plugin

--- >

WebConsole Plugin

diff -b -B -r ./documentation/bundles/caching-services.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/caching-services.html 94c94 <

Caching services are available under multiple repositories at https://github.com/apache/?utf8=✓&q=sling-cache

--- >

Caching services are available under multiple repositories at https://github.com/apache/?utf8=✓&q=sling-cache

96c96,97 < A portal cache provider API implementation is provided, that depends on the whiteboard portal modules found under [https://svn.apache.org/repos/asf/sling/whiteboard/portal](https://svn.apache.org/repos/asf/sling/whiteboard/portal)
--- > >

A portal cache provider API implementation is provided, that depends on the whiteboard portal modules found under https://svn.apache.org/repos/asf/sling/whiteboard/portal

diff -b -B -r ./documentation/bundles/configuration-installer-factory.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/configuration-installer-factory.html 95c95 <

Configurations

--- >

Configurations

97c97 <
filename ::= <pid> ( '-' <subname> )? ('.cfg'|'.config')
---
> 
filename ::= <pid> ( '-' <subname> )? ('.cfg'|'.config')
99c99
< 

If the form is <pid>('.cfg'|'.config'), the file contains the properties for a Managed Service. The <pid> is then the PID of the Managed Service. See the Configuration Admin service for details.

--- >

If the form is <pid>('.cfg'|'.config'), the file contains the properties for a Managed Service. The <pid> is then the PID of the Managed Service. See the Configuration Admin service for details.

108c108 <

Property Files (.cfg)

--- >

Property Files (.cfg)

111,112c111,112 < header ::= <header> ( ':' | '=' ) <value> ( '\<nl> <value> ) * < comment ::= '#' <any> --- > header ::= <header> ( ':' | '=' ) <value> ( '\<nl> <value> ) * > comment ::= '#' <any> 118,119c118,119 <

In addition the XML format defined by java.util.Property is supported if the file starts with the character <.

<

Configuration Files (.config)

--- >

In addition the XML format defined by [java.util.Property](https://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#loadFromXML(java.io.InputStream)) is supported if the file starts with the character <.

>

Configuration Files (.config)

124,125c124,125 < comment ::= '#' <any> < header ::= prop '=' value --- > comment ::= '#' <any> > header ::= prop '=' value 127,131c127,131 < symbolic-name ::= token { '.' token } < token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } < value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) < values ::= simple { ',' simple } < simple ::= '"' stringsimple '"' --- > symbolic-name ::= token { '.' token } > token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } > value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) > values ::= simple { ',' simple } > simple ::= '"' stringsimple '"' 133c133 < stringsimple ::= <quoted string representation of the value where both '"' and '=' need to be escaped> --- > stringsimple ::= <quoted string representation of the value where both '"' and '=' need to be escaped> 150c150 <

Project Info

--- >

Project Info

diff -b -B -r ./documentation/bundles/content-distribution.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/content-distribution.html 96c96 <

Introduction

--- >

Introduction

98c98 <

Distribution usecases

--- >

Distribution usecases

100c100 <

Forward distribution

--- >

Forward distribution

102c102 <

Setup overview

--- >

Setup overview

107c107,108 < --- > > 111c112,113 < --- > > 113c115 <

Sample configuration

--- >

Sample configuration

115,121c117,129 <
  • on source instance: one forward agent

    org.apache.sling.distribution.agent.impl.ForwardDistributionAgentFactory-publish.json            
    <     name="publish"
    <     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default"]
    < 
  • <
  • on target instance: one local importer

    org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory-default
    <     name="default"
    < 
  • --- >
  • >

    on source instance: one forward agent

    >
    org.apache.sling.distribution.agent.impl.ForwardDistributionAgentFactory-publish.json            
    >     name="publish"
    >     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default"]
    > 
    >
  • >
  • >

    on target instance: one local importer

    >
    org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory-default
    >     name="default"
    > 
    >
  • 123c131 <

    Trigger forward distribution

    --- >

    Trigger forward distribution

    126c134 <
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action=ADD' -d 'path=/content/sample1'
    ---
    > 
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action=ADD' -d 'path=/content/sample1'
    128c136
    < 

    Reverse distribution

    --- >

    Reverse distribution

    130c138 <

    Setup overview

    --- >

    Setup overview

    135c143,144 < --- > > 140c149,150 < --- > > 142c152 <

    Sample configuration

    --- >

    Sample configuration

    144,149c154,164 <
  • on target instance: one reverse agent

    org.apache.sling.distribution.agent.impl.ReverseDistributionAgentFactory-reverse.json            
    <     name="reverse"
    <     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse"]
    < 
  • <
  • on source instance: one queue agent and one exporter for that agent

    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    <     name="reverse"
    ---
    >   
  • >

    on target instance: one reverse agent

    >
    org.apache.sling.distribution.agent.impl.ReverseDistributionAgentFactory-reverse.json            
    >     name="reverse"
    >     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse"]
    > 
    >
  • >
  • >

    on source instance: one queue agent and one exporter for that agent

    >
    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    >     name="reverse"
    152,154c167,170
    <     name="reverse"
    <     agent.target="(name=reverse)"
    < 
  • --- > name="reverse" > agent.target="(name=reverse)" >
    >
  • 156c172 <

    Trigger reverse distribution

    --- >

    Trigger reverse distribution

    159c175 <
    $ curl -v -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/publish -d 'action=PULL' -d 'path=/content/sample1'
    ---
    > 
    $ curl -v -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/publish -d 'action=PULL' -d 'path=/content/sample1'
    161c177
    < 

    Sync distribution

    --- >

    Sync distribution

    163c179 <

    Setup overview:

    --- >

    Setup overview:

    168c184,185 < --- > > 174c191,192 < --- > > 176c194 <

    Sample configuration

    --- >

    Sample configuration

    178,184c196,207 <
  • on coordinator instance: one sync agent

    org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-sync.json            
    <     name="sync"
    <     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"]
    <     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    < 
  • <
  • on each farm instance: one local exporter and one local importer

    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    <     name="reverse"
    ---
    >   
  • >

    on coordinator instance: one sync agent

    >
    org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-sync.json            
    >     name="sync"
    >     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"]
    >     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    > 
    >
  • >
  • >

    on each farm instance: one local exporter and one local importer

    >
    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    >     name="reverse"
    187,188c210,211
    <     name="reverse"
    <     agent.target="(name=reverse)"
    ---
    >     name="reverse"
    >     agent.target="(name=reverse)"
    191,193c214,217
    <     name="reverse"
    <     agent.target="(name=reverse)"
    < 
  • --- > name="reverse" > agent.target="(name=reverse)" >
    >
  • 195c219 <

    Multidatacenter sync distribution

    --- >

    Multidatacenter sync distribution

    197c221 <

    Setup overview

    --- >

    Setup overview

    204c228,229 < --- > > 210c235,236 < --- > > 212c238 <

    Sample configuration

    --- >

    Sample configuration

    214,218c240,246 <
  • on coordinator instance: one intradcsync agent with two exporters for the other dcs, and one interdcsync agent that connects to remote exporters.

    org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-intradcsync          
    <     name="intradcsync"
    <     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"]
    <     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    <     passiveQueues=["dc2queue", "dc3queue"]
    ---
    >   
  • >

    on coordinator instance: one intradcsync agent with two exporters for the other dcs, and one interdcsync agent that connects to remote exporters.

    >
    org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory-intradcsync          
    >     name="intradcsync"
    >     packageExporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/exporters/reverse", "http://localhost:4504/libs/sling/distribution/services/exporters/reverse"]
    >     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    >     passiveQueues=["dc2queue", "dc3queue"]
    221,223c249,251
    <     name="dc2queue"
    <     agent.target="(name=intradcsync)"
    <     queue="dc2queue"
    ---
    >     name="dc2queue"
    >     agent.target="(name=intradcsync)"
    >     queue="dc2queue"
    226,228c254,256
    <     name="dc3queue"
    <     agent.target="(name=intradcsync)"
    <     queue="dc3queue"
    ---
    >     name="dc3queue"
    >     agent.target="(name=intradcsync)"
    >     queue="dc3queue"
    231,236c259,267
    <     name="interdcsync"
    <     packageExporter.endpoints=["http://localhost:5502/libs/sling/distribution/services/exporters/dc1queue", "http://localhost:6502/libs/sling/distribution/services/exporters/dc1queue"]
    <     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    < 
  • <
  • on each farm instance: one local exporter and one local importer

    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    <     name="reverse"
    ---
    >     name="interdcsync"
    >     packageExporter.endpoints=["http://localhost:5502/libs/sling/distribution/services/exporters/dc1queue", "http://localhost:6502/libs/sling/distribution/services/exporters/dc1queue"]
    >     packageImporter.endpoints=["http://localhost:4503/libs/sling/distribution/services/importers/default", "http://localhost:4504/libs/sling/distribution/services/importers/default"]
    > 
    >
  • >
  • >

    on each farm instance: one local exporter and one local importer

    >
    org.apache.sling.distribution.agent.impl.QueueDistributionAgentFactory-reverse.json            
    >     name="reverse"
    239,240c270,271
    <     name="reverse"
    <     agent.target="(name=reverse)"
    ---
    >     name="reverse"
    >     agent.target="(name=reverse)"
    243,244c274,276
    <     name="default"
    < 
  • --- > name="default" >
    >
  • 246,247c278,279 <

    Additional options

    <

    How to configure binary-less distribution?

    --- >

    Additional options

    >

    How to configure binary-less distribution?

    253c285 <

    How to configure priority queue?

    --- >

    How to configure priority queue?

    257c289 <

    How to configure retry strategy?

    --- >

    How to configure retry strategy?

    diff -b -B -r ./documentation/bundles/content-loading-jcr-contentloader.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/content-loading-jcr-contentloader.html 97c97 <

    Initial Content Loading

    --- >

    Initial Content Loading

    103,104c103,104 < Source Entry Paths in Bundle < Target Repository Path --- > Source Entry Paths in Bundle > Target Repository Path 109,110c109,110 < SLING-INF/content/home < /home --- > SLING-INF/content/home > /home 113,114c113,114 < SLING-INF/content/content/playground/en/home < /content/playground/en/home --- > SLING-INF/content/content/playground/en/home > /content/playground/en/home 117,118c117,118 < SLING-INF/someothercontent/playground/en/home < not installed at all, because not below the Sling-Initial-Content header entry --- > SLING-INF/someothercontent/playground/en/home > not installed at all, because not below the Sling-Initial-Content header entry 126,127c126,127 < Entry Type < Installation method --- > Entry Type > Installation method 132,133c132,133 < Directory < Created as a node of type sling:Folder unless a content definition file of the same name exists in the same directory as the directory to be installed. Example: A directory SLING-INF/content/dir is installed as node /dir of type nt:folder unless a SLING-INF/content/dir.xml or SLING-INF/content/dir.json file exists which defines the content for the /dir node. --- > Directory > Created as a node of type sling:Folder unless a content definition file of the same name exists in the same directory as the directory to be installed. Example: A directory SLING-INF/content/dir is installed as node /dir of type nt:folder unless a SLING-INF/content/dir.xml or SLING-INF/content/dir.json file exists which defines the content for the /dir node. 136,137c136,137 < File < Unless the file is a content definition file (see below) an nt:file node is created for the file and an nt:resource node is created as its jcr:content child node to take the contents of the bundle file. The properties of the nt:resource node are set from file information as available. If a content definition file exists with the same name as the file plus .json or .xml these properties are set additionally on the imported file. See below for the content definition file specification. --- > File > Unless the file is a content definition file (see below) an nt:file node is created for the file and an nt:resource node is created as its jcr:content child node to take the contents of the bundle file. The properties of the nt:resource node are set from file information as available. If a content definition file exists with the same name as the file plus .json or .xml these properties are set additionally on the imported file. See below for the content definition file specification. 145,148c145,148 < Directive < Definition < Default value < Description --- > Directive > Definition > Default value > Description 153,156c153,156 < overwrite < overwrite:=(true|false) < false < The overwrite directive specifies if content nodes should be overwritten (at the target repository path, which is "/" by default) or just initially added. If this is true, existing nodes are deleted and a new node is created in the same place. This directive should be used together with the path directive to limit overwriting. --- > overwrite > overwrite:=(true|false) > false > The overwrite directive specifies if content nodes should be overwritten (at the target repository path, which is "/" by default) or just initially added. If this is true, existing nodes are deleted and a new node is created in the same place. This directive should be used together with the path directive to limit overwriting. 159,162c159,162 < overwriteProperties < overwriteProperties:=(true|false) < false < The overwriteProperties directive specifying if content properties should be overwritten or just initially added (at the target repository path, which is "/" by default). This directive should be used together with the path directive to limit overwriting. --- > overwriteProperties > overwriteProperties:=(true|false) > false > The overwriteProperties directive specifying if content properties should be overwritten or just initially added (at the target repository path, which is "/" by default). This directive should be used together with the path directive to limit overwriting. 165,168c165,168 < uninstall < uninstall:=(true|false) < value from overwrite < The uninstall directive specifies if content should be uninstalled when bundle is unregistered. This value defaults to the value of the overwrite directive. --- > uninstall > uninstall:=(true|false) > value from overwrite > The uninstall directive specifies if content should be uninstalled when bundle is unregistered. This value defaults to the value of the overwrite directive. 171,174c171,174 < path < path:=/target/location < / < The path directive specifies the target node where initial content will be loaded. If the path does not exist yet in the repository, it is created by the content loader. The intermediate nodes are of type sling:Folder. --- > path > path:=*/target/location* > / > The path directive specifies the target node where initial content will be loaded. If the path does not exist yet in the repository, it is created by the content loader. The intermediate nodes are of type sling:Folder. 177,180c177,180 < checkin < checkin:=(true|false) < false < The checkin directive specifies whether versionable nodes should be checked in. --- > checkin > checkin:=(true|false) > false > The checkin directive specifies whether versionable nodes should be checked in. 183,186c183,186 < ignoreImportProviders < ignoreImportProviders:=list of extensions < empty < This directive can be used to not run one of the configured extractors (see below). --- > ignoreImportProviders > ignoreImportProviders:=list of extensions > empty > This directive can be used to not run one of the configured extractors (see below). 194,195c194,195 < Sling-Initial-Content header entry < Behaviour --- > Sling-Initial-Content header entry > Behaviour 200,201c200,201 < SLING-INF/content/home;overwrite:=true;path:=/home < Overwrites already existing content in /home and uninstalls the content when the bundle is unregistered. --- > SLING-INF/content/home;overwrite:=true;path:=/home > Overwrites already existing content in /home and uninstalls the content when the bundle is unregistered. 204,205c204,205 < SLING-INF/content/home;overwriteProperties:=true;path:=/home < Overwrites properties of existing content in /home. --- > SLING-INF/content/home;overwriteProperties:=true;path:=/home > Overwrites properties of existing content in /home. 208,209c208,209 < SLING-INF/content/home;path:=/sites/sling_website < This loads the content given in SLING-INF/content/home into /sites/sling_website. --- > SLING-INF/content/home;path:=/sites/sling_website > This loads the content given in SLING-INF/content/home into /sites/sling_website. 212,213c212,213 < SLING-INF/content/home;checkin:=true < After content loading, versionable nodes are checked in. --- > SLING-INF/content/home;checkin:=true > After content loading, versionable nodes are checked in. 217c217 <

    Loading initial content from bundles

    --- >

    Loading initial content from bundles

    226c226 <

    Directories

    --- >

    Directories

    228c228 <

    Files

    --- >

    Files

    231c231 <

    XML Descriptor Files

    --- >

    XML Descriptor Files

    286,289c286,289 <

    Using a custom XML format

    <

    By writing an XSLT stylesheet file, you can use whatever XML format you prefer. The XML file references an XSLT stylesheet by using the xml-stylesheet processing instruction:

    <
    <?xml version="1.0" encoding="UTF-8"?>
    < <?xml-stylesheet href="my-transform.xsl" type="text/xsl"?> <!-- The path to my-transform.xsl is relative to this file -->
    ---
    > 

    Using a custom XML format

    >

    By writing an XSLT stylesheet file, you can use whatever XML format you prefer. The XML file references an XSLT stylesheet by using the xml-stylesheet processing instruction:

    >
    <?xml version="1.0" encoding="UTF-8"?>
    > <?xml-stylesheet href="my-transform.xsl" type="text/xsl"?> <!-- The path to my-transform.xsl is relative to this file -->
    299,301c299,301
    < 
    <xsl:stylesheet version="1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 
    <   xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
    <   xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    ---
    > 
    <xsl:stylesheet version="1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 
    >   xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
    >   xmlns:rep="internal" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    303c303
    <   <xsl:template match="your_custom_element">
    ---
    >   <xsl:template match="your_custom_element">
    311c311
    < 

    JSON Descriptor Files

    --- >

    JSON Descriptor Files

    315c315 < "nodename" : { --- > "nodename" : { 317,318c317,318 < // optional primary node type, default "nt:unstructured" < "jcr:primaryType": "sling:ScriptedComponent", --- > // optional primary node type, default "nt:unstructured" > "jcr:primaryType": "sling:ScriptedComponent", 321c321 < "jcr:mixinTypes": [ ], --- > "jcr:mixinTypes": [ ], 328c328 < "sling:contentClass": "com.day.sling.jcr.test.Test", --- > "sling:contentClass": "com.day.sling.jcr.test.Test", 331c331 < "sampleMulti": [ "v1", "v2" ], --- > "sampleMulti": [ "v1", "v2" ], 334,335c334,335 < "sampleStruct": 1, < "sampleStructMulti": [ 1, 2, 3 ], --- > "sampleStruct": 1, > "sampleStructMulti": [ 1, 2, 3 ], 338c338 < "sampleDate": "2014-11-27T13:26:00.000+01:00", --- > "sampleDate": "2014-11-27T13:26:00.000+01:00", 341c341 < "jcr:reference:sampleRef": "386b0f48-49c3-4c58-8735-ceee6bfc1933", --- > "jcr:reference:sampleRef": "386b0f48-49c3-4c58-8735-ceee6bfc1933", 344c344 < "jcr:path:samplePath": "/content/data", --- > "jcr:path:samplePath": "/content/data", 347c347 < "jcr:name:sampleName": "data", --- > "jcr:name:sampleName": "data", 350c350 < "jcr:uri:sampleUri": "http://sling.apache.org/", --- > "jcr:uri:sampleUri": "http://sling.apache.org/", 353,359c353,359 < "sling:scripts": { < "jcr:primaryType": "sling:ScriptList", < "sling:Script": { < "jcr:primaryType": "sling:Script", < "sling:name": "/test/content/jsp/start.jsp", < "sling:type": "jsp", < "sling:glob": "*" --- > "sling:scripts": { > "jcr:primaryType": "sling:ScriptList", > "sling:Script": { > "jcr:primaryType": "sling:Script", > "sling:name": "/test/content/jsp/start.jsp", > "sling:type": "jsp", > "sling:glob": "*" 364,366c364,366 <

    Extractors

    <

    By default, the sling-jcr-contentloader bundle tries to extract certain file types during content loading. These include json, xml, zip, and jar files. Therefore all available extractors are used for content processing. However if some files should be put into the repository unextracted, the ignoreImportProviders directive can be used with a comma separated list of extensions that should not be extracted, like ignoreImportProviders:="jar,zip". Please note that the value needs to be put into quotation marks if more than one value is used like in the example.

    <

    File name escaping

    --- >

    Extractors

    >

    By default, the sling-jcr-contentloader bundle tries to extract certain file types during content loading. These include json, xml, zip, and jar files. Therefore all available extractors are used for content processing. However if some files should be put into the repository unextracted, the ignoreImportProviders directive can be used with a comma separated list of extensions that should not be extracted, like ignoreImportProviders:="jar,zip". Please note that the value needs to be put into quotation marks if more than one value is used like in the example.

    >

    File name escaping

    369,371c369,371 <

    Workspace Targetting

    <

    By default, initial content will be loaded into the default workspace. To override this, add a Sling-Initial-Content-Workspace bundle manifest header to specify the workspace. Note that all content from a bundle will be loaded into the same workspace.

    <

    Example: Load i18n JSON files

    --- >

    Workspace Targetting

    >

    By default, initial content will be loaded into the default workspace. To override this, add a Sling-Initial-Content-Workspace bundle manifest header to specify the workspace. Note that all content from a bundle will be loaded into the same workspace.

    >

    Example: Load i18n JSON files

    385c385 <
    <?xml version="1.0" encoding="UTF-8"?>
    ---
    > 
    <?xml version="1.0" encoding="UTF-8"?>
    396c396
    < 

    Declared Node Type Registration

    --- >

    Declared Node Type Registration

    400c400 <

    Node types installed by this mechanism will never be removed again by the sling-jcr-base bundle.

    --- >

    Node types installed by this mechanism will never be removed again by the sling-jcr-base bundle.

    403c403 < Support for re-registration of node types is relatively limited. In Jackrabbit, for example, only "trivial" changes are allowed. --- > Support for re-registration of node types is relatively limited. In Jackrabbit, for example, only "trivial" changes are allowed. 405c405 <

    Automated tests

    --- >

    Automated tests

    408c408 <

    ACLs and Principals

    --- >

    ACLs and Principals

    412,414c412,414 < "security:acl": [ < { "principal": "TestGroup1", "granted": ["jcr:read","jcr:write"] }, < { "principal": "TestUser1", "granted": ["jcr:read"], "denied": ["jcr:write"] } --- > "security:acl": [ > { "principal": "TestGroup1", "granted": ["jcr:read","jcr:write"] }, > { "principal": "TestUser1", "granted": ["jcr:read"], "denied": ["jcr:write"] } 428,430c428,430 < "security:principals": [ < { "name": "TestUser1", "password": "mypassword", "extraProp1": "extraProp1Value" }, < { "name": "TestGroup1", "isgroup": "true", "members": ["TestUser1"], "extraProp1": "extraProp1Value" } --- > "security:principals": [ > { "name": "TestUser1", "password": "mypassword", "extraProp1": "extraProp1Value" }, > { "name": "TestGroup1", "isgroup": "true", "members": ["TestUser1"], "extraProp1": "extraProp1Value" } diff -b -B -r ./documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/context-aware-configuration/context-aware-configuration-default-implementation.html 98c98 <

    About

    --- >

    About

    101c101 <

    Repository paths

    --- >

    Repository paths

    104c104 <

    Context paths

    --- >

    Context paths

    106c106 <

    Configuration resource resolving

    --- >

    Configuration resource resolving

    108c108 <

    Configuration resource lookup

    --- >

    Configuration resource lookup

    126c126 <

    Configuration persistence

    --- >

    Configuration persistence

    132c132 < @prop1 = 'value1' --- > @prop1 = 'value1' 144c144 <

    Resource inheritance

    --- >

    Resource inheritance

    155c155 <

    Resource inheritance

    --- >

    Resource inheritance

    157c157 <

    Property inheritance

    --- >

    Property inheritance

    diff -b -B -r ./documentation/bundles/context-aware-configuration/context-aware-configuration-override.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/context-aware-configuration/context-aware-configuration-override.html 98c98 <

    About

    --- >

    About

    102c102 <

    Override syntax

    --- >

    Override syntax

    119,121c119,121 <
    my-config/property1="value 1"
    < my-config/sub1/property1="value 1"
    < my-config/property1=["value 1","value 2"]
    ---
    > 
    my-config/property1="value 1"
    > my-config/sub1/property1="value 1"
    > my-config/property1=["value 1","value 2"]
    123,125c123,125
    < x.y.z.MyConfig={"prop1"="value1","prop2"=[1,2,3],"prop3"=true,"prop4"=1.23}
    < [/content/region1]my-config/property1="value 1"
    < [/content/region1]my-config/sub1={"prop1":"value 1"}
    ---
    > x.y.z.MyConfig={"prop1"="value1","prop2"=[1,2,3],"prop3"=true,"prop4"=1.23}
    > [/content/region1]my-config/property1="value 1"
    > [/content/region1]my-config/sub1={"prop1":"value 1"}
    128,129c128,129
    < 

    Built-in override providers

    <

    Override via system properties

    --- >

    Built-in override providers

    >

    Override via system properties

    134,135c134,135 < -D"sling.caconfig.override.my-config/property1=[\"value 1\",\"value 2\"]" < -D"sling.caconfig.override.[/content/region1]x.y.z.MyConfig={\"prop1\"=\"value1\",\"prop2\"=[1,2,3],\"prop3\"=true,\"prop4\"=1.23}" --- > -D"sling.caconfig.override.my-config/property1=[\"value 1\",\"value 2\"]" > -D"sling.caconfig.override.[/content/region1]x.y.z.MyConfig={\"prop1\"=\"value1\",\"prop2\"=[1,2,3],\"prop3\"=true,\"prop4\"=1.23}" 138c138 <

    Override via OSGi configuration

    --- >

    Override via OSGi configuration

    diff -b -B -r ./documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/context-aware-configuration/context-aware-configuration-spi.html 98c98 <

    About

    --- >

    About

    101c101 <

    General principles

    --- >

    General principles

    109c109 <

    Context Path Strategy

    --- >

    Context Path Strategy

    112c112 <

    Configuration Resource Resolver Strategy

    --- >

    Configuration Resource Resolver Strategy

    114c114 <

    Configuration Inheritance Strategy

    --- >

    Configuration Inheritance Strategy

    116c116 <

    Configuration Persistence Strategy

    --- >

    Configuration Persistence Strategy

    119c119 <

    Configuration Metadata Provider

    --- >

    Configuration Metadata Provider

    121c121 <

    Configuration Override Provider

    --- >

    Configuration Override Provider

    diff -b -B -r ./documentation/bundles/context-aware-configuration/context-aware-configuration.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/context-aware-configuration/context-aware-configuration.html 96c96 <

    About

    --- >

    About

    99c99 <

    Configuration example

    --- >

    Configuration example

    102c102 <

    Java API

    --- >

    Java API

    110c110 <

    Context-Aware Resources

    --- >

    Context-Aware Resources

    117c117 <
    Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
    ---
    > 
    Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
    119c119
    < Resource configResource = configurationResourceResolver.getResource(contentResource, "my-bucket", "my-config");
    ---
    > Resource configResource = configurationResourceResolver.getResource(contentResource, "my-bucket", "my-config");
    122c122
    < 
    Collection<Resource> configResources = configurationResourceResolver.getResourceCollection(contentResource, "my-bucket", "my-config");
    ---
    > 
    Collection<Resource> configResources = configurationResourceResolver.getResourceCollection(contentResource, "my-bucket", "my-config");
    125,126c125,126
    < 

    The configuration name (3rd parameter) defines which configuration you are interested in. The name can be a relative path as well (e.g. "sub1/my-config").

    <

    Context-Aware Configurations

    --- >

    The configuration name (3rd parameter) defines which configuration you are interested in. The name can be a relative path as well (e.g. "sub1/my-config").

    >

    Context-Aware Configurations

    129c129 <
    Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
    ---
    > 
    Resource contentResource = resourceResolver.getResource("/content/mysite/page1");
    138c138
    < 

    Contexts and configuration references

    --- >

    Contexts and configuration references

    141c141 <

    Context and config reference

    --- >

    Context and config reference

    143c143 <

    Describe configurations via annotation classes

    --- >

    Describe configurations via annotation classes

    146c146 <
    @Configuration(label="My Configuration", description="Describe me")
    ---
    > 
    @Configuration(label="My Configuration", description="Describe me")
    149c149
    <     @Property(label="Parameter #1", description="Describe me")
    ---
    >     @Property(label="Parameter #1", description="Describe me")
    152,153c152,153
    <     @Property(label="Parameter with Default value", description="Describe me")
    <     String paramWithDefault() default "defValue";
    ---
    >     @Property(label="Parameter with Default value", description="Describe me")
    >     String paramWithDefault() default "defValue";
    155c155
    <     @Property(label="Integer parameter", description="Describe me")
    ---
    >     @Property(label="Integer parameter", description="Describe me")
    159c159
    < 

    The @Configuration annotation is mandatory. All properties on the @Configuration annotation and the @Property annotations are optional - they provide additional metadata for tooling e.g. configuration editors.

    --- >

    The @Configuration annotation is mandatory. All properties on the @Configuration annotation and the @Property annotations are optional - they provide additional metadata for tooling e.g. configuration editors.

    165,166c165,166 <

    To automate this you can use the Context-Aware Configuration bnd plugin (see next chapter).

    <

    Accessing configuration from HTL/Sightly templates

    --- >

    To automate this you can use the Context-Aware Configuration bnd plugin (see next chapter).

    >

    Accessing configuration from HTL/Sightly templates

    171c171 < <dd>${caconfig['x.y.z.ConfigSample'].stringParam}</dd> --- > <dd>${caconfig['x.y.z.ConfigSample'].stringParam}</dd> 175c175 <
    <ul data-sly-list.item="${caconfig['x.y.z.ConfigSampleList']}">
    ---
    > 
    <ul data-sly-list.item="${caconfig['x.y.z.ConfigSampleList']}">
    180c180
    < 
    ${caconfig['x.y.z.ConfigSample']['nestedConfig/stringParam']}
    ---
    > 
    ${caconfig['x.y.z.ConfigSample']['nestedConfig/stringParam']}
    182c182
    < 

    Context-Aware Configuration bnd plugin

    --- >

    Context-Aware Configuration bnd plugin

    204c204 <

    Unit Tests with Context-Aware Configuration

    --- >

    Unit Tests with Context-Aware Configuration

    229c229 <

    Customizing the configuration lookup

    --- >

    Customizing the configuration lookup

    233c233 <

    Web Console plugins

    --- >

    Web Console plugins

    240c240 <

    Management API

    --- >

    Management API

    244c244 <

    References

    --- >

    References

    diff -b -B -r ./documentation/bundles/datasource-providers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/datasource-providers.html 97c97 <

    Pooled Connection DataSource Provider

    --- >

    Pooled Connection DataSource Provider

    105c105 <

    Driver Loading

    --- >

    Driver Loading

    111c111 <

    Configuration

    --- >

    Configuration

    118c118 <

    Web Console Config

    --- >

    Web Console Config

    120c120 <

    Convert Driver jars to Bundle

    --- >

    Convert Driver jars to Bundle

    140c140 <

    JNDI DataSource

    --- >

    JNDI DataSource

    148c148 <

    Usage

    --- >

    Usage

    156c156 < @Reference(target = "(&(objectclass=javax.sql.DataSource)(datasource.name=foo))") --- > @Reference(target = "(&(objectclass=javax.sql.DataSource)(datasource.name=foo))") 160c160 <

    Installation

    --- >

    Installation

    diff -b -B -r ./documentation/bundles/discovery-api-and-impl.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/discovery-api-and-impl.html 98c98 <

    Discovery Entities

    --- >

    Discovery Entities

    100c100 <

    Instance, InstanceDescription

    --- >

    Instance, InstanceDescription

    108c108 <

    Cluster, ClusterView

    --- >

    Cluster, ClusterView

    116c116 <

    Topology, TopologyView

    --- >

    Topology, TopologyView

    123c123 <

    Cluster Leader and Instance Ordering

    --- >

    Cluster Leader and Instance Ordering

    125,126c125,126 <

    Additionally each cluster (ClusterView) orders its instances in a stable list: each newly joined instances is added at the end of the list and retains its order in the list as long as it doesn't leave the cluster. This can be used to distribute "singleton" work amongst the cluster to more than just the leader.

    <

    Topology Changes

    --- >

    Additionally each cluster (ClusterView) orders its instances in a stable list: each newly joined instances is added at the end of the list and retains its order in the list as long as it doesn't leave the cluster. This can be used to distribute "singleton" work amongst the cluster to more than just the leader.

    >

    Topology Changes

    146c146 <

    Properties

    --- >

    Properties

    158c158 < value = {"sample.value1", "sample.value2" }) --- > value = {"sample.value1", "sample.value2" }) 162,165c162,165 < if ("sample.value1".equals(name)) { < return "foo"; < } else if ("sample.value2".equals(name)) { < return "bar"; --- > if ("sample.value1".equals(name)) { > return "foo"; > } else if ("sample.value2".equals(name)) { > return "bar"; 172c172 <

    Deployment and configuration

    --- >

    Deployment and configuration

    174,175c174,175 <

    discovery.impl: Resource-based, OOTB Implementation

    <

    The discovery.impl bundle is a resource-based, out of the box implementation of the discovery.api using standard Sling.

    --- >

    discovery.impl: Resource-based, OOTB Implementation

    >

    The discovery.impl bundle is a resource-based, out of the box implementation of the discovery.api using standard Sling.

    178c178 <

    Location in Repository

    --- >

    Location in Repository

    182c182 <

    /var/discovery/impl/clusterInstances/<slingId>

    --- >

    /var/discovery/impl/clusterInstances/<slingId>

    195c195 <

    /var/discovery/impl/establishedView

    --- >

    /var/discovery/impl/establishedView

    202c202 <

    /var/discovery/impl/ongoingVotings

    --- >

    /var/discovery/impl/ongoingVotings

    205c205 <

    /var/discovery/impl/previousView

    --- >

    /var/discovery/impl/previousView

    207c207 <

    Heartbeats, Voting and Intra-Cluster Discovery

    --- >

    Heartbeats, Voting and Intra-Cluster Discovery

    214c214 <

    To avoid having each instance make it's own, perhaps differing conclusions as to which instance/heartbeat is dead or not, there is an explicit, unanimous voting mechanism that agrees upon a list of alive instances. This list of alive instances is called cluster view.

    --- >

    To avoid having each instance make it's own, perhaps differing conclusions as to which instance/heartbeat is dead or not, there is an explicit, unanimous voting mechanism that agrees upon a list of alive instances. This list of alive instances is called cluster view.

    222c222 <

    pseudo-network partitioning aka split-brain

    --- >

    pseudo-network partitioning aka split-brain

    226c226 <

    discovery.impl split brain

    --- >

    discovery.impl split brain

    235c235 <

    Topology Connectors for Cross-Cluster Discovery

    --- >

    Topology Connectors for Cross-Cluster Discovery

    240c240 <

    WebConsole

    --- >

    WebConsole

    242c242 <

    Configuration

    --- >

    Configuration

    245,254c245,264 <
  • heartbeatInterval: the time in seconds between two heartbeats (both cluster-internal and for HTTP-connectors). Default value is 15 seconds.

  • <
  • heartbeatTimeout: the time in seconds after which an instance is considered dead if no heartbeat was sent since. Default value is 20 seconds.

  • <
  • topologyConnectorUrls: a list of connector URLs to which this instance should connect to. The list can contain multiple instances of the same cluster (for fallback configurations). If the list is empty, no connector will be created. The default relative URL is /libs/sling/topology/connector. Note that this URL is accessible without authentication - to avoid having to configure administrative username/passwords in all instances. Instead, a whitelist approach is used (see next item).

  • <
  • topologyConnectorWhitelist: As mentioned above, the path /libs/sling/topology/connector does not require authentication. To assure that only trusted instances can connect to the topology, its hostname or IP address must be in a whitelist. By default this whitelist only contains localhost and 127.0.0.1.

  • <
  • minEventDelay: To reduce the number of events sent during changes, there is a delay (in seconds) before the event is sent. If additional changes happen during this delay, the change will be combined in one event.

  • <
  • leaderElectionRepositoryDescriptor: this is an advanced parameter. It denotes a repository descriptor that is evaluated and taken into account for leader Election: the corresponding value of the descriptor is sorted by first.

  • <
  • hmacEnabled: If this is true, and sharedKey is set to a value on all Sling instances within the same topology, then messages are validates using a signature of the content of the message based on the shared key. The signature and the digest of the content appear as http headers. When hmac message validation is enabled, whitelisting is disabled. This use useful where the topology messages are transported through multiple reverse proxy layers or the topology is dynamic. The Hmac algorithm in use is HmacSHA256. The JVM is expected to have a provider implementing this algorithm (The Standard JDKs do).

  • <
  • sharedKey: If hmacEnabled is true, this must be set to a secret value, shared amongst all Sling instances that are members of the same topology.

  • <
  • enableEncryption: If hmacEnabled is true, and sharedKey is set, setting this to true will encrypt the body of the message using 128 Bit AES encryption. The encryption key is derived from the sharedKey using a 9 byte random salt, giving 2^^72 potential salt values.

  • <
  • hmacSharedKeyTTL: The key used for the signatures is derived from the shared key. Each derived key has a lifetime before the next key is generated. This parameter sets the lifetime of each key in ms. The default is 4h. Messages sent using old keys will remain valid for 2x the TTL, after which time the message will be ignored.

  • --- >
  • >

    heartbeatInterval: the time in seconds between two heartbeats (both cluster-internal and for HTTP-connectors). Default value is 15 seconds.

  • >
  • >

    heartbeatTimeout: the time in seconds after which an instance is considered dead if no heartbeat was sent since. Default value is 20 seconds.

  • >
  • >

    topologyConnectorUrls: a list of connector URLs to which this instance should connect to. The list can contain multiple instances of the same cluster (for fallback configurations). If the list is empty, no connector will be created. The default relative URL is /libs/sling/topology/connector. Note that this URL is accessible without authentication - to avoid having to configure administrative username/passwords in all instances. Instead, a whitelist approach is used (see next item).

  • >
  • >

    topologyConnectorWhitelist: As mentioned above, the path /libs/sling/topology/connector does not require authentication. To assure that only trusted instances can connect to the topology, its hostname or IP address must be in a whitelist. By default this whitelist only contains localhost and 127.0.0.1.

  • >
  • >

    minEventDelay: To reduce the number of events sent during changes, there is a delay (in seconds) before the event is sent. If additional changes happen during this delay, the change will be combined in one event.

  • >
  • >

    leaderElectionRepositoryDescriptor: this is an advanced parameter. It denotes a repository descriptor that is evaluated and taken into account for leader Election: the corresponding value of the descriptor is sorted by first.

  • >
  • >

    hmacEnabled: If this is true, and sharedKey is set to a value on all Sling instances within the same topology, then messages are validates using a signature of the content of the message based on the shared key. The signature and the digest of the content appear as http headers. When hmac message validation is enabled, whitelisting is disabled. This use useful where the topology messages are transported through multiple reverse proxy layers or the topology is dynamic. The Hmac algorithm in use is HmacSHA256. The JVM is expected to have a provider implementing this algorithm (The Standard JDKs do).

  • >
  • >

    sharedKey: If hmacEnabled is true, this must be set to a secret value, shared amongst all Sling instances that are members of the same topology.

  • >
  • >

    enableEncryption: If hmacEnabled is true, and sharedKey is set, setting this to true will encrypt the body of the message using 128 Bit AES encryption. The encryption key is derived from the sharedKey using a 9 byte random salt, giving 2^^72 potential salt values.

  • >
  • >

    hmacSharedKeyTTL: The key used for the signatures is derived from the shared key. Each derived key has a lifetime before the next key is generated. This parameter sets the lifetime of each key in ms. The default is 4h. Messages sent using old keys will remain valid for 2x the TTL, after which time the message will be ignored.

  • 256c266 <

    discovery.oak: Oak-based, OOTB-implementation

    --- >

    discovery.oak: Oak-based, OOTB-implementation

    259c269 <

    Jackrabbit Oak's discovery-lite

    --- >

    Jackrabbit Oak's discovery-lite

    261c271 <

    'oak.discoverylite.clusterview'

    --- >

    'oak.discoverylite.clusterview'

    272c282 <

    Accessing discovery-lite

    --- >

    Accessing discovery-lite

    274c284 <
    getRepository().getDescriptor("oak.discoverylite.clusterview")
    ---
    > 
    getRepository().getDescriptor("oak.discoverylite.clusterview")
    278c288
    < 

    Sling's discovery.oak

    --- >

    Sling's discovery.oak

    283c293 <

    discovery.commons

    --- >

    discovery.commons

    285c295 <

    discovery.base

    --- >

    discovery.base

    diff -b -B -r ./documentation/bundles/distribution.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/distribution.html 94c94 <

    Overview

    --- >

    Overview

    101c101 <

    Bundles

    --- >

    Bundles

    111c111 <

    Design

    --- >

    Design

    123,124c123,124 <

    In order to properly handle large number of requests against the same agent each of them is provided with queues where the exported packages are sent, the agent takes then care to process such a queue in order to import each package.

    <

    Distribution agents configuration

    --- >

    In order to properly handle large number of requests against the same agent each of them is provided with queues where the exported packages are sent, the agent takes then care to process such a queue in order to import each package.

    >

    Distribution agents configuration

    141,143c141,143 < "jcr:primaryType": "sling:OsgiConfig", < "provider.roots": [ "/libs/sling/distribution/settings/agents" ], < "kind" : "agent" --- > "jcr:primaryType": "sling:OsgiConfig", > "provider.roots": [ "/libs/sling/distribution/settings/agents" ], > "kind" : "agent" 149c149 <

    Distribution agents services

    --- >

    Distribution agents services

    153,155c153,155 < "jcr:primaryType": "sling:OsgiConfig", < "provider.roots": [ "/libs/sling/distribution/services/agents" ], < "kind" : "agent" --- > "jcr:primaryType": "sling:OsgiConfig", > "provider.roots": [ "/libs/sling/distribution/services/agents" ], > "kind" : "agent" 161,162c161,162 <

    Distribution queues

    <

    In Memory queue

    --- >

    Distribution queues

    >

    In Memory queue

    164c164 <

    Sling Job Handling based queue

    --- >

    Sling Job Handling based queue

    172c172 <

    Distribution of packages among queues

    --- >

    Distribution of packages among queues

    179,180c179,180 <

    Usecases

    <

    Forward distribution

    --- >

    Usecases

    >

    Forward distribution

    187,188c187,188 <

    Create/update content

    <
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action=ADD' -d 'path=/content/sample1'
    ---
    > 

    Create/update content

    >
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action=ADD' -d 'path=/content/sample1'
    190,191c190,191
    < 

    Delete content

    <
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action= DELETE' -d 'path=/content/sample1'
    ---
    > 

    Delete content

    >
    $ curl -v -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish -d 'action= DELETE' -d 'path=/content/sample1'
    193c193
    < 

    Reverse distribution

    --- >

    Reverse distribution

    196,198c196,198 <

    Create/update content

    <
    $ curl -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/reverse -d 'action=ADD' -d 'path=/content/sample1'
    < $ curl -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish-reverse -d 'action=PULL'
    ---
    > 

    Create/update content

    >
    $ curl -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/reverse -d 'action=ADD' -d 'path=/content/sample1'
    > $ curl -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/publish-reverse -d 'action=PULL'
    200c200
    < 

    Sync distribution

    --- >

    Sync distribution

    203,205c203,205 <

    Create/update content

    <
    $ curl -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/reverse-pubsync -d 'action=ADD' -d 'path=/content/sample1'
    < $ curl -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/pubsync -d 'action=PULL'
    ---
    > 

    Create/update content

    >
    $ curl -u admin:admin http://localhost:8081/libs/sling/distribution/services/agents/reverse-pubsync -d 'action=ADD' -d 'path=/content/sample1'
    > $ curl -u admin:admin http://localhost:8080/libs/sling/distribution/services/agents/pubsync -d 'action=PULL'
    207c207
    < 

    Installation

    --- >

    Installation

    212,213c212,213 <

    HTTP API

    <

    API Requirements

    --- >

    HTTP API

    >

    API Requirements

    226,227c226,227 <

     API endpoints

    <

    Configuration API

    --- >

     API endpoints

    >

    Configuration API

    234c234 <

    Command API

    --- >

    Command API

    240c240 <

    Monitoring API

    --- >

    Monitoring API

    245c245 <

    Java API

    --- >

    Java API

    249c249 <

    Extensions

    --- >

    Extensions

    251c251 <

    Apache Avro serializer

    --- >

    Apache Avro serializer

    253c253 <

    Kryo serializer

    --- >

    Kryo serializer

    255c255 <

    Ideas for future developments

    --- >

    Ideas for future developments

    diff -b -B -r ./documentation/bundles/dynamic-includes.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/dynamic-includes.html 95c95 <

    Sling Dynamic Include (org.apache.sling.dynamic-include)

    --- >

    Sling Dynamic Include (org.apache.sling.dynamic-include)

    diff -b -B -r ./documentation/bundles/file-installer-provider.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/file-installer-provider.html 95c95 <

    Setup

    --- >

    Setup

    123c123 <

    Bundles

    --- >

    Bundles

    126c126 <

    Configurations

    --- >

    Configurations

    128c128 <

    Custom Artifacts

    --- >

    Custom Artifacts

    130,131c130,131 <

    Runmode Support

    <

    The file installer supports run modes for installing artifacts (added with SLING-4478). Within the scanned directory, a folder prefixed with "install." and followed by one or more run modes (separated by ".") will only be considered if all the respective run modes are active. For example artifacts below a folder named install.a1.dev are only taken into account if the run modes a1 and dev are both active.

    --- >

    Runmode Support

    >

    The file installer supports run modes for installing artifacts (added with SLING-4478). Within the scanned directory, a folder prefixed with "install." and followed by one or more run modes (separated by ".") will only be considered if all the respective run modes are active. For example artifacts below a folder named install.a1.dev are only taken into account if the run modes a1 and dev are both active.

    133c133 <

    Project Info

    --- >

    Project Info

    diff -b -B -r ./documentation/bundles/hapi.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/hapi.html 94,95c94,95 <

    HApi - Hypermedia API tools

    <

    The hypermedia API tools are a way to enable sling component developers to add metadata information to their HTML components and easily define an API using the html markup generated by the components.

    --- >

    HApi - Hypermedia API tools

    >

    The hypermedia API tools are a way to enable sling component developers to add metadata information to their HTML components and easily define an API using the html markup generated by the components.

    98c98 <

    Installation

    --- >

    Installation

    103c103 <

    Hypermedia API with Microdata

    --- >

    Hypermedia API with Microdata

    106,109c106,109 <
    <div itemscope itemtype="http://schema.org/Movie">
    <    <h1 itemprop="name">Avatar</h1>
    <    <span itemprop="genre">Science fiction</span>
    <    <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
    ---
    > 
    <div itemscope itemtype="http://schema.org/Movie">
    >    <h1 itemprop="name">Avatar</h1>
    >    <span itemprop="genre">Science fiction</span>
    >    <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
    111,112c111,112
    <    <div itemprop="director" itemscope itemtype="http://schema.org/Person"> 
    <        Director: <span itemprop="name">James Cameron</span> (born <span itemprop="birthDate">August16, 1954)</span>
    ---
    >    <div itemprop="director" itemscope itemtype="http://schema.org/Person"> 
    >        Director: <span itemprop="name">James Cameron</span> (born <span itemprop="birthDate">August16, 1954)</span>
    116c116
    < 

    The attribute itemscope defines a scope for an object. The (optional) itemtype links to a description of the type of the object. Inside an element with an itemscope attribute, we have descendant elements with a property itemprop. This means the name property will point to the enclosed object, which is the simple text "Avatar". Similarly, the genre property is "Science Fiction".

    --- >

    The attribute itemscope defines a scope for an object. The (optional) itemtype links to a description of the type of the object. Inside an element with an itemscope attribute, we have descendant elements with a property itemprop. This means the name property will point to the enclosed object, which is the simple text "Avatar". Similarly, the genre property is "Science Fiction".

    118c118 <

    How HApi works, by example

    --- >

    How HApi works, by example

    120,121c120,121 <

    Consuming the API

    <

    The app looks like this in the browser: Page in the browser

    --- >

    Consuming the API

    >

    The app looks like this in the browser: Page in the browser

    123,125c123,125 <
    <div itemtype="/apps/sling/hapi_sample/types/album_card.html" itemscope="itemscope" class="card-asset">
    <     <a href="details.html" rel="self">
    <         <img itemprop="thumbnail" itemtype="/libs/sling/hapi/types/image.html" alt="" src="assets/preview-small-album.png" class="show-grid">
    ---
    > 
    <div itemtype="/apps/sling/hapi_sample/types/album_card.html" itemscope="itemscope" class="card-asset">
    >     <a href="details.html" rel="self">
    >         <img itemprop="thumbnail" itemtype="/libs/sling/hapi/types/image.html" alt="" src="assets/preview-small-album.png" class="show-grid">
    128c128
    <             <h4 itemprop="title" itemtype="/libs/sling/hapi/types/text.html">PIC 001</h4>
    ---
    >             <h4 itemprop="title" itemtype="/libs/sling/hapi/types/text.html">PIC 001</h4>
    130c130
    <             <p class="type">album</p>
    ---
    >             <p class="type">album</p>
    132,135c132,135
    <             <p itemprop="cards" itemtype="/libs/sling/hapi/types/number.html" class="size">5</p>
    <             <meta itemprop="disabled" itemtype="/libs/sling/hapi/types/boolean.html" content="false">
    <             <div class="myinfo">
    <                 <p class="mymodified">
    ---
    >             <p itemprop="cards" itemtype="/libs/sling/hapi/types/number.html" class="size">5</p>
    >             <meta itemprop="disabled" itemtype="/libs/sling/hapi/types/boolean.html" content="false">
    >             <div class="myinfo">
    >                 <p class="mymodified">
    137c137
    <                     <span itemprop="modified" itemtype="/libs/sling/hapi/types/text.html" class="date">2 days ago</span>
    ---
    >                     <span itemprop="modified" itemtype="/libs/sling/hapi/types/text.html" class="date">2 days ago</span>
    147,148c147,148
    <  
  • <div itemtype="/apps/sling/hapi_sample/types/album_card.html" itemscope="itemscope" class="card-asset">
  • <
  • <a href="details.html" rel="self">
  • --- >
  • <div itemtype="/apps/sling/hapi_sample/types/album_card.html" itemscope="itemscope" class="card-asset">
  • >
  • <a href="details.html" rel="self">
  • 153c153 <

    Enter example

    --- >

    Enter example

    155c155 <

    Type in browser

    --- >

    Type in browser

    157c157 <

    Properties example Properties example

    --- >

    Properties example Properties example

    159c159 <

    Links example

    --- >

    Links example

    162c162 <

    Defining the types

    --- >

    Defining the types

    166,173c166,173 < "fqdn": "org.apache.sling.hapi_sample.album_card", < "description": "A demo card type for HApi", < "name": "album_card", < "sling:resourceType": "sling/hapi/components/type", < "parameters": [ ], < "extends": "/apps/sling/hapi_sample/types/demo_card", < "jcr:primaryType": "nt:unstructured", < "thumbnail": --- > "fqdn": "org.apache.sling.hapi_sample.album_card", > "description": "A demo card type for HApi", > "name": "album_card", > "sling:resourceType": "sling/hapi/components/type", > "parameters": [ ], > "extends": "/apps/sling/hapi_sample/types/demo_card", > "jcr:primaryType": "nt:unstructured", > "thumbnail": 177,180c177,180 < "description": "The thumbnail of the demo pic card", < "type": "org.apache.sling.hapi.common.Image", < "multiple": true, < "jcr:primaryType": "nt:unstructured" --- > "description": "The thumbnail of the demo pic card", > "type": "org.apache.sling.hapi.common.Image", > "multiple": true, > "jcr:primaryType": "nt:unstructured" 183c183 < "disabled": --- > "disabled": 186,189c186,189 < "description": "Whether this album is disabled or not", < "type": "org.apache.sling.hapi.common.Boolean", < "multiple": false, < "jcr:primaryType": "nt:unstructured" --- > "description": "Whether this album is disabled or not", > "type": "org.apache.sling.hapi.common.Boolean", > "multiple": false, > "jcr:primaryType": "nt:unstructured" 192c192 < "modified": --- > "modified": 195,198c195,198 < "description": "When was the pic last modified", < "type": "org.apache.sling.hapi.common.Text", < "multiple": false, < "jcr:primaryType": "nt:unstructured" --- > "description": "When was the pic last modified", > "type": "org.apache.sling.hapi.common.Text", > "multiple": false, > "jcr:primaryType": "nt:unstructured" 201c201 < "cards": --- > "cards": 204,207c204,207 < "description": "The number of pictures in this album", < "type": "org.apache.sling.hapi.common.Number", < "multiple": false, < "jcr:primaryType": "nt:unstructured" --- > "description": "The number of pictures in this album", > "type": "org.apache.sling.hapi.common.Number", > "multiple": false, > "jcr:primaryType": "nt:unstructured" 210c210 < "users": --- > "users": 213,216c213,216 < "description": "The numbers of users for this album", < "type": "org.apache.sling.hapi.common.Number", < "multiple": false, < "jcr:primaryType": "nt:unstructured" --- > "description": "The numbers of users for this album", > "type": "org.apache.sling.hapi.common.Number", > "multiple": false, > "jcr:primaryType": "nt:unstructured" 221,222c221,222 <

    Using the sightly HApiUse class

    <

    After defining the types needed for the component in question, you can immediately benefit from the HApi tools and add the microdata annotations. There is also validation for the properties and the itemtype for properties is added automatically by the tools.

    --- >

    Using the sightly HApiUse class

    >

    After defining the types needed for the component in question, you can immediately benefit from the HApi tools and add the microdata annotations. There is also validation for the properties and the itemtype for properties is added automatically by the tools.

    224,227c224,227 <
    <div data-sly-use.card="${'org.apache.sling.hapi.sightly.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}"
    <              data-sly-attribute="${card.itemtype}" class="card-asset">
    <             <a rel="self" href="details.html">
    <                 <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview-small.png" alt="">
    ---
    > 
    <div data-sly-use.card="${'org.apache.sling.hapi.sightly.HApiUse' @type='/apps/sling/hapi_sample/types/pic_card'}"
    >              data-sly-attribute="${card.itemtype}" class="card-asset">
    >             <a rel="self" href="details.html">
    >                 <img data-sly-attribute="${card.itemprop.thumbnail}" class="show-grid" src="assets/preview-small.png" alt="">
    230c230
    <                     <h4 data-sly-attribute="${card.itemprop['title']}">PIC 001</h4>
    ---
    >                     <h4 data-sly-attribute="${card.itemprop['title']}">PIC 001</h4>
    232c232
    <                     <p class="type">PSD</p>
    ---
    >                     <p class="type">PSD</p>
    234,237c234,237
    <                     <p data-sly-attribute="${card.itemprop.resolution}"
    <                        data-sly-use.resolution="${'org.apache.sling.hapi.sightly.HApiUse' @type=card.proptype.resolution}" class="resolution">
    <                         <span data-sly-attribute="${resolution.itemprop.width}">1620</span> x <span
    <                             data-sly-attribute="${resolution.itemprop.height}">670</span>
    ---
    >                     <p data-sly-attribute="${card.itemprop.resolution}"
    >                        data-sly-use.resolution="${'org.apache.sling.hapi.sightly.HApiUse' @type=card.proptype.resolution}" class="resolution">
    >                         <span data-sly-attribute="${resolution.itemprop.width}">1620</span> x <span
    >                             data-sly-attribute="${resolution.itemprop.height}">670</span>
    240,243c240,243
    <                     <p data-sly-attribute="${card.itemprop.size}" class="size">249KB</p>
    <                     <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/>
    <                     <div class="myinfo">
    <                         <p class="mymodified">
    ---
    >                     <p data-sly-attribute="${card.itemprop.size}" class="size">249KB</p>
    >                     <meta data-sly-attribute="${card.itemprop.disabled}" content="false"/>
    >                     <div class="myinfo">
    >                         <p class="mymodified">
    245c245
    <                             <span data-sly-attribute="${card.itemprop.modified}" class="date">2 days ago</span>
    ---
    >                             <span data-sly-attribute="${card.itemprop.modified}" class="date">2 days ago</span>
    254c254
    < 
    <img data-sly-attribute="${card.itemprop.inexistent_property}" class="show-grid" src="assets/preview-small.png" alt=""></span>           
    ---
    > 
    <img data-sly-attribute="${card.itemprop.inexistent_property}" class="show-grid" src="assets/preview-small.png" alt=""></span>           
    diff -b -B -r ./documentation/bundles/internationalization-support-i18n.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/internationalization-support-i18n.html
    102c102
    < 

    Default Implementation in the org.apache.sling.engine Bundle

    --- >

    Default Implementation in the org.apache.sling.engine Bundle

    111c111 <

    Extensible Implementation in the org.apache.sling.i18n Bundle

    --- >

    Extensible Implementation in the org.apache.sling.i18n Bundle

    114,115c114,117 <
  • LocaleResolver -- The LocaleResolver interface defines a method which may be implemented by a service outside of the sling.i18n bundle. If no such service is registered the default behaviour is as described above for the sling.core bundle. The service described by this interface is used to implement the getLocale() and getLocales() method.

  • <
  • ResourceBundleProvider -- The ResourceBundleProvider interface defines two methods to acquire a ResourceBundle for any Locale and an optional base name. This service interface is not intended to be implemented outside of the sling.i18n bundle: A JCR Repository based implementation is contained in the sling.i18n bundle. The ResourceBundleProvider service is not only used within the sling.i18n bundle to implement the SlingHttpServletRequest.getResourceBundle(Locale) and SlingHttpServletRequest.getResourceBundle(String, Locale) methods. The service may also be used by Sling applications to acquire ResourceBundle instances without having a request object by getting the service and calling its getResourceBundle(Locale) or getResourceBundle(String, Locale) method directly.

  • --- >
  • >

    LocaleResolver -- The LocaleResolver interface defines a method which may be implemented by a service outside of the sling.i18n bundle. If no such service is registered the default behaviour is as described above for the sling.core bundle. The service described by this interface is used to implement the getLocale() and getLocales() method.

  • >
  • >

    ResourceBundleProvider -- The ResourceBundleProvider interface defines two methods to acquire a ResourceBundle for any Locale and an optional base name. This service interface is not intended to be implemented outside of the sling.i18n bundle: A JCR Repository based implementation is contained in the sling.i18n bundle. The ResourceBundleProvider service is not only used within the sling.i18n bundle to implement the SlingHttpServletRequest.getResourceBundle(Locale) and SlingHttpServletRequest.getResourceBundle(String, Locale) methods. The service may also be used by Sling applications to acquire ResourceBundle instances without having a request object by getting the service and calling its getResourceBundle(Locale) or getResourceBundle(String, Locale) method directly.

  • 117c119 <

    JCR Repository based ResourceBundleProvider

    --- >

    JCR Repository based ResourceBundleProvider

    121c123 <

    sling:MessageEntry based

    --- >

    sling:MessageEntry based

    128c130 <
    Sample Resources
    --- >
    Sample Resources
    134,135c136,137 < | | +-- sling:key = "msg001" < | | +-- sling:message = "This is a message" --- > | | +-- sling:key = "msg001" > | | +-- sling:message = "This is a message" 137,138c139,140 < | +-- sling:key = "msg002" < | +-- sling:message = "Another message" --- > | +-- sling:key = "msg002" > | +-- sling:message = "Another message" 142,143c144,145 < | +-- sling:key = "msg001" < | +-- sling:message = "Das ist ein Text" --- > | +-- sling:key = "msg001" > | +-- sling:message = "Das ist ein Text" 145,146c147,148 < +-- sling:key = "msg002" < +-- sling:message = "Ein anderer Text" --- > +-- sling:key = "msg002" > +-- sling:message = "Ein anderer Text" 152,153c154,155 < | +-- sling:key = "msgXXX" < | +-- sling:message = "An Application Text" --- > | +-- sling:key = "msgXXX" > | +-- sling:message = "An Application Text" 157,158c159,160 < +-- sling:key = "msgXXX" < +-- sling:message = "Ein Anwendungstext" --- > +-- sling:key = "msgXXX" > +-- sling:message = "Ein Anwendungstext" 161c163 <

    JSON-file based

    --- >

    JSON-file based

    163c165 <
    Sample Resources
    --- >
    Sample Resources
    175c177 <

    JCR Node Types supporting the JCR Repository based ResourceBundleProvider

    --- >

    JCR Node Types supporting the JCR Repository based ResourceBundleProvider

    190c192 <

    ResourceBundle with base names

    --- >

    ResourceBundle with base names

    196,197c198,199 < Value < ResourceBundle selection --- > Value > ResourceBundle selection 202,203c204,205 < null < Selects messages of mix:language nodes ignoring the existence or absence of sling:basename properties --- > null > Selects messages of mix:language nodes ignoring the existence or absence of sling:basename properties 206,207c208,209 < Empty String < Selects messages of mix:language nodes which have sling:basename properties, ignoring the actual values --- > Empty String > Selects messages of mix:language nodes which have sling:basename properties, ignoring the actual values 210,211c212,213 < Any other Value < Selects messages of mix:language nodes whose sling:basename properties has any value which matches the base name string --- > Any other Value > Selects messages of mix:language nodes whose sling:basename properties has any value which matches the base name string 216c218 <

    ResourceBundle hierarchies

    --- >

    ResourceBundle hierarchies

    diff -b -B -r ./documentation/bundles/jcr-installer-provider.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/jcr-installer-provider.html 95c95 <

    Configuration and Scanning

    --- >

    Configuration and Scanning

    97c97 <

    If such an install folder contains a binary artifact (e.g. a bundle or a config file as described in Configuration Installer Factory) this is provided to the OSGi installer.

    --- >

    If such an install folder contains a binary artifact (e.g. a bundle or a config file as described in Configuration Installer Factory) this is provided to the OSGi installer.

    100c100 <

    Runmode Support

    --- >

    Runmode Support

    103,104c103,104 <

    Write Back Support

    <

    The JCR installer supports writing back of configurations which are changed by some other ways, e.g by using the Apache Felix web console. If this is a new configuration which was not originally stored in the repository, a new configuration is stored under /apps/sling/install. The highest search path is used together with a configurable folder (sling/install in this case). If a configuration is changed which already exists in the repository, then it depends where the original configuration is stored. If its under /libs a new configuration at the same path under /apps is created. Otherwise the configuration is directly modified. As JCR properties do not support all Java primitive types like Integer, the write back does not generate a node of type sling:OsgiConfig in the repository but a properties file as described in Configuration Installer Factory.

    --- >

    Write Back Support

    >

    The JCR installer supports writing back of configurations which are changed by some other ways, e.g by using the Apache Felix web console. If this is a new configuration which was not originally stored in the repository, a new configuration is stored under /apps/sling/install. The highest search path is used together with a configurable folder (*sling/install* in this case). If a configuration is changed which already exists in the repository, then it depends where the original configuration is stored. If its under /libs a new configuration at the same path under /apps is created. Otherwise the configuration is directly modified. As JCR properties do not support all Java primitive types like Integer, the write back does not generate a node of type sling:OsgiConfig in the repository but a properties file as described in Configuration Installer Factory.

    106,108c106,108 <

    Start Level Support

    <

    If the parent folder of a bundle has a name which is a number, this is used as the start level (when installing the bundle for the first time, compare with SLING-2011). So e.g. a bundle in the path /libs/sling/install/15/somebundle.jar is having the start level 15.

    <

    Example

    --- >

    Start Level Support

    >

    If the parent folder of a bundle has a name which is a number, this is used as the start level (when installing the bundle for the first time, compare with SLING-2011). So e.g. a bundle in the path /libs/sling/install/15/somebundle.jar is having the start level 15.

    >

    Example

    110c110 <

    Installation

    --- >

    Installation

    112,113c112,113 <

    To watch the logs produced by these modules, you can filter sling/logs/error.log using egrep 'jcrinstall|osgi.installer'.

    <

    Install and remove a bundle

    --- >

    To watch the logs produced by these modules, you can filter sling/logs/error.log using egrep 'jcrinstall|osgi.installer'.

    >

    Install and remove a bundle

    130c130 <

    Install, modify and remove a configuration

    --- >

    Install, modify and remove a configuration

    134c134 < -F "jcr:primaryType=sling:OsgiConfig" \ --- > -F "jcr:primaryType=sling:OsgiConfig" \ 143,145c143,145 <
    {"foo":"bar",
    < "jcr:created":"Wed Aug 26 2009 17:06:40GMT+0200",
    < "jcr:primaryType":"sling:OsgiConfig","works":"yes"}
    ---
    > 
    {"foo":"bar",
    > "jcr:created":"Wed Aug 26 2009 17:06:40GMT+0200",
    > "jcr:primaryType":"sling:OsgiConfig","works":"yes"}
    176c176
    < 

    Automated Tests

    --- >

    Automated Tests

    183c183 <

    Project Info

    --- >

    Project Info

    diff -b -B -r ./documentation/bundles/log-tracers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/log-tracers.html 98,102c98,102 < -d "./jcr:content/jcr:title=Summer Collection" \ < -d ":name=summer-collection" \ < -d "./jcr:primaryType=sling:Folder" \ < -d "./jcr:content/jcr:primaryType=nt:unstructured" \ < -d "tracers=oak-writes" \ --- > -d "./jcr:content/jcr:title=Summer Collection" \ > -d ":name=summer-collection" \ > -d "./jcr:primaryType=sling:Folder" \ > -d "./jcr:content/jcr:primaryType=nt:unstructured" \ > -d "tracers=oak-writes" \ 105,106c105,106 <

    Configuration

    <

    Tracer Config

    --- >

    Configuration

    >

    Tracer Config

    109c109 <

    Tracer Sets

    --- >

    Tracer Sets

    118c118 <
    tracerConfig := loggerConfig ( ',' loggerConfig) *
    ---
    > 
    tracerConfig := loggerConfig ( ',' loggerConfig) *
    120c120
    < attributes := attributeName '=' attributeValue
    ---
    > attributes := attributeName '=' attributeValue
    125c125
    <  
  • caller - Used to dump stacktrace of caller. It can have following value (since 1.0.0, SLING-5505) --- >
  • caller - Used to dump stacktrace of caller. It can have following value (_since 1.0.0_, SLING-5505) 129c129,130 <
  • --- > > 132c133 <

    Performance Impact

    --- >

    Performance Impact

    135c136 <

    Where do logs go

    --- >

    Where do logs go

    137c138 <

    RequestProgressTracker

    --- >

    RequestProgressTracker

    140c141 <

    Sling Main Servlet Config

    --- >

    Sling Main Servlet Config

    143c144 <
    132 (2015-05-11 17:39:55) LOG [JCR]  Query SELECT * FROM [granite:InboxItem] AS s where  status='ACTIVE' ORDER BY s.startTime DESC
    ---
    > 
    132 (2015-05-11 17:39:55) LOG [JCR]  Query SELECT * FROM [granite:InboxItem] AS s where  status='ACTIVE' ORDER BY s.startTime DESC
    149c150
    < 

    Server Logs

    --- >

    Server Logs

    151c152 <

    Usage

    --- >

    Usage

    157c158 <

    Request Parameters

    --- >

    Request Parameters

    161c162,164 <
  • tracerConfig - Tracer config like org.apache.sling.auth;level=trace`

    curl -u admin:admin http://localhost:4802/projects.html?tracerConfig=org.apache.sling

  • --- >
  • tracerConfig - Tracer config like org.apache.sling.auth;level=trace` >

    curl -u admin:admin http://localhost:4802/projects.html?tracerConfig=org.apache.sling

    >
  • 165,169c168,172 < -d "./jcr:content/jcr:title=Summer Collection" \ < -d ":name=summer-collection" \ < -d "./jcr:primaryType=sling:Folder" \ < -d "./jcr:content/jcr:primaryType=nt:unstructured" \ < -d "tracers=oak-writes" \ --- > -d "./jcr:content/jcr:title=Summer Collection" \ > -d ":name=summer-collection" \ > -d "./jcr:primaryType=sling:Folder" \ > -d "./jcr:content/jcr:primaryType=nt:unstructured" \ > -d "tracers=oak-writes" \ 172c175 <

    Above request would create a folder in Assets and for that we have enabled the oak-writes tracer. This would result in following output

    --- >

    Above request would create a folder in Assets and for that we have enabled the oak-writes tracer. This would result in following output

    182c185 <

    Request Headers

    --- >

    Request Headers

    189,192c192,195 <
    curl -D - -d "j_username=admin" \
    <     -d "j_password=admin" \
    <     -d "j_validate=true"  \
    <     -H "Sling-Tracer-Config : org.apache.sling.auth;level=trace,org.apache.jackrabbit.oak.security;level=trace" \
    ---
    > 
    curl -D - -d "j_username=admin" \
    >     -d "j_password=admin" \
    >     -d "j_validate=true"  \
    >     -H "Sling-Tracer-Config : org.apache.sling.auth;level=trace,org.apache.jackrabbit.oak.security;level=trace" \
    203c206
    < 

    Tracer Recording

    --- >

    Tracer Recording

    208,214c211,219 <
  • Client sends an HTTP request with header Sling-Tracer-Record​ set to true

    curl -D - -u admin:admin \
    <   -H "Sling-Tracer-Record : true" \
    <  -d "./jcr:content/jcr:title=Summer Collection" \
    <  -d ":name=summer-collection" \
    <  -d "./jcr:primaryType=sling:Folder" \
    <  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
    <  -d "tracers=oak-writes" \
    ---
    >   
  • >

    Client sends an HTTP request with header Sling-Tracer-Record​ set to true

    >
    curl -D - -u admin:admin \
    >   -H "Sling-Tracer-Record : true" \
    >  -d "./jcr:content/jcr:title=Summer Collection" \
    >  -d ":name=summer-collection" \
    >  -d "./jcr:primaryType=sling:Folder" \
    >  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
    >  -d "tracers=oak-writes" \
    216,217c221,225
    < 
  • <
  • Server includes a request id as part of Sling-Tracer-Request-Id response headers

    HTTP/1.1 201 Created
    ---
    > 
    >
  • >
  • >

    Server includes a request id as part of Sling-Tracer-Request-Id response headers

    >
    HTTP/1.1 201 Created
    225,227c233,238
    < 
  • <
  • The logs in json format can then be fetched from server at /system/console/tracer like http://localhost:8080/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json.

    curl -s -D - -H "Sling-Tracer-Record : true" -H "Sling-Tracers : oak-query" \
    < -H "Sling-Tracer-Config : org.apache.jackrabbit.oak.query" \
    ---
    > 
    >
  • >
  • >

    The logs in json format can then be fetched from server at /system/console/tracer like http://localhost:8080/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json.

    >
    curl -s -D - -H "Sling-Tracer-Record : true" -H "Sling-Tracers : oak-query" \
    > -H "Sling-Tracer-Config : org.apache.jackrabbit.oak.query" \
    229,235c240,248
    < 

    Below is a json output for GET request

    {
    <   "method": "GET",
    <   "time": 15140,
    <   "timestamp": 1461574009024,
    <   "requestProgressLogs": [
    <     "0 TIMER_START{Request Processing}",
    <     "0 COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>",
    ---
    > 
    >

    Below is a json output for GET request

    >
    {
    >   "method": "GET",
    >   "time": 15140,
    >   "timestamp": 1461574009024,
    >   "requestProgressLogs": [
    >     "0 TIMER_START{Request Processing}",
    >     "0 COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>",
    238,241c251,254
    <   "queries": [{
    <     "query": "/jcr:root/etc/workflow/instances//element(*,app:Workflow)[@status='RUNNING'] order by @startTime descending",
    <     "plan": "[app:Workflow] as [a] /* property status = RUNNING where ([a].[status] = 'RUNNING') and (isdescendantnode([a], [/etc/workflow/instances])) */",
    <     "caller": "com.example.WorkflowManager.getWorkflowInstances(WorkflowManager.java:902)"
    ---
    >   "queries": [{
    >     "query": "/jcr:root/etc/workflow/instances//element(*,app:Workflow)[@status='RUNNING'] order by @startTime descending",
    >     "plan": "[app:Workflow] as [a] /* property status = RUNNING where ([a].[status] = 'RUNNING') and (isdescendantnode([a], [/etc/workflow/instances])) */",
    >     "caller": "com.example.WorkflowManager.getWorkflowInstances(WorkflowManager.java:902)"
    244,251c257,264
    <   "logs": [{
    <     "timestamp": 1461574022401,
    <     "level": "DEBUG",
    <     "logger": "org.apache.jackrabbit.oak.query.QueryEngineImpl",
    <     "message": "Parsing xpath statement: /jcr:root/etc/workflow/instances//element(*,cq:Workflow)[@status='RUNNING'] order by @startTime descending",
    <     "params": [
    <       "xpath",
    <       "/jcr:root/etc/workflow/instances//element(*,cq:Workflow)[@status='RUNNING'] order by @startTime descending"
    ---
    >   "logs": [{
    >     "timestamp": 1461574022401,
    >     "level": "DEBUG",
    >     "logger": "org.apache.jackrabbit.oak.query.QueryEngineImpl",
    >     "message": "Parsing xpath statement: /jcr:root/etc/workflow/instances//element(*,cq:Workflow)[@status='RUNNING'] order by @startTime descending",
    >     "params": [
    >       "xpath",
    >       "/jcr:root/etc/workflow/instances//element(*,cq:Workflow)[@status='RUNNING'] order by @startTime descending"
    257c270,271
    < 
  • --- >
    >
  • 269c283 <

    Installation

    --- >

    Installation

    diff -b -B -r ./documentation/bundles/managing-permissions-jackrabbit-accessmanager.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/managing-permissions-jackrabbit-accessmanager.html 96c96 <

    Privileges

    --- >

    Privileges

    100,101c100,101 < privilagename < description --- > privilagename > description 106,107c106,107 < jcr:read < the privilege to retrieve a node and get its properties and their values --- > jcr:read > the privilege to retrieve a node and get its properties and their values 110,111c110,111 < jcr:readAccessControl < the privilege to get the access control policy of a node --- > jcr:readAccessControl > the privilege to get the access control policy of a node 114,115c114,115 < jcr:modifyProperties < the privilege to create, modify and remove the properties of a node --- > jcr:modifyProperties > the privilege to create, modify and remove the properties of a node 118,119c118,119 < jcr:addChildNodes < the privilege to create child nodes of a node --- > jcr:addChildNodes > the privilege to create child nodes of a node 122,123c122,123 < jcr:removeChildNodes < the privilege to remove child nodes of a node --- > jcr:removeChildNodes > the privilege to remove child nodes of a node 126,127c126,127 < jcr:removeNode < the privilege to remove a node --- > jcr:removeNode > the privilege to remove a node 130,131c130,131 < jcr:write < an aggregate privilege that contains: jcr:modifyProperties jcr:addChildNodes jcr:removeNode jcr:removeChildNodes --- > jcr:write > an aggregate privilege that contains: jcr:modifyProperties jcr:addChildNodes jcr:removeNode jcr:removeChildNodes 134,135c134,135 < jcr:modifyAccessControl < the privilege to modify the access control policies of a node --- > jcr:modifyAccessControl > the privilege to modify the access control policies of a node 138,139c138,139 < jcr:lockManagement < the privilege to lock and unlock a node --- > jcr:lockManagement > the privilege to lock and unlock a node 142,143c142,143 < jcr:versionManagement < the privilege to perform versioning operations on a node --- > jcr:versionManagement > the privilege to perform versioning operations on a node 146,147c146,147 < jcr:nodeTypeManagement < the privilege to add and remove mixin node types and change the primary node type of a node --- > jcr:nodeTypeManagement > the privilege to add and remove mixin node types and change the primary node type of a node 150,151c150,151 < jcr:retentionManagement < the privilege to perform retention management operations on a node --- > jcr:retentionManagement > the privilege to perform retention management operations on a node 154,155c154,155 < jcr:lifecycleManagement < the privilege to perform lifecycle operations on a node --- > jcr:lifecycleManagement > the privilege to perform lifecycle operations on a node 158,159c158,159 < jcr:all < an aggregate privilege that contains all predefined privileges --- > jcr:all > an aggregate privilege that contains all predefined privileges 163c163 <

    Add or modify permissions

    --- >

    Add or modify permissions

    171c171 <

    Delete permissions

    --- >

    Delete permissions

    176,178c176,178 <

    Get permissions

    <

    Bound Permissions

    <

    To get the permissions bound to a particular node in a json format for a node send a GET request to /<path-to-the-node>.acl.json.

    --- >

    Get permissions

    >

    Bound Permissions

    >

    To get the permissions bound to a particular node in a json format for a node send a GET request to /<path-to-the-node>.acl.json.

    182,183c182,183 <

    Effective Permissions

    <

    To get the permissions which are effective for a particular node in a json format for a node send a GET request to /<path-to-the-node>.eacl.json.

    --- >

    Effective Permissions

    >

    To get the permissions which are effective for a particular node in a json format for a node send a GET request to /<path-to-the-node>.eacl.json.

    188c188 < See section 16.3 of the JCR 2.0 specification for an explanation of the difference between bound and effective policies. --- > See section 16.3 of the JCR 2.0 specification for an explanation of the difference between bound and effective policies. diff -b -B -r ./documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html 98c98 <

    List users

    --- >

    List users

    103,105c103,105 < "admin": { < "memberOf": [], < "declaredMemberOf": [] --- > "admin": { > "memberOf": [], > "declaredMemberOf": [] 107,109c107,109 < "anonymous": { < "memberOf": [], < "declaredMemberOf": [] --- > "anonymous": { > "memberOf": [], > "declaredMemberOf": [] 113c113 <

    Get user

    --- >

    Get user

    118,119c118,119 < "memberOf": [], < "declaredMemberOf": [] --- > "memberOf": [], > "declaredMemberOf": [] 123c123 <

    Create user

    --- >

    Create user

    129,130c129,130 < Required < Description --- > Required > Description 136,137c136,137 < yes < The name of the new user --- > yes > The name of the new user 141,142c141,142 < yes < The password of the new user --- > yes > The password of the new user 146,147c146,147 < yes < The password of the new user (must be equal to the value of pwd) --- > yes > The password of the new user (must be equal to the value of pwd) 151,152c151,152 < no < Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 161c161 < Description --- > Description 167c167 < Success, a redirect is sent to the users resource locator with HTML (or JSON) describing status. --- > Success, a redirect is sent to the users resource locator with HTML (or JSON) describing status. 171c171 < Failure, including user already exists. HTML (or JSON) explains failure. --- > Failure, including user already exists. HTML (or JSON) explains failure. 179c179 <

    Update user

    --- >

    Update user

    185,186c185,186 < Required < Description --- > Required > Description 192,193c192,193 < no < (since version 2.1.1) If true disables the user to block further login attempts. If false enables a disabled user. --- > no > (since version 2.1.1) If true disables the user to block further login attempts. If false enables a disabled user. 197,198c197,198 < no < Specifies the reason why a user has been disabled. --- > no > Specifies the reason why a user has been disabled. 202,203c202,203 < no < Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 207,208c207,208 < no < Properties with @Delete at the end of the name will be deleted in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Properties with @Delete at the end of the name will be deleted in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 217c217 < Description --- > Description 223c223 < Success, a redirect is sent to the users resource locator with HTML (or JSON) describing status. --- > Success, a redirect is sent to the users resource locator with HTML (or JSON) describing status. 227c227 < User was not found. --- > User was not found. 231c231 < Any other failure. HTML (or JSON) explains failure. --- > Any other failure. HTML (or JSON) explains failure. 239c239 <

    Change password

    --- >

    Change password

    245,246c245,246 < Required < Description --- > Required > Description 252,253c252,253 < yes < Old password. --- > yes > Old password. 257,258c257,258 < yes < New password. --- > yes > New password. 262,263c262,263 < yes < New password (must be equal to the value of newPwd). --- > yes > New password (must be equal to the value of newPwd). 272c272 < Description --- > Description 278c278 < Success, no body. --- > Success, no body. 282c282 < User was not found. --- > User was not found. 286c286 < Any other failure. HTML (or JSON) explains failure. --- > Any other failure. HTML (or JSON) explains failure. 294c294 <

    Delete user

    --- >

    Delete user

    300,301c300,301 < Required < Description --- > Required > Description 307,308c307,308 < no < An array of relative resource references to users to be deleted. If this parameter is present, the username from the URL is ignored and all listed users are removed. --- > no > An array of relative resource references to users to be deleted. If this parameter is present, the username from the URL is ignored and all listed users are removed. 317c317 < Description --- > Description 323c323 < Success, no body. --- > Success, no body. 327c327 < User(s) was/were not found. --- > User(s) was/were not found. 331c331 < Any other failure. HTML (or JSON) explains failure. --- > Any other failure. HTML (or JSON) explains failure. 338c338 <

    List groups

    --- >

    List groups

    343,347c343,347 < "UserAdmin": { < "members": [], < "declaredMembers": [], < "memberOf": [], < "declaredMemberOf": [] --- > "UserAdmin": { > "members": [], > "declaredMembers": [], > "memberOf": [], > "declaredMemberOf": [] 349,353c349,353 < "GroupAdmin": { < "members": [], < "declaredMembers": [], < "memberOf": [], < "declaredMemberOf": [] --- > "GroupAdmin": { > "members": [], > "declaredMembers": [], > "memberOf": [], > "declaredMemberOf": [] 355,359c355,359 < "administrators": { < "members": [], < "declaredMembers": [], < "memberOf": [], < "declaredMemberOf": [] --- > "administrators": { > "members": [], > "declaredMembers": [], > "memberOf": [], > "declaredMemberOf": [] 363c363 <

    Get group

    --- >

    Get group

    368,371c368,371 < "members": [], < "declaredMembers": [], < "memberOf": [], < "declaredMemberOf": [] --- > "members": [], > "declaredMembers": [], > "memberOf": [], > "declaredMemberOf": [] 375c375 <

    Create group

    --- >

    Create group

    381,382c381,382 < Required < Description --- > Required > Description 388,389c388,389 < yes < The name of the new group --- > yes > The name of the new group 393,394c393,394 < no < Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 403c403 < Description --- > Description 409c409 < Success, a redirect is sent to the group resource locator with HTML (or JSON) describing status --- > Success, a redirect is sent to the group resource locator with HTML (or JSON) describing status 413c413 < Failure including group already exists. HTML (or JSON) explains failure. --- > Failure including group already exists. HTML (or JSON) explains failure. 421c421 <

    Update group

    --- >

    Update group

    427,428c427,428 < Required < Description --- > Required > Description 434,435c434,435 < no < user(s) (name or URI) to add to the group as a member. Can also be an array of users. --- > no > user(s) (name or URI) to add to the group as a member. Can also be an array of users. 439,440c439,440 < no < user(s) (name or URI) to remove from the group. Can also be an array of users. --- > no > user(s) (name or URI) to remove from the group. Can also be an array of users. 444,445c444,445 < no < Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Additional parameters will be stored as node properties in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 449,450c449,450 < no < Properties with @Delete at the end of the name will be deleted in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). --- > no > Properties with @Delete at the end of the name will be deleted in the JCR. Nested properties are supported since 2.2.6 (SLING-6747). 459c459 < Description --- > Description 465c465 < Success, a redirect is sent to the group resource locator with HTML (or JSON) describing status. --- > Success, a redirect is sent to the group resource locator with HTML (or JSON) describing status. 469c469 < Group was not found. --- > Group was not found. 473c473 < Any other failure. HTML (or JSON) explains failure. --- > Any other failure. HTML (or JSON) explains failure. 478c478 <
    curl -Fanyproperty1@Delete -Fproperty2=value2 -F ":member=/system/userManager/user/myuser" \
    ---
    > 
    curl -Fanyproperty1@Delete -Fproperty2=value2 -F ":member=/system/userManager/user/myuser" \
    481c481
    < 

    Delete group

    --- >

    Delete group

    487,488c487,488 < Required < Description --- > Required > Description 494,495c494,495 < no < An array of relative resource references to groups to be deleted. If this parameter is present, the name of the group from the URL is ignored and all listed groups are removed. --- > no > An array of relative resource references to groups to be deleted. If this parameter is present, the name of the group from the URL is ignored and all listed groups are removed. 504c504 < Description --- > Description 510c510 < Success, sent with no body. --- > Success, sent with no body. 514c514 < Group(s) was/were not found. --- > Group(s) was/were not found. 518c518 < Any other failure. HTML (or JSON) explains failure. --- > Any other failure. HTML (or JSON) explains failure. 525c525 <

    Automated Tests

    --- >

    Automated Tests

    527c527 <

    Permissions checking from scripts

    --- >

    Permissions checking from scripts

    535,536c535,536 < Method < Description --- > Method > Description 541,542c541,542 < canAddUser(jcrSession) < Checks if the current user may add new users --- > canAddUser(jcrSession) > Checks if the current user may add new users 545,546c545,546 < canAddGroup(jcrSession) < Checks if the current user may add new groups --- > canAddGroup(jcrSession) > Checks if the current user may add new groups 549,550c549,550 < canUpdateProperties(jcrSession, principalId) < Checks if the current user may update the properties of the specified principal --- > canUpdateProperties(jcrSession, principalId) > Checks if the current user may update the properties of the specified principal 553,554c553,554 < canRemove(jcrSession, principalId) < Checks if the current user may remove the specified user or group --- > canRemove(jcrSession, principalId) > Checks if the current user may remove the specified user or group 557,558c557,558 < canUpdateGroupMembers(jcrSession, groupId) < Checks if the current user may modify the membership of the specified group --- > canUpdateGroupMembers(jcrSession, groupId) > Checks if the current user may modify the membership of the specified group 575c575 < if (privilegesInfo.canUpdateProperties(currentSession, "someUserId")) { --- > if (privilegesInfo.canUpdateProperties(currentSession, "someUserId")) { 579c579 < if (privilegesInfo.canRemove(currentSession, "someUserId")) { --- > if (privilegesInfo.canRemove(currentSession, "someUserId")) { 583c583 < if (privilegesInfo.canUpdateGroupMembers(currentSession, "GroupName")) { --- > if (privilegesInfo.canUpdateGroupMembers(currentSession, "GroupName")) { diff -b -B -r ./documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html 98c98 <

    Multiple Ways to Modify Content

    --- >

    Multiple Ways to Modify Content

    101c101 <

    Quickstart: Creating Content

    --- >

    Quickstart: Creating Content

    103,105c103,105 <
    <form method="POST" action="http://host/some/new/content" enctype="multipart/form-data">
    <    <input type="text" name="title" value="" />
    <    <input type="text" name="text" value="" />
    ---
    > 
    <form method="POST" action="http://host/some/new/content" enctype="multipart/form-data">
    >    <input type="text" name="title" value="" />
    >    <input type="text" name="text" value="" />
    110c110
    < 
    $ curl -Ftitle="some title text" -Ftext="some body text content" http://host/some/new/content
    ---
    > 
    $ curl -Ftitle="some title text" -Ftext="some body text content" http://host/some/new/content
    113,114c113,114
    < 
    $ curl -F"jcr:primaryType=nt:unstructured" -Ftitle="some title text" \    
    <     -Ftext="some body text content" http://host/some/new/content
    ---
    > 
    $ curl -F"jcr:primaryType=nt:unstructured" -Ftitle="some title text" \    
    >     -Ftext="some body text content" http://host/some/new/content
    117,118c117,118
    < 
    $ curl -F"sling:resourceType=sling:sample" -Ftitle="some title text" \    
    <     -Ftext="some body text content" http://host/some/new/content
    ---
    > 
    $ curl -F"sling:resourceType=sling:sample" -Ftitle="some title text" \    
    >     -Ftext="some body text content" http://host/some/new/content
    120c120
    < 

    Preface: multipart/form-data POSTs

    --- >

    Preface: multipart/form-data POSTs

    122c122 <

    In this case, ensure you are submitting the POST request using multipart/form-data encoding. This preserves the order of parameter application according to the original HTML form. To this avail, ensure to always include the enctype="multipart/form-data" attribute with the <form> tag.

    --- >

    In this case, ensure you are submitting the POST request using multipart/form-data encoding. This preserves the order of parameter application according to the original HTML form. To this avail, ensure to always include the enctype="multipart/form-data" attribute with the <form> tag.

    124c124 <

    SlingPostServlet Operations

    --- >

    SlingPostServlet Operations

    139,140c139,140 < Automated tests: Note that the launchpad test services module contains a number of < integration tests for the SlingPostServlet. Most of these tests are fairly readable, and can be used to find out more details about the servlet's behavior. --- > Automated tests: > Note that the launchpad test services module contains a number of integration tests for the SlingPostServlet. Most of these tests are fairly readable, and can be used to find out more details about the servlet's behavior. 143c143,145 < Trailing star in the :applyTo parameter: This applies to operations that use this parameter, since version 2.1.2 of the *org.apache.sling.servlets.post* bundle: If the last segment of the `:applyTo` value is '*' then the operation applies to all the children of the resolved parent resource. This can be used to act on all the children of a resource without having to specify the path of each individual child resource. --- > Trailing star in the :applyTo parameter: > This applies to operations that use this parameter, since version 2.1.2 of the *org.apache.sling.servlets.post* bundle: If the last segment of the `:applyTo` value is '*' then the operation applies to all the children of the resolved parent resource. This can be used to act on all the children > of a resource without having to specify the path of each individual child resource. 145c147 <

    Content Creation or Modification

    --- >

    Content Creation or Modification

    158,159c160,161 < Resource Path < Item path --- > Resource Path > Item path 164,165c166,167 < /content/new < /content/new --- > /content/new > /content/new 168,169c170,171 < /content/new.html < /content/new --- > /content/new.html > /content/new 172,173c174,175 < /content/new.print.a4.html < /content/new --- > /content/new.print.a4.html > /content/new 176,177c178,179 < /content/ < /content/xxx where xxx is a generated name --- > /content/ > /content/xxx where xxx is a generated name 180,181c182,183 < /content/* < /content/xxx where xxx is a generated name --- > /content/* > /content/xxx where xxx is a generated name 184,185c186,187 < /content/*.html < /content/xxx where xxx is a generated name --- > /content/*.html > /content/xxx where xxx is a generated name 188,189c190,191 < /content/*.print.a4.html < /content/xxx where xxx is a generated name --- > /content/*.print.a4.html > /content/xxx where xxx is a generated name 193c195 <
    Setting Property Values
    --- >
    Setting Property Values
    196,199c198,201 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="text" name="title" />
    <     <input type="text" name="text" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="text" name="title" />
    >     <input type="text" name="text" />
    >     <input type="Submit" />
    209c211
    < 
    Automatic property values: last modified and created by
    --- >
    Automatic property values: last modified and created by
    212,215c214,221 <
  • created and jcr:created are set to the node creation time, as a Date value.

  • <
  • lastModified, jcr:lastModified are set to the node modification time, as a Date value.

  • <
  • createdBy and jcr:createdBy are set to the name of the user who created the node.

  • <
  • lastModifiedBy, jcr:lastModifiedBy are set to the name of the user who modified the node.

  • --- >
  • >

    created and jcr:created are set to the node creation time, as a Date value.

  • >
  • >

    lastModified, jcr:lastModified are set to the node modification time, as a Date value.

  • >
  • >

    createdBy and jcr:createdBy are set to the name of the user who created the node.

  • >
  • >

    lastModifiedBy, jcr:lastModifiedBy are set to the name of the user who modified the node.

  • 218,219c224,225 <
    File Uploads
    <

    File uploads are typically done using the <input type="file""/> element of an HTML form and ensuring the correct form encoding. The SlingPostServlet handles uploaded files specially, in that the file data is not simply written into a property, but a node is actually created with three properties:

    --- >
    File Uploads
    >

    File uploads are typically done using the <input type="file""/> element of an HTML form and ensuring the correct form encoding. The SlingPostServlet handles uploaded files specially, in that the file data is not simply written into a property, but a node is actually created with three properties:

    233,235c239,241 <
    <form method="POST" action="/content/page" enctype="multipart/form-data">
    <     <input type="file" name="image" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page" enctype="multipart/form-data">
    >     <input type="file" name="image" />
    >     <input type="Submit" />
    239,242c245,248
    < 
    <form method="POST" action="/content/page" enctype="multipart/form-data">
    <     <input type="file" name="*" />
    <     <input type="hidden" name="*@TypeHint" value="nt:file" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page" enctype="multipart/form-data">
    >     <input type="file" name="*" />
    >     <input type="hidden" name="*@TypeHint" value="nt:file" />
    >     <input type="Submit" />
    246c252
    < 
    Date properties
    --- >
    Date properties
    260c266 <
    Omitting Some Parameters
    --- >
    Omitting Some Parameters
    264,269c270,275 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="text" name="./title" />
    <     <input type="text" name="../first/text" />
    <     <input type="hidden" name="control0" /><!-- ignored -->
    <     <input type="hidden" name="control1" /><!-- ignored -->
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="text" name="./title" />
    >     <input type="text" name="../first/text" />
    >     <input type="hidden" name="control0" /><!-- ignored -->
    >     <input type="hidden" name="control1" /><!-- ignored -->
    >     <input type="Submit" />
    280c286
    < 
    Controlling Content Updates with @ Suffixes
    --- >
    Controlling Content Updates with @ Suffixes
    285c291 <
    @TypeHint
    --- >
    @TypeHint
    289,298c295,304 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="text" name="width" />
    <     <input type="hidden" name="width@TypeHint" value="Long" />
    <     <input type="checkbox" name="checked" />
    <     <input type="hidden" name="checked@TypeHint" value="Boolean" />
    <     <input type="text" name="hobbys"/>
    <     <input type="text" name="hobbys"/>
    <     <input type="text" name="hobbys"/>
    <     <input type="hidden" name="hobbys@TypeHint" value="String[]" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="text" name="width" />
    >     <input type="hidden" name="width@TypeHint" value="Long" />
    >     <input type="checkbox" name="checked" />
    >     <input type="hidden" name="checked@TypeHint" value="Boolean" />
    >     <input type="text" name="hobbys"/>
    >     <input type="text" name="hobbys"/>
    >     <input type="text" name="hobbys"/>
    >     <input type="hidden" name="hobbys@TypeHint" value="String[]" />
    >     <input type="Submit" />
    305c311
    < 
    @DefaultValue
    --- >
    @DefaultValue
    308,311c314,317 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="text" name="text" />
    <     <input type="hidden" name="text@DefaultValue" value="--- Default Value ---" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="text" name="text" />
    >     <input type="hidden" name="text@DefaultValue" value="--- Default Value ---" />
    >     <input type="Submit" />
    314c320
    < 
    @UseDefaultWhenMissing
    --- >
    @UseDefaultWhenMissing
    316,319c322,325 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input name="queryIgnoreNoise" class="input" type="checkbox" value="true"/>
    <     <input type="hidden" name="queryIgnoreNoise@DefaultValue" value="false"/> 
    <     <input type="hidden" name="queryIgnoreNoise@UseDefaultWhenMissing" value="true"/>
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input name="queryIgnoreNoise" class="input" type="checkbox" value="true"/>
    >     <input type="hidden" name="queryIgnoreNoise@DefaultValue" value="false"/> 
    >     <input type="hidden" name="queryIgnoreNoise@UseDefaultWhenMissing" value="true"/>
    322c328
    < 
    @IgnoreBlanks
    --- >
    @IgnoreBlanks
    324,328c330,334 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="hidden" name="stringProperty@TypeHint" value="String[]"/>
    <     <input type="text" name="stringProperty" value="foo"/>
    <     <input type="text" name="stringProperty" value="bar"/>
    <     <input type="text" name="stringProperty" value=""/>
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="hidden" name="stringProperty@TypeHint" value="String[]"/>
    >     <input type="text" name="stringProperty" value="foo"/>
    >     <input type="text" name="stringProperty" value="bar"/>
    >     <input type="text" name="stringProperty" value=""/>
    333,335c339,341
    < 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="hidden" name="stringProperty@TypeHint" value="String"/>
    <     <input type="text" name="stringProperty" value=""/>
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="hidden" name="stringProperty@TypeHint" value="String"/>
    >     <input type="text" name="stringProperty" value=""/>
    341c347
    < 
    <input type="hidden" name="stringProperty@IgnoreBlanks" value="true"/>
    ---
    > 
    <input type="hidden" name="stringProperty@IgnoreBlanks" value="true"/>
    344c350
    < 
    @ValueFrom
    --- >
    @ValueFrom
    347,350c353,356 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="text" name="supplied_text" />
    <     <input type="hidden" name="./text@ValueFrom" value="supplied_text" />
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="text" name="supplied_text" />
    >     <input type="hidden" name="./text@ValueFrom" value="supplied_text" />
    >     <input type="Submit" />
    356c362
    < 
    @Delete
    --- >
    @Delete
    360,365c366,371 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="checkbox" name="color" value="red" />
    <     <input type="checkbox" name="color" value="green" />
    <     <input type="checkbox" name="color" value="blue" />
    <     <input type="hidden" name="color@Delete" value="delete text" /><!-- actual value is ignored -->
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="checkbox" name="color" value="red" />
    >     <input type="checkbox" name="color" value="green" />
    >     <input type="checkbox" name="color" value="blue" />
    >     <input type="hidden" name="color@Delete" value="delete text" /><!-- actual value is ignored -->
    >     <input type="Submit" />
    370c376
    < 
    @MoveFrom
    --- >
    @MoveFrom
    375,379c381,385 < <form method="POST" action="/content/page/" enctype="multipart/form-data"> < <input type="hidden" name="image@MoveFrom" value="/tmp/upload/123" /> < <input type="text" name="title" /> < <input type="text" name="text" /> < <input type="Submit" /> --- > <form method="POST" action="/content/page/" enctype="multipart/form-data"> > <input type="hidden" name="image@MoveFrom" value="/tmp/upload/123" /> > <input type="text" name="title" /> > <input type="text" name="text" /> > <input type="Submit" /> 386c392 <
    @CopyFrom
    --- >
    @CopyFrom
    390,394c396,400 < <form method="POST" action="/content/page/" enctype="multipart/form-data"> < <input type="hidden" name="image@CopyFrom" value="/tmp/upload/123" /> < <input type="text" name="title" /> < <input type="text" name="text" /> < <input type="Submit" /> --- > <form method="POST" action="/content/page/" enctype="multipart/form-data"> > <input type="hidden" name="image@CopyFrom" value="/tmp/upload/123" /> > <input type="text" name="title" /> > <input type="text" name="text" /> > <input type="Submit" /> 401c407 <
    @Patch
    --- >
    @Patch
    404,409c410,415 <
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    <     <input type="hidden" name="tags@TypeHint" value="String[]" />
    <     <input type="hidden" name="tags@Patch"    value="true" />
    <     <input type="text"   name="tags"          value="+cool"/>
    <     <input type="text"   name="tags"          value="-boring"/>
    <     <input type="Submit" />
    ---
    > 
    <form method="POST" action="/content/page/first" enctype="multipart/form-data">
    >     <input type="hidden" name="tags@TypeHint" value="String[]" />
    >     <input type="hidden" name="tags@Patch"    value="true" />
    >     <input type="text"   name="tags"          value="+cool"/>
    >     <input type="text"   name="tags"          value="-boring"/>
    >     <input type="Submit" />
    418c424
    < 
    Algorithm for Node Name Creation
    --- >
    Algorithm for Node Name Creation
    435c441 <
    Response Status
    --- >
    Response Status
    440,441c446,447 < Status < Explanation --- > Status > Explanation 446,447c452,453 < 200/OK < An existing node has been updated with content --- > 200/OK > An existing node has been updated with content 450,451c456,457 < 201/CREATED < A new node has been created and filled with content --- > 201/CREATED > A new node has been created and filled with content 454,455c460,461 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request 459c465 <

    Content Removal

    --- >

    Content Removal

    461c467 <
    $ curl -F":operation=delete" http://host/content/sample
    ---
    > 
    $ curl -F":operation=delete" http://host/content/sample
    463c469
    < 
    Response Status
    --- >
    Response Status
    468,469c474,475 < Status < Explanation --- > Status > Explanation 474,475c480,481 < 200/OK < The resource (and all its descendants) has been removed --- > 200/OK > The resource (and all its descendants) has been removed 478,479c484,485 < 404/NOT FOUND < The request URL does not address an existing repository item --- > 404/NOT FOUND > The request URL does not address an existing repository item 482,483c488,489 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request 487c493 <
    Deleting Multiple Items
    --- >
    Deleting Multiple Items
    491,492c497,498 <
    $ curl -F":operation=delete" -F":applyTo=/content/page1" \    
    <     -F":applyTo=/content/page2" http://host/content/sample
    ---
    > 
    $ curl -F":operation=delete" -F":applyTo=/content/page1" \    
    >     -F":applyTo=/content/page2" http://host/content/sample
    495c501
    < 
    $ curl -F":operation=delete" -F":applyTo=/content/*" http://host/content/sample
    ---
    > 
    $ curl -F":operation=delete" -F":applyTo=/content/*" http://host/content/sample
    498c504
    < 
    Response Status
    --- >
    Response Status
    503,504c509,510 < Status < Explanation --- > Status > Explanation 509,510c515,516 < 200/OK < All requested and existing resources have been removed --- > 200/OK > All requested and existing resources have been removed 513,514c519,520 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request 518c524 <

    Copying Content

    --- >

    Copying Content

    524,525c530,531 < :dest Parameter < Destination Absolute Path --- > :dest Parameter > Destination Absolute Path 530,531c536,537 < /content/newSample < /content/newSample --- > /content/newSample > /content/newSample 534,535c540,541 < different/newSample < /content/different/newSample --- > different/newSample > /content/different/newSample 538,539c544,545 < /content/different/ < /content/different/sample --- > /content/different/ > /content/different/sample 542,543c548,549 < different/ < /content/different/sample --- > different/ > /content/different/sample 548c554 <
    Response Status
    --- >
    Response Status
    553,554c559,560 < Status < Explanation --- > Status > Explanation 559,560c565,566 < 200/OK < The node has been copied to the new location replacing an existing item at the destination --- > 200/OK > The node has been copied to the new location replacing an existing item at the destination 563,564c569,570 < 201/CREATED < The node has been copied to the new location creating a new item at the destination --- > 201/CREATED > The node has been copied to the new location creating a new item at the destination 567,568c573,574 < 404/NOT FOUND < The request URL does not address an existing repository item --- > 404/NOT FOUND > The request URL does not address an existing repository item 571,572c577,578 < 412/PRECONDITION FAILED < An item already exists at the destination and the :replace parameter is not set to true --- > 412/PRECONDITION FAILED > An item already exists at the destination and the :replace parameter is not set to true 575,576c581,582 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request 580c586 <
    Copying Multiple Items
    --- >
    Copying Multiple Items
    584,585c590,591 <
    $ curl -F":operation=copy" -F":applyTo=/content/page1" -F":applyTo=/content/page2" \    
    <     -F":dest=/content/target/" http://host/content/sample
    ---
    > 
    $ curl -F":operation=copy" -F":applyTo=/content/page1" -F":applyTo=/content/page2" \    
    >     -F":dest=/content/target/" http://host/content/sample
    589c595
    < 
    $ curl -F":operation=copy" -F":applyTo=/content/*" -F":dest=/content/target/" \    
    ---
    > 
    $ curl -F":operation=copy" -F":applyTo=/content/*" -F":dest=/content/target/" \    
    593c599
    < 
    Response Status
    --- >
    Response Status
    598,599c604,605 < Status < Explanation --- > Status > Explanation 604,605c610,611 < 200/OK < All requested and existing resources have been copied --- > 200/OK > All requested and existing resources have been copied 608,609c614,615 < 412/PRECONDITION FAILED < The node indicated by the :dest parameter does not exist --- > 412/PRECONDITION FAILED > The node indicated by the :dest parameter does not exist 612,613c618,619 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the :dest parameter value does not have a trailing slash character. --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the :dest parameter value does not have a trailing slash character. 617c623 <

    Moving Content

    --- >

    Moving Content

    623,624c629,630 < :dest Parameter < Destination Absolute Path --- > :dest Parameter > Destination Absolute Path 629,630c635,636 < /content/newSample < /content/newSample --- > /content/newSample > /content/newSample 633,634c639,640 < different/newSample < /content/different/newSample --- > different/newSample > /content/different/newSample 637,638c643,644 < /content/different/ < /content/different/sample --- > /content/different/ > /content/different/sample 641,642c647,648 < different/ < /content/different/sample --- > different/ > /content/different/sample 647c653 <
    Response Status
    --- >
    Response Status
    652,653c658,659 < Status < Explanation --- > Status > Explanation 658,659c664,665 < 200/OK < The node has been moved to the new location replacing an existing item at the destination --- > 200/OK > The node has been moved to the new location replacing an existing item at the destination 662,663c668,669 < 201/CREATED < The node has been moved to the new location creating a new item at the destination --- > 201/CREATED > The node has been moved to the new location creating a new item at the destination 666,667c672,673 < 404/NOT FOUND < The request URL does not address an existing repository item --- > 404/NOT FOUND > The request URL does not address an existing repository item 670,671c676,677 < 412/PRECONDITION FAILED < An item already exists at the destination and the :replace parameter is not set to true --- > 412/PRECONDITION FAILED > An item already exists at the destination and the :replace parameter is not set to true 674,675c680,681 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request 679c685 <
    Moving Multiple Items
    --- >
    Moving Multiple Items
    683,684c689,690 <
    $ curl -F":operation=move" -F":applyTo=/content/page1" -F":applyTo=/content/page2" \    
    <      -F":dest=/content/target/" http://host/content/sample
    ---
    > 
    $ curl -F":operation=move" -F":applyTo=/content/page1" -F":applyTo=/content/page2" \    
    >      -F":dest=/content/target/" http://host/content/sample
    688c694
    < 
    $ curl -F":operation=move" -F":applyTo=/content/*" -F":dest=/content/target/" \    
    ---
    > 
    $ curl -F":operation=move" -F":applyTo=/content/*" -F":dest=/content/target/" \    
    692c698
    < 
    Response Status
    --- >
    Response Status
    697,698c703,704 < Status < Explanation --- > Status > Explanation 703,704c709,710 < 200/OK < All requested and existing resources have been moved --- > 200/OK > All requested and existing resources have been moved 707,708c713,714 < 412/PRECONDITION FAILED < The node indicated by the :dest parameter does not exist --- > 412/PRECONDITION FAILED > The node indicated by the :dest parameter does not exist 711,712c717,718 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the :dest parameter value does not have a trailing slash character. --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the :dest parameter value does not have a trailing slash character. 716,717c722,723 <

    Importing Content Structures

    <

    To import content structures just address the parent item to import into and set the :operation parameter to import.

    --- >

    Importing Content Structures

    >

    To import content structures just address the parent item to import into and set the :operation parameter to import.

    723,726c729,732 < Parameter < Required < Default value < Description --- > Parameter > Required > Default value > Description 731,732c737,738 < :contentType < true --- > :contentType > true 734c740 < The :contentType value specifies the type of content being imported. Possible values are: xml, jcr.xml, json, jar, zip --- > The :contentType value specifies the type of content being imported. Possible values are: xml, jcr.xml, json, jar, zip 737,738c743,744 < :content < false --- > :content > false 740c746 < The :content value specifies content string to import. The format of the import content is the same as is used by the jcr.contentloader bundle. This parameter is required if the :contentFile parameter is not supplied. --- > The :content value specifies content string to import. The format of the import content is the same as is used by the jcr.contentloader bundle. This parameter is required if the :contentFile parameter is not supplied. 743,744c749,750 < :contentFile < false --- > :contentFile > false 746c752 < The :contentFile value specifies a file uploaded for import. The format of the import content is the same as is used by the jcr.contentloader bundle. This parameter is required if the :content parameter is not supplied. --- > The :contentFile value specifies a file uploaded for import. The format of the import content is the same as is used by the jcr.contentloader bundle. This parameter is required if the :content parameter is not supplied. 749,752c755,758 < :checkin < false < false < The :checkin value specifies whether versionable nodes should be checked in during the import. --- > :checkin > false > false > The :checkin value specifies whether versionable nodes should be checked in during the import. 755,758c761,764 < :autoCheckout < false < false < The :autoCheckout value specifies whether versionable nodes should be checked out when necessary during the import. --- > :autoCheckout > false > false > The :autoCheckout value specifies whether versionable nodes should be checked out when necessary during the import. 761,764c767,770 < :replace < false < false < The :replace value specifies whether the import should replace any existing nodes at the same path. Note: When true, the existing nodes will be deleted and a new node is created in the same place. --- > :replace > false > false > The :replace value specifies whether the import should replace any existing nodes at the same path. Note: When true, the existing nodes will be deleted and a new node is created in the same place. 767,770c773,776 < :replaceProperties < false < false < The :replaceProperties value specifies whether the import should replace properties if they already exist. --- > :replaceProperties > false > false > The :replaceProperties value specifies whether the import should replace properties if they already exist. 775,776c781,782 <
    $ curl -F":operation=import" -F":contentType=json" -F":name=sample" \    
    <    -F':content={ "jcr:primaryType": "nt:unstructured", "propOne" : "propOneValue", "childOne" : { "childPropOne" : true } }' \    
    ---
    > 
    $ curl -F":operation=import" -F":contentType=json" -F":name=sample" \    
    >    -F':content={ "jcr:primaryType": "nt:unstructured", "propOne" : "propOneValue", "childOne" : { "childPropOne" : true } }' \    
    780,781c786,787
    < 
    $ curl -F":operation=import" -F":contentType=json"
    <    -F':content={ "sample" : {"propOne" : "propOneValue", "childOne" : { "childPropOne" : true } } }' \    
    ---
    > 
    $ curl -F":operation=import" -F":contentType=json"
    >    -F':content={ "sample" : {"propOne" : "propOneValue", "childOne" : { "childPropOne" : true } } }' \    
    785,788c791,794
    < 
    <form method="POST" action="/content" enctype="multipart/form-data">
    <     <input type="hidden" name=":operation" value="import" />
    <     <input type="hidden" name=":contentType" value="json" />
    <     <input type="hidden" name=":nameHint" value="sample" />
    ---
    > 
    <form method="POST" action="/content" enctype="multipart/form-data">
    >     <input type="hidden" name=":operation" value="import" />
    >     <input type="hidden" name=":contentType" value="json" />
    >     <input type="hidden" name=":nameHint" value="sample" />
    790,791c796,797
    <     <input type="text" name=":content" value="{ &quot;jcr:primaryType&quot; : &quot;nt:unstructured&quot; , &quot;propOne&quot; : &quot;propOneValue&quot;, &quot;childOne&quot; : { &quot;childPropOne&quot; : true } }" />
    <     <input type="Submit" />
    ---
    >     <input type="text" name=":content" value="{ &quot;jcr:primaryType&quot; : &quot;nt:unstructured&quot; , &quot;propOne&quot; : &quot;propOneValue&quot;, &quot;childOne&quot; : { &quot;childPropOne&quot; : true } }" />
    >     <input type="Submit" />
    795,798c801,804
    < 
    <form method="POST" action="/content" enctype="multipart/form-data">
    <     <input type="hidden" name=":operation" value="import" />
    <     <input type="hidden" name=":contentType" value="json" />
    <     <input type="hidden" name=":nameHint" value="sample" />
    ---
    > 
    <form method="POST" action="/content" enctype="multipart/form-data">
    >     <input type="hidden" name=":operation" value="import" />
    >     <input type="hidden" name=":contentType" value="json" />
    >     <input type="hidden" name=":nameHint" value="sample" />
    800,801c806,807
    <     <input type="file" name=":contentFile" />
    <     <input type="Submit" />
    ---
    >     <input type="file" name=":contentFile" />
    >     <input type="Submit" />
    804c810
    < 
    Response Status
    --- >
    Response Status
    809,810c815,816 < Status < Explanation --- > Status > Explanation 815,816c821,822 < 200/OK < All requested content has been imported --- > 200/OK > All requested content has been imported 819,820c825,826 < 404/NOT FOUND < The target parent node does not exist --- > 404/NOT FOUND > The target parent node does not exist 823,824c829,830 < 412/PRECONDITION FAILED < One or more of the required parameters does not exist --- > 412/PRECONDITION FAILED > One or more of the required parameters does not exist 827,828c833,834 < 500/INTERNAL SERVER ERROR < Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the ContentImporter service is missing. --- > 500/INTERNAL SERVER ERROR > Some exception, for example a RepositoryException, occurred while processing the request. This status is also set if the ContentImporter service is missing. 832c838 <

    Null Operation

    --- >

    Null Operation

    835c841 <
    Response Status
    --- >
    Response Status
    840,841c846,847 < Status < Explanation --- > Status > Explanation 846,847c852,853 < 200/OK < Default status set if :nopstatus parameter is not set or does not have a valid value --- > 200/OK > Default status set if :nopstatus parameter is not set or does not have a valid value 850,851c856,857 < {:nopstatus} < The status as requested by the :nopstatus parameter --- > {:nopstatus} > The status as requested by the :nopstatus parameter 855c861 <

    Special Parameters

    --- >

    Special Parameters

    857c863 <

    :order

    --- >

    :order

    863,864c869,870 < Value < Description --- > Value > Description 869,870c875,876 < first < Place the target node as the first amongst its siblings --- > first > Place the target node as the first amongst its siblings 873,874c879,880 < last < Place the target node as the last amongst its siblings --- > last > Place the target node as the last amongst its siblings 877,878c883,884 < before *xyz* < Place the target node immediately before the sibling whose name is xyz --- > before *xyz* > Place the target node immediately before the sibling whose name is xyz 881,882c887,888 < after *xyz* < Place the target node immediately after the sibling whose name is xyz --- > after *xyz* > Place the target node immediately after the sibling whose name is xyz 885,886c891,892 < numeric < Place the target node at the indicated numeric place amongst its siblings where 0 is equivalent to first and 1 means the second place --- > numeric > Place the target node at the indicated numeric place amongst its siblings where 0 is equivalent to first and 1 means the second place 891c897 <
    $ curl -F":order=before other" http://host/content/sample/page5
    ---
    > 
    $ curl -F":order=before other" http://host/content/sample/page5
    894c900
    < 

    :redirect

    --- >

    :redirect

    896c902 <

    :status

    --- >

    :status

    899c905 <

    Response format

    --- >

    Response format

    904,905c910,911 <
  • Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
  • <
  • Accept: application/json,/;q=0.9
  • --- >
  • Accept: text/html,application/xhtml+xml,application/xml;q=0.9,**/**;q=0.8
  • >
  • Accept: application/json,**/**;q=0.9
  • 909c915 <

    Versionable Node Support

    --- >

    Versionable Node Support

    917c923 <

    --- >

    925,926c931,932 <

    Extending the SlingPostServlet

    <

    Additional POST operations

    --- >

    Extending the SlingPostServlet

    >

    Additional POST operations

    931c937 <

    SlingPostProcessor

    --- >

    SlingPostProcessor

    diff -b -B -r ./documentation/bundles/metrics.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/metrics.html 94,95c94,95 <

    Sling Metrics bundle provides integration with Dropwizard Metrics library which provides a toolkit to capture runtime performance statistics in your application.

    <

    Features

    --- >

    Sling Metrics bundle provides integration with Dropwizard Metrics library which provides a toolkit to capture runtime performance statistics in your application.

    >

    Features

    101c101 <

    Basic Usage

    --- >

    Basic Usage

    112c112 < counter = metricsService.counter("sessionCounter"); --- > counter = metricsService.counter("sessionCounter"); 126c126 <

    Best Practices

    --- >

    Best Practices

    131,132c131,132 <

    API

    <

    Sling Metrics bundle provides its own Metric classes which are modelled on Dropwizard Metrics library. The metric interfaces defined by Sling bundle only provides methods related to data collection.

    --- >

    API

    >

    Sling Metrics bundle provides its own Metric classes which are modelled on Dropwizard Metrics library. The metric interfaces defined by Sling bundle only provides methods related to data collection.

    140c140 <

    Requirement of wrapper interfaces

    --- >

    Requirement of wrapper interfaces

    146c146 <

    Access to Dropwizard Metrics API

    --- >

    Access to Dropwizard Metrics API

    148c148 <
    @Reference(target = "(name=sling)")
    ---
    > 
    @Reference(target = "(name=sling)")
    154c154
    < Counter counter = metricService.counter("login");
    ---
    > Counter counter = metricService.counter("login");
    157,159c157,159
    < 

    WebConsole Plugin

    <

    A Web Console plugin is also provided which is accessible at http://localhost:8080/system/console/slingmetrics. It lists down all registered Metric instances and their state.

    <

    Metric Plugin

    --- >

    WebConsole Plugin

    >

    A Web Console plugin is also provided which is accessible at http://localhost:8080/system/console/slingmetrics. It lists down all registered Metric instances and their state.

    >

    Metric Plugin

    161c161 <

    Installation

    --- >

    Installation

    diff -b -B -r ./documentation/bundles/mime-type-support-commons-mime.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/mime-type-support-commons-mime.html 97c97 <

    Servlet API Support

    --- >

    Servlet API Support

    103c103 <

    The Sling MimeTypeService

    --- >

    The Sling MimeTypeService

    115c115 <

    The Sling ContentAwareMimeTypeService

    --- >

    The Sling ContentAwareMimeTypeService

    120c120 <

    And More...

    --- >

    And More...

    127c127 <

    Configuring MIME Type Mappings

    --- >

    Configuring MIME Type Mappings

    145c145 <

    MIME Type Mapping File Format

    --- >

    MIME Type Mapping File Format

    149c149,150 <
  • The files consist of lines defining mappings where each line is terminated with either or both of a carriage return (CR, 0x0c) and line feed character (LF, 0x0a). There is no line continuation support *-la shell scripts or Java properties files.
  • --- >
  • The files consist of lines defining mappings where each line is terminated with either or both of a carriage return (CR, 0x0c) and line feed character (LF, 0x0a). There is no line continuation support *-la shell scripts or Java properties files. >
  • 154c155 <

    Web Console Plugin

    --- >

    Web Console Plugin

    156c157 <

    Mime Types Web Console Plugin

    --- >

    Mime Types Web Console Plugin

    diff -b -B -r ./documentation/bundles/models.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/models.html 97c97 <

    Design Goals

    --- >

    Design Goals

    108c108 <

    Basic Usage

    --- >

    Basic Usage

    130c130 < public MyModel(@Named("propertyName") String propertyName) { --- > public MyModel(@Named("propertyName") String propertyName) { 149,150c149,150 <

    Client Code

    <

    adaptTo()

    --- >

    Client Code

    >

    adaptTo()

    155c155 <
    <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.models.it.models.MyModel" var="model"/>
    ---
    > 
    <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.models.it.models.MyModel" var="model"/>
    158c158
    < 
    ${sling:adaptTo(resource, 'org.apache.sling.models.it.models.MyModel')}
    ---
    > 
    ${sling:adaptTo(resource, 'org.apache.sling.models.it.models.MyModel')}
    161c161
    < 

    ModelFactory (since 1.2.0)

    --- >

    ModelFactory (since 1.2.0)

    173,174c173,174 <

    Other Options

    <

    Names

    --- >

    Other Options

    >

    Names

    179c179 < @Inject @Named("secondPropertyName") --- > @Inject @Named("secondPropertyName") 183c183 <

    Optional and Required

    --- >

    Optional and Required

    202c202 <

    Defaults

    --- >

    Defaults

    207c207 < @Inject @Default(values="defaultValue") --- > @Inject @Default(values="defaultValue") 228c228 <

    Collections

    --- >

    Collections

    255c255 <

    OSGi Service Filters

    --- >

    OSGi Service Filters

    264c264 < @Named("log") --- > @Named("log") 268c268 < @Filter("(paths=/bin/something)") --- > @Filter("(paths=/bin/something)") 272c272 <

    PostConstruct Methods

    --- >

    PostConstruct Methods

    281c281 < @Named("log") --- > @Named("log") 286c286 < logger.info("hello"); --- > logger.info("hello"); 292c292 <

    Via

    --- >

    Via

    297,298c297,298 < // will return request.getResource().getValueMap().get("propertyName", String.class) < @Inject @Via("resource") --- > // will return request.getResource().getValueMap().get("propertyName", String.class) > @Inject @Via("resource") 306,307c306,307 < // will return resource.getChild("jcr:content").getValueMap().get("propertyName", String.class) < @Inject @Via(value = "jcr:content", type = ChildResource.class) --- > // will return resource.getChild("jcr:content").getValueMap().get("propertyName", String.class) > @Inject @Via(value = "jcr:content", type = ChildResource.class) 313c313 <

    Source

    --- >

    Source

    318,319c318,319 < // Ensure that "resource" is retrived from the bindings, not a request attribute < @Inject @Source("script-bindings") --- > // Ensure that "resource" is retrived from the bindings, not a request attribute > @Inject @Source("script-bindings") 323c323 <

    Adaptations

    --- >

    Adaptations

    354,355c354,356 <

    Sling Validation (since 1.2.0)

    <

    See also SLING-4161

    --- >

    Sling Validation (since 1.2.0)

    > >

    See also SLING-4161

    361,364c362,365 < Description < Invalid validation model < No validation model found < Resource invalid according to model --- > Description > Invalid validation model > No validation model found > Resource invalid according to model 370,373c371,374 < don't validate the resource bound to the Model < Model instantiated < Model instantiated < Model instantiated --- > don't validate the resource bound to the Model > Model instantiated > Model instantiated > Model instantiated 377,380c378,381 < enforce validation of the resource bound to the Model < Model not instantiated < Model not instantiated < Model not instantiated --- > enforce validation of the resource bound to the Model > Model not instantiated > Model not instantiated > Model not instantiated 384,387c385,388 < validate the resource bound to the Model (if a validation model is found) < Model not instantiated < Model instantiated < Model not instantiated --- > validate the resource bound to the Model (if a validation model is found) > Model not instantiated > Model instantiated > Model not instantiated 393c394 <

    Custom Injectors

    --- >

    Custom Injectors

    396c397 <

    Annotation Reference

    --- >

    Annotation Reference

    409c410 <

    Available Injectors

    --- >

    Available Injectors

    414,421c415,422 < Name (for @Source) < Service Ranking < Available Since (Implementation Version) < Description < Applicable To (including using @Via) < Accepts Null Name? < Array Support < Parameterized Type Support --- > Name (for @Source) > Service Ranking > Available Since (Implementation Version) > Description > Applicable To (including using @Via) > Accepts Null Name? > Array Support > Parameterized Type Support 427,434c428,435 < script-bindings < 1000 < 1.0.0 < Lookup objects in the script bindings object by name. < A ServletRequest object which has the Sling Bindings attribute defined < no < no conversion is done < If a parameterized type is passed, the bindings value must be of a compatible type of the parameterized type. --- > script-bindings > 1000 > 1.0.0 > Lookup objects in the script bindings object by name. > A ServletRequest object which has the Sling Bindings attribute defined > no > no conversion is done > If a parameterized type is passed, the bindings value must be of a compatible type of the parameterized type. 438,445c439,446 < valuemap < 2000 < 1.0.0 < Gets a property from a ValueMap by name. < Any object which is or can be adapted to a ValueMap < no < Primitive arrays wrapped/unwrapped as necessary. Wrapper object arrays are unwrapped/wrapped as necessary. < Parameterized List and Collection injection points are injected by getting an array of the component type and creating an unmodifiable List from the array. --- > valuemap > 2000 > 1.0.0 > Gets a property from a ValueMap by name. > Any object which is or can be adapted to a ValueMap > no > Primitive arrays wrapped/unwrapped as necessary. Wrapper object arrays are unwrapped/wrapped as necessary. > Parameterized List and Collection injection points are injected by getting an array of the component type and creating an unmodifiable List from the array. 449,456c450,457 < child-resources < 3000 < 1.0.0 < Gets a child resource by name. < Resource objects < no < none < if a parameterized type List or Collection is passed, a List<Resource> is returned (the contents of which may be adapted to the target type) filled with all child resources of the resource looked up by the given name. --- > child-resources > 3000 > 1.0.0 > Gets a child resource by name. > Resource objects > no > none > if a parameterized type List or Collection is passed, a List<Resource> is returned (the contents of which may be adapted to the target type) filled with all child resources of the resource looked up by the given name. 460,467c461,468 < request-attributes < 4000 < 1.0.0 < Get a request attribute by name. < ServletRequest objects < no < no conversion is done < If a parameterized type is passed, the request attribute must be of a compatible type of the parameterized type. --- > request-attributes > 4000 > 1.0.0 > Get a request attribute by name. > ServletRequest objects > no > no conversion is done > If a parameterized type is passed, the request attribute must be of a compatible type of the parameterized type. 471,478c472,479 < osgi-services < 5000 < 1.0.0 < Lookup services based on class name. Since Sling Models Impl 1.2.8 (SLING-5664) the service with the highest service ranking is returned. In case multiple services are returned, they are ordered descending by their service ranking (i.e. the one with the highest ranking first). < Any object < yes < yes < Parameterized List and Collection injection points are injected by getting an array of the services and creating an unmodifiable List from the array. --- > osgi-services > 5000 > 1.0.0 > Lookup services based on class name. Since Sling Models Impl 1.2.8 (SLING-5664) the service with the highest service ranking is returned. In case multiple services are returned, they are ordered descending by their service ranking (i.e. the one with the highest ranking first). > Any object > yes > yes > Parameterized List and Collection injection points are injected by getting an array of the services and creating an unmodifiable List from the array. 482,489c483,490 < resource-path < 2500 < 1.1.0 < Injects one or multiple resources. The resource paths are either given by @Path annotations, the element path or paths of the annotation @ResourcePath or by paths given through a resource property being referenced by either @Named or element name of the annotation @ResourcePath. < Resource or SlingHttpServletRequest objects < yes < yes < none --- > resource-path > 2500 > 1.1.0 > Injects one or multiple resources. The resource paths are either given by @Path annotations, the element path or paths of the annotation @ResourcePath or by paths given through a resource property being referenced by either @Named or element name of the annotation @ResourcePath. > Resource or SlingHttpServletRequest objects > yes > yes > none 493,500c494,501 < self < Integer.MAX_VALUE < 1.1.0 < Injects the adaptable object itself (if the class of the field matches or is a supertype). If the @Self annotation is present it is tried to adapt the adaptable to the field type. < Any object < yes < none < none --- > self > Integer.MAX_VALUE > 1.1.0 > Injects the adaptable object itself (if the class of the field matches or is a supertype). If the @Self annotation is present it is tried to adapt the adaptable to the field type. > Any object > yes > none > none 504,511c505,512 < sling-object < Integer.MAX_VALUE < 1.1.0 < Injects commonly used sling objects if the field matches with the class: request, response, resource resolver, current resource, SlingScriptHelper. This works only if the adaptable can get the according information, i.e. all objects are available via SlingHttpServletRequest while ResourceResolver can only resolve the ResourceResolver object and nothing else. A discussion around this limitation can be found at SLING-4083. Also Resources can only be injected if the according injector-specific annotation is used (@SlingObject). < Resource, ResourceResolver or SlingHttpServletRequest objects (not all objects can be resolved by all adaptables). < yes < none < none --- > sling-object > Integer.MAX_VALUE > 1.1.0 > Injects commonly used sling objects if the field matches with the class: request, response, resource resolver, current resource, SlingScriptHelper. This works only if the adaptable can get the according information, i.e. all objects are available via SlingHttpServletRequest while ResourceResolver can only resolve the ResourceResolver object and nothing else. A discussion around this limitation can be found at SLING-4083. Also Resources can only be injected if the according injector-specific annotation is used (@SlingObject). > Resource, ResourceResolver or SlingHttpServletRequest objects (not all objects can be resolved by all adaptables). > yes > none > none 515c516 <

    Injector-specific Annotations

    --- >

    Injector-specific Annotations

    528,530c529,531 < Supported Optional Elements < Injector < Description --- > Supported Optional Elements > Injector > Description 536,538c537,539 < injectionStrategy and name < script-bindings < Injects the script variable defined via Sling Bindings. If name is not set the name is derived from the method/field name. --- > injectionStrategy and name > script-bindings > Injects the script variable defined via Sling Bindings. If name is not set the name is derived from the method/field name. 542,544c543,545 < injectionStrategy, name and via < valuemap < Injects a ValueMap value. If via is not set, it will automatically take resource if the adaptable is the SlingHttpServletRequest. If name is not set the name is derived from the method/field name. --- > injectionStrategy, name and via > valuemap > Injects a ValueMap value. If via is not set, it will automatically take resource if the adaptable is the SlingHttpServletRequest. If name is not set the name is derived from the method/field name. 548,550c549,551 < injectionStrategy, name and via < child-resources < Injects a child resource by name. If via is not set, it will automatically take resource if the adaptable is the SlingHttpServletRequest. If name is not set the name is derived from the method/field name. --- > injectionStrategy, name and via > child-resources > Injects a child resource by name. If via is not set, it will automatically take resource if the adaptable is the SlingHttpServletRequest. If name is not set the name is derived from the method/field name. 554,556c555,557 < injectionStrategy, name and via < request-attributes < Injects a request attribute by name. If name is not set the name is derived from the method/field name. --- > injectionStrategy, name and via > request-attributes > Injects a request attribute by name. If name is not set the name is derived from the method/field name. 560,562c561,563 < injectionStrategy, path, and name < resource-path < Injects a resource either by path or by reading a property with the given name. --- > injectionStrategy, path, and name > resource-path > Injects a resource either by path or by reading a property with the given name. 566,568c567,569 < injectionStrategy, filter < osgi-services < Injects an OSGi service by type. The filter can be used give an OSGi service filter. --- > injectionStrategy, filter > osgi-services > Injects an OSGi service by type. The filter can be used give an OSGi service filter. 572,574c573,575 < injectionStrategy < self < Injects the adaptable itself. If the field type does not match with the adaptable it is tried to adapt the adaptable to the requested type. --- > injectionStrategy > self > Injects the adaptable itself. If the field type does not match with the adaptable it is tried to adapt the adaptable to the requested type. 578,579c579,580 < injectionStrategy < sling-object --- > injectionStrategy > sling-object 584c585 <

    Hints

    --- >

    Hints

    586c587 <

    Custom Annotations

    --- >

    Custom Annotations

    588c589 <

    Specifying an Alternate Adapter Class (since 1.1.0)

    --- >

    Specifying an Alternate Adapter Class (since 1.1.0)

    599c600 <

    Associating a Model Class with a Resource Type (since 1.3.0)

    --- >

    Associating a Model Class with a Resource Type (since 1.3.0)

    604c605 <

    Exporter Framework (since 1.3.0)

    --- >

    Exporter Framework (since 1.3.0)

    614,615c615,616 <
    @Model(adaptable = Resource.class, resourceType = "myco/components/foo")
    < @Exporter(name = "jackson", extensions = "json")
    ---
    > 
    @Model(adaptable = Resource.class, resourceType = "myco/components/foo")
    > @Exporter(name = "jackson", extensions = "json")
    618c619
    < 

    Registration of Sling Models classes via bnd plugin

    --- >

    Registration of Sling Models classes via bnd plugin

    647c648 <

    Caching

    --- >

    Caching

    682c683 <

    Via Types (Since API 1.3.4/Implementation 1.4.0)

    --- >

    Via Types (Since API 1.3.4/Implementation 1.4.0)

    688c689 < Description --- > Description 694c695 < Uses a JavaBean property from the adaptable. --- > Uses a JavaBean property from the adaptable. 698c699 < Uses a child resource from the adaptable, assuming the adaptable is a Resource. In case the adaptable is a SlingHttpServletRequest uses a wrapper overwriting the getResource() to point to the given child resource (SLING-7321). --- > Uses a child resource from the adaptable, assuming the adaptable is a Resource. In case the adaptable is a SlingHttpServletRequest uses a wrapper overwriting the getResource() to point to the given child resource (SLING-7321). 702c703 < Creates a wrapped resource with the provided resource type. If the adaptable is a SlingHttpServletRequest, a wrapped request is created as well to contain the wrapped resource. --- > Creates a wrapped resource with the provided resource type. If the adaptable is a SlingHttpServletRequest, a wrapped request is created as well to contain the wrapped resource. 706c707 < Creates a wrapped resource with the resource type set to the adaptable's resource super type. If the adaptable is a SlingHttpServletRequest, a wrapped request is created as well to contain the wrapped resource. --- > Creates a wrapped resource with the resource type set to the adaptable's resource super type. If the adaptable is a SlingHttpServletRequest, a wrapped request is created as well to contain the wrapped resource. 710c711 <

    Custom Via Type

    --- >

    Custom Via Type

    diff -b -B -r ./documentation/bundles/nosql-resource-providers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/nosql-resource-providers.html 98c98 <

    Introduction

    --- >

    Introduction

    111c111 <

    MongoDB NoSQL Resource Provider

    --- >

    MongoDB NoSQL Resource Provider

    116,119c116,119 < provider.roots=["/"] < connectionString="localhost:27017" < database="sling" < collection="resources" --- > provider.roots=["/"] > connectionString="localhost:27017" > database="sling" > collection="resources" 124c124 <

    Couchbase NoSQL Resource Provider

    --- >

    Couchbase NoSQL Resource Provider

    129c129 < provider.roots=["/"] --- > provider.roots=["/"] 132,135c132,135 < clientId="sling-resourceprovider-couchbase" < couchbaseHosts="localhost:8091" < bucketName="sling" < enabled=B"true" --- > clientId="sling-resourceprovider-couchbase" > couchbaseHosts="localhost:8091" > bucketName="sling" > enabled=B"true" 140c140 <

    Example Launchpad

    --- >

    Example Launchpad

    diff -b -B -r ./documentation/bundles/org-apache-sling-junit-bundles.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/org-apache-sling-junit-bundles.html 94c94 <

    This is an overview of the Sling bundles that provide support for server-side JUnit tests.

    --- >

    This is an overview of the Sling bundles that provide support for server-side JUnit tests.

    96,97c96,97 <

    org.apache.sling.junit.core: server-side JUnit tests support

    <

    This bundle provides a JUnitServlet that runs JUnit tests found in bundles.

    --- >

    org.apache.sling.junit.core: server-side JUnit tests support

    >

    This bundle provides a JUnitServlet that runs JUnit tests found in bundles.

    99c99 < Note that the JUnitServlet does not require authentication, so it would allow any client to run tests. The servlet can be disabled by configuration if needed, but in general the `/system` path should not be accessible to website visitors anyway. --- > Note that the JUnitServlet does not require authentication, so it would allow any client to run tests. The servlet can be disabled by configuration if needed, but in general the `/system` path should not be accessible to website visitors anyway. 102c102 < For tighter integration with Sling, the alternate `SlingJUnitServlet` is registered with the `sling/junit/testing` resource type and `.junit` selector, if the bundle is running in a Sling system. Using this servlet instead of the plain JUnitServlet also allows Sling authentication to be used for running the tests, and the standard Sling request processing is used, including servlet filters for example. --- > For tighter integration with Sling, the alternate `SlingJUnitServlet` is registered with the `sling/junit/testing` resource type and `.junit` selector, if the bundle is running in a Sling system. Using this servlet instead of the plain JUnitServlet also allows Sling authentication to be used for running the tests, and the standard Sling request processing is used, including servlet filters for example. 107,108c107,108 <

    The TeleporterRule

    <

    The TeleporterRule supplied by this bundle (since V1.0.12) makes it easy to write such tests, as it takes care of all the mechanics of

    --- >

    The TeleporterRule

    >

    The TeleporterRule supplied by this bundle (since V1.0.12) makes it easy to write such tests, as it takes care of all the mechanics of

    117c117 <

    Using this rule the server-side tests can be mixed with other tests in the source code if that's convenient, it just requires the junit.core and junit.teleporter modules described on this page to create such tests.

    --- >

    Using this rule the server-side tests can be mixed with other tests in the source code if that's convenient, it just requires the junit.core and junit.teleporter modules described on this page to create such tests.

    122c122 < public final TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "Launchpad"); --- > public final TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "Launchpad"); 126c126 < final String pid = "TEST_" + getClass().getName() + UUID.randomUUID(); --- > final String pid = "TEST_" + getClass().getName() + UUID.randomUUID(); 129c129 < assertNotNull("Teleporter should provide a ConfigurationAdmin", ca); --- > assertNotNull("Teleporter should provide a ConfigurationAdmin", ca); 132,133c132,133 < assertNotNull("Expecting to get a Configuration", cfg); < assertEquals("Expecting the correct pid", pid, cfg.getPid()); --- > assertNotNull("Expecting to get a Configuration", cfg); > assertEquals("Expecting the correct pid", pid, cfg.getPid()); 137c137 <

    That's all there is to it, the TeleporterRule takes care of the rest.

    --- >

    That's all there is to it, the TeleporterRule takes care of the rest.

    140c140 <
    final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");
    ---
    > 
    final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");
    146,147c146,147
    <   TeleporterRule.forClass(getClass(), "Launchpad")
    <   .withResources("/foo/", "/some/other/resource.txt");
    ---
    >   TeleporterRule.forClass(getClass(), "Launchpad")
    >   .withResources("/foo/", "/some/other/resource.txt");
    150c150
    < 

    This teleporter mechanism is used in our integration tests, search for TeleporterRule in there for examples or look at the integrationtest.teleporter package.

    --- >

    This teleporter mechanism is used in our integration tests, search for TeleporterRule in there for examples or look at the integrationtest.teleporter package.

    152c152 <

    More details on the JUnitServlet

    --- >

    More details on the JUnitServlet

    157c157 <

    org.apache.sling.junit.teleporter: client-side TeleporterRule support

    --- >

    org.apache.sling.junit.teleporter: client-side TeleporterRule support

    160c160 <

    TeleporterRule.Customizer

    --- >

    TeleporterRule.Customizer

    162c162 <
    TeleporterRule.forClass(getClass(), "Launchpad:author");
    ---
    > 
    TeleporterRule.forClass(getClass(), "Launchpad:author");
    166,167c166,167
    < 

    Using Strings for customization reduces the coupling with the junit.core bundle, as it does not need to know those classes which are used only on the client side when running tests.

    <

    If TeleporterRule.forClass(getClass()) is used (the method without an additional 2nd parameter) the default customizer is used (SLING-5677, since version 1.0.8).

    --- >

    Using Strings for customization reduces the coupling with the junit.core bundle, as it does not need to know those classes which are used only on the client side when running tests.

    >

    If TeleporterRule.forClass(getClass()) is used (the method without an additional 2nd parameter) the default customizer is used (SLING-5677, since version 1.0.8).

    169c169 <

    Default Customizer

    --- >

    Default Customizer

    174,179c174,179 < Property Name < Description < Mandatory to set < Default value < Since version < Related JIRA --- > Property Name > Description > Mandatory to set > Default value > Since version > Related JIRA 184,277c184,277 < ClientSideTeleporter.baseUrl < base url of the Sling Server to which to deploy. < yes < (-) < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.includeDependencyPrefixes < comma-separated list of package prefixes for classes referenced from the IT. Only the classes having one of the given package prefix are included in the bundle being deployed to the given Sling instance together with the IT class itself. They are only included though in case they are referenced! If this is not set, no referenced classes will be included. < no < (-) < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.excludeDependencyPrefixes < comma-separated list of package prefixes for classes referenced from the IT. Classes having one of the given package prefix will not be included in the bundle being deployed to the given Sling instance together with the IT class itself. This takes precedence over the ClientSideTeleporter.includeDependencyPrefixes. < no < (-) < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.embedClasses < comma-separated list of fully qualified class names which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle < no < (-) < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.embedClassesDirectories < comma-separated list directories containing class files which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle < no < (-) < 1.0.12 < SLING-6551 < < < ClientSideTeleporter.additionalBundleHeaders < comma-separated list of entries in the format <name>:<value> which should be added to the test bundle as additional headers < no < (-) < 1.0.12 < SLING-6558 < < < ClientSideTeleporter.testReadyTimeoutSeconds < how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. < no < 12 < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.serverUsername < the username with which to send requests to the Sling server. < no < admin < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.serverPassword < the password with which to send requests to the Sling server. < no < admin < 1.0.8 < SLING-5677 < < < ClientSideTeleporter.enableLogging < set to true to log the tasks being performed by the teleporter. Useful for debugging. < no < false < 1.0.12 < SLING-6546 < < < ClientSideTeleporter.preventToUninstallBundle < set to true to not automatically uninstall the test bundle after test execution. Useful for debugging. < no < false < 1.0.12 < SLING-6546 < < < ClientSideTeleporter.testBundleDirectory < if set the test bundles are being persisted (before being installed) within the given directory name. If the directory does not exist, it will be automatically created. Useful for debugging. Recommended value ${project.build.directory}/test-bundles. < no < (-) < 1.0.12 < SLING-6546 --- > ClientSideTeleporter.baseUrl > base url of the Sling Server to which to deploy. > yes > (-) > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.includeDependencyPrefixes > comma-separated list of package prefixes for classes referenced from the IT. Only the classes having one of the given package prefix are included in the bundle being deployed to the given Sling instance together with the IT class itself. They are only included though in case they are referenced! If this is not set, no referenced classes will be included. > no > (-) > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.excludeDependencyPrefixes > comma-separated list of package prefixes for classes referenced from the IT. Classes having one of the given package prefix will not be included in the bundle being deployed to the given Sling instance together with the IT class itself. This takes precedence over the ClientSideTeleporter.includeDependencyPrefixes. > no > (-) > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.embedClasses > comma-separated list of fully qualified class names which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle > no > (-) > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.embedClassesDirectories > comma-separated list directories containing class files which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundle > no > (-) > 1.0.12 > SLING-6551 > > > ClientSideTeleporter.additionalBundleHeaders > comma-separated list of entries in the format <name>:<value> which should be added to the test bundle as additional headers > no > (-) > 1.0.12 > SLING-6558 > > > ClientSideTeleporter.testReadyTimeoutSeconds > how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. > no > 12 > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.serverUsername > the username with which to send requests to the Sling server. > no > admin > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.serverPassword > the password with which to send requests to the Sling server. > no > admin > 1.0.8 > SLING-5677 > > > ClientSideTeleporter.enableLogging > set to true to log the tasks being performed by the teleporter. Useful for debugging. > no > false > 1.0.12 > SLING-6546 > > > ClientSideTeleporter.preventToUninstallBundle > set to true to not automatically uninstall the test bundle after test execution. Useful for debugging. > no > false > 1.0.12 > SLING-6546 > > > ClientSideTeleporter.testBundleDirectory > if set the test bundles are being persisted (before being installed) within the given directory name. If the directory does not exist, it will be automatically created. Useful for debugging. Recommended value ${project.build.directory}/test-bundles. > no > (-) > 1.0.12 > SLING-6546 282c282 <

    LaunchpadCustomizer

    --- >

    LaunchpadCustomizer

    284c284 <

    BWIT_TeleporterCustomizer

    --- >

    BWIT_TeleporterCustomizer

    287c287 <

    org.apache.sling.junit.healthcheck: run JUnit tests as Sling Health Checks

    --- >

    org.apache.sling.junit.healthcheck: run JUnit tests as Sling Health Checks

    289,290c289,290 <

    See the JUnitHealthCheck class for details.

    <

    org.apache.sling.junit.scriptable: scriptable server-side tests

    --- >

    See the JUnitHealthCheck class for details.

    >

    org.apache.sling.junit.scriptable: scriptable server-side tests

    309,312c309,312 < "INFO_TYPE": "test", < "description": "verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)", < "test_metadata": { < "test_execution_time_msec": 2 --- > "INFO_TYPE": "test", > "description": "verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)", > "test_metadata": { > "test_execution_time_msec": 2 317,319c317,319 <

    Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again.

    <

    org.apache.sling.junit.remote: obsolete

    <

    The org.apache.sling.junit.remote bundle provides utilities to run server-side JUnit tests, but using the newer TeleporterRule described above is much simpler. As a result, this bundle should only be needed for existing tests that were written using its mechanisms.

    --- >

    Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again.

    >

    org.apache.sling.junit.remote: obsolete

    >

    The org.apache.sling.junit.remote bundle provides utilities to run server-side JUnit tests, but using the newer TeleporterRule described above is much simpler. As a result, this bundle should only be needed for existing tests that were written using its mechanisms.

    diff -b -B -r ./documentation/bundles/osgi-installer.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/osgi-installer.html 94c94 <

    Overview

    --- >

    Overview

    96c96 <

    Apache Sling OSGI Installer Diagram

    --- >

    Apache Sling OSGI Installer Diagram

    101c101 <

    API

    --- >

    API

    104c104 <

    Artifact Handling

    --- >

    Artifact Handling

    107c107 <

    Bundle Handling

    --- >

    Bundle Handling

    111c111 <

    Versions and Snapshots

    --- >

    Versions and Snapshots

    114c114 <

    Start Level Handling

    --- >

    Start Level Handling

    124,125c124,125 <

    Plugins

    <

    Factories

    --- >

    Plugins

    >

    Factories

    131c131 <

    Providers

    --- >

    Providers

    137c137 <

    Health Check

    --- >

    Health Check

    139c139 <

    Bundles Installation Failure

    --- >

    Bundles Installation Failure

    141c141 <

    Configuration Installation Failure

    --- >

    Configuration Installation Failure

    143,144c143,144 <

    Due to SLING-7735, there might be false positives being reported by the health check, in case the configuration has already been deployed with exactly the same values in the system previously. In that case the OSGi Installer might also mark the resource as IGNORED. If you run into such an issue, you can fix it by removing the manually overwritten configurations: Just go to /system/console/configMgr and delete the according configuration. That way the OSGi installer should automatically create a new configuration for the same PID based on the configuration provided by some provider with the highest prio.

    <

    Limitations of the health check

    --- >

    Due to SLING-7735, there might be false positives being reported by the health check, in case the configuration has already been deployed with exactly the same values in the system previously. In that case the OSGi Installer might also mark the resource as IGNORED. If you run into such an issue, you can fix it by removing the manually overwritten configurations: Just go to /system/console/configMgr and delete the according configuration. That way the OSGi installer should automatically create a new configuration for the same PID based on the configuration provided by some provider with the highest prio.

    >

    Limitations of the health check

    diff -b -B -r ./documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html 96c96 <

    SAX Pipelines

    --- >

    SAX Pipelines

    101c101 <

    Sling contains a default pipeline which is executed for all HTML responses: it starts with an HTML generator, parsing the HTML output and sending events into the pipeline. An HTML serializer collects all events and serializes the output.

    --- >

    Sling contains a default pipeline which is executed for all HTML responses: it starts with an HTML generator, parsing the HTML output and sending events into the pipeline. An HTML serializer collects all events and serializes the output.

    103c103 <

    Default Pipeline

    --- >

    Default Pipeline

    105c105 <

    Implementing Pipeline Components

    --- >

    Implementing Pipeline Components

    107,109c107,109 <
    @scr.component metatype="no" 
    < @scr.service interface="TransformerFactory"
    < @scr.property value="pipeline.type" value="validator"
    ---
    > 
    @scr.component metatype="no" 
    > @scr.service interface="TransformerFactory"
    > @scr.property value="pipeline.type" value="validator"
    112c112
    < 

    Extending the Pipeline

    --- >

    Extending the Pipeline

    115,118c115,118 <
    @scr.component metatype="no"
    < @scr.service interface="TransformerFactory"
    < @scr.property name="pipeline.mode" value="global"
    < @scr.property name="service.ranking" value="RANKING" type="Integer"
    ---
    > 
    @scr.component metatype="no"
    > @scr.service interface="TransformerFactory"
    > @scr.property name="pipeline.mode" value="global"
    > @scr.property name="service.ranking" value="RANKING" type="Integer"
    123c123
    < 

    Implementing a Processor

    --- >

    Implementing a Processor

    126,128c126,128 <
    @scr.component metatype="no" 
    < @scr.service interface="ProcessorFactory"
    < @scr.property value="pipeline.type" value="uniqueName"
    ---
    > 
    @scr.component metatype="no" 
    > @scr.service interface="ProcessorFactory"
    > @scr.property value="pipeline.type" value="uniqueName"
    130c130
    < 

    Configuring a Processor

    --- >

    Configuring a Processor

    136,139c136,139 < Type < Description < Example Value < Mandatory --- > Type > Description > Example Value > Mandatory 145,148c145,148 < String < The type of the generator. Identifies the generator being registered via service property pipeline.type of a service implementing a GeneratorFactory < html-generator < yes --- > String > The type of the generator. Identifies the generator being registered via service property pipeline.type of a service implementing a GeneratorFactory > html-generator > yes 152,155c152,155 < String[] < The types of the transformers. Identifies the transformers being registered via service property pipeline.type of a service implementing a TransformerFactory < link-rewriter (Sling itself does not contain any TransformerFactories) < no --- > String[] > The types of the transformers. Identifies the transformers being registered via service property pipeline.type of a service implementing a TransformerFactory > link-rewriter (Sling itself does not contain any TransformerFactories) > no 159,162c159,162 < String < The type of the serializer. Identifies the serializer being registered via service property pipeline.type of a service implementing a SerializerFactory < html-serializer < yes --- > String > The type of the serializer. Identifies the serializer being registered via service property pipeline.type of a service implementing a SerializerFactory > html-serializer > yes 166,169c166,169 < String[] < The paths this pipeline should run on (content paths). Only if the request's resource path starts with one of the given paths or one of the given paths is * the pipeline configuration is considered. < /content/ < no --- > String[] > The paths this pipeline should run on (content paths). Only if the request's resource path starts with one of the given paths or one of the given paths is * the pipeline configuration is considered. > /content/ > no 173,176c173,176 < String[] < The content types this pipeline should be used for . If no explicit content type is set on the response yet, text/html is assumed. May contain * values which match for all content types. Only if the response has one of the given content types the pipeline configuration is considered. < text/html < no --- > String[] > The content types this pipeline should be used for . If no explicit content type is set on the response yet, text/html is assumed. May contain * values which match for all content types. Only if the response has one of the given content types the pipeline configuration is considered. > text/html > no 180,183c180,183 < String < The extensions this pipeline should be used for. Only if the request's extension is equal to one of the given extensions the pipeline configuration is considered. < html < no --- > String > The extensions this pipeline should be used for. Only if the request's extension is equal to one of the given extensions the pipeline configuration is considered. > html > no 187,190c187,190 < String[] < The resource types this pipeline should be used for. Only if the request's resource type is equal (via ResourceResolver.isResourceType(<request's resource>, <given resource type>) to one of the given resourceTypes the pipeline configuration is considered. < myapp/customresourcetype < no --- > String[] > The resource types this pipeline should be used for. Only if the request's resource type is equal (via ResourceResolver.isResourceType(<request's resource>, <given resource type>) to one of the given resourceTypes the pipeline configuration is considered. > myapp/customresourcetype > no 194,197c194,197 < Boolean < Check resource types of unwrapped resources as well if this is set to true. Available since 1.1.0 (SLING-5012). < false < no --- > Boolean > Check resource types of unwrapped resources as well if this is set to true. Available since 1.1.0 (SLING-5012). > false > no 201,204c201,204 < String[] < A set of selectors the pipeline should be used for. Each value is a single selector (i.e. must not contain .). Only if the request contains at least one selector which is equal to one of the given selectors, this pipeline configuration is considered. Available since 1.1.0 (SLING-3511) < myselector < no --- > String[] > A set of selectors the pipeline should be used for. Each value is a single selector (i.e. must not contain .). Only if the request contains at least one selector which is equal to one of the given selectors, this pipeline configuration is considered. Available since 1.1.0 (SLING-3511) > myselector > no 208,211c208,211 < Long < The configurations are sorted by this order, order must be higher or equal to 0. The configuration with the highest order is tried first. Default value (if not set): 0 < 100 < no --- > Long > The configurations are sorted by this order, order must be higher or equal to 0. The configuration with the highest order is tried first. Default value (if not set): 0 > 100 > no 215,218c215,218 < Boolean < Is this configuration active? (default yes) < false < no --- > Boolean > Is this configuration active? (default yes) > false > no 222,225c222,225 < Boolean < Only if this is set to true also error responses are processed by this pipeline configuration. Default true < true < no --- > Boolean > Only if this is set to true also error responses are processed by this pipeline configuration. Default true > true > no diff -b -B -r ./documentation/bundles/rendering-content-default-get-servlets.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/rendering-content-default-get-servlets.html 97,98c97,98 < Not all features of the < org.apache.sling.servlets.get bundle are described below - this page needs more work. --- > Not all features of the org.apache.sling.servlets.get bundle are described below - this > page needs more work. 100c100 <

    Default GET and HEAD servlets

    --- >

    Default GET and HEAD servlets

    104,106c104,106 <

    Currently, only the DefaultGetServlet has configuration parameters. Those are found at /system/console/configMgr/org.apache.sling.servlets.get.DefaultGetServlet on a standard Sling setup, and should be self-explaining. One common use is to disable some of the default renderings listed below, as they might not be useful or desired on production systems.

    <

    Default renderings

    <

    Default JSON rendering

    --- >

    Currently, only the DefaultGetServlet has configuration parameters. Those are found at /system/console/configMgr/org.apache.sling.servlets.get.DefaultGetServlet on a standard Sling setup, and should be self-explaining. One common use is to disable some of the default renderings listed below, as they might not be useful or desired on production systems.

    >

    Default renderings

    >

    Default JSON rendering

    115c115 <

    Default HTML rendering

    --- >

    Default HTML rendering

    117c117 <

    Default text rendering

    --- >

    Default text rendering

    119c119 <

    Default XML rendering

    --- >

    Default XML rendering

    122c122 <

    StreamRendererServlet

    --- >

    StreamRendererServlet

    124c124 <

    RedirectServlet

    --- >

    RedirectServlet

    127c127 <

    SlingInfoServlet

    --- >

    SlingInfoServlet

    129,130c129,130 <

    It is available at /system/sling/info.sessionInfo by default, and supports .json and .txt extensions.

    <

    JCR Versions Support

    --- >

    It is available at /system/sling/info.sessionInfo by default, and supports .json and .txt extensions.

    >

    JCR Versions Support

    141,145c141,145 < "versions": { < "jcr:rootVersion": { < "created": "Tue Jan 23 2018 14:08:09 GMT+0100", < "successors": [ < "1.0" --- > "versions": { > "jcr:rootVersion": { > "created": "Tue Jan 23 2018 14:08:09 GMT+0100", > "successors": [ > "1.0" 147,149c147,149 < "predecessors": [], < "labels": [], < "baseVersion": "false" --- > "predecessors": [], > "labels": [], > "baseVersion": "false" 151,155c151,155 < "1.0": { < "created": "Tue Jan 23 2018 14:08:35 GMT+0100", < "successors": [], < "predecessors": [ < "jcr:rootVersion" --- > "1.0": { > "created": "Tue Jan 23 2018 14:08:35 GMT+0100", > "successors": [], > "predecessors": [ > "jcr:rootVersion" 157,158c157,158 < "labels": [], < "baseVersion": "true" --- > "labels": [], > "baseVersion": "true" 170,173c170,173 < "versions": { < "jcr:rootVersion": { < "successors": [ < "1.0" --- > "versions": { > "jcr:rootVersion": { > "successors": [ > "1.0" 175c175 < "predecessors": [] --- > "predecessors": [] 177,179c177,179 < "1.0": { < "successors": [ < "1.1" --- > "1.0": { > "successors": [ > "1.1" 181,182c181,182 < "predecessors": [ < "jcr:rootVersion" --- > "predecessors": [ > "jcr:rootVersion" 185,187c185,187 < "1.1": { < "successors": [ < "1.2" --- > "1.1": { > "successors": [ > "1.2" 189,190c189,190 < "predecessors": [ < "1.0" --- > "predecessors": [ > "1.0" 193,196c193,196 < "1.2": { < "successors": [], < "predecessors": [ < "1.1" --- > "1.2": { > "successors": [], > "predecessors": [ > "1.1" 203c203 <
    curl -s "http://localhost:8080/vtest.tidy.json;v=1.0"
    ---
    > 
    curl -s "http://localhost:8080/vtest.tidy.json;v=1.0"
    205,207c205,207
    <   "marker": "A",
    <   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    <   "jcr:uuid": "74291bc8-e7cb-4a71-ab3a-224ba234be0a"
    ---
    >   "marker": "A",
    >   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    >   "jcr:uuid": "74291bc8-e7cb-4a71-ab3a-224ba234be0a"
    210c210
    < curl -s "http://localhost:8080/vtest.tidy.json;v=1.1"
    ---
    > curl -s "http://localhost:8080/vtest.tidy.json;v=1.1"
    212,214c212,214
    <   "marker": "B",
    <   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    <   "jcr:uuid": "18b38479-a3fc-4a21-9cd4-89c44daf917d"
    ---
    >   "marker": "B",
    >   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    >   "jcr:uuid": "18b38479-a3fc-4a21-9cd4-89c44daf917d"
    217c217
    < curl -s "http://localhost:8080/vtest.tidy.json;v=1.2"
    ---
    > curl -s "http://localhost:8080/vtest.tidy.json;v=1.2"
    219,221c219,221
    <   "marker": "C",
    <   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    <   "jcr:uuid": "3d55430b-2fa6-4562-b415-638fb6608c0e"
    ---
    >   "marker": "C",
    >   "jcr:frozenUuid": "a6fd966d-917d-49e2-ba32-e7f942ff3a0f",
    >   "jcr:uuid": "3d55430b-2fa6-4562-b415-638fb6608c0e"
    diff -b -B -r ./documentation/bundles/repository-initialization.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/repository-initialization.html
    101c101
    < 

    SlingRepositoryInitializer

    --- >

    SlingRepositoryInitializer

    110c110 <

    The 'repoinit' Repository Initialization Language

    --- >

    The 'repoinit' Repository Initialization Language

    114c114 <

    Here's a current example from the test cases mentioned above, that uses all language features as of version 1.0.2 of the parser module.

    --- >

    Here's a current example from the test cases mentioned above, that uses all language features as of version 1.0.2 of the parser module.

    160c160 < # empty rep:glob means "apply to this node but not its children" --- > # empty rep:glob means "apply to this node but not its children" 189c189 < << <slingevent='http://sling.apache.org/jcr/event/1.0'> --- > << <slingevent='http://sling.apache.org/jcr/event/1.0'> 200c200 < disable service user deprecated_service_user : "Disabled user to make an example" --- > disable service user deprecated_service_user : "Disabled user to make an example" 204c204 <

    Providing repoinit statements from the Sling provisioning model or other URLs

    --- >

    Providing repoinit statements from the Sling provisioning model or other URLs

    208c208 < references=["model:context:/resources/provisioning/model.txt","model@repoinitTwo:context:/resources/provisioning/model.txt"] --- > references=["model:context:/resources/provisioning/model.txt","model@repoinitTwo:context:/resources/provisioning/model.txt"] 212,213c212,213 <

    Note that previous versions of the org.apache.sling.jcr.repoinit bundle used different configuration parameters. From version 1.0.2 on, warnings are logged if those old parameters (text.url,text.format,model.section.name) are used.

    <

    References to Sling Provisioning Model additional sections

    --- >

    Note that previous versions of the org.apache.sling.jcr.repoinit bundle used different configuration parameters. From version 1.0.2 on, warnings are logged if those old parameters (_text.url,text.format,model.section.name_) are used.

    >

    References to Sling Provisioning Model additional sections

    228c228 <

    References to URLs providing raw repoinit statements

    --- >

    References to URLs providing raw repoinit statements

    233c233 <

    Providing repoinit statements from OSGi factory configurations

    --- >

    Providing repoinit statements from OSGi factory configurations

    diff -b -B -r ./documentation/bundles/request-analysis.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/request-analysis.html 96c96 <

    Introduction

    --- >

    Introduction

    111c111 <

    Web Console Integration

    --- >

    Web Console Integration

    118c118 <

    Analyzing the requesttracker.txt file

    --- >

    Analyzing the requesttracker.txt file

    128c128 <

    Recorded Requests

    --- >

    Recorded Requests

    130c130 <

    Details of a recorded Request

    --- >

    Details of a recorded Request

    diff -b -B -r ./documentation/bundles/resource-access-security.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/resource-access-security.html 95c95 <

    Summary

    --- >

    Summary

    97,101c97,101 <

    The ResourceAccessSecurity defines a service API which is used in two different context: for securing resource providers which have no own access control and on the application level to further restrict the access to resources in general.

    <

    A resource access security service is registered with the service property “context”. Allowed values are “application” and “provider”. If the value is missing or invalid, the service will be ignored.

    <

    In the context of resource providers, this service might be used for implementations of resource providers where the underlying persistence layer does not implement access control. The goal is to make it easy to implement a lightweight access control for such providers. For example, a JCR resource providers should not use the provider context resource access security - in a JCR context, security is fully delegated to the underlying repository, and mixing security models would be a bad idea.

    <

    In the context of the application, this service might be used to add additional or temporary constraints across the whole resource tree.

    <

    How to use ResourceAccessSecurity

    --- >

    The ResourceAccessSecurity defines a service API which is used in two different context: for securing resource providers which have no own access control and on the application level to further restrict the access to resources in general.

    >

    A resource access security service is registered with the service property “context”. Allowed values are “application” and “provider”. If the value is missing or invalid, the service will be ignored.

    >

    In the context of resource providers, this service might be used for implementations of resource providers where the underlying persistence layer does not implement access control. The goal is to make it easy to implement a lightweight access control for such providers. For example, a JCR resource providers should not use the provider context resource access security - in a JCR context, security is fully delegated to the underlying repository, and mixing security models would be a bad idea.

    >

    In the context of the application, this service might be used to add additional or temporary constraints across the whole resource tree.

    >

    How to use ResourceAccessSecurity

    105c105 <

    Service properties

    --- >

    Service properties

    110c110 < description --- > description 116c116 < regexp to define on which paths the service should be called (default .*) --- > regexp to define on which paths the service should be called (default .*) 120c120 < set of operations on which the service should be called ("read,create,update,delete,execute", default all of them) --- > set of operations on which the service should be called ("read,create,update,delete,execute", default all of them) 124c124 < set of operations on which the service answer is final and no further service should be called (default none of them), except the GateResult is GateResult.CANT_DECIDE --- > set of operations on which the service answer is final and no further service should be called (default none of them), except the GateResult is GateResult.CANT_DECIDE 128c128 < “provider” or “application”. The resource access gate can either have the context “provider”, in this case the gate is only applied to resource providers requesting the security checks. Or the context can be “application”. In this case the access gate is invoked for the whole resource tree. This is indicated by the required service property “context”. If the property is missing or invalid, the service is ignored. --- > “provider” or “application”. The resource access gate can either have the context “provider”, in this case the gate is only applied to resource providers requesting the security checks. Or the context can be “application”. In this case the access gate is invoked for the whole resource tree. This is indicated by the required service property “context”. If the property is missing or invalid, the service is ignored. 132c132 <

    How to implement ResourceAccessGate

    --- >

    How to implement ResourceAccessGate

    154c154 <

    GateResult

    --- >

    GateResult

    162c162 <

    Actual state of ResourceAccessSecurity

    --- >

    Actual state of ResourceAccessSecurity

    diff -b -B -r ./documentation/bundles/resource-editor.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/resource-editor.html 95,96c95,96 <

    alt text

    <

    Features

    --- >

    alt text

    >

    Features

    105c105 <

    Status

    --- >

    Status

    107c107 <

    Installation

    --- >

    Installation

    diff -b -B -r ./documentation/bundles/resource-merger.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/resource-merger.html 96c96 <

    Introduction

    --- >

    Introduction

    104c104 <

    Each MergedResourcePicker service implementation in the system provides one unique mount point/root path (usually starting with /mnt) exposing a view on merged resources from at least two different locations.

    --- >

    Each MergedResourcePicker service implementation in the system provides one unique mount point/root path (usually starting with /mnt) exposing a view on merged resources from at least two different locations.

    111c111 <

    You may use any of the merge properties described below to influence the merging behaviour. All those special properties are not exposed below the mount point.

    --- >

    You may use any of the merge properties described below to influence the merging behaviour. All those special properties are not exposed below the mount point.

    113c113 <

    Merge Properties

    --- >

    Merge Properties

    118,119c118,119 < Type < Description --- > Type > Description 125,126c125,126 < String[] < Hides the properties with the given names. * hides all properties (since version 1.3.2 the wildcard only affects underlying properties and no longer local ones, see also SLING-5468). --- > String[] > Hides the properties with the given names. * hides all properties (since version 1.3.2 the wildcard only affects underlying properties and no longer local ones, see also SLING-5468). 130,131c130,131 < String[] < Hides the child resources with the given names. * hides all child resources (since version 1.3.2 the wildcard only affects underlying child resources and no longer local ones, see also SLING-5468). If one value starts with ! this is a negation (which means the property with the given value should not be hidden). Since by default nothing is hidden the negation is only useful if you specify multiple values for this property. E.g. giving the values [!child1,*] hides all children except for the one with the name child1. If you have a resource name starting with ! you must escape it with an additional ! in front if you want to reference it in sling:hideChildren, e.g. !!child1 means that the resource with the name !child1 should be hidden. --- > String[] > Hides the child resources with the given names. * hides all child resources (since version 1.3.2 the wildcard only affects underlying child resources and no longer local ones, see also SLING-5468). If one value starts with ! this is a negation (which means the property with the given value should not be hidden). Since by default nothing is hidden the negation is only useful if you specify multiple values for this property. E.g. giving the values [!child1,*] hides all children except for the one with the name child1. If you have a resource name starting with ! you must escape it with an additional ! in front if you want to reference it in sling:hideChildren, e.g. !!child1 means that the resource with the name !child1 should be hidden. 135,136c135,136 < Boolean < If true then the resource with the name which contains this property should not be exposed! --- > Boolean > If true then the resource with the name which contains this property should not be exposed! 140,141c140,141 < String < Contains the name of the preceding sibling resource. This is influencing the order of resources when calling e.g. Resource.listChildren() or Resource.getChildren() on the merged resource. This is only necessary if the default child resource order is not sufficient (see below). --- > String > Contains the name of the preceding sibling resource. This is influencing the order of resources when calling e.g. Resource.listChildren() or Resource.getChildren() on the merged resource. This is only necessary if the default child resource order is not sufficient (see below). 145c145 <

    Child Resource Order

    --- >

    Child Resource Order

    161,162c161,162 <

    Resource Pickers

    <

    Merging Resource Picker (Overlay approach)

    --- >

    Resource Pickers

    >

    Merging Resource Picker (Overlay approach)

    167,170c167,170 < Merged Resource Path < Merging Order < Read-Only < Related Ticket --- > Merged Resource Path > Merging Order > Read-Only > Related Ticket 176,179c176,179 < /mnt/overlay/<relative resource path> < Last resource resolver search path first (Order = Descending search paths). < true < SLING-2986 --- > /mnt/overlay/<relative resource path> > Last resource resolver search path first (Order = Descending search paths). > true > SLING-2986 184c184 <

    Example

    --- >

    Example

    186c186 < +-- sling:resourceType = "some/resource/type" --- > +-- sling:resourceType = "some/resource/type" 188c188 < | +-- property1 = "property from /libs/sling/example/child1" --- > | +-- property1 = "property from /libs/sling/example/child1" 190c190 < | +-- property1 = "property from /libs/sling/example/child2" --- > | +-- property1 = "property from /libs/sling/example/child2" 192c192 < | +-- property1 = "property from /libs/sling/example/child3" --- > | +-- property1 = "property from /libs/sling/example/child3" 196c196 < +-- property1 = "property added in apps" --- > +-- property1 = "property added in apps" 200c200 < | +-- property1 = "property from /apps/sling/example/child2" --- > | +-- property1 = "property from /apps/sling/example/child2" 202c202 < | +-- property2 = "property from /apps/sling/example/child3" --- > | +-- property2 = "property from /apps/sling/example/child3" 206,207c206,207 < +-- sling:resourceType = "some/resource/type" < +-- property1 = "property added in apps" --- > +-- sling:resourceType = "some/resource/type" > +-- property1 = "property added in apps" 209c209 < | +-- property1 = "property from /apps/sling/example/child2" --- > | +-- property1 = "property from /apps/sling/example/child2" 211,212c211,212 < | +-- property1 = "property from /libs/sling/example/child3" < | +-- property2 = "property from /apps/sling/example/child3" --- > | +-- property1 = "property from /libs/sling/example/child3" > | +-- property2 = "property from /apps/sling/example/child3" 214c214 <

    Overriding Resource Picker (Override approach)

    --- >

    Overriding Resource Picker (Override approach)

    219,222c219,222 < Merged Resource Path < Merging Order < Read-Only < Related Ticket --- > Merged Resource Path > Merging Order > Read-Only > Related Ticket 228,231c228,231 < /mnt/override/<absolute resource type> < The topmost resource type (having itself no sling:resourceSuperType defined) is the base. The resources are overlaid in the order from the most generic one to the most specific one (which is the one having the most inheritance levels). < true < SLING-3675 --- > /mnt/override/<absolute resource type> > The topmost resource type (having itself no sling:resourceSuperType defined) is the base. The resources are overlaid in the order from the most generic one to the most specific one (which is the one having the most inheritance levels). > true > SLING-3675 236c236 <

    Example

    --- >

    Example

    239c239 < | +-- property1 = "property from /libs/sling/example/child1" --- > | +-- property1 = "property from /libs/sling/example/child1" 241c241 < | +-- property1 = "property from /libs/sling/example/child2" --- > | +-- property1 = "property from /libs/sling/example/child2" 243c243 < | +-- property1 = "property from /libs/sling/example/child3" --- > | +-- property1 = "property from /libs/sling/example/child3" 247,248c247,248 < +-- sling:resourceSuperType = "/apps/sling/base" < +-- property1 = "property added in /apps/sling/example" --- > +-- sling:resourceSuperType = "/apps/sling/base" > +-- property1 = "property added in /apps/sling/example" 252c252 < | +-- property1 = "property from /apps/sling/example/child2" --- > | +-- property1 = "property from /apps/sling/example/child2" 254c254 < | +-- property2 = "property from /apps/sling/example/child3" --- > | +-- property2 = "property from /apps/sling/example/child3" 258,259c258,259 < +-- sling:resourceSuperType = "/apps/sling/base" < +-- property1 = "property added in /apps/sling/example" --- > +-- sling:resourceSuperType = "/apps/sling/base" > +-- property1 = "property added in /apps/sling/example" 261c261 < | +-- property1 = "property from /apps/sling/example/child2" --- > | +-- property1 = "property from /apps/sling/example/child2" 263,264c263,264 < | +-- property1 = "property from /libs/sling/example/child3" < | +-- property2 = "property from /apps/sling/example/child3" --- > | +-- property1 = "property from /libs/sling/example/child3" > | +-- property2 = "property from /apps/sling/example/child3" diff -b -B -r ./documentation/bundles/scheduler-service-commons-scheduler.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/scheduler-service-commons-scheduler.html 96,97c96 < The notion of Job used in this context is a different one than the one used for < Sling Jobs. The main difference is that a scheduler's job is not persisted. --- > The notion of Job used in this context is a different one than the one used for Sling Jobs. The main difference is that a scheduler's job is not persisted. 99c98 <

    Examples of jobs that are scheduled by leveraging the whiteboard pattern

    --- >

    Examples of jobs that are scheduled by leveraging the whiteboard pattern

    101,102c100,101 <

    Scheduling with a cron expression

    <

    The cron expression format is described in the Quartz Cron Documentation and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute).

    --- >

    Scheduling with a cron expression

    >

    The cron expression format is described in the Quartz Cron Documentation and requires either 6 or 7 fields separated by white space. The first field always indicates the second (not the minute).

    114c113 < @Property( name = "scheduler.expression", value = "0 * * * * ?") --- > @Property( name = "scheduler.expression", value = "0 * * * * ?") 121c120 < log.info("Executing a cron job (job#1) through the whiteboard pattern"); --- > log.info("Executing a cron job (job#1) through the whiteboard pattern"); 126c125 <

    Scheduling at periodic times

    --- >

    Scheduling at periodic times

    138c137 < @Property( name = "scheduler.period", longValue = 10) --- > @Property( name = "scheduler.period", longValue = 10) 145c144 < log.info("Executing a perodic job (job#2) through the whiteboard pattern"); --- > log.info("Executing a perodic job (job#2) through the whiteboard pattern"); 150c149 <

    Preventing concurrent execution

    --- >

    Preventing concurrent execution

    152c151 <
    @Property(name="scheduler.concurrent", boolValue=false)
    ---
    > 
    @Property(name="scheduler.concurrent", boolValue=false)
    154c153
    < 

    Scheduling the job just once in a cluster

    --- >

    Scheduling the job just once in a cluster

    156c155 <
    @Property(name="scheduler.runOn", value="LEADER");
    ---
    > 
    @Property(name="scheduler.runOn", value="LEADER");
    159c158
    < 
    @Property(name="scheduler.runOn", value="SINGLE");
    ---
    > 
    @Property(name="scheduler.runOn", value="SINGLE");
    162c161
    < 

    The Scheduler API

    --- >

    The Scheduler API

    164c163 <

    Examples of scheduled jobs registered through the scheduler API

    --- >

    Examples of scheduled jobs registered through the scheduler API

    166c165 <

    Defining the job

    --- >

    Defining the job

    170c169 < log.info("Executing the job"); --- > log.info("Executing the job"); 174c173 <

    Scheduling with a cron expression

    --- >

    Scheduling with a cron expression

    176,177c175,176 <
    String schedulingExpression = "0 15 10 ? * MON-FRI";
    < this.scheduler.addJob("myJob", job, null, schedulingExpression, true);
    ---
    > 
    String schedulingExpression = "0 15 10 ? * MON-FRI";
    > this.scheduler.addJob("myJob", job, null, schedulingExpression, true);
    180c179
    < 

    Scheduling at periodic times

    --- >

    Scheduling at periodic times

    183c182 < this.scheduler.addPeriodicJob("myJob", job, null, period, true); --- > this.scheduler.addPeriodicJob("myJob", job, null, period, true); 185c184 <

    Scheduling at a given time

    --- >

    Scheduling at a given time

    187,188c186,187 <
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd");
    < String date = "2020/01/10";
    ---
    > 
    SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd");
    > String date = "2020/01/10";
    190c189
    < this.scheduler.fireJobAt("myJob", job, null, fireDate);
    ---
    > this.scheduler.fireJobAt("myJob", job, null, fireDate);
    192c191
    < 

    A service scheduling the job based on 3 different kinds of scheduling

    --- >

    A service scheduling the job based on 3 different kinds of scheduling

    225,226c224,225 < String schedulingExpression = "0 * * * * ?"; < String jobName1 = "case1"; --- > String schedulingExpression = "0 * * * * ?"; > String jobName1 = "case1"; 231c230 < log.info("Executing job1"); --- > log.info("Executing job1"); 241c240 < String jobName2 = "case2"; --- > String jobName2 = "case2"; 246c245 < log.info("Executing job2"); --- > log.info("Executing job2"); 256c255 < String jobName3 = "case3"; --- > String jobName3 = "case3"; 263c262 < log.info("Executing job3 at date: {} with a delay of: {} seconds", fireDate, delay/1000); --- > log.info("Executing job3 at date: {} with a delay of: {} seconds", fireDate, delay/1000); 274c273 < log.info("Deactivated, goodbye!"); --- > log.info("Deactivated, goodbye!"); diff -b -B -r ./documentation/bundles/scripting/scripting-htl.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/scripting/scripting-htl.html 101c101 <

    Modules

    --- >

    Modules

    112c112 <

    The Use-API

    --- >

    The Use-API

    115c115,117 <
  • Java Use-API, through POJOs, that may optionally implement an init method:

    /**
    ---
    >   
  • >

    Java Use-API, through POJOs, that may optionally implement an init method:

    >
    /**
    121,124c123,129
    < 
  • <
  • JavaScript Use-API, by using a standardised use function

    /**
    <  * In the following example '/libs/dep1.js' and 'dep2.js' are optional
    <  * dependencies needed for this script's execution. Dependencies can
    ---
    > 
    >
  • >
  • >

    JavaScript Use-API, by using a standardised use function

    >
    /**
    >  * In the following example '/libs/dep1.js' and 'dep2.js' are optional
    >  * dependencies needed for this script's execution. Dependencies can
    126c131
    <  * script's own path.
    ---
    >  * script's own path.
    130c135
    < use(['dep1.js', 'dep2.js'], function (Dep1, Dep2) {
    ---
    > use(['dep1.js', 'dep2.js'], function (Dep1, Dep2) {
    133c138
    <     // define this Use object's behaviour
    ---
    >     // define this Use object's behaviour
    139c144,145
    < 
  • --- >
    >
  • 143c149 <

    Sling-specific Use-API Extensions

    --- >

    Sling-specific Use-API Extensions

    149,151c155,157 < Use Provider < Bundle < Functionality --- > Use Provider > Bundle > Functionality 172,177c178 < support for loading Java objects such as: <
      <
    1. OSGi services
    2. <
    3. POJOs adaptable from SlingHttpServletRequest or Resource
    4. <
    5. POJOs that implement Use
    6. <
    --- > support for loading Java objects such as:
    1. OSGi services
    2. POJOs adaptable from SlingHttpServletRequest or Resource
    3. POJOs that implement Use
    196c197 <

    Global Objects

    --- >

    Global Objects

    210c211 <

    Sling Models Use Provider

    --- >

    Sling Models Use Provider

    212c213 <
        <div data-sly-use.model3="org.example.models.Model3">
    ---
    > 
        <div data-sly-use.model3="org.example.models.Model3">
    218c219
    < 

    Passing parameters

    --- >

    Passing parameters

    220c221 <
        <div data-sly-use.model3="${'org.example.models.Model3' @ colour='red', path=resource.path}">
    ---
    > 
        <div data-sly-use.model3="${'org.example.models.Model3' @ colour='red', path=resource.path}">
    235c236
    < 

    Java Use Provider

    --- >

    Java Use Provider

    237c238 <

    Resource-backed Java classes

    --- >

    Resource-backed Java classes

    249c250 < <html data-sly-use.page="apps.my_project.components.page.PageBean"> --- > <html data-sly-use.page="apps.my_project.components.page.PageBean"> 255c256 < <html data-sly-use.page="PageBean"> --- > <html data-sly-use.page="PageBean"> 259,260c260,261 <

    The advantage of loading a bean using just the simple class name (e.g. data-sly-use.page="PageBean") is that an inheriting component can overlay the PageBean.java file and provide a different logic. In this case the package name of the PageBean class will automatically be derived from the calling script's parent path (e.g. apps.my_project.components.page) - the bean doesn't even have to specify it. However, keep in mind that loading a bean this way is slower than providing the fully qualified class name, since the provider has to check if there is a backing resource. At the same time, loading an object using its fully qualified class name will not allow overriding it by inheriting components.

    <

    Passing parameters

    --- >

    The advantage of loading a bean using just the simple class name (e.g. data-sly-use.page="PageBean") is that an inheriting component can overlay the PageBean.java file and provide a different logic. In this case the package name of the PageBean class will automatically be derived from the calling script's parent path (e.g. apps.my_project.components.page) - the bean doesn't even have to specify it. However, keep in mind that loading a bean this way is slower than providing the fully qualified class name, since the provider has to check if there is a backing resource. At the same time, loading an object using its fully qualified class name will not allow overriding it by inheriting components.

    >

    Passing parameters

    262c263 <
        <div data-sly-use.useObject="${'org.example.use.MyUseObject' @ colour='red', year=2016}">
    ---
    > 
        <div data-sly-use.useObject="${'org.example.use.MyUseObject' @ colour='red', year=2016}">
    280,281c281,282
    <             colour = PropertiesUtil.toString(bindings.get("colour"), "");
    <             year = PropertiesUtil.toInteger(bindings.get("year"), Calendar.getInstance().get(Calendar.YEAR));
    ---
    >             colour = PropertiesUtil.toString(bindings.get("colour"), "");
    >             year = PropertiesUtil.toInteger(bindings.get("year"), Calendar.getInstance().get(Calendar.YEAR));
    301c302
    <                         "org.apache.sling.api.SlingHttpServletRequest"
    ---
    >                         "org.apache.sling.api.SlingHttpServletRequest"
    307c308
    <                         "org.example.use.MyUseObject"
    ---
    >                         "org.example.use.MyUseObject"
    317,318c318,319
    <             String colour = PropertiesUtil.toString(request.getAttribute("colour"), "");
    <             Integer year = PropertiesUtil.toInteger(request.getAttribute("year"), Calendar.getInstance().get(Calendar.YEAR));
    ---
    >             String colour = PropertiesUtil.toString(request.getAttribute("colour"), "");
    >             Integer year = PropertiesUtil.toInteger(request.getAttribute("year"), Calendar.getInstance().get(Calendar.YEAR));
    328c329
    < 

    JavaScript Use Provider

    --- >

    JavaScript Use Provider

    340c341 < <html data-sly-use.page="/apps/my-project/components/page/page.js"> --- > <html data-sly-use.page="/apps/my-project/components/page/page.js"> 346c347 < <html data-sly-use.page="page.js"> --- > <html data-sly-use.page="page.js"> 351c352 <

    Global Objects

    --- >

    Global Objects

    363c364 <

    Passing parameters

    --- >

    Passing parameters

    365,366c366,367 <
        <div data-sly-use.logic="${'logic.js' @ colour='red', year=2017}">
    <         My colour is ${logic.colour ? logic.colour : 'not important'} and I'm from ${logic.year}
    ---
    > 
        <div data-sly-use.logic="${'logic.js' @ colour='red', year=2017}">
    >         My colour is ${logic.colour ? logic.colour : 'not important'} and I'm from ${logic.year}
    371c372
    <         'use strict';
    ---
    >         'use strict';
    373c374
    <         var colour = this.colour || '';
    ---
    >         var colour = this.colour || '';
    382c383
    < 

    Caveats

    --- >

    Caveats

    385c386 <
        <ol data-sly-use.obj="logic.js" data-sly-list="${obj}">
    ---
    > 
        <ol data-sly-use.obj="logic.js" data-sly-list="${obj}">
    396,397c397,398
    <                 code: 'new java.lang.String("apples") === "apples"',
    <                 result: new java.lang.String("apples") === "apples"
    ---
    >                 code: 'new java.lang.String("apples") === "apples"',
    >                 result: new java.lang.String("apples") === "apples"
    400,401c401,402
    <                 code: 'new java.lang.String("apples") == "apples"',
    <                 result: new java.lang.String("apples") == "apples"
    ---
    >                 code: 'new java.lang.String("apples") == "apples"',
    >                 result: new java.lang.String("apples") == "apples"
    404,405c405,406
    <                 code: 'new java.lang.String("apples") !== "apples"',
    <                 result: new java.lang.String("apples") !== "apples"
    ---
    >                 code: 'new java.lang.String("apples") !== "apples"',
    >                 result: new java.lang.String("apples") !== "apples"
    408,409c409,410
    <                 code: 'new java.lang.String("apples") != "apples"',
    <                 result: new java.lang.String("apples") != "apples"
    ---
    >                 code: 'new java.lang.String("apples") != "apples"',
    >                 result: new java.lang.String("apples") != "apples"
    412c413
    <                 code: 'new java.lang.Integer(1) === 1',
    ---
    >                 code: 'new java.lang.Integer(1) === 1',
    416c417
    <                 code: 'new java.lang.Integer(1) == 1',
    ---
    >                 code: 'new java.lang.Integer(1) == 1',
    420c421
    <                 code: 'new java.lang.Integer(1) !== 1',
    ---
    >                 code: 'new java.lang.Integer(1) !== 1',
    424c425
    <                 code: 'new java.lang.Integer(1) != 1',
    ---
    >                 code: 'new java.lang.Integer(1) != 1',
    428c429
    <                 code: 'java.lang.Boolean.TRUE === true',
    ---
    >                 code: 'java.lang.Boolean.TRUE === true',
    432c433
    <                 code: 'java.lang.Boolean.TRUE == true',
    ---
    >                 code: 'java.lang.Boolean.TRUE == true',
    436c437
    <                 code: 'java.lang.Boolean.TRUE !== true',
    ---
    >                 code: 'java.lang.Boolean.TRUE !== true',
    440c441
    <                 code: 'java.lang.Boolean.TRUE != true',
    ---
    >                 code: 'java.lang.Boolean.TRUE != true',
    447,450c448,451
    < 
         1. Code new java.lang.String("apples") === "apples" evaluates to false
    <      2. Code new java.lang.String("apples") == "apples" evaluates to true
    <      3. Code new java.lang.String("apples") !== "apples" evaluates to true
    <      4. Code new java.lang.String("apples") != "apples" evaluates to false
    ---
    > 
         1. Code new java.lang.String("apples") === "apples" evaluates to false
    >      2. Code new java.lang.String("apples") == "apples" evaluates to true
    >      3. Code new java.lang.String("apples") !== "apples" evaluates to true
    >      4. Code new java.lang.String("apples") != "apples" evaluates to false
    469c470
    <     myObject ? 'this' : 'that'
    ---
    >     myObject ? 'this' : 'that'
    471c472
    <     myObject != null ? 'this' : 'that'
    ---
    >     myObject != null ? 'this' : 'that'
    473c474
    < 

    Script Use Provider

    --- >

    Script Use Provider

    475c476 <

    Picking the best Use Provider for a project

    --- >

    Picking the best Use Provider for a project

    478d478 < 486,495c486,487 < <
      <
    • convenient injection annotations for data retrieval
    • <
    • easy to extend from other Sling Models
    • <
    • simple setup for unit testing
    • <
    < <
      <
    • lacks flexibility in terms of component overlaying, relying on service.ranking configurations; this was solved for Sling Models 1.3.0 by SLING-5992
    • <
    --- >
    • convenient injection annotations for data retrieval
    • easy to extend from other Sling Models
    • simple setup for unit testing
    >
    • lacks flexibility in terms of component overlaying, relying on service.ranking configurations; this was solved for Sling Models 1.3.0 by SLING-5992
    499c491,492 <

    Use-objects provided through bundles:

    --- > >

    Use-objects provided through bundles:

    504c497,498 <

    Use-objects backed by Resources:

    --- > >

    Use-objects backed by Resources:

    509,510c503,506 < <

    Use-objects provided through bundles:

    --- > > > >

    Use-objects provided through bundles:

    513,548c509,544 <
            <p>Use-objects backed by <code>Resources</code>:</p>
    <         <ul>
    <             <li>cannot extend other Java objects</li>
    <             <li>the Java project might need a different setup to allow running unit tests, since the objects will be deployed like content</li>
    <         </ul>
    <     </td>
    < </tr>
    < <tr>
    <     <td>JavaScript Use Provider</td>
    <     <td>
    <         <ul>
    <             <li>allows JavaScript developers to develop component logic</li>
    <             <li>can be reused through the dependency mechanism provided by the <code>use</code> function</li>
    <         </ul>
    <     </td>
    <     <td>
    <         <ul>
    <             <li>harder to test and debug, relying mostly on end-to-end testing and console logging</li>
    <             <li>slower to execute than both Sling Models and Java Use-API objects</li>
    <         </ul>
    <     </td>
    < </tr>
    < <tr>
    <     <td>Script Use Provider</td>
    <     <td>
    <         <ul>
    <             <li>allows the usage of Use objects evaluated by other Script Engines available in the platform</li>
    <         </ul>
    <     </td>
    <     <td>
    <         <ul>
    <             <li>like in the case of the JavaScript Use Provider, the performance is influenced by the Script Engine's implementation</li>
    <         </ul>
    <     </td>
    < </tr>
    < 
    --- > > >

    Use-objects backed by Resources:

    >
      >
    • cannot extend other Java objects
    • >
    • the Java project might need a different setup to allow running unit tests, since the objects will be deployed like content
    • >
    > > > > JavaScript Use Provider > >
      >
    • allows JavaScript developers to develop component logic
    • >
    • can be reused through the dependency mechanism provided by the use function
    • >
    > > >
      >
    • harder to test and debug, relying mostly on end-to-end testing and console logging
    • >
    • slower to execute than both Sling Models and Java Use-API objects
    • >
    > > > > Script Use Provider > >
      >
    • allows the usage of Use objects evaluated by other Script Engines available in the platform
    • >
    > > >
      >
    • like in the case of the JavaScript Use Provider, the performance is influenced by the Script Engine's implementation
    • >
    > 550d545 < diff -b -B -r ./documentation/bundles/scripting/scripting-jsp.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/scripting/scripting-jsp.html 101c101 <

    Use

    --- >

    Use

    103c103 <
    <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling" %>
    ---
    > 
    <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling" %>
    107c107
    < 

    Taglib Versions

    --- >

    Taglib Versions

    112,114c112,114 < Taglib Version < Bundle Version < URI --- > Taglib Version > Bundle Version > URI 119,121c119,121 < 1.0 < 2.0.6 < http://sling.apache.org/taglibs/sling/1.0 --- > 1.0 > 2.0.6 > http://sling.apache.org/taglibs/sling/1.0 124,126c124,126 < 1.1 < 2.1.0 < http://sling.apache.org/taglibs/sling/1.1 --- > 1.1 > 2.1.0 > http://sling.apache.org/taglibs/sling/1.1 129,131c129,131 < 1.2 < 2.1.8 < http://sling.apache.org/taglibs/sling/1.2 --- > 1.2 > 2.1.8 > http://sling.apache.org/taglibs/sling/1.2 134,136c134,136 < 1.3 < 2.2.0 < http://sling.apache.org/taglibs/sling --- > 1.3 > 2.2.0 > http://sling.apache.org/taglibs/sling 141c141 <

    Expression Language Functions

    --- >

    Expression Language Functions

    143c143 <

    adaptTo

    --- >

    adaptTo

    151c151,152 < --- > > 155c156 <
    <c:set var="myProperties" value="${sling:adaptTo(resource,'org.apache.sling.api.resource.ValueMap')}" />
    ---
    > 
    <c:set var="myProperties" value="${sling:adaptTo(resource,'org.apache.sling.api.resource.ValueMap')}" />
    157c158
    < 

    encode

    --- >

    encode

    165c166,167 < --- > > 169c171 <
    ${sling:encode('<script>alert("Bad Stuff!");</script>','HTML')}
    ---
    > 
    ${sling:encode('<script>alert("Bad Stuff!");</script>','HTML')}
    171c173
    < 

    findResources

    --- >

    findResources

    180c182,183 < --- > > 184c187 <
    <c:forEach var="found" items="${sling:findResources(resourceResolver,'/jcr:root//*[jcr:contains(., 'Sling')] order by @jcr:score','xpath')">
    ---
    > 
    <c:forEach var="found" items="${sling:findResources(resourceResolver,'/jcr:root//*[jcr:contains(., 'Sling')] order by @jcr:score','xpath')">
    188c191
    < 

    getAbsoluteParent

    --- >

    getAbsoluteParent

    196c199,200 < --- > > 200c204 <
    <c:set var="content" value="${sling:getAbsoluteParent(resource,'2')}" />
    ---
    > 
    <c:set var="content" value="${sling:getAbsoluteParent(resource,'2')}" />
    202c206
    < 

    getParents

    --- >

    getParents

    210c214,215 < --- > > 214,215c219,220 <
    <c:set var="parents" value="${sling:getParents(resource,'2')}" />
    < <c:forEach var="parent" items="${parents}">
    ---
    > 
    <c:set var="parents" value="${sling:getParents(resource,'2')}" />
    > <c:forEach var="parent" items="${parents}">
    219c224
    < 

    getRelativeResource

    --- >

    getRelativeResource

    227c232,233 < --- > > 231c237 <
    <c:set var="content" value="${sling:getRelativeResource(resource,'jcr:content')}" />
    ---
    > 
    <c:set var="content" value="${sling:getRelativeResource(resource,'jcr:content')}" />
    233c239
    < 

    getResource

    --- >

    getResource

    241c247,248 < --- > > 245c252 <
    <c:set var="content" value="${sling:getResource(resourceResolver,'/content')}" />
    ---
    > 
    <c:set var="content" value="${sling:getResource(resourceResolver,'/content')}" />
    247c254
    < 

    getValue

    --- >

    getValue

    257c264,265 < --- > > 261c269 <
    <c:set var="content" value="${sling:getValue(properties,'jcr:title',resource.name)}" />
    ---
    > 
    <c:set var="content" value="${sling:getValue(properties,'jcr:title',resource.name)}" />
    263c271
    < 

    hasChildren

    --- >

    hasChildren

    270c278,279 < --- > > 274c283 <
    <c:if test="${sling:hasChildren(resource)">
    ---
    > 
    <c:if test="${sling:hasChildren(resource)">
    278c287
    < 

    listChildren

    --- >

    listChildren

    285c294,295 < --- > > 289c299 <
    <c:forEach var="child" items="${sling:listChildren(resource)">
    ---
    > 
    <c:forEach var="child" items="${sling:listChildren(resource)">
    293c303
    < 

    Tags

    --- >

    Tags

    295c305 <

    adaptTo

    --- >

    adaptTo

    303c313,314 < --- > > 307c318 <
    <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.api.resource.ValueMap" var="myProps" />
    ---
    > 
    <sling:adaptTo adaptable="${resource}" adaptTo="org.apache.sling.api.resource.ValueMap" var="myProps" />
    309c320
    < 

    call

    --- >

    call

    317c328,329 < --- > > 321c333 <
    <sling:call script="myscript.jsp" />
    ---
    > 
    <sling:call script="myscript.jsp" />
    323c335
    < 

    defineObjects

    --- >

    defineObjects

    346c358,359 < --- > > 352c365 <

    encode

    --- >

    encode

    360c373,374 < --- > > 364c378 <
    <sling:encode value="<script>alert('Bad Stuff!');</script>" mode="HTML" />
    ---
    > 
    <sling:encode value="<script>alert('Bad Stuff!');</script>" mode="HTML" />
    366c380
    < 

    eval

    --- >

    eval

    376c390,391 < --- > > 380c395 <
    <sling:eval script="myscript.jsp" />
    ---
    > 
    <sling:eval script="myscript.jsp" />
    382c397
    < 

    findResources

    --- >

    findResources

    390c405,406 < --- > > 394c410 <
    <sling:findResources query="/jcr:root//*[jcr:contains(., 'Sling')] order by @jcr:score" language="xpath" var="resources" />
    ---
    > 
    <sling:findResources query="/jcr:root//*[jcr:contains(., 'Sling')] order by @jcr:score" language="xpath" var="resources" />
    396c412
    < 

    forward

    --- >

    forward

    407c423,424 < --- > > 411c428 <
    <sling:forward path="/content/aresource" resourceType="myapp/components/display" />
    ---
    > 
    <sling:forward path="/content/aresource" resourceType="myapp/components/display" />
    413c430
    < 

    getCAConfigResource

    --- >

    getCAConfigResource

    422c439,440 < --- > > 426c444 <
    <sling:getCAConfigResource resource="${resource}" bucket="site" name="templates" var="config" />
    ---
    > 
    <sling:getCAConfigResource resource="${resource}" bucket="site" name="templates" var="config" />
    428c446
    < 

    getCAConfigResources

    --- >

    getCAConfigResources

    437c455,456 < --- > > 441c460 <
    <sling:getCAConfigResources resource="${resource}" bucket="site" name="templates" var="config" />
    ---
    > 
    <sling:getCAConfigResources resource="${resource}" bucket="site" name="templates" var="config" />
    443c462
    < 

    getParent

    --- >

    getParent

    451c470,471 < --- > > 455c475 <
    <sling:getParent resource="${resource}" level="2" var="parent" />
    ---
    > 
    <sling:getParent resource="${resource}" level="2" var="parent" />
    457c477
    < 

    getParents

    --- >

    getParents

    465c485,486 < --- > > 469c490 <
    <sling:getProperties properties="${properties}" key="jcr:title" defaultValue="${resource.name}" var="title" />
    ---
    > 
    <sling:getProperties properties="${properties}" key="jcr:title" defaultValue="${resource.name}" var="title" />
    471c492
    < 

    getResource

    --- >

    getResource

    479c500,501 < --- > > 483c505 <
    <sling:getResource base="${resource}" path="jcr:content" var="content" />
    ---
    > 
    <sling:getResource base="${resource}" path="jcr:content" var="content" />
    485c507
    < 

    include

    --- >

    include

    499c521,522 < --- > > 503c526 <
    <sling:include path="/content/aresource" resourceType="myapp/components/display" />
    ---
    > 
    <sling:include path="/content/aresource" resourceType="myapp/components/display" />
    505c528
    < 

    listChildren

    --- >

    listChildren

    512c535,536 < --- > > 516c540 <
    <sling:listChildren resource="${resource}" var="children" />
    ---
    > 
    <sling:listChildren resource="${resource}" var="children" />
    diff -b -B -r ./documentation/bundles/scripting/scripting-thymeleaf.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/scripting/scripting-thymeleaf.html
    101c101
    < 

    Features

    --- >

    Features

    103c103 <
  • Supporting all of Thymeleaf's extension points: TemplateResolvers, MessageResolvers, _Dialect_s, LinkBuilders, DecoupledTemplateLogicResolver, CacheManager and EngineContextFactory
  • --- >
  • Supporting all of Thymeleaf's extension points: TemplateResolvers, MessageResolvers, Dialects, LinkBuilders, DecoupledTemplateLogicResolver, CacheManager and EngineContextFactory
  • 110c110 <

    Installation

    --- >

    Installation

    121,122c121,122 <

    Configuration

    <

    Apache Sling Scripting Thymeleaf “ScriptEngineFactory”

    --- >

    Configuration

    >

    Apache Sling Scripting Thymeleaf “ScriptEngineFactory”

    124,125c124,125 <

    Apache Sling Scripting Thymeleaf “ScriptEngineFactory”

    <

    Apache Sling Scripting Thymeleaf “Sling Resource TemplateResolver”

    --- >

    Apache Sling Scripting Thymeleaf “ScriptEngineFactory”

    >

    Apache Sling Scripting Thymeleaf “Sling Resource TemplateResolver”

    127,128c127,128 <

    Apache Sling Scripting Thymeleaf “Sling Resource TemplateResolver”

    <

    Apache Sling Scripting Thymeleaf “Pattern TemplateModeProvider”

    --- >

    Apache Sling Scripting Thymeleaf “Sling Resource TemplateResolver”

    >

    Apache Sling Scripting Thymeleaf “Pattern TemplateModeProvider”

    130,131c130,131 <

    Apache Sling Scripting Thymeleaf “Pattern TemplateModeProvider

    <

    Apache Sling Scripting Thymeleaf “ResourceBundle MessageResolver”

    --- >

    Apache Sling Scripting Thymeleaf “Pattern TemplateModeProvider

    >

    Apache Sling Scripting Thymeleaf “ResourceBundle MessageResolver”

    133,134c133,134 <

    Apache Sling Scripting Thymeleaf “ResourceBundle MessageResolver”

    <

    Sling Dialect

    --- >

    Apache Sling Scripting Thymeleaf “ResourceBundle MessageResolver”

    >

    Sling Dialect

    136,137c136,137 <

    include

    <

    <header data-sling-include="${resource}" data-sling-resourceType="'example/page/header'" data-sling-unwrap="true"/>

    --- >

    include

    >

    <header data-sling-include="${resource}" data-sling-resourceType="'example/page/header'" data-sling-unwrap="true"/>

    139c139 <

    supported options (* = RequestDispatcher option)

    --- >

    supported options (* = RequestDispatcher option)

    141,144c141,148 <
  • addSelectors (String) *: When dispatching, add the value provided by this option to the selectors.
  • <
  • replaceSelectors (String) *: When dispatching, replace selectors by the value provided by this option.
  • <
  • replaceSuffix (String) *: When dispatching, replace the suffix by the value provided by this option.
  • <
  • resourceType (String) *: The resource type of a resource to include. If the resource to be included is specified with the path attribute, which cannot be resolved to a resource, the tag may create a synthetic resource object out of the path and this resource type. If the resource type is set the path must be the exact path to a resource object. That is, adding parameters, selectors and extensions to the path is not supported if the resource type is set.
  • --- >
  • addSelectors (String) *: When dispatching, add the value provided by this option to the selectors. >
  • >
  • replaceSelectors (String) *: When dispatching, replace selectors by the value provided by this option. >
  • >
  • replaceSuffix (String) *: When dispatching, replace the suffix by the value provided by this option. >
  • >
  • resourceType (String) *: The resource type of a resource to include. If the resource to be included is specified with the path attribute, which cannot be resolved to a resource, the tag may create a synthetic resource object out of the path and this resource type. If the resource type is set the path must be the exact path to a resource object. That is, adding parameters, selectors and extensions to the path is not supported if the resource type is set. >
  • 147,149c151,153 <

    Class Diagram

    <

    Class Diagram

    <

    Sample

    --- >

    Class Diagram

    >

    Class Diagram

    >

    Sample

    151c155 <

    Sling Fling Sample

    --- >

    Sling Fling Sample

    diff -b -B -r ./documentation/bundles/scripting.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/scripting.html 97c97 <

    Sling Scripting Engines

    --- >

    Sling Scripting Engines

    diff -b -B -r ./documentation/bundles/servlet-helpers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/servlet-helpers.html 97,98c97,98 <

    Usage

    <

    SlingHttpServletRequest

    --- >

    Usage

    >

    SlingHttpServletRequest

    104c104 < request.setQueryString("param1=aaa&param2=bbb"); --- > request.setQueryString("param1=aaa&param2=bbb"); 108,109c108,109 < .put("param1", "aaa") < .put("param2", "bbb") --- > .put("param1", "aaa") > .put("param2", "bbb") 113c113 < request.setResource(resourceResolver.getResource("/content/sample")); --- > request.setResource(resourceResolver.getResource("/content/sample")); 117,118c117,118 < requestPathInfo.setSelectorString("selector1.selector2"); < requestPathInfo.setExtension("html"); --- > requestPathInfo.setSelectorString("selector1.selector2"); > requestPathInfo.setExtension("html"); 124c124 < request.setAttribute("attr1", "value1"); --- > request.setAttribute("attr1", "value1"); 127c127 < request.addHeader("header1", "value1"); --- > request.addHeader("header1", "value1"); 130c130 < request.addCookie(new Cookie("cookie1", "value1")); --- > request.addCookie(new Cookie("cookie1", "value1")); 132c132 <

    SlingHttpServletResponse

    --- >

    SlingHttpServletResponse

    143c143 < assertEquals("text/plain;charset=UTF-8", response.getContentType()); --- > assertEquals("text/plain;charset=UTF-8", response.getContentType()); 148,149c148,149 < assertTrue(response.containsHeader("header1")); < assertEquals("5", response.getHeader("header2")); --- > assertTrue(response.containsHeader("header1")); > assertEquals("5", response.getHeader("header2")); diff -b -B -r ./documentation/bundles/sling-health-check-tool.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-health-check-tool.html 101c101 <
  • Source code for the HealthCheck modules on GitHub
  • --- >
  • Source code for the HealthCheck modules on GitHub
  • 106c106,107 < --- > > 108c109 <

    Use cases

    --- >

    Use cases

    125c126 <

    What's a HealthCheck ?

    --- >

    What's a HealthCheck ?

    155c156 <

    SlingHealthCheck annotation

    --- >

    SlingHealthCheck annotation

    159,162c160,163 < name="Annotated Health Check Sample", < mbeanName="annotatedHC", < description="Sample Health Check defined by a java annotation", < tags={"sample","annotation"}) --- > name="Annotated Health Check Sample", > mbeanName="annotatedHC", > description="Sample Health Check defined by a java annotation", > tags={"sample","annotation"}) 172,173c173,174 <

    Executing Health Checks

    <

    Health Checks can be executed via a webconsole plugin, the health check servlet or via JMX. HealthCheck services can be selected for execution based on their hc.tags multi-value service property.

    --- >

    Executing Health Checks

    >

    Health Checks can be executed via a webconsole plugin, the health check servlet or via JMX. HealthCheck services can be selected for execution based on their hc.tags multi-value service property.

    176c177 <

    Health Check bundles

    --- >

    Health Check bundles

    186,187c187,188 <

    Out-of-the-box HealthCheck services

    <

    The following default HealthCheck services are provided by the org.apache.sling.hc.core bundle:

    --- >

    Out-of-the-box HealthCheck services

    >

    The following default HealthCheck services are provided by the org.apache.sling.hc.core bundle:

    202c203 <

    Configuring Health Checks

    --- >

    Configuring Health Checks

    209,210c210,211 < Type < Description --- > Type > Description 216,217c217,218 < String < The name of the health check as shown in UI --- > String > The name of the health check as shown in UI 221,222c222,223 < String[] < List of tags: Both Felix Console Plugin and Health Check servlet support selecting relevant checks by providing a list of tags --- > String[] > List of tags: Both Felix Console Plugin and Health Check servlet support selecting relevant checks by providing a list of tags 226,227c227,228 < String < Makes the HC result available via given MBean name. If not provided no MBean is created for that HealthCheck --- > String > Makes the HC result available via given MBean name. If not provided no MBean is created for that HealthCheck 231,232c232,233 < String < Used to schedule the execution of a HealthCheck at regular intervals, using a cron expression as specified by the Sling Scheduler module. --- > String > Used to schedule the execution of a HealthCheck at regular intervals, using a cron expression as specified by the Sling Scheduler module. 236,237c237,238 < Long < Overrides the global default TTL as configured in health check executor for health check responses (since v1.2.6 of core) --- > Long > Overrides the global default TTL as configured in health check executor for health check responses (since v1.2.6 of core) 241,242c242,243 < Long < This property will make WARN/CRITICAL results stay visible for future executions, even if the current state has returned to status OK. It is useful to keep attention on issues that might still require action after the state went back to OK, e.g. if an event pool has overflown and some events might have been lost (since v1.2.10 of core) --- > Long > This property will make WARN/CRITICAL results stay visible for future executions, even if the current state has returned to status OK. It is useful to keep attention on issues that might still require action after the state went back to OK, e.g. if an event pool has overflown and some events might have been lost (since v1.2.10 of core) 249,253c250,254 < "hc.name" : "LoadedClassCount and ManagementSpecVersion are in range" < "hc.mbean.name" : "LoadedClassCount and ManagementSpecVersion" < "hc.tags" : [jvm, script] < "expression" : "jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount') > 10 && jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') > 1" < "language.extension" : "ecma" --- > "hc.name" : "LoadedClassCount and ManagementSpecVersion are in range" > "hc.mbean.name" : "LoadedClassCount and ManagementSpecVersion" > "hc.tags" : [jvm, script] > "expression" : "jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount') > 10 && jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') > 1" > "language.extension" : "ecma" 255,256c256,257 <

    The service properties starting with the hc. prefix in this example should be provided by all HealthCheck services.

    <

    Configuring the Health Check Executor

    --- >

    The service properties starting with the hc. prefix in this example should be provided by all HealthCheck services.

    >

    Configuring the Health Check Executor

    262,264c263,265 < Type < Default < Description --- > Type > Default > Description 270,272c271,273 < Long < 2000ms < Timeout in ms until a check is marked as timed out --- > Long > 2000ms > Timeout in ms until a check is marked as timed out 276,278c277,279 < Long < 300000ms = 5min < Threshold in ms until a check is marked as 'exceedingly' timed out and will marked CRITICAL instead of WARN only --- > Long > 300000ms = 5min > Threshold in ms until a check is marked as 'exceedingly' timed out and will marked CRITICAL instead of WARN only 282,284c283,285 < Long < 2000ms < Result Cache time to live - results will be cached for the given time --- > Long > 2000ms > Result Cache time to live - results will be cached for the given time 288c289 <

    Webconsole plugin

    --- >

    Webconsole plugin

    292,293c293,294 <

    Health Check Webconsole Plugin

    <

    JMX access to health checks

    --- >

    Health Check Webconsole Plugin

    >

    JMX access to health checks

    295c296 <

    The MBean gives access to the Result and the log, as shown on the screenshot below.

    --- >

    The MBean gives access to the Result and the log, as shown on the screenshot below.

    297,298c298,299 <

    JConsole showing Sling Health Check MBeans

    <

    Health Check Servlet

    --- >

    JConsole showing Sling Health Check MBeans

    >

    Health Check Servlet

    307,308c308,309 <

    Health Checks as server-side JUnit tests

    <

    The org.apache.sling.hc.junit.bridge bundle makes selected Health Checks available as server-side JUnit tests.

    --- >

    Health Checks as server-side JUnit tests

    >

    The org.apache.sling.hc.junit.bridge bundle makes selected Health Checks available as server-side JUnit tests.

    310c311 <

    The idea is to implement the smoke tests of your system, for example, as health checks. You can then run them as part of integration testing, using the Sling Testing Tools
    remote testing utilities, and also as plain Health Checks for monitoring or troubleshooting Sling instances.

    --- >

    The idea is to implement the smoke tests of your system, for example, as health checks. You can then run them as part of integration testing, using the Sling Testing Tools
    remote testing utilities, and also as plain Health Checks for monitoring or troubleshooting Sling instances.

    diff -b -B -r ./documentation/bundles/sling-oak-restrictions.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-oak-restrictions.html 100c100 <

    Introduction

    --- >

    Introduction

    102,104c102,104 <

    Important: Using the sling restrictions (as well as standard oak restrictions) is not as performant as simple path based ACE entries without any restrictions. Permission setups should always mostly work with path based ACEs and only use ACEs with restrictions for special cases.

    <

    Restriction sling:resourceTypes

    <

    This restriction allows to match against a sling resource type of a node and works much like the oak standard restriction rep:ntNames. Only resources that have one of the supplied resource types are matched, child and parent resources with other resource types are not matched.

    --- >

    Important: Using the sling restrictions (as well as standard oak restrictions) is not as performant as simple path based ACE entries without any restrictions. Permission setups should always mostly work with path based ACEs and only use ACEs with restrictions for special cases.

    >

    Restriction sling:resourceTypes

    >

    This restriction allows to match against a sling resource type of a node and works much like the oak standard restriction rep:ntNames. Only resources that have one of the supplied resource types are matched, child and parent resources with other resource types are not matched.

    106,120c106,113 <
      <
    • /content/myprj/mynode <
        <
      • rep:policy (rep:ACL) <
          <
        • allow (rep:GrantACE)
        • <
        • principalName (String) = "myAuthorizable"
        • <
        • rep:privileges (Name[]) = "rep:write"
        • <
        • rep:restrictions (rep:Restrictions) <
            <
          • sling:resourceTypes (String[]) = [myproj/comp1,myproj/comp2]
          • <
        • <
      • <
    • <
    --- >
    - /content/myprj/mynode 
    >    - rep:policy (rep:ACL)
    >      - allow (rep:GrantACE)
    >        + principalName (String) = "myAuthorizable"
    >        + rep:privileges (Name[]) = "rep:write"
    >        - rep:restrictions (rep:Restrictions)
    >           + sling:resourceTypes (String[]) = [myproj/comp1,myproj/comp2]
    > 
    122,133c115,121 <
      <
    • /content/myprj <
        <
      • sling:resourceType (String) = "myproj/siteroot"
      • <
      • mynode <
          <
        • sling:resourceType (String) = "myproj/comp1"
        • <
        • mysubnode
        • <
        • sling:resourceType (String) = "myproj/comp3"
        • <
      • <
    • <
    --- >
    - /content/myprj 
    >    + sling:resourceType (String) = "myproj/siteroot"
    >    - mynode
    >      + sling:resourceType (String) = "myproj/comp1"
    >      - mysubnode 
    >        + sling:resourceType (String) = "myproj/comp3"
    > 
    136c124 <

    Restriction sling:resourceTypesWithDescendants

    --- >

    Restriction sling:resourceTypesWithDescendants

    139,153c127,134 <
      <
    • /content/myprj/mynode <
        <
      • rep:policy (rep:ACL) <
          <
        • allow (rep:GrantACE)
        • <
        • principalName (String) = "myAuthorizable"
        • <
        • rep:privileges (Name[]) = "rep:write" <
            <
          • rep:restrictions (rep:Restrictions)
          • <
          • sling:resourceTypesWithDescendants (String[]) = [myproj/comp1,myproj/comp2]
          • <
        • <
      • <
    • <
    --- >
    - /content/myprj/mynode 
    >    - rep:policy (rep:ACL)
    >      - allow (rep:GrantACE)
    >        + principalName (String) = "myAuthorizable"
    >        + rep:privileges (Name[]) = "rep:write"
    >          - rep:restrictions (rep:Restrictions)
    >            + sling:resourceTypesWithDescendants (String[]) = [myproj/comp1,myproj/comp2]
    > 
    155,156c136,137 <

    Advanced Path Matching

    <

    Both sling:resourceTypes and sling:resourceTypesWithDescendants support advanced path matching by using resourcetype@path. That way instead of checking the resource type of the current node, the resource type of node at the relative path is checked. For instance this is useful for the case where page content is stored in a jcr:content subnode of a hierarchy, the permission however is required to become effective on the parent node of jcr:content.

    --- >

    Advanced Path Matching

    >

    Both sling:resourceTypes and sling:resourceTypesWithDescendants support advanced path matching by using resourcetype@path. That way instead of checking the resource type of the current node, the resource type of node at the relative path is checked. For instance this is useful for the case where page content is stored in a jcr:content subnode of a hierarchy, the permission however is required to become effective on the parent node of jcr:content.

    158,172c139,146 <
      <
    • /content/myprj/mynode <
        <
      • rep:policy (rep:ACL) <
          <
        • allow (rep:GrantACE)
        • <
        • principalName (String) = "myAuthorizable"
        • <
        • rep:privileges (Name[]) = "rep:write"
        • <
        • rep:restrictions (rep:Restrictions) <
            <
          • sling:resourceTypesWithDescendants (String[]) = [myproj/comp1@jcr:content,myproj/comp2@jcr:content]
          • <
        • <
      • <
    • <
    --- >
    - /content/myprj/mynode 
    >    - rep:policy (rep:ACL)
    >      - allow (rep:GrantACE)
    >        + principalName (String) = "myAuthorizable"
    >        + rep:privileges (Name[]) = "rep:write"
    >        - rep:restrictions (rep:Restrictions)
    >           + sling:resourceTypesWithDescendants (String[]) = [myproj/comp1@jcr:content,myproj/comp2@jcr:content]
    > 
    174,215c148,168 <
      <
    • /content/myprj <
        <
      • jcr:content <
          <
        • sling:resourceType (String) = "myproj/siteroot"
        • <
      • <
      • mynode1 <
          <
        • jcr:content <
            <
          • sling:resourceType (String) = "myproj/comp1"
          • <
        • <
        • mysubnode1
        • <
        • jcr:content <
            <
          • sling:resourceType (String) = "myproj/comp3"
          • <
          • contentsubnode1 <
              <
            • sling:resourceType (String) = "myproj/comp4"
            • <
          • <
          • contentsubnode2 <
              <
            • sling:resourceType (String) = "myproj/comp5"
            • <
          • <
        • <
        • mysubnode2
        • <
        • jcr:content <
            <
          • sling:resourceType (String) = "myproj/comp3"
          • <
        • <
      • <
      • mynode2 <
          <
        • jcr:content <
            <
          • sling:resourceType (String) = "myproj/comp7"
          • <
        • <
      • <
    • <
    <

    the rule from above will match

    --- >
    - /content/myprj 
    >    - jcr:content 
    >       + sling:resourceType (String) = "myproj/siteroot"
    >    - mynode1
    >      - jcr:content 
    >         + sling:resourceType (String) = "myproj/comp1"
    >      - mysubnode1 
    >        - jcr:content 
    >           + sling:resourceType (String) = "myproj/comp3"
    >           - contentsubnode1 
    >             + sling:resourceType (String) = "myproj/comp4"
    >           - contentsubnode2
    >             + sling:resourceType (String) = "myproj/comp5"
    >      - mysubnode2 
    >        - jcr:content 
    >           + sling:resourceType (String) = "myproj/comp3"
    >    - mynode2
    >      - jcr:content 
    >         + sling:resourceType (String) = "myproj/comp7"
    > 
    >

    the rule from above will match

    diff -b -B -r ./documentation/bundles/sling-pipes/bindings.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/bindings.html 97c97 <

    configuration expression

    --- >

    configuration expression

    100,101c100,101 <

    output binding

    <

    each single pipe has to declare an output binding at the same time it outputs a resource. The binding will be named as the name of the pipe outputing it. If a pipe as been created as a sub pipe of a container with pipe builder api, it will have default name of "one", "two", ... depending on its position in the pipe, you can override the name with .name(...) api.

    --- >

    output binding

    >

    each single pipe has to declare an output binding at the same time it outputs a resource. The binding will be named as the name of the pipe outputing it. If a pipe as been created as a sub pipe of a container with pipe builder api, it will have default name of "one", "two", ... depending on its position in the pipe, you can override the name with .name(...) api.

    103,105c103,105 <
        .echo('/content/foo')
    <     .children('nt:unstructured').name('example')
    <     .write('jcr:description','this node property prop = ${example.prop}')
    ---
    > 
        .echo('/content/foo')
    >     .children('nt:unstructured').name('example')
    >     .write('jcr:description','this node property prop = ${example.prop}')
    109,111c109,111
    <         "jcr:primaryType":"nt:unstructured",
    <         "firstItem": {
    <             "prop":"firstVal"
    ---
    >         "jcr:primaryType":"nt:unstructured",
    >         "firstItem": {
    >             "prop":"firstVal"
    113,114c113,114
    <         "firstItem": {
    <             "prop":"secondVal"
    ---
    >         "firstItem": {
    >             "prop":"secondVal"
    120,123c120,123
    <         "jcr:primaryType":"nt:unstructured",
    <         "firstItem": {
    <             "prop":"firstVal"
    <             "jcr:description":"this node property prop = firstVal"
    ---
    >         "jcr:primaryType":"nt:unstructured",
    >         "firstItem": {
    >             "prop":"firstVal"
    >             "jcr:description":"this node property prop = firstVal"
    125,127c125,127
    <         "firstItem": {
    <             "prop":"secondVal"
    <             "jcr:description":"this node property prop = secondVal"
    ---
    >         "firstItem": {
    >             "prop":"secondVal"
    >             "jcr:description":"this node property prop = secondVal"
    131c131
    < 

    additional bindings

    --- >

    additional bindings

    136c136 <
        .runWith("env", "prod")
    ---
    > 
        .runWith("env", "prod")
    139c139
    < 
        -F binding='{"env":"prod"}'
    ---
    > 
        -F binding='{"env":"prod"}'
    141c141
    < 

    additional scripts

    --- >

    additional scripts

    143c143 <

    bindings forward

    --- >

    bindings forward

    diff -b -B -r ./documentation/bundles/sling-pipes/execution-monitoring.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/execution-monitoring.html 96c96 <

    JCR persistence of a pipe

    --- >

    JCR persistence of a pipe

    101,102c101,102 < Configuration node property < Explanation --- > Configuration node property > Explanation 107,108c107,108 < sling:resourceType < which must be a pipe type registered by the plumber --- > sling:resourceType > which must be a pipe type registered by the plumber 111,112c111,112 < name < that will be used in bindings as an id, and will be the key for the output bindings (default value being a value map of the current output resource). Note that the node name will be used in case no name is provided. --- > name > that will be used in bindings as an id, and will be the key for the output bindings (default value being a value map of the current output resource). Note that the node name will be used in case no name is provided. 115,116c115,116 < path < defines pipe's input. Note that property is not mandatory in case the pipe is streamed after another pipe, in which case previous pipe output's can be used as input. --- > path > defines pipe's input. Note that property is not mandatory in case the pipe is streamed after another pipe, in which case previous pipe output's can be used as input. 119,120c119,120 < expr < expression through which the pipe will execute (depending on the type) --- > expr > expression through which the pipe will execute (depending on the type) 123,124c123,124 < additionalScripts < multi value property to declare scripts that can be reused in expressions  --- > additionalScripts > multi value property to declare scripts that can be reused in expressions  131,132c131,132 < Configuration child node < Explanation --- > Configuration child node > Explanation 137,138c137,138 <  conf <  optional, contains addition configuration of the pipe (depending on the type)  --- >  conf >  optional, contains addition configuration of the pipe (depending on the type)  141,142c141,142 < additionalBinding < set "global" bindings (property=value) in pipe execution --- > additionalBinding > set "global" bindings (property=value) in pipe execution 145,146c145,146 < writer <  set a writer with key / value property being label, and value of each added entry. Those values can be expressions  --- > writer >  set a writer with key / value property being label, and value of each added entry. Those values can be expressions  150c150 <

    Java

    --- >

    Java

    158,161c158,161 <

    You can encapsulate the whole execution of a pipe through the execute methods that are used internally by both Pipe Builder and HTTP APIs.

    <

    Pipe Builder API

    <

    Plumber osgi service provides PipeBuilder with newPipe(ResourceResolver resolver) API, that gives a fluent API to quickly configure and run pipes. e.g.

    <
    plumber.newPipe(resolver).xpath('//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
    ---
    > 

    You can encapsulate the whole execution of a pipe through the execute methods that are used internally by both Pipe Builder and HTTP APIs.

    >

    Pipe Builder API

    >

    Plumber osgi service provides PipeBuilder with newPipe(ResourceResolver resolver) API, that gives a fluent API to quickly configure and run pipes. e.g.

    >
    plumber.newPipe(resolver).xpath('//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
    165c165
    < 
         def plumber = getService("org.apache.sling.pipes.Plumber");
    ---
    > 
         def plumber = getService("org.apache.sling.pipes.Plumber");
    168c168
    <          .echo("/content/mySite")
    ---
    >          .echo("/content/mySite")
    174,175c174,175
    <     Pipe Builder Method 
    <     Explanation 
    ---
    >       Pipe Builder Method 
    >       Explanation 
    180,181c180,181
    <     pipe(type) 
    <     generate a new subpipe 
    ---
    >       pipe(type) 
    >       generate a new subpipe 
    184,185c184,185
    <     with(Object...) 
    <     add to actual subpipe configuration node key/value configurations 
    ---
    >       with(Object...) 
    >       add to actual subpipe configuration node key/value configurations 
    188,189c188,189
    <     expr(String) 
    <     add an expr configuration 
    ---
    >       expr(String) 
    >       add an expr configuration 
    192,193c192,193
    <     path(String) 
    <     add an path configuration 
    ---
    >       path(String) 
    >       add an path configuration 
    196,197c196,197
    <     name(String) 
    <     specify a name (there would be a default one, named 'one', 'two', ... depending on the position otherwise), that will be use in the persistence and bindings 
    ---
    >       name(String) 
    >       specify a name (there would be a default one, named 'one', 'two', ... depending on the position otherwise), that will be use in the persistence and bindings 
    200,201c200,201
    <     conf(Object...) 
    <     add an extra configuration node with key/value properties/values 
    ---
    >       conf(Object...) 
    >       add an extra configuration node with key/value properties/values 
    205c205
    < 

    note that that configuration part has shortcuts for some pipes. Typically, above sample is a shorter equivalent of

    --- >

    note that that configuration part has shortcuts for some pipes. Typically, above sample is a shorter equivalent of

    207,208c207,208 < .pipe('slingPipes/xpath').expr('//element(*,nt:unstructured)[@sling:resourceType='to/delete']") < .pipe('slingPipes/rm').run(); --- > .pipe('slingPipes/xpath').expr('//element(*,nt:unstructured)[@sling:resourceType='to/delete']") > .pipe('slingPipes/rm').run(); 220,221c220,221 < Pipe Builder Method < Explanation --- > Pipe Builder Method > Explanation 226,227c226,227 < outputs(keys...) < set the keys you want as an output --- > outputs(keys...) > set the keys you want as an output 230,231c230,231 < build(path) < builds the requested pipe at the given path location --- > build(path) > builds the requested pipe at the given path location 234,235c234,235 < build() < will build the pipe under /var/pipes/... (random node under timed base path) --- > build() > will build the pipe under /var/pipes/... (random node under timed base path) 238,239c238,239 < run(bindings) or runWith(bindings...) < will build the pipe in random location, and run it with passed bindings --- > run(bindings) or runWith(bindings...) > will build the pipe in random location, and run it with passed bindings 242,243c242,243 < runAsync(bindings) < will do the same, but asynchronously --- > runAsync(bindings) > will do the same, but asynchronously 247,248c247,248 <

    HTTP API

    <

    Pipe HTTP Request bits

    --- >

    HTTP API

    >

    Pipe HTTP Request bits

    252,253c252,253 < request bit < Explanation --- > request bit > Explanation 258,259c258,259 < request path < path of a pipe configuration resource (see above), or a resource of type slingPipes/plumber with a path parameter indicating the pipe configuration resource path. --- > request path > path of a pipe configuration resource (see above), or a resource of type slingPipes/plumber with a path parameter indicating the pipe configuration resource path. 262,263c262,263 < request method < GET or POST. Note that GET will not work on pipe modifying content (unless you are using a dryRun) --- > request method > GET or POST. Note that GET will not work on pipe modifying content (unless you are using a dryRun) 266,267c266,267 < request extension < .json or .csv --- > request extension > .json or .csv 270,271c270,271 < request selectors <  you can add status to get status on a currently executed pipe --- > request selectors >  you can add status to get status on a currently executed pipe 275c275 <
    Pipe HTTP Request parameter
    --- >
    Pipe HTTP Request parameter
    279,280c279,280 < request parameter < Explanation --- > request parameter > Explanation 285,286c285,286 < size <  size of the returned excerpt. Default response is truncated to 10 items, if you need more (or less), you can modify that settings with the size parameter. 0 value will return all the items --- > size >  size of the returned excerpt. Default response is truncated to 10 items, if you need more (or less), you can modify that settings with the size parameter. 0 value will return all the items 289,290c289,290 < binding < json object of global bindings you want to add for the execution of the pipe e.g. {testBinding:'foo'} --- > binding > json object of global bindings you want to add for the execution of the pipe e.g. {testBinding:'foo'} 293,294c293,294 < writer < you can configure output of your servlet, with writer parameter, a json object as a pattern to the result you want to have. The values of the json object are expressions and can reuse each pipe's subpipe binding. This will be entries of your json output, or headers and values of your csv output, e.g {"user":"${user.fullName}"} --- > writer > you can configure output of your servlet, with writer parameter, a json object as a pattern to the result you want to have. The values of the json object are expressions and can reuse each pipe's subpipe binding. This will be entries of your json output, or headers and values of your csv output, e.g {"user":"${user.fullName}"} 297,298c297,298 < dryRun=true < if parameter dryRun is set to true, and the executed pipe is supposed to modify content, it will log (at best it can) the change it would have done, without doing anything --- > dryRun=true > if parameter dryRun is set to true, and the executed pipe is supposed to modify content, it will log (at best it can) the change it would have done, without doing anything 301,302c301,302 < async=true < allow asynchronous execution of the given type. This is advised in case you plan your pipe execution to last longer than the session of your HTTP client. If used, the returned value will be id of the created sling Job. In that case you can monitor the pipes path with status selector as described above until it has the value finished. --- > async=true > allow asynchronous execution of the given type. This is advised in case you plan your pipe execution to last longer than the session of your HTTP client. If used, the returned value will be id of the created sling Job. In that case you can monitor the pipes path with status selector as described above until it has the value finished. 306,308c306,308 <

    PipeModel

    <

    a Sling Model is shipped with sling pipes bundle that allows you to add a set of pipes to a component instance.

    <

    A typical usage would be to have some list pipes stored e.g. under /etc/pipes/navigation-lists and then

    --- >

    PipeModel

    >

    a Sling Model is shipped with sling pipes bundle that allows you to add a set of pipes to a component instance.

    >

    A typical usage would be to have some list pipes stored e.g. under /etc/pipes/navigation-lists and then

    311,318c311,318 < "jcr:primaryType":"nt:unstructured", < "sling:resourceType":"my/navigation/breadcrumb", < "pipes": { < "jcr:primaryType":"nt:unstructured", < "breadcrumb": { < "jcr:primaryType":"nt:unstructured", < "sling:resourceType":"slingPipes/reference" < "expr":"/etc/pipes/navigation-lists/breadcrumb" --- > "jcr:primaryType":"nt:unstructured", > "sling:resourceType":"my/navigation/breadcrumb", > "pipes": { > "jcr:primaryType":"nt:unstructured", > "breadcrumb": { > "jcr:primaryType":"nt:unstructured", > "sling:resourceType":"slingPipes/reference" > "expr":"/etc/pipes/navigation-lists/breadcrumb" 323,327c323,327 <

    and then the sightly script for "/apps/my/navigation/breadcrumb" could look like

    <
            <ol class="breadcrumb"
    <                  data-sly-use.pipe="org.apache.sling.pipes.models.PipeModel"
    <                  data-sly-list.nav="${pipe.outputs.breadcrumb}">
    <             <sly data-sly-resource="${breadcrumb.path}"></sly>
    ---
    > 

    and then the sightly script for "/apps/my/navigation/breadcrumb" could look like

    >
            <ol class="breadcrumb"
    >                  data-sly-use.pipe="org.apache.sling.pipes.models.PipeModel"
    >                  data-sly-list.nav="${pipe.outputs.breadcrumb}">
    >             <sly data-sly-resource="${breadcrumb.path}"></sly>
    333,335c333,335
    < 
        .echo('${path.currentResource}')
    <     .parents("my:PageContent[showInNav=true]")
    <     .parent("my:Page")  
    ---
    > 
        .echo('${path.currentResource}')
    >     .parents("my:PageContent[showInNav=true]")
    >     .parent("my:Page")  
    337c337
    < 

    JMX

    --- >

    JMX

    diff -b -B -r ./documentation/bundles/sling-pipes/logical.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/logical.html 97c97 <

    Container Pipe

    --- >

    Container Pipe

    104c104 <

    ReferencePipe (ref(path))

    --- >

    ReferencePipe (ref(path))

    110c110 <

    FilterPipe (grep(conf))

    --- >

    FilterPipe (grep(conf))

    115,116c115,116 <
  • slingPipesFilter_test='${...}' evaluates the property value, and filters out the stream if the expression is not a boolean or false
  • <
  • slingPipesFilter_not='true' inverts the expected result of the filter
  • --- >
  • slingPipesFilter_test='${...}' evaluates the property value, and filters out the stream if the expression is not a boolean or false
  • >
  • slingPipesFilter_not='true' inverts the expected result of the filter
  • 119c119 <
    echo('/content/foo').grep('foo','bar','slingPipesFilter_not',true).run()
    ---
    > 
    echo('/content/foo').grep('foo','bar','slingPipesFilter_not',true).run()
    122c122
    < 
    echo('content/foo').name('FOO').grep('slingPipesFilter_test','${FOO.foo == "bar"}').run()
    ---
    > 
    echo('content/foo').name('FOO').grep('slingPipesFilter_test','${FOO.foo == "bar"}').run()
    125c125
    < 

    NotPipe

    --- >

    NotPipe

    diff -b -B -r ./documentation/bundles/sling-pipes/readers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/readers.html 99c99 <

    Base pipe (echo(path))

    --- >

    Base pipe (echo(path))

    105,106c105,106 <
        echo('/content/foo')
    <     .write('bar',true)
    ---
    > 
        echo('/content/foo')
    >     .write('bar',true)
    109c109
    < 
        write('bar',true).with('path','/content/foo')
    ---
    > 
        write('bar',true).with('path','/content/foo')
    111c111
    < 

    XPathPipe (xpath(expr))

    --- >

    XPathPipe (xpath(expr))

    115,117c115,119 <
  • expr should be a valid xpath query
    xpath('/jcr:root/content/foo//element(*,nt:unstructured)[@sling:resourceType="foo/bar"]')
    < .write('foo','bar')
    < 
  • --- >
  • expr should be a valid xpath query >
    xpath('/jcr:root/content/foo//element(*,nt:unstructured)[@sling:resourceType="foo/bar"]')
    > .write('foo','bar')
    > 
    >
  • 119c121 <

    TraversePipe (traverse())

    --- >

    TraversePipe (traverse())

    128c130 <

    MultiPropertyPipe

    --- >

    MultiPropertyPipe

    134c136 <

    Sling Query Pipes

    --- >

    Sling Query Pipes

    136c138 <

    Find Pipe ($(expr))

    --- >

    Find Pipe ($(expr))

    140,143c142,147 <
  • expr mandatory property, contains Sling Query selector string
    echo("/content/foo")
    < .$("nt:unstructured[sling:resourceType=foo/bar]")
    < .write('foo','bar')
    < 
  • --- >
  • expr mandatory property, contains Sling Query selector string >
    echo("/content/foo")
    > .$("nt:unstructured[sling:resourceType=foo/bar]")
    > .write('foo','bar')
    > 
    >
  • 145c149 <

    Children Pipe (children(expr))

    --- >

    Children Pipe (children(expr))

    151c155 <

    Siblings Pipe (siblings(expr))

    --- >

    Siblings Pipe (siblings(expr))

    157c161 <

    Parent Pipe (parent())

    --- >

    Parent Pipe (parent())

    162c166 <

    Closest Pipe (closest(expr))

    --- >

    Closest Pipe (closest(expr))

    166,168c170,174 <
  • expr mandatory property, contains Sling Query selector string
    .$("nt:unstructured[sling:resourceType=foo/bar]")
    < .closest('jcr:content')
    < 
  • --- >
  • expr mandatory property, contains Sling Query selector string >
    .$("nt:unstructured[sling:resourceType=foo/bar]")
    > .closest('jcr:content')
    > 
    >
  • 171c177 <

    Parents Pipe (parents(expr))

    --- >

    Parents Pipe (parents(expr))

    177c183 <

    InputStream reader pipes

    --- >

    InputStream reader pipes

    185c191 <

    JsonPipe (json(expr))

    --- >

    JsonPipe (json(expr))

    193,194c199,200 <
        .json('{items:[{val:1},{val:2},{val:3}]}').with('valuePath','$.items').name('demo')
    <     .mkdir('/content/${demo.val}')
    ---
    > 
        .json('{items:[{val:1},{val:2},{val:3}]}').with('valuePath','$.items').name('demo')
    >     .mkdir('/content/${demo.val}')
    198,201c204,207
    < 
        .json('["/content/mySite/page1","/content/mySite/page2","/content/mySite/page3"]')
    <     .echo('${one}')
    <     .children("jcr:content")
    <     .write("update","something")
    ---
    > 
        .json('["/content/mySite/page1","/content/mySite/page2","/content/mySite/page3"]')
    >     .echo('${one}')
    >     .children("jcr:content")
    >     .write("update","something")
    203c209
    < 

    CsvPipe (csv(expr))

    --- >

    CsvPipe (csv(expr))

    208,210c214,218 <
  • separator separator character, default being comma ,
    .csv('idx,val\n1,1\n2,2\n3,3').name('demo')
    < .mkdir('/content/${demo.val}')
    < 
  • --- >
  • separator separator character, default being comma , >
    .csv('idx,val\n1,1\n2,2\n3,3').name('demo')
    > .mkdir('/content/${demo.val}')
    > 
    >
  • diff -b -B -r ./documentation/bundles/sling-pipes/samples.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/samples.html 96,98c96,98 <

    Pipebuilder samples

    <

    those are samples built with pipebuilder api you can

    <

    echo | $ | children | write

    --- >

    Pipebuilder samples

    >

    those are samples built with pipebuilder api you can

    >

    echo | $ | children | write

    100,103c100,103 <
      echo('/home/users')
    <   .$('rep:User')
    <   .children("nt:unstructured#profile")
    <   .write("fullName","${(profile.gender === 'female' ? 'Ms ' + profile.fullName : 'Mr ' + profile.fullName)}")
    ---
    > 
      echo('/home/users')
    >   .$('rep:User')
    >   .children("nt:unstructured#profile")
    >   .write("fullName","${(profile.gender === 'female' ? 'Ms ' + profile.fullName : 'Mr ' + profile.fullName)}")
    105c105
    < 

    echo | $ | multiProperty | auth | write

    --- >

    echo | $ | multiProperty | auth | write

    107,112c107,112 <
     .echo('/etc/badges/jcr:content/par')
    <  .$('[sling:resourceType=myApp/components/badge]').name('badge')
    <  .pipe('slingPipes/multiProperty').path('${path.badge}/profiles').name('profile')
    <  .auth('${profile}').name('user')
    <  .echo('${path.user}/profile')
    <  .write('badges','+[${path.badge}]')
    ---
    > 
     .echo('/etc/badges/jcr:content/par')
    >  .$('[sling:resourceType=myApp/components/badge]').name('badge')
    >  .pipe('slingPipes/multiProperty').path('${path.badge}/profiles').name('profile')
    >  .auth('${profile}').name('user')
    >  .echo('${path.user}/profile')
    >  .write('badges','+[${path.badge}]')
    114,115c114,115
    < 
    echo | children | children | echo | json | write
    <

    this use case is for completing repository website with external system's data (that has an json api), it does

    --- >
    echo | children | children | echo | json | write
    >

    this use case is for completing repository website with external system's data (that has an json api), it does

    122,127c122,127 <
     .echo("/content/mySite")
    <  .children('my:Page')
    <  .children('my:Page').name("localePage")
    <  .echo('${path.localePage}/jcr:content').name("content")
    <  .json('https://www.external.com/api/${content.country.toUpperCase()}.json.name('api')
    <  .write('cachedValue','${api.remoteJsonValueWeWant}')
    ---
    > 
     .echo("/content/mySite")
    >  .children('my:Page')
    >  .children('my:Page').name("localePage")
    >  .echo('${path.localePage}/jcr:content').name("content")
    >  .json('https://www.external.com/api/${content.country.toUpperCase()}.json.name('api')
    >  .write('cachedValue','${api.remoteJsonValueWeWant}')
    129c129
    < 
    echo | $ | parent | rm
    --- >
    echo | $ | parent | rm
    133,134c133,135 <
  • remove it
    .echo("/home/users")
    < .$("profile[@bad]")
    ---
    >   
  • remove it >
    .echo("/home/users")
    > .$("profile[@bad]")
    137c138,139
    < 
  • --- >
    >
  • diff -b -B -r ./documentation/bundles/sling-pipes/writers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes/writers.html 96,97c96,97 <

    those pipes all are using common sling (or other) APIs to modify content. You'll probably need some reader pipes and/or logical pipes first to put you into the right context.

    <
    Write Pipe (write(conf))
    --- >

    those pipes all are using common sling (or other) APIs to modify content. You'll probably need some reader pipes and/or logical pipes first to put you into the right context.

    >
    Write Pipe (write(conf))
    105,106c105,106 <
        .echo('/content/foo')
    <     .write('foo1','bar1','foo2','bar2')
    ---
    > 
        .echo('/content/foo')
    >     .write('foo1','bar1','foo2','bar2')
    110,111c110,111
    < 
        .echo('/content/destination')
    <     .pipe("slingPipes/write").expr("/content/source")
    ---
    > 
        .echo('/content/destination')
    >     .pipe("slingPipes/write").expr("/content/source")
    113c113
    < 
    MovePipe (mv(expr))
    --- >
    MovePipe (mv(expr))
    117,119c117,121 <
  • expr full target path, note that parent path must exists
    .echo("/content/foo/old/location")
    < .mv("/content/bar/new/location")
    < 
  • --- >
  • expr full target path, note that parent path must exists >
    .echo("/content/foo/old/location")
    > .mv("/content/bar/new/location")
    > 
    >
  • 121c123 <
    RemovePipe (rm())
    --- >
    RemovePipe (rm())
    128c130 <
        .echo("/content/foo/toRemove")
    ---
    > 
        .echo("/content/foo/toRemove")
    131c133
    < 
    PathPipe (mkdir(expr))
    --- >
    PathPipe (mkdir(expr))
    136,137c138,141 <
  • autosave should save at each creation (will make things slow, but sometimes you don't have choice)
    .mkdir("/content/foo/bar")
    < 
  • --- >
  • autosave should save at each creation (will make things slow, but sometimes you don't have choice) >
    .mkdir("/content/foo/bar")
    > 
    >
  • 139,140c143,144 <

    will create a /content/foo/bar path of sling:Folder nodes

    <
    AuthorizablePipe (auth(conf))
    --- >

    will create a /content/foo/bar path of sling:Folder nodes

    >
    AuthorizablePipe (auth(conf))
    151c155 <
        .auth("createGroup", true).expr("foo-bar")
    ---
    > 
        .auth("createGroup", true).expr("foo-bar")
    154,156c158,160
    < 
        .echo("/home/users/foo")
    <     .$("rep:User")
    <     .auth("addToGroup", "foo-bar")
    ---
    > 
        .echo("/home/users/foo")
    >     .$("rep:User")
    >     .auth("addToGroup", "foo-bar")
    159,161c163,165
    < 
        .auth("bindMembers",true).expr("administrators")
    <     .json('${one}')
    <     .mkdir('/content/admin-users/${two}')
    ---
    > 
        .auth("bindMembers",true).expr("administrators")
    >     .json('${one}')
    >     .mkdir('/content/admin-users/${two}')
    diff -b -B -r ./documentation/bundles/sling-pipes.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-pipes.html
    95c95
    < 

    Introduction

    --- >

    Introduction

    97c97 <
        searching for resources with type "foo/bar" and setting property id to 3
    ---
    > 
        searching for resources with type "foo/bar" and setting property id to 3
    101c101
    < 
        plumber.newPipe(resolver).$("[sling:resourceType='foo/bar']").write("id",3).build("/etc/demo")
    ---
    > 
        plumber.newPipe(resolver).$("[sling:resourceType='foo/bar']").write("id",3).build("/etc/demo")
    103,104c103,104
    < 

    this is enough to persist a pipe in /etc/demo that is executable as http, java, groovy console script, or JMX. You can make it monitor it with JMX, logs, http, you'll have dry run possibility of that execution for example, or asynchronous execution. You could also use a pipe to create a java-free json or csv servlet, or a list component whose list possibilities are pipes accessed through the PipeModel

    <

    What is a pipe

    --- >

    this is enough to persist a pipe in /etc/demo that is executable as http, java, groovy console script, or JMX. You can make it monitor it with JMX, logs, http, you'll have dry run possibility of that execution for example, or asynchronous execution. You could also use a pipe to create a java-free json or csv servlet, or a list component whose list possibilities are pipes accessed through the PipeModel

    >

    What is a pipe

    119c119 <

    Get Started

    --- >

    Get Started

    127,128c127,128 <

    Once you've successfully run your first try, you can get into more complicated configuration, making them dynamics with bindings and have a look at some other samples

    <

    Compatibility

    --- >

    Once you've successfully run your first try, you can get into more complicated configuration, making them dynamics with bindings and have a look at some other samples

    >

    Compatibility

    diff -b -B -r ./documentation/bundles/sling-query/basic-ideas.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/basic-ideas.html 96c96 <

    Collections

    --- >

    Collections

    103c103 <

    Operations

    --- >

    Operations

    116c116 <

    Laziness

    --- >

    Laziness

    121c121 <

    Immutability

    --- >

    Immutability

    128c128 <

    Selectors

    --- >

    Selectors

    130c130 <
    "cq:Page"
    ---
    > 
    "cq:Page"
    133c133
    < 
    $(resource).children("cq:Page")
    ---
    > 
    $(resource).children("cq:Page")
    136c136
    < 
    $(resource).children("cq:Page[jcr:title=Some title][jcr:description=Some desc]")
    ---
    > 
    $(resource).children("cq:Page[jcr:title=Some title][jcr:description=Some desc]")
    139c139
    < 
    $(resource).children("cq:Page[jcr:content/cq:template=my/template]:even")
    ---
    > 
    $(resource).children("cq:Page[jcr:content/cq:template=my/template]:even")
    142,147c142,147
    < 

    All parts of the selector are optional. In fact, an empty string ("") is a valid selector, accepting all resources. However, the defined order (resource type, attributes in square brackets and modifiers) has to be followed. Example selectors:

    <
    "foundation/components/richtext" // resource type
    < "foundation/components/richtext:first" // resource type with modifier
    < "[property=value][property2=value2]" // two attributes
    < ":even" // modifier
    < ":even:not(:first)" // two modifiers, the second one is nested
    ---
    > 

    All parts of the selector are optional. In fact, an empty string ("") is a valid selector, accepting all resources. However, the defined order (resource type, attributes in square brackets and modifiers) has to be followed. Example selectors:

    >
    "foundation/components/richtext" // resource type
    > "foundation/components/richtext:first" // resource type with modifier
    > "[property=value][property2=value2]" // two attributes
    > ":even" // modifier
    > ":even:not(:first)" // two modifiers, the second one is nested
    diff -b -B -r ./documentation/bundles/sling-query/examples.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/examples.html
    96,97c96,97
    < 

    Get containing page (like PageManager#getContainingPage)

    <
    $(resource).closest("cq:Page")
    ---
    > 

    Get containing page (like [PageManager#getContainingPage](https://docs.adobe.com/docs/en/aem/6-3/develop/ref/javadoc/com/day/cq/wcm/api/PageManager.html#getContainingPage(org.apache.sling.api.resource.Resource)))

    >
    $(resource).closest("cq:Page")
    100c100
    < 
    $(resource).closest("cq:Page[jcr:content/cq:template=/apps/geometrixx/templates/homepage]")
    ---
    > 
    $(resource).closest("cq:Page[jcr:content/cq:template=/apps/geometrixx/templates/homepage]")
    103c103
    < 
    $(resource).closest("cq:Page").siblings("cq:Page[jcr:content/hiddenInNav=false]")
    ---
    > 
    $(resource).closest("cq:Page").siblings("cq:Page[jcr:content/hiddenInNav=false]")
    106c106
    < 
    $(resource).closest("cq:Page").siblings("cq:Page").first()
    ---
    > 
    $(resource).closest("cq:Page").siblings("cq:Page").first()
    109c109
    < 
    $(resource).parents("cq:Page").last()
    ---
    > 
    $(resource).parents("cq:Page").last()
    112c112
    < 
    $(resource1, resource2, resource3).children(":eq(1)")
    ---
    > 
    $(resource1, resource2, resource3).children(":eq(1)")
    115c115
    < 
    $(resource1, resource2, resource3).children(":lt(2)")
    ---
    > 
    $(resource1, resource2, resource3).children(":lt(2)")
    118c118
    < 
    $(resource).closest("cq:Page foundation/components/parsys:parent")
    ---
    > 
    $(resource).closest("cq:Page foundation/components/parsys:parent")
    121c121
    < 
    Iterable<Page> breadcrumbs = $(resource).parents("cq:Page").map(Page.class);
    ---
    > 
    Iterable<Page> breadcrumbs = $(resource).parents("cq:Page").map(Page.class);
    126,127c126,127
    <     "cq:Page[jcr:content/cq:template=/apps/geometrixx/templates/homepage]",
    <     "cq:Page").map(Page.class);
    ---
    >     "cq:Page[jcr:content/cq:template=/apps/geometrixx/templates/homepage]",
    >     "cq:Page").map(Page.class);
    130c130
    < 
    $(resource).children("cq:Page").children("cq:Page").has("foundation/components/parsys:empty)
    ---
    > 
    $(resource).children("cq:Page").children("cq:Page").has("foundation/components/parsys:empty)
    135c135
    <     .find("cq:PageContent[cq:template=/apps/geometrixx/templates/homepage]")
    ---
    >     .find("cq:PageContent[cq:template=/apps/geometrixx/templates/homepage]")
    139c139
    < 
    $(resource).children("#en, #de")
    ---
    > 
    $(resource).children("#en, #de")
    diff -b -B -r ./documentation/bundles/sling-query/hierarchy-operators.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/hierarchy-operators.html
    96c96
    < 

    Child operator (parent > child)

    --- >

    Child operator (parent > child)

    99c99 < $(resource).find('foundation/components/parsys > foundation/components/richtext') --- > $(resource).find('foundation/components/parsys > foundation/components/richtext') 101c101 < $(resource).find('foundation/components/parsys').children('foundation/components/richtext') --- > $(resource).find('foundation/components/parsys').children('foundation/components/richtext') 103c103 <

    Descendant operator (ancestor descendant)

    --- >

    Descendant operator (ancestor descendant)

    106c106 < $(resource).children('cq:Page [someAttribute]') --- > $(resource).children('cq:Page [someAttribute]') 108c108 < $(resource).children('cq:Page').find('[someAttribute]') --- > $(resource).children('cq:Page').find('[someAttribute]') 110c110 <

    Next adjacent operator (prev + next)

    --- >

    Next adjacent operator (prev + next)

    113c113 < $(resource).closest('cq:Page + cq:Page') --- > $(resource).closest('cq:Page + cq:Page') 115c115 < $(resource).closest('cq:Page').next('cq:Page') --- > $(resource).closest('cq:Page').next('cq:Page') 117c117 <

    Next siblings operator (prev ~ siblings)

    --- >

    Next siblings operator (prev ~ siblings)

    120c120 < $(resource).closest('cq:Page ~ cq:Page') --- > $(resource).closest('cq:Page ~ cq:Page') 122c122 < $(resource).closest('cq:Page').nextAll('cq:Page') --- > $(resource).closest('cq:Page').nextAll('cq:Page') diff -b -B -r ./documentation/bundles/sling-query/methods.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/methods.html 96c96 <

    $(Resource... resources)

    --- >

    $(Resource... resources)

    100c100 <

    .add(Resource... resources)

    --- >

    .add(Resource... resources)

    104c104 <

    .asList()

    --- >

    .asList()

    106c106 <
    $(resource).children("cq:Page").asList().get(0); // get the first child page
    ---
    > 
    $(resource).children("cq:Page").asList().get(0); // get the first child page
    109c109
    < 

    .children([selector])

    --- >

    .children([selector])

    111c111 <
    $(resource).children("cq:Page"); // get all page children of the resource
    ---
    > 
    $(resource).children("cq:Page"); // get all page children of the resource
    114c114
    < 

    .closest(selector)

    --- >

    .closest(selector)

    116,118c116,118 <
    $(resource).closest("cq:Page"); // find containing page, like PageManager#getContainingPage
    < // let's assume that someCqPageResource is a cq:Page
    < $(someCqPageResource).closest("cq:Page"); // return the same resource
    ---
    > 
    $(resource).closest("cq:Page"); // find containing page, like PageManager#getContainingPage
    > // let's assume that someCqPageResource is a cq:Page
    > $(someCqPageResource).closest("cq:Page"); // return the same resource
    120c120
    < 

    .eq(index)

    --- >

    .eq(index)

    125c125 <

    .filter(selector)

    --- >

    .filter(selector)

    131c131 < SlingQuery query = $(resource).children("cq:Page").filter(new Predicate<Resource>() { --- > SlingQuery query = $(resource).children("cq:Page").filter(new Predicate<Resource>() { 138c138 <

    .find([selector])

    --- >

    .find([selector])

    140c140 <
    $(resource).find("cq:Page"); // find all descendant pages
    ---
    > 
    $(resource).find("cq:Page"); // find all descendant pages
    142c142
    < 

    .first()

    --- >

    .first()

    146c146 <

    .has(selector)

    --- >

    .has(selector)

    148c148 <
    $(...).children('cq:Page').has(foundation/components/richtext) // find children pages containing some richtext component
    ---
    > 
    $(...).children('cq:Page').has(foundation/components/richtext) // find children pages containing some richtext component
    151c151
    < 

    .last()

    --- >

    .last()

    155c155 <

    .map(Class<T> clazz)

    --- >

    .map(Class clazz)

    157c157 <
    for (Page page : $(resource).parents("cq:Page").map(Page.class)) {
    ---
    > 
    for (Page page : $(resource).parents("cq:Page").map(Page.class)) {
    161c161
    < 

    .next([selector])

    --- >

    .next([selector])

    163c163 <
    // let's assume that resource have 3 children: child1, child2 and child3
    ---
    > 
    // let's assume that resource have 3 children: child1, child2 and child3
    166c166
    < 

    .nextAll([selector])

    --- >

    .nextAll([selector])

    168c168 <
    // let's assume that resource have 3 children: child1, child2 and child3
    ---
    > 
    // let's assume that resource have 3 children: child1, child2 and child3
    171c171
    < 

    .nextUntil(selector)

    --- >

    .nextUntil(selector)

    173c173 <
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    ---
    > 
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    175c175
    < $(resource).children().first().nextUntil("[jcr:title=Page]"); // return child2 and child3
    ---
    > $(resource).children().first().nextUntil("[jcr:title=Page]"); // return child2 and child3
    177c177
    < 

    .not(selector)

    --- >

    .not(selector)

    179,180c179,180 <
    $(resource).children().not("cq:Page"); // remove all cq:Pages from the collection
    < $(resource).children().not(":first").not(":last"); // remove the first and the last element of the collection
    ---
    > 
    $(resource).children().not("cq:Page"); // remove all cq:Pages from the collection
    > $(resource).children().not(":first").not(":last"); // remove the first and the last element of the collection
    182c182
    < 

    .parent()

    --- >

    .parent()

    184c184 <
    $(resource).find("cq:PageContent[jcr:title=My page]:first").parent(); // find the parent of the first `cq:PageContent` resource with given attribute in the subtree
    ---
    > 
    $(resource).find("cq:PageContent[jcr:title=My page]:first").parent(); // find the parent of the first `cq:PageContent` resource with given attribute in the subtree
    186c186
    < 

    .parents([selector])

    --- >

    .parents([selector])

    188c188 <
    ($resource).parents("cq:Page"); // create page breadcrumbs for the given resources
    ---
    > 
    ($resource).parents("cq:Page"); // create page breadcrumbs for the given resources
    190c190
    < 

    .parentsUntil(selector)

    --- >

    .parentsUntil(selector)

    192c192 <
    ($currentResource).parentsUntil("cq:Page"); // find all ancestor components on the current page
    ---
    > 
    ($currentResource).parentsUntil("cq:Page"); // find all ancestor components on the current page
    194c194
    < 

    .prev([selector])

    --- >

    .prev([selector])

    196c196 <
    // let's assume that resource have 3 children: child1, child2 and child3
    ---
    > 
    // let's assume that resource have 3 children: child1, child2 and child3
    199c199
    < 

    .prevAll([selector])

    --- >

    .prevAll([selector])

    201c201 <
    // let's assume that resource have 3 children: child1, child2 and child3
    ---
    > 
    // let's assume that resource have 3 children: child1, child2 and child3
    204c204
    < 

    .prevUntil(selector)

    --- >

    .prevUntil(selector)

    206c206 <
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    ---
    > 
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    208c208
    < $(resource).children().last().prevUntil("[jcr:title=Page]"); // return child2 and child3
    ---
    > $(resource).children().last().prevUntil("[jcr:title=Page]"); // return child2 and child3
    210c210
    < 

    .searchStrategy(strategy)

    --- >

    .searchStrategy(strategy)

    218c218 <

    .siblings([selector])

    --- >

    .siblings([selector])

    220c220 <
    $(resource).closest("cq:Page").siblings("cq:Page"); // return all sibling pages
    ---
    > 
    $(resource).closest("cq:Page").siblings("cq:Page"); // return all sibling pages
    222c222
    < 

    .slice(from[, to])

    --- >

    .slice(from[, to])

    224c224 <
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    ---
    > 
    // let's assume that resource have 4 children: child1, child2, child3 and child4
    diff -b -B -r ./documentation/bundles/sling-query/modifiers.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/modifiers.html
    96c96
    < 

    :eq(index)

    --- >

    :eq(index)

    98c98 <
    $(...).find("foundation/components/richtext:eq(2)"); // find the third richtext in the subtree
    ---
    > 
    $(...).find("foundation/components/richtext:eq(2)"); // find the third richtext in the subtree
    100c100
    < 

    :even

    --- >

    :even

    102c102 <
    $(...).children("cq:Page:even"); // get even children pages for each resource in the collection
    ---
    > 
    $(...).children("cq:Page:even"); // get even children pages for each resource in the collection
    104c104
    < 

    :first

    --- >

    :first

    106c106 <
    $(...).find("foundation/components/richtext:first"); // find the first richtext in the subtree
    ---
    > 
    $(...).find("foundation/components/richtext:first"); // find the first richtext in the subtree
    108c108
    < 

    :gt(index)

    --- >

    :gt(index)

    110c110 <
    $(...).children("cq:Page:gt(2)"); // filter out first 3 pages
    ---
    > 
    $(...).children("cq:Page:gt(2)"); // filter out first 3 pages
    112c112
    < 

    :has(selector)

    --- >

    :has(selector)

    114c114 <
    $(...).children("cq:Page:has(foundation/components/richtext)]"); // get children pages containing richtext component
    ---
    > 
    $(...).children("cq:Page:has(foundation/components/richtext)]"); // get children pages containing richtext component
    116c116
    < 

    :last

    --- >

    :last

    118c118 <
    $(...).find("foundation/components/richtext:last"); // find the last richtext in the subtree
    ---
    > 
    $(...).find("foundation/components/richtext:last"); // find the last richtext in the subtree
    120c120
    < 

    :lt(index)

    --- >

    :lt(index)

    122c122 <
    $(...).children("cq:Page:lt(3)"); // get first 3 matches
    ---
    > 
    $(...).children("cq:Page:lt(3)"); // get first 3 matches
    124c124
    < 

    :not(selector)

    --- >

    :not(selector)

    126c126 <
    $(...).find(":not(:parent)"); // ancestor resources that doesn't contain any children
    ---
    > 
    $(...).find(":not(:parent)"); // ancestor resources that doesn't contain any children
    128c128
    < 

    :odd

    --- >

    :odd

    130c130 <
    $(...).children("cq:Page:odd"); // get odd children pages for each resource in the collection
    ---
    > 
    $(...).children("cq:Page:odd"); // get odd children pages for each resource in the collection
    132c132
    < 

    :parent

    --- >

    :parent

    134c134 <
    $(...).children(":parent]"); // get children resources containing any resource
    ---
    > 
    $(...).children(":parent]"); // get children resources containing any resource
    diff -b -B -r ./documentation/bundles/sling-query/operators.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/operators.html
    96c96
    < 

    Contains [name*=value]

    --- >

    Contains [name*=value]

    98,99c98,99 <
    // select children pages titled 'foo', 'foo bar', 'bar foo bar', 'foofoofoo', etc.
    < $(resources).children("cq:Page[jcr:content/jcr:title*=foo]")
    ---
    > 
    // select children pages titled 'foo', 'foo bar', 'bar foo bar', 'foofoofoo', etc.
    > $(resources).children("cq:Page[jcr:content/jcr:title*=foo]")
    101c101
    < 

    Contains a word [name~=value]

    --- >

    Contains a word [name~=value]

    103,104c103,104 <
    // select children pages titled 'foo', 'foo bar', 'bar foo bar', but not 'foofoofoo'
    < $(resources).children("cq:Page[jcr:content/jcr:title~=foo]")
    ---
    > 
    // select children pages titled 'foo', 'foo bar', 'bar foo bar', but not 'foofoofoo'
    > $(resources).children("cq:Page[jcr:content/jcr:title~=foo]")
    106c106
    < 

    Ends with [name$=value]

    --- >

    Ends with [name$=value]

    108,109c108,109 <
    // select children pages titled 'foo', 'bar foo', etc.
    < $(resources).children("cq:Page[jcr:content/jcr:title$=foo]")
    ---
    > 
    // select children pages titled 'foo', 'bar foo', etc.
    > $(resources).children("cq:Page[jcr:content/jcr:title$=foo]")
    111c111
    < 

    Equals [name=value]

    --- >

    Equals [name=value]

    113c113 <
    $(resources).children("cq:Page[jcr:content/jcr:title=foo]")
    ---
    > 
    $(resources).children("cq:Page[jcr:content/jcr:title=foo]")
    115c115
    < 

    Not equal [name!=value]

    --- >

    Not equal [name!=value]

    117c117 <
    $(resources).children("cq:Page[jcr:content/jcr:title!=foo]")
    ---
    > 
    $(resources).children("cq:Page[jcr:content/jcr:title!=foo]")
    119c119
    < 

    Starts with [name^=value]

    --- >

    Starts with [name^=value]

    121,122c121,122 <
    // select children pages titled 'foo', 'foo bar', etc.
    < $(resources).children("cq:Page[jcr:content/jcr:title^=foo]")
    ---
    > 
    // select children pages titled 'foo', 'foo bar', etc.
    > $(resources).children("cq:Page[jcr:content/jcr:title^=foo]")
    124c124
    < 

    Has attribute [name]

    --- >

    Has attribute [name]

    126c126 <
    $(resources).find("[markerProperty]")
    ---
    > 
    $(resources).find("[markerProperty]")
    diff -b -B -r ./documentation/bundles/sling-query/selectors.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/selectors.html
    97c97
    < 

    Syntax

    --- >

    Syntax

    99c99 <

    Resource type

    --- >

    Resource type

    101c101 <

    Resource name

    --- >

    Resource name

    103c103 <
    $(resource).children("cq:Page#some-name")
    ---
    > 
    $(resource).children("cq:Page#some-name")
    106c106
    < 
    $(resource).children("#'jcr:content'[jcr:title=My title]")
    ---
    > 
    $(resource).children("#'jcr:content'[jcr:title=My title]")
    108c108
    < 

    Attributes

    --- >

    Attributes

    110c110 <
    $(resource).children("cq:Page[jcr:content/jcr:title=My title]")
    ---
    > 
    $(resource).children("cq:Page[jcr:content/jcr:title=My title]")
    113c113
    < 
    $(resource).children("cq:Page[jcr:content/jcr:title*=title]")
    ---
    > 
    $(resource).children("cq:Page[jcr:content/jcr:title*=title]")
    116c116
    < 

    Modifiers

    --- >

    Modifiers

    118,120c118,120 <
    $(resource).children("cq:Page:first");
    < $(resource).children("cq:Page:eq(0)"); // the same
    < $(resource).children(":first"); // modifier can be used alone
    ---
    > 
    $(resource).children("cq:Page:first");
    > $(resource).children("cq:Page:eq(0)"); // the same
    > $(resource).children(":first"); // modifier can be used alone
    126c126
    < 
    $(resource1, resource2).children(":first");
    ---
    > 
    $(resource1, resource2).children(":first");
    130c130
    < 

    Joining selectors

    --- >

    Joining selectors

    132c132 <
    $(resource).children("cq:Page foundation/components/parsys > foundation/components/richtext")
    ---
    > 
    $(resource).children("cq:Page foundation/components/parsys > foundation/components/richtext")
    135c135
    < 

    Combining selectors

    --- >

    Combining selectors

    137c137 <
    $(resource).children("#en, #de, #fr"); // return all direct children named `en` or `de` or `fr`.
    ---
    > 
    $(resource).children("#en, #de, #fr"); // return all direct children named `en` or `de` or `fr`.
    diff -b -B -r ./documentation/bundles/sling-query/vs-jcr.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query/vs-jcr.html
    102,104c102,104
    <     Description 
    <     JCR query 
    <     SlingQuery 
    ---
    >       Description 
    >       JCR query 
    >       SlingQuery 
    109,111c109,111
    <     You have a complex logic using Sling Resource API 
    <     (-) 
    <     Yes! 
    ---
    >       You have a complex logic using Sling Resource API 
    >       (-) 
    >       Yes! 
    114,116c114,116
    <     You want to find resource ancestor 
    <     (-) 
    <     Yes! 
    ---
    >       You want to find resource ancestor 
    >       (-) 
    >       Yes! 
    119,121c119,121
    <     You want to find all descendants with given attribute 
    <     Yes! 
    <     (-) 
    ---
    >       You want to find all descendants with given attribute 
    >       Yes! 
    >       (-) 
    124,126c124,126
    <     You want to find all descendants of given type 
    <     Yes! 
    <     (-) 
    ---
    >       You want to find all descendants of given type 
    >       Yes! 
    >       (-) 
    129,131c129,131
    <     You'd like to get ordered results 
    <     Yes! 
    <     (-) 
    ---
    >       You'd like to get ordered results 
    >       Yes! 
    >       (-) 
    diff -b -B -r ./documentation/bundles/sling-query.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-query.html
    95c95
    < 

    Introduction

    --- >

    Introduction

    99c99 < if (!resource.isResourceType("cq:Page")) { --- > if (!resource.isResourceType("cq:Page")) { 102,103c102,103 < Resource template = resource.getChild("jcr:content/cq:template"); < if (template != null && "my/template".equals(template.adaptTo(String.class))) { --- > Resource template = resource.getChild("jcr:content/cq:template"); > if (template != null && "my/template".equals(template.adaptTo(String.class))) { 108c108 < // we've found appropriate ancestor --- > // we've found appropriate ancestor 114c114 < $(resource).closest("cq:Page[jcr:content/cq:template=my/template]") --- > $(resource).closest("cq:Page[jcr:content/cq:template=my/template]") 118c118 <

    Features

    --- >

    Features

    126c126 <

    Installation

    --- >

    Installation

    134c134 <

    Documentation

    --- >

    Documentation

    143c143,144 < --- > > 147c148 <

    External resources

    --- >

    External resources

    diff -b -B -r ./documentation/bundles/sling-settings-org-apache-sling-settings.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/sling-settings-org-apache-sling-settings.html 96c96 <

    Overview

    --- >

    Overview

    101,103c101,103 < Method < Bundle Context Property < Description --- > Method > Bundle Context Property > Description 108,110c108,110 < String getSlingId() < (-) < A unique identifier of the running Sling instance. This value is created when Sling is first started and may be used to identify the instance, for example if multiple Sling instances are running on top of a Jackrabbit Repository Cluster --- > String getSlingId() > (-) > A unique identifier of the running Sling instance. This value is created when Sling is first started and may be used to identify the instance, for example if multiple Sling instances are running on top of a Jackrabbit Repository Cluster 113,115c113,115 < String getSlingHomePath() < sling.home < The absolute filesystem path to the directory where Sling stores all its content --- > String getSlingHomePath() > sling.home > The absolute filesystem path to the directory where Sling stores all its content 118,120c118,120 < URL getSlingHome() < sling.home.url < The Sling Home path as an java.net.URL instance --- > URL getSlingHome() > sling.home.url > The Sling Home path as an java.net.URL instance 123,125c123,125 < Set<String> getRunModes() < sling.run.modes < The active Run Modes of the running Sling instance --- > Set<String> getRunModes() > sling.run.modes > The active Run Modes of the running Sling instance 130c130 <

    Selecting the active run modes

    --- >

    Selecting the active run modes

    134c134 <

    Defining valid run modes

    --- >

    Defining valid run modes

    148c148 <

    The rules for determining the active run modes from the selected run mode (sling.run.modes) and the run mode options (sling.run.mode.install.options and sling.run.mode.options) are as follows :

    --- >

    The rules for determining the active run modes from the selected run mode (sling.run.modes) and the run mode options (sling.run.mode.install.options and sling.run.mode.options) are as follows :

    162c162 < Effectively active run modes --- > Effectively active run modes 168c168 < a,c --- > a,c 172c172 < a,c --- > a,c 176c176 < b,c --- > b,c 180c180 < a,c --- > a,c 184c184 < a,d --- > a,d 188c188 < a,e --- > a,e 193c193 <

    Getting the Run Modes of the Sling instance

    --- >

    Getting the Run Modes of the Sling instance

    198c198 < Set<String> expectedRunModes = new HashSet<String>(){{ add("foo");add("wii"); }}; --- > Set<String> expectedRunModes = new HashSet<String>(){{ add("foo");add("wii"); }}; diff -b -B -r ./documentation/bundles/subsystem-installer-factory.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/subsystem-installer-factory.html 95c95 <

    Subsystems

    --- >

    Subsystems

    97c97 <

    Project Info

    --- >

    Project Info

    diff -b -B -r ./documentation/bundles/validation.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/validation.html 97c97 <

    Prerequisites

    --- >

    Prerequisites

    104c104 <

    Basic Usage

    --- >

    Basic Usage

    123c123 < return !"resourcetype1".equals(resource.getResourceType()); --- > return !"resourcetype1".equals(resource.getResourceType()); 138c138 <

    ValidationResult

    --- >

    ValidationResult

    146,147c146,147 <

    Validation Model Resources

    <

    The ValidationModel is constructed from resources with the resourceType sling/validation/model. Those resources are considered validation model resources if they are located below the Sling ResourceResolver search paths (/apps and /libs).

    --- >

    Validation Model Resources

    >

    The ValidationModel is constructed from resources with the resourceType sling/validation/model. Those resources are considered validation model resources if they are located below the Sling ResourceResolver search paths (*/apps* and /libs).

    153,157c153,157 < Property or Resource < Type < Description < Mandatory < Example Value --- > Property or Resource > Type > Description > Mandatory > Example Value 163,167c163,167 < Property < String < Always sling/validation/model, otherwise model will never be picked up by Sling Validation. < yes < sling/validation/model --- > Property > String > Always sling/validation/model, otherwise model will never be picked up by Sling Validation. > yes > sling/validation/model 171,175c171,175 < Property < String < The resource type of the resource for which this validation model should be applied. Must always be relative to the resource resolver's search path (i.e. not start with a "/"). < yes < my/own/resourcetype --- > Property > String > The resource type of the resource for which this validation model should be applied. Must always be relative to the resource resolver's search path (i.e. not start with a "/"). > yes > my/own/resourcetype 179,183c179,183 < Property < String[] < Path prefixes which restrict the validation model to resources which are below one of the given prefixes. No wildcards are supported. If not given, there is no path restriction. If there are multiple validation models registered for the same resource type the one with the longest matching applicablePath is chosen. < no < /content/mysite --- > Property > String[] > Path prefixes which restrict the validation model to resources which are below one of the given prefixes. No wildcards are supported. If not given, there is no path restriction. If there are multiple validation models registered for the same resource type the one with the longest matching applicablePath is chosen. > no > /content/mysite 187,191c187,191 < Resource < n/a < This resource ensures that the property with the name <propertyName> is there. The resource name has no longer a meaning if the property nameRegex is set on this node. < no < n/a --- > Resource > n/a > This resource ensures that the property with the name <propertyName> is there. The resource name has no longer a meaning if the property nameRegex is set on this node. > no > n/a 195,199c195,199 < Property < Boolean < If true it is not an error if there is no property with the given <propertyName> or none matching the nameRegex. If not set or false the property must be there. < no < false --- > Property > Boolean > If true it is not an error if there is no property with the given <propertyName> or none matching the nameRegex. If not set or false the property must be there. > no > false 203,207c203,207 < Property < Boolean < If true only multivalue properties are allowed with the name <propertyName> or matching the nameRegex. If not set or false, multi- and single-value properties are accepted. < no < false --- > Property > Boolean > If true only multivalue properties are allowed with the name <propertyName> or matching the nameRegex. If not set or false, multi- and single-value properties are accepted. > no > false 211,215c211,215 < Property < String < If set the <propertyName> has no longer a meaning. Rather all properties which match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. < no < property[0-8] --- > Property > String > If set the <propertyName> has no longer a meaning. Rather all properties which match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. > no > property[0-8] 219,223c219,223 < Resource < n/a < The <validatorId> must be the id of a validator. The id is given by the OSGi service property validator.id set in the validator. Each validators node might have arbitrarily many child resources (one per validator). < no < n/a --- > Resource > n/a > The <validatorId> must be the id of a validator. The id is given by the OSGi service property validator.id set in the validator. Each validators node might have arbitrarily many child resources (one per validator). > no > n/a 227,231c227,231 < Property < String[] < The parametrization for the validator with the id <validatorId>. Each value must have the pattern key=value. The parametrization differs per validator. < no < regex=^[a-z]*$ --- > Property > String[] > The parametrization for the validator with the id <validatorId>. Each value must have the pattern key=value. The parametrization differs per validator. > no > regex=^[a-z]*$ 235,239c235,239 < Property < Integer < The severity which should be set on all emitted validation failures by this validator. < no < 0 --- > Property > Integer > The severity which should be set on all emitted validation failures by this validator. > no > 0 243,247c243,247 < Resource < n/a < This resource ensures that the resource with the name <resourceName> is there. The resource name has no longer a meaning if the property nameRegex is set on this node. < no < n/a --- > Resource > n/a > This resource ensures that the resource with the name <resourceName> is there. The resource name has no longer a meaning if the property nameRegex is set on this node. > no > n/a 251,255c251,255 < Property < String < If set the <resourceName> has no longer a meaning. Rather all resources whose name match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. < no < child[1-9] --- > Property > String > If set the <resourceName> has no longer a meaning. Rather all resources whose name match the given regular expression are considered. At least one match is required, otherwise the validated resource/valuemap is considered invalid. > no > child[1-9] 259,263c259,263 < Property < Boolean < If true it is not an error if there is no resource with the given <resourceName> or none matching the nameRegex. If not set or false the resource must be there. < no < false --- > Property > Boolean > If true it is not an error if there is no resource with the given <resourceName> or none matching the nameRegex. If not set or false the resource must be there. > no > false 267,271c267,271 < Resource < n/a < The properties can be configured on the child level in the same way as on the root level. < no < n/a --- > Resource > n/a > The properties can be configured on the child level in the same way as on the root level. > no > n/a 275c275 <

    Validation Model Inheritance

    --- >

    Validation Model Inheritance

    277c277 <

    Precedence of Validation Models

    --- >

    Precedence of Validation Models

    279,280c279,280 <

    Usage in Sling Models

    <

    Since Sling Models 1.2.0

    --- >

    Usage in Sling Models

    >

    Since Sling Models 1.2.0

    282c282 <

    Before Sling Models 1.2.0

    --- >

    Before Sling Models 1.2.0

    295c295 < LOG.warn("No validation defined for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType()); --- > LOG.warn("No validation defined for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType()); 304c304 < LOG.warn("Invalid validation model for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType()); --- > LOG.warn("Invalid validation model for resource '{}' with type '{}'", resource.getPath(), resource.getResourceType()); 308c308 <

    Validators

    --- >

    Validators

    313,315c313,315 < Description < Parameters < Since --- > Description > Parameters > Since 321,323c321,323 < Validates that a property value matches a given regular expression < regex, mandatory parameter giving a regular expression according to the pattern described in java.util.regex.Pattern. Only if the property value matches this expression it is considered valid. < 1.0.0 --- > Validates that a property value matches a given regular expression > regex, mandatory parameter giving a regular expression according to the pattern described in java.util.regex.Pattern. Only if the property value matches this expression it is considered valid. > 1.0.0 327c327 <

    Writing Validators

    --- >

    Writing Validators

    331c331 <

    References

    --- >

    References

    diff -b -B -r ./documentation/bundles/web-console-extensions.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles/web-console-extensions.html 99c99 <

    Branding (org.apache.sling.extensions.webconsolebranding)

    --- >

    Branding (org.apache.sling.extensions.webconsolebranding)

    102c102 <

    Security Provider (org.apache.sling.extensions.webconsolesecurityprovider)

    --- >

    Security Provider (org.apache.sling.extensions.webconsolesecurityprovider)

    110c110 <

    Configuration

    --- >

    Configuration

    115,118c115,118 < Property < Type < Default Value < Description --- > Property > Type > Default Value > Description 123,126c123,126 < users < String, String[] or Vector<String> < admin < The list of users granted access to the Web Console --- > users > String, String[] or Vector<String> > admin > The list of users granted access to the Web Console 129,132c129,132 < groups < String, String[] or Vector<String> < (---) < The list of groups whose (direct or indirect) members are granted access to the Web Console --- > groups > String, String[] or Vector<String> > (---) > The list of groups whose (direct or indirect) members are granted access to the Web Console 137c137 <

    Authentication Handling

    --- >

    Authentication Handling

    diff -b -B -r ./documentation/bundles.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/bundles.html 94c94 <

    Bundles and Git repositories

    --- >

    Bundles and Git repositories

    97c97 <

    Content

    --- >

    Content

    107c107 <

    Resource Providers

    --- >

    Resource Providers

    114c114 <

    Users, Groups, Access, Permissions, ACLs on Resources

    --- >

    Users, Groups, Access, Permissions, ACLs on Resources

    121c121 <

    OSGi Installer

    --- >

    OSGi Installer

    130c130 <

    Development and Utilities

    --- >

    Development and Utilities

    148c148 <

    Content Presentation and Rendering

    --- >

    Content Presentation and Rendering

    156c156 <

    Troubleshooting

    --- >

    Troubleshooting

    161c161 <

    Misc

    --- >

    Misc

    diff -b -B -r ./documentation/configuration.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/configuration.html 92c92 <

    Introduction

    --- >

    Introduction

    102c102,103 < --- > > 107c108 <

    Initial Configuration

    --- >

    Initial Configuration

    124c125,126 < --- > > 130c132 <

    Standalone Application

    --- >

    Standalone Application

    137,139c139,141 < Argument < Sling property < Description --- > Argument > Sling property > Description 144,146c146,148 < -l loglevel < org.apache.sling.osgi.log.level < The initial loglevel (0..4, FATAL, ERROR, WARN, INFO, DEBUG) --- > -l loglevel > org.apache.sling.osgi.log.level > The initial loglevel (0..4, FATAL, ERROR, WARN, INFO, DEBUG) 149,151c151,153 < -f logfile < org.apache.sling.osgi.log.file < The log file, "-" for stdout --- > -f logfile > org.apache.sling.osgi.log.file > The log file, "-" for stdout 154,171c156,158 < -c slinghome < sling.home < the sling context directory < < < -a address < -- < the interfact to bind to (use 0.0.0.0 for any) (not supported yet) < < < -p port < org.osgi.service.http.port < the port to listen to (default 8080) < < < -h < -- < Prints a simple usage message and exits. --- > -c slinghome > sling.home > the sling context directory 174a162 >

    | -a address | -- | the interfact to bind to (use 0.0.0.0 for any) (not supported yet) | | -p port | org.osgi.service.http.port | the port to listen to (default 8080) | | -h | -- | Prints a simple usage message and exits. |

    176c164 <

    Web Application

    --- >

    Web Application

    180c168 <

    Property File Inclusions

    --- >

    Property File Inclusions

    195c183 <

    OSGi Boot Delegation Support

    --- >

    OSGi Boot Delegation Support

    207,208c195,196 < Configuration < Description --- > Configuration > Description 213,214c201,202 < sling.bootdelegation.simple = com.some.package < This setting unconditionally adds the com.some.package package to the org.osgi.framework.bootdelegation property --- > sling.bootdelegation.simple = com.some.package > This setting unconditionally adds the com.some.package package to the org.osgi.framework.bootdelegation property 217,218c205,206 < sling.bootdelegation.class.com.some.other.Main = com.some.other < This setting checks whether the com.some.other.Main class is known. If so, the com.some.other package is added to the org.osgi.framework.bootdelegation property. Otherwise the com.some.other package is not added - and therefore must be exported by a bundle if required for use inside the framework. --- > sling.bootdelegation.class.com.some.other.Main = com.some.other > This setting checks whether the com.some.other.Main class is known. If so, the com.some.other package is added to the org.osgi.framework.bootdelegation property. Otherwise the com.some.other package is not added - and therefore must be exported by a bundle if required for use inside the framework. 223c211 <

    OSGi System Packages Support

    --- >

    OSGi System Packages Support

    229,230c217,218 < Configuration < Description --- > Configuration > Description 235,236c223,224 < sling.system.packages.simple = com.some.package < This setting unconditionally adds the com.some.package package to the org.osgi.framework.system.packages property --- > sling.system.packages.simple = com.some.package > This setting unconditionally adds the com.some.package package to the org.osgi.framework.system.packages property 239,240c227,228 < sling.system.packages.class.com.some.other.Main = com.some.other < This setting checks whether the com.some.other.Main class is known. If so, the com.some.other package is added to the org.osgi.framework.system.packages property. Otherwise the com.some.other package is not added - and therefore must be exported by a bundle if required for use inside the framework. --- > sling.system.packages.class.com.some.other.Main = com.some.other > This setting checks whether the com.some.other.Main class is known. If so, the com.some.other package is added to the org.osgi.framework.system.packages property. Otherwise the com.some.other package is not added - and therefore must be exported by a bundle if required for use inside the framework. 245c233 <

    Recommendations for property names

    --- >

    Recommendations for property names

    257c245 <

    Well Known Properties

    --- >

    Well Known Properties

    262,263c250,251 < Property < Description --- > Property > Description 268,269c256,257 < sling.home < Defines the file system location where Project Sling will write copies of the initial configuration. This property should also be used to define other local file system locations such as the directory to use for the Apache Felix Bundle Cache (${sling.home}/felix by default). If this property is not set it defaults to ${user.dir}/sling. --- > sling.home > Defines the file system location where Project Sling will write copies of the initial configuration. This property should also be used to define other local file system locations such as the directory to use for the Apache Felix Bundle Cache (${sling.home}/felix by default). If this property is not set it defaults to ${user.dir}/sling. 272,273c260,261 < sling.home.url < Contains the Sling directory set in the sling.home property as a valid URL. This property may be used in situations where the Sling directory is required as an URL. This property is automatically set by the Sling application and may not be modified by configuration files. --- > sling.home.url > Contains the Sling directory set in the sling.home property as a valid URL. This property may be used in situations where the Sling directory is required as an URL. This property is automatically set by the Sling application and may not be modified by configuration files. 276,277c264,265 < sling.ignoreSystemProperties < Whether to overwrite any configuration properties with Java system properties or not. By default this property is set to true by the Sling Servlet but not set by the Sling main class. The reason to set this by default in the Sling Servlet is to not induce values from the environment, which may not be appropriate in the Web Application case. --- > sling.ignoreSystemProperties > Whether to overwrite any configuration properties with Java system properties or not. By default this property is set to true by the Sling Servlet but not set by the Sling main class. The reason to set this by default in the Sling Servlet is to not induce values from the environment, which may not be appropriate in the Web Application case. 280,281c268,269 < obr.repository.url < A comma-separated list of OSGi Bundle Repository URLs. See sling.properties on the page the Sling Launchpad. --- > obr.repository.url > A comma-separated list of OSGi Bundle Repository URLs. See sling.properties on the page the Sling Launchpad. 284,285c272,273 < org.apache.sling.commons.log.* < Properties providing initial configuration to the Sling Log Service. See sling.properties on the page the Sling Launchpad. --- > org.apache.sling.commons.log.* > Properties providing initial configuration to the Sling Log Service. See sling.properties on the page the Sling Launchpad. 289c277 <

    Configuration Admin Service

    --- >

    Configuration Admin Service

    diff -b -B -r ./documentation/development/client-request-logging.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/client-request-logging.html 99c99 <

    Traditional access.log and request.log Files

    --- >

    Traditional access.log and request.log Files

    105,108c105,108 < Parameter < Name < Default < Description --- > Parameter > Name > Default > Description 113,116c113,116 < Request Log Name < request.log.output < logs/request.log < Name of the destination for the request log. The request log logs the entry and exit of each request into and out of the system together with the entry time, exit time, time to process the request, a request counter as well as the final status code and response content type. In terms of Request Logger Service formats, request entry is logged with the format %t \[%R\] \-> %m %U%q %H and request exit is logged with the format %\{end}t \[%R] <\- %s %\{Content-Type}o %Dms (See Log Format Specification below for the specification of the format). --- > Request Log Name > request.log.output > logs/request.log > Name of the destination for the request log. The request log logs the entry and exit of each request into and out of the system together with the entry time, exit time, time to process the request, a request counter as well as the final status code and response content type. In terms of Request Logger Service formats, request entry is logged with the format %t \[%R\] \-> %m %U%q %H and request exit is logged with the format %\{end}t \[%R] <\- %s %\{Content-Type}o %Dms (See Log Format Specification below for the specification of the format). 119,122c119,122 < Request Log Type < request.log.outputtype < Logger Name < Type of Logger named with the Logger Name parameter. See Log Output below --- > Request Log Type > request.log.outputtype > Logger Name > Type of Logger named with the Logger Name parameter. See Log Output below 125,128c125,128 < Enable Request Log < request.log.enabled < true < Whether to enable Request logging or not. --- > Enable Request Log > request.log.enabled > true > Whether to enable Request logging or not. 131,134c131,134 < Access Log Name < access.log.output < logs/access.log < Name of the destination for the access log. The access log writes an entry for each request as the request terminates using the NCSA extended/combined log format. In terms of Request Logger Service formats the access log is written with the format %h %l %u %t "%r" %>s %b "%\{Referer}i" "%\{User-Agent}i" (See Log Format Specification below for the specification of the format). --- > Access Log Name > access.log.output > logs/access.log > Name of the destination for the access log. The access log writes an entry for each request as the request terminates using the NCSA extended/combined log format. In terms of Request Logger Service formats the access log is written with the format %h %l %u %t "%r" %>s %b "%\{Referer}i" "%\{User-Agent}i" (See Log Format Specification below for the specification of the format). 137,140c137,140 < Access Log Type < access.log.outputtype < Logger Name < Type of Logger named with the Logger Name parameter. See Log Output below --- > Access Log Type > access.log.outputtype > Logger Name > Type of Logger named with the Logger Name parameter. See Log Output below 143,146c143,146 < Enable Access Log < access.log.enabled < true < Whether to enable Access logging or not. --- > Enable Access Log > access.log.enabled > true > Whether to enable Access logging or not. 150c150 <

    Log Output

    --- >

    Log Output

    155,157c155,157 < Type Code < Type Name < Description and Logger Name interpretation --- > Type Code > Type Name > Description and Logger Name interpretation 162,164c162,164 < 0 < Logger Name < Writes the logging information to a named SLF4J Logger. The name of the Logger is defined in the Logger Name property. The actual destination of the log messages is defined the SLF4J configuration for the named logger --- > 0 > Logger Name > Writes the logging information to a named SLF4J Logger. The name of the Logger is defined in the Logger Name property. The actual destination of the log messages is defined the SLF4J configuration for the named logger 167,169c167,169 < 1 < File Name < Writes the logging information to a file, on message per line. The file name is an absolute or relative path name. If the name is relative, it is resolved against the sling.home framework property. --- > 1 > File Name > Writes the logging information to a file, on message per line. The file name is an absolute or relative path name. If the name is relative, it is resolved against the sling.home framework property. 172,174c172,174 < 2 < RequestLog Service < Sends the logging information to a org.apache.sling.engine.RequestLog service whose requestlog.name service registration property must the same as the value of the Logger Name property. If more than one such service is registered, all services are called. If no such service is registered, the logging information is discarded. Using RequestLog Services is deprecated. --- > 2 > RequestLog Service > Sends the logging information to a org.apache.sling.engine.RequestLog service whose requestlog.name service registration property must the same as the value of the Logger Name property. If more than one such service is registered, all services are called. If no such service is registered, the logging information is discarded. Using RequestLog Services is deprecated. 179c179 <

    Additional per-request Loggers

    --- >

    Additional per-request Loggers

    185,188c185,188 < Parameter < Name < Default < Description --- > Parameter > Name > Default > Description 193,196c193,196 < Log Format < request.log.service.format <   < Specify a Log Format Specification as described below --- > Log Format > request.log.service.format >   > Specify a Log Format Specification as described below 199,202c199,202 < Logger Type < request.log.service.outputtype < Logger Name/0 < Type of Logger named with the Logger Name parameter. See Log Output above --- > Logger Type > request.log.service.outputtype > Logger Name/0 > Type of Logger named with the Logger Name parameter. See Log Output above 205,208c205,208 < Logger Name < request.log.service.output < request.log < Name of the Logger to be used. See Log Output above --- > Logger Name > request.log.service.output > request.log > Name of the Logger to be used. See Log Output above 211,214c211,214 < Request Entry < request.log.service.onentry < unchecked/false < Whether logger is called at the start of request processing or after processing the request --- > Request Entry > request.log.service.onentry > unchecked/false > Whether logger is called at the start of request processing or after processing the request 218c218 <

    Log Format Specification

    --- >

    Log Format Specification

    224,225c224,225 < Format String < Description --- > Format String > Description 230,231c230,231 < %% < The percent sign --- > %% > The percent sign 234,235c234,235 < %a < Remote IP-address --- > %a > Remote IP-address 238,239c238,239 < %A < Local IP-address --- > %A > Local IP-address 242,243c242,243 < %B < Size of response in bytes, excluding HTTP headers. --- > %B > Size of response in bytes, excluding HTTP headers. 246,247c246,247 < %b < Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent. --- > %b > Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent. 250,251c250,251 < %\{Foobar}C < The contents of cookie Foobar in the request sent to the server. --- > %\{Foobar}C > The contents of cookie Foobar in the request sent to the server. 254,255c254,255 < %D < The time taken to serve the request, in milliseconds. Please note that this deviates from the Apache httpd format. --- > %D > The time taken to serve the request, in milliseconds. Please note that this deviates from the Apache httpd format. 258c258 < %\{FOOBAR}e --- > %\{FOOBAR}e 262,263c262,263 < %f < The absolute path of the resolved resource --- > %f > The absolute path of the resolved resource 266,267c266,267 < %h < Remote host --- > %h > Remote host 270,271c270,271 < %H < The request protocol --- > %H > The request protocol 274,275c274,275 < %\{Foobar}i < The contents of Foobar: header line(s) in the request sent to the server. --- > %\{Foobar}i > The contents of Foobar: header line(s) in the request sent to the server. 278,279c278,279 < %k < Not supported in Sling; prints nothing. --- > %k > Not supported in Sling; prints nothing. 282,283c282,283 < %l < Not supported in Sling; prints nothing. --- > %l > Not supported in Sling; prints nothing. 286,287c286,287 < %m < The request method --- > %m > The request method 290,291c290,291 < %\{Foobar}n < Not supported in Sling; prints nothing. --- > %\{Foobar}n > Not supported in Sling; prints nothing. 294,295c294,295 < %\{Foobar}o < The contents of Foobar: header line(s) in the reply. --- > %\{Foobar}o > The contents of Foobar: header line(s) in the reply. 298,299c298,299 < %p < The canonical port of the server serving the request --- > %p > The canonical port of the server serving the request 302,303c302,303 < %\{format}p < The canonical port of the server serving the request or the server's actual port or the client's actual port. Valid formats are canonical, local, or remote. --- > %\{format}p > The canonical port of the server serving the request or the server's actual port or the client's actual port. Valid formats are canonical, local, or remote. 306,307c306,307 < %P < The name of the thread ~~process ID of the child~~ that serviced the request. --- > %P > The name of the thread ~~process ID of the child~~ that serviced the request. 310,311c310,311 < %\{format}P < Same as %P; the format parameter is ignored. --- > %\{format}P > Same as %P; the format parameter is ignored. 314,315c314,315 < %q < The query string (prepended with a ? if a query string exists, otherwise an empty string) --- > %q > The query string (prepended with a ? if a query string exists, otherwise an empty string) 318,319c318,319 < %r < First line of request --- > %r > First line of request 322,323c322,323 < %R < The number of requests processed by Sling since the last start. --- > %R > The number of requests processed by Sling since the last start. 326,327c326,327 < %s < Status. --- > %s > Status. 330,331c330,331 < %t < Time the request was received (standard english format) --- > %t > Time the request was received (standard english format) 334,335c334,335 < %\{format}t < Same as %t; the format parameter is ignored unless it is the literal value end indicating to use the time of request terminating (instead of the time of request receipt). --- > %\{format}t > Same as %t; the format parameter is ignored unless it is the literal value end indicating to use the time of request terminating (instead of the time of request receipt). 338,339c338,339 < %T < The time taken to serve the request, in seconds. --- > %T > The time taken to serve the request, in seconds. 342,343c342,343 < %u < Remote user (from auth; may be bogus if return status (%s) is 401) --- > %u > Remote user (from auth; may be bogus if return status (%s) is 401) 346,347c346,347 < %U < The URL path requested, not including any query string. --- > %U > The URL path requested, not including any query string. 350,351c350,351 < %v < The canonical ServerName of the server serving the request. --- > %v > The canonical ServerName of the server serving the request. 354,355c354,355 < %V < Same as %v. --- > %V > Same as %v. 358,359c358,359 < %X < Not supported in Sling; prints nothing. --- > %X > Not supported in Sling; prints nothing. 362,363c362,363 < %I < Not supported in Sling; prints nothing. --- > %I > Not supported in Sling; prints nothing. 366,367c366,367 < %O < Not supported in Sling; prints nothing. --- > %O > Not supported in Sling; prints nothing. 375,376c375,376 <

    For security reasons non-printable and other special characters in %C, %i and %o are escaped using \uhhhh sequences, where hhhh stands for the hexadecimal representation of the character's unicode value. Exceptions from this rule are " and , which are escaped by prepending a backslash, and all whitespace characters, which are written in their Java-style notation (\n, \t, etc).

    <

    Rotating Logger Files

    --- >

    For security reasons non-printable and other special characters in %C, %i and %o are escaped using \uhhhh sequences, where hhhh stands for the hexadecimal representation of the character's unicode value. Exceptions from this rule are " and \, which are escaped by prepending a backslash, and all whitespace characters, which are written in their Java-style notation (\n, \t, etc).

    >

    Rotating Logger Files

    386c386,387 < --- > > diff -b -B -r ./documentation/development/dependency-management.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/dependency-management.html 97c97 <

    Introduction

    --- >

    Introduction

    106c106 <

    Dependency Management

    --- >

    Dependency Management

    117,120c117,120 < Group ID < Artifact ID < Version < Scope --- > Group ID > Artifact ID > Version > Scope 125,128c125,128 < org.osgi < org.osgi.core < 4.1.0 < provided --- > org.osgi > org.osgi.core > 4.1.0 > provided 131,134c131,134 < org.osgi < org.osgi.compendium < 4.1.0 < provided --- > org.osgi > org.osgi.compendium > 4.1.0 > provided 137,140c137,140 < javax.servlet < servlet-api < 2.4 < provided --- > javax.servlet > servlet-api > 2.4 > provided 143,146c143,146 < javax.jcr < jcr < 1.0 < provided --- > javax.jcr > jcr > 1.0 > provided 149,152c149,152 < org.slf4j < slf4j-api < 1.5.2 < provided --- > org.slf4j > slf4j-api > 1.5.2 > provided 155,158c155,158 < org.apache.felix < org.apache.felix.scr.annotations < 1.9.8 < provided --- > org.apache.felix > org.apache.felix.scr.annotations > 1.9.8 > provided 161,164c161,164 < biz.aQute < bndlib < 1.50.0 < provided --- > biz.aQute > bndlib > 1.50.0 > provided 167,170c167,170 < junit < junit < 4.11 < test --- > junit > junit > 4.11 > test 173,176c173,176 < org.jmock < jmock-junit4 < 2.5.1 < test --- > org.jmock > jmock-junit4 > 2.5.1 > test 179,182c179,182 < org.slf4j < slf4j-simple < 1.5.2 < test --- > org.slf4j > slf4j-simple > 1.5.2 > test 189c189 <

    References

    --- >

    References

    diff -b -B -r ./documentation/development/embedding-sling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/embedding-sling.html 103c103,104 < --- > > 110c111 <

    Structure

    --- >

    Structure

    122c123 <

    The Bridging Part

    --- >

    The Bridging Part

    127,128c128,129 < Class < Description --- > Class > Description 133,134c134,135 < Launcher < The interface implemented by the internal class matching the external class being called to start/stop the framework. --- > Launcher > The interface implemented by the internal class matching the external class being called to start/stop the framework. 137,138c138,139 < LauncherClassLoader < URLClassLoader implementing the class loader to load the internal part (along with the OSGi framework). This class loader only delegates to the parent class loader any packages not contained in the launchpad library (primary artifact of the Launchpad Base project). --- > LauncherClassLoader > URLClassLoader implementing the class loader to load the internal part (along with the OSGi framework). This class loader only delegates to the parent class loader any packages not contained in the launchpad library (primary artifact of the Launchpad Base project). 141,142c142,143 < Loader < Helper class to find the launchpad library and to create the LauncherClassLoader with that library. This class is also used to actually load the Launcher implementation to be called from the external launcher class. --- > Loader > Helper class to find the launchpad library and to create the LauncherClassLoader with that library. This class is also used to actually load the Launcher implementation to be called from the external launcher class. 145,146c146,147 < Notifiable < The interface implemented in the external part and handed over to the internal part. --- > Notifiable > The interface implemented in the external part and handed over to the internal part. 149,150c150,151 < SharedConstants < Constants naming various properties and classes. --- > SharedConstants > Constants naming various properties and classes. 154c155 <

    The Internal Part

    --- >

    The Internal Part

    162c163 <

    The External Part

    --- >

    The External Part

    164c165 <

    Standalone Java Application

    --- >

    Standalone Java Application

    169,170c170,171 < Class < Description --- > Class > Description 175,176c176,177 < Main < This is the main class whose main method is called by the Java VM. This class is itself the Notifiable and finds the sling.home location from the environment (command line parameter, system property, or environment variable). --- > Main > This is the main class whose main method is called by the Java VM. This class is itself the Notifiable and finds the sling.home location from the environment (command line parameter, system property, or environment variable). 179,180c180,181 < MainDelegate < This class is loaded by the Loader from the LauncherClassLoader to actually complete the initial setup before creating the Sling class to start the framework. --- > MainDelegate > This class is loaded by the Loader from the LauncherClassLoader to actually complete the initial setup before creating the Sling class to start the framework. 183,184c184,185 < ControlListener < This class is used by the Main class to open a server socket to be able to start and stop Sling as a server. This class allows for starting (opening the server socket), status check (connecting to the socket asking for status), and shutdown (connecting to the socket asking for shutdown). --- > ControlListener > This class is used by the Main class to open a server socket to be able to start and stop Sling as a server. This class allows for starting (opening the server socket), status check (connecting to the socket asking for status), and shutdown (connecting to the socket asking for shutdown). 189c190 <

    Embedding the Standalone Java Application

    --- >

    Embedding the Standalone Java Application

    194,195c195,196 < Method < Description --- > Method > Description 200,201c201,202 < Main(Map<String, String> properties) < Instantiates the Main class with the given configuration properties. These are properties which are used directly as overwrites to the configurations in the sling.properties file. There is no more conversion applied. --- > Main(Map<String, String> properties) > Instantiates the Main class with the given configuration properties. These are properties which are used directly as overwrites to the configurations in the sling.properties file. There is no more conversion applied. 204,205c205,206 < doControlCommand() < Before starting the application for the first time, this method can be called to handle any control command action. --- > doControlCommand() > Before starting the application for the first time, this method can be called to handle any control command action. 208,209c209,210 < doStart() < Starts the Sling Application using the provided configuration properties as overwrites. Also these properties (or the sling.home system property or the SLING_HOME environment variable are analyzed to get the value for the sling.home setting. --- > doStart() > Starts the Sling Application using the provided configuration properties as overwrites. Also these properties (or the sling.home system property or the SLING_HOME environment variable are analyzed to get the value for the sling.home setting. 212,213c213,214 < doStop() < Stops the application started by the doStart() method. --- > doStop() > Stops the application started by the doStart() method. 217c218 <

    External Control of the Sling Application

    --- >

    External Control of the Sling Application

    224,225c225,226 < Value < Description --- > Value > Description 230,231c231,232 < start < Starts a server socket as specified by the sling.control.socket property. If the socket cannot be bound to (because the port is in use) an error message is printed. Using the start action only makes sense when starting the application. --- > start > Starts a server socket as specified by the sling.control.socket property. If the socket cannot be bound to (because the port is in use) an error message is printed. Using the start action only makes sense when starting the application. 234,235c235,236 < stop < The stop action is used to stop a running application. For that a connection is opened to the server running on the socket specified by the sling.control.socket property. On this connection the server is instructed to shut down. After executing the stop action, the Java application should be terminated. --- > stop > The stop action is used to stop a running application. For that a connection is opened to the server running on the socket specified by the sling.control.socket property. On this connection the server is instructed to shut down. After executing the stop action, the Java application should be terminated. 238,239c239,240 < status < The status action is used to check the status of a running application. For that a connection is opened to the server running on the socket specified by the sling.control.socket property. On this connection the server is queried on its status. After executing the stop action, the Java application should be terminated. --- > status > The status action is used to check the status of a running application. For that a connection is opened to the server running on the socket specified by the sling.control.socket property. On this connection the server is queried on its status. After executing the stop action, the Java application should be terminated. 243c244 <

    Conversion of Commandline Arguments to Properties

    --- >

    Conversion of Commandline Arguments to Properties

    248,249c249,250 < Command Line Argument < Properties Entry --- > Command Line Argument > Properties Entry 254,255c255,256 < start < sling.control.action = "start" --- > start > sling.control.action = "start" 258,259c259,260 < status < sling.control.action = "status" --- > status > sling.control.action = "status" 262,263c263,264 < stop < sling.control.action = "stop" --- > stop > sling.control.action = "stop" 266,267c267,268 < -c slinghome < sling.home = slinghome --- > -c slinghome > sling.home = slinghome 270,271c271,272 < -l loglevel < org.apache.sling.commons.log.level = loglevel --- > -l loglevel > org.apache.sling.commons.log.level = loglevel 274,275c275,276 < -f logfile < org.apache.sling.commons.log.file = logfile --- > -f logfile > org.apache.sling.commons.log.file = logfile 278,279c279,280 < -a address < This command line argument is not supported yet and thus ignored --- > -a address > This command line argument is not supported yet and thus ignored 282,283c283,284 < -p port < org.osgi.service.http.port = port --- > -p port > org.osgi.service.http.port = port 286,287c287,288 < -j [ host ":" ] port < sling.control.socket = [ host ":" ] port --- > -j [ host ":" ] port > sling.control.socket = [ host ":" ] port 290,291c291,292 < -h < This command line option is handled directly and not converted into the map --- > -h > This command line option is handled directly and not converted into the map 295c296 <

    Web Application

    --- >

    Web Application

    300,301c301,302 < Class < Description --- > Class > Description 306,307c307,308 < SlingServlet < This is the servlet registered in the web.xml descriptor and loaded by the servlet container into which Sling is deplyoed. This class locates the sling.home folder and loads the SlingServletDelagate to actually launch the framework. --- > SlingServlet > This is the servlet registered in the web.xml descriptor and loaded by the servlet container into which Sling is deplyoed. This class locates the sling.home folder and loads the SlingServletDelagate to actually launch the framework. 310,311c311,312 < SlingSessionListener < This -- somewhat inappropriately named -- class is registered as a listener by the Sling web.xml descriptor. It is called by the servlet container and forwards events to the SlingHttpSessionListenerDelegate which in turn forwards the events to the respective Servlet API listener services registered in the OSGi Framework. --- > SlingSessionListener > This -- somewhat inappropriately named -- class is registered as a listener by the Sling web.xml descriptor. It is called by the servlet container and forwards events to the SlingHttpSessionListenerDelegate which in turn forwards the events to the respective Servlet API listener services registered in the OSGi Framework. 314,315c315,316 < SlingBridge < Simple extension of the Sling class which registers the system bundle's BundleContext as a servlet context attribute of the Sling web application. This allows Servlet Container bridging to properly work. --- > SlingBridge > Simple extension of the Sling class which registers the system bundle's BundleContext as a servlet context attribute of the Sling web application. This allows Servlet Container bridging to properly work. 318,319c319,320 < SlingHttpSessionListenerDelegate < This class is loaded by the LauncherClassLoader called from the SlingSessionListener. It is called by the SlingSessionListener to forward servlet container events to registered Servlet API listener services. --- > SlingHttpSessionListenerDelegate > This class is loaded by the LauncherClassLoader called from the SlingSessionListener. It is called by the SlingSessionListener to forward servlet container events to registered Servlet API listener services. 322,323c323,324 < SlingServletDelegate < This class is loaded by the Loader from the LauncherClassLoader to actually complete the initial setup before creating the SlingBridge class to start the framework. --- > SlingServletDelegate > This class is loaded by the Loader from the LauncherClassLoader to actually complete the initial setup before creating the SlingBridge class to start the framework. diff -b -B -r ./documentation/development/getting-and-building-sling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/getting-and-building-sling.html 97c97 <

    tl:dr - Short form build + run instructions

    --- >

    tl:dr - Short form build + run instructions

    102c102 < $ export DBG="-Xmx384M -agentlib:jdwp..." # (see below) --- > $ export DBG="-Xmx384M -agentlib:jdwp..." # (see below) 106c106 <

    Prerequisites

    --- >

    Prerequisites

    113c113 <

    Configuring Maven

    --- >

    Configuring Maven

    115c115 <

    Getting the Sling Source

    --- >

    Getting the Sling Source

    117,120c117 <

    The complete list of modules can be used to clone individual modules, but we provide a more convenient way of checking out all of the source modules that are used in Sling. Since that's over 2^ < < 8 < repositories, it's based on additional tooling:

    --- >

    The complete list of modules can be used to clone individual modules, but we provide a more convenient way of checking out all of the source modules that are used in Sling. Since that's over 2^8 repositories, it's based on additional tooling:

    122,123c119,123 <
  • Install a git client if needed and the Google Repo tool.

  • <
  • Check out a new repo workspace

    $ repo init --no-clone-bundle -u https://github.com/apache/sling-aggregator.git
    ---
    >   
  • >

    Install a git client if needed and the Google Repo tool.

  • >
  • >

    Check out a new repo workspace

    >
    $ repo init --no-clone-bundle -u https://github.com/apache/sling-aggregator.git
    125,126c125,128
    < 
  • <
  • In your IDE, import the projects you're interested in from the repo workspace.

  • --- >
    >
  • >
  • >

    In your IDE, import the projects you're interested in from the repo workspace.

  • 128c130 <

    Building Sling

    --- >

    Building Sling

    133c135 <

    Running Sling

    --- >

    Running Sling

    139c141 < When starting Sling inside the org-apache-sling-starter module you should not use the default Sling Home folder name sling because this folder is removed when running mvn clean. --- > When starting Sling inside the org-apache-sling-starter module you should not use the default Sling Home folder name sling because this folder is removed when running mvn clean. 149c151 <

    Making and deploying changes

    --- >

    Making and deploying changes

    160,161c162,163 <

    Further Tips and Tricks

    <

    Debug Sling in Eclipse

    --- >

    Further Tips and Tricks

    >

    Debug Sling in Eclipse

    164,165c166,171 <
  • start Sling from the command line with (replace N with the actual version before running the command)

    java -Xmx384M -agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n -jar org.apache.sling.starter-N.jar

  • <
  • Open Menu Run-> Debug configurations

  • --- >
  • >

    start Sling from the command line with (replace N with the actual version before running the command)

    >

    java -Xmx384M -agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n -jar org.apache.sling.starter-N.jar

    >
  • >
  • >

    Open Menu Run-> Debug configurations

  • 178c184 <

    Debug Maven Tests in Eclipse

    --- >

    Debug Maven Tests in Eclipse

    183c189 <

    Simple way to develop new bundle in Eclipse for Sling

    --- >

    Simple way to develop new bundle in Eclipse for Sling

    diff -b -B -r ./documentation/development/hamcrest.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/hamcrest.html 95c95 <

    Maven Dependency

    --- >

    Maven Dependency

    97c97 < This module has not yet been officially released. --- > This module has not yet been officially released. 106c106 <

    Usage

    --- >

    Usage

    117,118c117,118 < assertThat(resource, resourceOfType("my/app")); < assertThat(resource, hasChildren("header", "body")); --- > assertThat(resource, resourceOfType("my/app")); > assertThat(resource, hasChildren("header", "body")); diff -b -B -r ./documentation/development/ide-tooling/ide-tooling-incremental-build.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/ide-tooling/ide-tooling-incremental-build.html 100c100 <

    Overview

    --- >

    Overview

    102,103c102,103 <

    Manifest Generation

    <

    maven-bundle-plugin

    --- >

    Manifest Generation

    >

    maven-bundle-plugin

    105c105 <

    maven-bundle-plugin prior to version 3.2.0

    --- >

    maven-bundle-plugin prior to version 3.2.0

    107c107 <

    maven-bundle-plugin since version 3.2.0

    --- >

    maven-bundle-plugin since version 3.2.0

    109c109 <

    bnd-maven-plugin

    --- >

    bnd-maven-plugin

    111c111 <

    Service Description and Metatype Resources

    --- >

    Service Description and Metatype Resources

    diff -b -B -r ./documentation/development/ide-tooling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/ide-tooling.html 98,99c98,99 <

    Installation

    <

    Prerequisites

    --- >

    Installation

    >

    Prerequisites

    102c102 <

    Update site installation

    --- >

    Update site installation

    104c104 <

    Building from source

    --- >

    Building from source

    109c109 <

    Overall concepts

    --- >

    Overall concepts

    112c112 <

    Server definition

    --- >

    Server definition

    115c115 <

    New Server

    --- >

    New Server

    117c117 <

    New Server Step 2

    --- >

    New Server Step 2

    119c119 <

    Server configuration

    --- >

    Server configuration

    121c121 <

    Servers View

    --- >

    Servers View

    133c133 <

    Servers Definition

    --- >

    Servers Definition

    135c135 <

    Content sync

    --- >

    Content sync

    142c142 <

    Creating a new content project

    --- >

    Creating a new content project

    144c144 <

    New content project step 1

    --- >

    New content project step 1

    146c146 <

    New content project step 2

    --- >

    New content project step 2

    148c148 <

    New content project step 3

    --- >

    New content project step 3

    151,152c151,152 <

    Converting existing projects

    <

    Automatic conversion

    --- >

    Converting existing projects

    >

    Automatic conversion

    159,160c159,160 < Property name < Effect --- > Property name > Effect 165,166c165,166 < sling.ide.m2e.contentpackage.active < When set to false, the configuration is disabled --- > sling.ide.m2e.contentpackage.active > When set to false, the configuration is disabled 169,170c169,170 < sling.ide.m2e.contentpackage.javaFacetVersion < Controls the version of the Java Facet which is added to the project, e.g. 8 --- > sling.ide.m2e.contentpackage.javaFacetVersion > Controls the version of the Java Facet which is added to the project, e.g. 8 173,174c173,174 < sling.ide.m2e.contentpackage.webFacetVersion < Controls the version of the Web Facet which is added to the project, e.g. 3.0 --- > sling.ide.m2e.contentpackage.webFacetVersion > Controls the version of the Web Facet which is added to the project, e.g. 3.0 180,181c180,181 <

    Maven Project Configurator preferences

    <

    Manual conversion

    --- >

    Maven Project Configurator preferences

    >

    Manual conversion

    183c183 <

    Content navigator

    --- >

    Content navigator

    185c185 <

    Content navigator

    --- >

    Content navigator

    187,188c187,188 <

    JCR properties

    <

    filter.xml - workspace filter definition

    --- >

    JCR properties

    >

    filter.xml - workspace filter definition

    190c190 <

    Deploying projects on the server

    --- >

    Deploying projects on the server

    192c192 <

    Add and Remove projects from server

    --- >

    Add and Remove projects from server

    194c194 <

    Manual content sync

    --- >

    Manual content sync

    197c197 <

    Repository export

    --- >

    Repository export

    199,200c199,200 <

    Repository import

    <

    Excluding paths from the sync process

    --- >

    Repository import

    >

    Excluding paths from the sync process

    203,204c203,204 <

    Content sync exclusions

    <

    Bundle sync

    --- >

    Content sync exclusions

    >

    Bundle sync

    206c206 <

    Creating a new bundle project

    --- >

    Creating a new bundle project

    208c208 <

    New bundle project step 1

    --- >

    New bundle project step 1

    210c210 <

    New bundle project step 2

    --- >

    New bundle project step 2

    212c212 <

    New bundle project step 3

    --- >

    New bundle project step 3

    214c214 <

    New bundle project step 4

    --- >

    New bundle project step 4

    216c216 <

    Converting existing projects

    --- >

    Converting existing projects

    218c218 <

    Deploying projects on the server

    --- >

    Deploying projects on the server

    220c220 <

    Add and Remove projects from server

    --- >

    Add and Remove projects from server

    222c222 <

    HTL support

    --- >

    HTL support

    231c231 <

    HTL Editor

    --- >

    HTL Editor

    233c233 <

    Debugging

    --- >

    Debugging

    236c236 <

    Debugging

    --- >

    Debugging

    238c238 <

    Launchpad project support

    --- >

    Launchpad project support

    242,244c242,244 <

    Launchpad project

    <

    Troubleshooting

    <

    Gathering debug information

    --- >

    Launchpad project

    >

    Troubleshooting

    >

    Gathering debug information

    246c246 <

    Sling Console

    --- >

    Sling Console

    248,250c248,250 <

    Tracing

    <

    Why do I get an error about "No DS descriptor found at..."?

    <

    Missing SCR descriptors

    --- >

    Tracing

    >

    Why do I get an error about "No DS descriptor found at..."?

    >

    Missing SCR descriptors

    259c259 <

    How do I fix the error "Missing m2e incremental build support for generating the bundle manifest, component descriptions and metatype resources"?

    --- >

    How do I fix the error "Missing m2e incremental build support for generating the bundle manifest, component descriptions and metatype resources"?

    261c261 <

    Known issues

    --- >

    Known issues

    diff -b -B -r ./documentation/development/issue-tracker.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/issue-tracker.html 99c99 <

    Issue type

    --- >

    Issue type

    104,105c104,105 < Issue type < Description --- > Issue type > Description 110,111c110,111 < Bug < Bug reports are used for cases where Sling fails not function as it should (as defined by some documentation). If you are not certain whether the issue you've found is actually a bug, please ask the Sling mailing lists first for help. --- > Bug > Bug reports are used for cases where Sling fails not function as it should (as defined by some documentation). If you are not certain whether the issue you've found is actually a bug, please ask the Sling mailing lists first for help. 114,115c114,115 < New Feature < Use a feature request when Sling does not have some functionality you need. --- > New Feature > Use a feature request when Sling does not have some functionality you need. 118,119c118,119 < Improvement < Use an improvement request to suggest improvements to existing features. Typical improvement requests are about updating documentation, increasing stability and performance, simplifying the implementation, or other such changes that make Sling better without introducing new features or fixing existing bugs. --- > Improvement > Use an improvement request to suggest improvements to existing features. Typical improvement requests are about updating documentation, increasing stability and performance, simplifying the implementation, or other such changes that make Sling better without introducing new features or fixing existing bugs. 122,123c122,123 < Test < Use this type when contributing test cases for existing features. Normally test cases should be contributed as a part of the original feature request or as regression tests associated with bug reports, but sometimes you just want to extend test coverage by introducing new test cases. This issue type is for such cases. --- > Test > Use this type when contributing test cases for existing features. Normally test cases should be contributed as a part of the original feature request or as regression tests associated with bug reports, but sometimes you just want to extend test coverage by introducing new test cases. This issue type is for such cases. 126,127c126,127 < Task < Used only for issues related to project infrastructure. --- > Task > Used only for issues related to project infrastructure. 131c131 <

    Summary

    --- >

    Summary

    133c133 <

    Issue priority

    --- >

    Issue priority

    138,139c138,139 < Issue priority < Description --- > Issue priority > Description 144,145c144,145 < Blocker < Legal or other fundamental issue that makes it impossible to release Jackrabbit code --- > Blocker > Legal or other fundamental issue that makes it impossible to release Jackrabbit code 148,149c148,149 < Critical < Major loss of functionality that affects many Slingusers --- > Critical > Major loss of functionality that affects many Slingusers 152,153c152,153 < Major < Important issue that should be resolved soon --- > Major > Important issue that should be resolved soon 156,157c156,157 < Minor < Nice to have issues --- > Minor > Nice to have issues 160,161c160,161 < Trivial < Trivial changes that can be applied whenever someone has extra time --- > Trivial > Trivial changes that can be applied whenever someone has extra time 165c165 <

    Issue States

    --- >

    Issue States

    170,172c170,172 < State < Description < Next States in Workflow --- > State > Description > Next States in Workflow 177,179c177,179 < Open < The issue has just been created < In Pogress --- > Open > The issue has just been created > In Pogress 182,184c182,184 < In Progress < Work has started on the issue < Documentation Required, Testcase Required, Documentation/Testcase required, Resolved, Open --- > In Progress > Work has started on the issue > Documentation Required, Testcase Required, Documentation/Testcase required, Resolved, Open 187,189c187,189 < Documentation Required < Implementation work has finished for this issue. To complete it documentation must be created and/or updated. < Resolved --- > Documentation Required > Implementation work has finished for this issue. To complete it documentation must be created and/or updated. > Resolved 192,194c192,194 < Testcase Required < Implementation work has finished for this issue. To complete it test cases must be created and/or updated. < Resolved --- > Testcase Required > Implementation work has finished for this issue. To complete it test cases must be created and/or updated. > Resolved 197,199c197,199 < Documentation/Testcase Required < Implementation work has finished for this issue. To complete it documentation and test cases must be created and/or updated. < Resolved, Documentation Required, Testcase Required --- > Documentation/Testcase Required > Implementation work has finished for this issue. To complete it documentation and test cases must be created and/or updated. > Resolved, Documentation Required, Testcase Required 202,204c202,204 < Resolved < The issue has been resolved from the developers point of view. Documentation and Testcases have been created and updated as required. Issue is ready for release. < Reopened, Closed --- > Resolved > The issue has been resolved from the developers point of view. Documentation and Testcases have been created and updated as required. Issue is ready for release. > Reopened, Closed 207,214c207,209 < Reopened < A resolved issue has been recognized to contain bugs or to be incomplete and thus has been reopened. < In Progress, Resolved < < < Closed < Work on this issue has finished and it is included in the release. < -- --- > Reopened > A resolved issue has been recognized to contain bugs or to be incomplete and thus has been reopened. > In Progress, Resolved 217a213 >

    | Closed | Work on this issue has finished and it is included in the release. | -- |

    221c217 <

    Patches

    --- >

    Patches

    diff -b -B -r ./documentation/development/jcr-mock.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/jcr-mock.html 101c101 <

    Maven Dependency

    --- >

    Maven Dependency

    108c108 <

    Implemented mock features

    --- >

    Implemented mock features

    126,127c126,127 <

    Usage

    <

    Getting JCR mock objects

    --- >

    Usage

    >

    Getting JCR mock objects

    137c137 <

    Mocking queries

    --- >

    Mocking queries

    147c147 < MockJcr.setQueryResult(session, "your query statement", Query.JCR_SQL2, resultNodes); --- > MockJcr.setQueryResult(session, "your query statement", Query.JCR_SQL2, resultNodes); diff -b -B -r ./documentation/development/jsr-305.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/jsr-305.html 96c96 <

    Introduction

    --- >

    Introduction

    98c98 <

    Annotations

    --- >

    Annotations

    108,109c108,109 <

    Use With Eclipse

    <

    Eclipse since Juno supports null analysis based on any annotations. Those need to be enabled in Preferences->Java->Compiler->Errors/Warnings via Enable annoation-based null analysis. Also the annotations need to be configured. For Sling/JSR 305 those are

    --- >

    Use With Eclipse

    >

    Eclipse since Juno supports null analysis based on any annotations. Those need to be enabled in Preferences->Java->Compiler->Errors/Warnings via Enable annoation-based null analysis. Also the annotations need to be configured. For Sling/JSR 305 those are

    114c114 <

    Eclipse Settings for Null analysis

    --- >

    Eclipse Settings for Null analysis

    118,119c118,119 <

    Use With Maven

    <

    Leveraging Eclipse JDT Compiler (recommended)

    --- >

    Use With Maven

    >

    Leveraging Eclipse JDT Compiler (recommended)

    146c146 <

    Leveraging FindBugs

    --- >

    Leveraging FindBugs

    166c166 <

    Use With FindBugs

    --- >

    Use With FindBugs

    176c176 <

    Use with SonarQube

    --- >

    Use with SonarQube

    diff -b -B -r ./documentation/development/logging.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/logging.html 97,98c97,98 < This document is for the new (November 2013) 4.x release of the Sling Commons Log components. Refer to < Logging 3.x for older versions. --- > This document is for the new (November 2013) 4.x release of the Sling Commons Log components. Refer to > Logging 3.x for older versions. 102c102 <

    Introduction

    --- >

    Introduction

    114c114 <

    v5.0.0 release

    --- >

    v5.0.0 release

    117c117 <

    WebConsole Plugin

    --- >

    WebConsole Plugin

    129,130c129,130 <

    <

    WebTail

    --- > >

    WebTail

    132c132,134 <

    http://localhost:8080/system/console/slinglog/tailer.txt?tail=1000&grep=lucene&name=%2Flogs%2Ferror.log

    --- >

    > http://localhost:8080/system/console/slinglog/tailer.txt?tail=1000&grep=lucene&name=%2Flogs%2Ferror.log >

    141c143,144 < --- > > 143c146 <

    Initial Configuration

    --- >

    Initial Configuration

    148,150c151,153 < Property < Default < Description --- > Property > Default > Description 155,157c158,160 < org.apache.sling.commons.log.level < INFO < Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. --- > org.apache.sling.commons.log.level > INFO > Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. 160,162c163,165 < org.apache.sling.commons.log.file < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. --- > org.apache.sling.commons.log.file > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. 165,167c168,170 < org.apache.sling.commons.log.file.number < 5 < The number of rotated files to keep. --- > org.apache.sling.commons.log.file.number > 5 > The number of rotated files to keep. 170,172c173,175 < org.apache.sling.commons.log.file.size < '.'yyyy-MM-dd < Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. --- > org.apache.sling.commons.log.file.size > '.'yyyy-MM-dd > Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. 175,177c178,180 < org.apache.sling.commons.log.pattern < {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} < The MessageFormat pattern to use for formatting log messages with the root logger. --- > org.apache.sling.commons.log.pattern > {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} > The MessageFormat pattern to use for formatting log messages with the root logger. 180,182c183,185 < org.apache.sling.commons.log.julenabled < n/a < Enables the java.util.logging support. --- > org.apache.sling.commons.log.julenabled > n/a > Enables the java.util.logging support. 185,187c188,190 < org.apache.sling.commons.log.configurationFile < n/a < Path for the Logback config file which would be used to configure logging. If the path is not absolute then it would be resolved against Sling Home --- > org.apache.sling.commons.log.configurationFile > n/a > Path for the Logback config file which would be used to configure logging. If the path is not absolute then it would be resolved against Sling Home 190,192c193,195 < org.apache.sling.commons.log.packagingDataEnabled < true < Boolean property to control packaging data support of Logback. See Packaging Data section of Logback for more details --- > org.apache.sling.commons.log.packagingDataEnabled > true > Boolean property to control packaging data support of Logback. See Packaging Data section of Logback for more details 195,197c198,200 < org.apache.sling.commons.log.numOfLines < 1000 < Number of lines from each log files to include while generating the dump in 'txt' mode. If set to -1 then whole file would be included --- > org.apache.sling.commons.log.numOfLines > 1000 > Number of lines from each log files to include while generating the dump in 'txt' mode. If set to -1 then whole file would be included 200,202c203,205 < org.apache.sling.commons.log.maxOldFileCountInDump < 3 < Maximum number of old rolled over files for each active file to be included while generating the dump as part of Status zip support --- > org.apache.sling.commons.log.maxOldFileCountInDump > 3 > Maximum number of old rolled over files for each active file to be included while generating the dump as part of Status zip support 205,207c208,210 < sling.log.root < Sling Home < The directory, which is used to resolve relative path names against. If not specified it would map to sling.home. Since 4.0.2 --- > sling.log.root > Sling Home > The directory, which is used to resolve relative path names against. If not specified it would map to sling.home. Since 4.0.2 211c214 <

    User Configuration - OSGi Based

    --- >

    User Configuration - OSGi Based

    213c216 <

    Logger Configuration

    --- >

    Logger Configuration

    219,222c222,225 < Property < Type < Default < Description --- > Property > Type > Default > Description 227,230c230,233 < org.apache.sling.commons.log.level < String < INFO < Sets the logging level of the loggers. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. --- > org.apache.sling.commons.log.level > String > INFO > Sets the logging level of the loggers. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. 233,236c236,239 < org.apache.sling.commons.log.file < String < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property should refer to the file name of a configured Log Writer (see below). If no Log Writer is configured with the same file name an implicit Log Writer configuration with default configuration is created. --- > org.apache.sling.commons.log.file > String > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property should refer to the file name of a configured Log Writer (see below). If no Log Writer is configured with the same file name an implicit Log Writer configuration with default configuration is created. 239,242c242,245 < org.apache.sling.commons.log.pattern < String < {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} < The java.util.MessageFormat pattern to use for formatting log messages with the root logger. This is a java.util.MessageFormat pattern supporting up to six arguments: {0} The timestamp of type java.util.Date, {1} the log marker, {2} the name of the current thread, {3} the name of the logger, {4} the log level and {5} the actual log message. If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern. --- > org.apache.sling.commons.log.pattern > String > {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} > The java.util.MessageFormat pattern to use for formatting log messages with the root logger. This is a java.util.MessageFormat pattern supporting up to six arguments: {0} The timestamp of type java.util.Date, {1} the log marker, {2} the name of the current thread, {3} the name of the logger, {4} the log level and {5} the actual log message. If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern. 245,246c248,249 < org.apache.sling.commons.log.names < String[] --- > org.apache.sling.commons.log.names > String[] 248c251 < A list of logger names to which this configuration applies. --- > A list of logger names to which this configuration applies. 251,254c254,257 < org.apache.sling.commons.log.additiv < Boolean < false < If set to false then logs from these loggers would not be sent to any appender attached higher in the hierarchy --- > org.apache.sling.commons.log.additiv > Boolean > false > If set to false then logs from these loggers would not be sent to any appender attached higher in the hierarchy 259c262 <

    Log Writer Configuration

    --- >

    Log Writer Configuration

    265,267c268,270 < Property < Default < Description --- > Property > Default > Description 272,274c275,277 < org.apache.sling.commons.log.file < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. --- > org.apache.sling.commons.log.file > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. 277,279c280,282 < org.apache.sling.commons.log.file.number < 5 < The number of rotated files to keep. --- > org.apache.sling.commons.log.file.number > 5 > The number of rotated files to keep. 282,284c285,287 < org.apache.sling.commons.log.file.size < '.'yyyy-MM-dd < Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. --- > org.apache.sling.commons.log.file.size > '.'yyyy-MM-dd > Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. 290c293 <

    Log File Rotation

    --- >

    Log File Rotation

    292,293c295,296 <

    As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is '.'yyyy-MM-dd causing daily log rotation. In previous version, log rotation defaults to a 10MB file size limit.

    <
    Scheduled Rotation
    --- >

    As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is '.'yyyy-MM-dd causing daily log rotation. In previous version, log rotation defaults to a 10MB file size limit.

    >
    Scheduled Rotation
    295c298 <

    For example, if the log file is configured as /foo/bar.log and the pattern set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/bar.log will be renamed to /foo/bar.log.2001-02-16 and logging for 2001-02-17 will continue in a new /foo/bar.log file until it rolls over the next day.

    --- >

    For example, if the log file is configured as /foo/bar.log and the pattern set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/bar.log will be renamed to /foo/bar.log.2001-02-16 and logging for 2001-02-17 will continue in a new /foo/bar.log file until it rolls over the next day.

    300,302c303,305 < DatePattern < Rollover schedule < Example --- > DatePattern > Rollover schedule > Example 307,309c310,312 < '.'yyyy-MM < Rollover at the beginning of each month < At midnight of May 31st, 2002 /foo/bar.log will be copied to /foo/bar.log.2002-05. Logging for the month of June will be output to /foo/bar.log until it is also rolled over the next month. --- > '.'yyyy-MM > Rollover at the beginning of each month > At midnight of May 31st, 2002 /foo/bar.log will be copied to /foo/bar.log.2002-05. Logging for the month of June will be output to /foo/bar.log until it is also rolled over the next month. 312,314c315,317 < '.'yyyy-ww < Rollover at the first day of each week. The first day of the week depends on the locale. < Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file /foo/bar.log will be copied to /foo/bar.log.2002-23. Logging for the 24th week of 2002 will be output to /foo/bar.log until it is rolled over the next week. --- > '.'yyyy-ww > Rollover at the first day of each week. The first day of the week depends on the locale. > Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file /foo/bar.log will be copied to /foo/bar.log.2002-23. Logging for the 24th week of 2002 will be output to /foo/bar.log until it is rolled over the next week. 317,319c320,322 < '.'yyyy-MM-dd < Rollover at midnight each day. < At midnight, on March 8th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-08. Logging for the 9th day of March will be output to /foo/bar.log until it is rolled over the next day. --- > '.'yyyy-MM-dd > Rollover at midnight each day. > At midnight, on March 8th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-08. Logging for the 9th day of March will be output to /foo/bar.log until it is rolled over the next day. 322,324c325,327 < '.'yyyy-MM-dd-a < Rollover at midnight and midday of each day. < at noon, on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-AM. Logging for the afternoon of the 9th will be output to /foo/bar.log until it is rolled over at midnight. --- > '.'yyyy-MM-dd-a > Rollover at midnight and midday of each day. > at noon, on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-AM. Logging for the afternoon of the 9th will be output to /foo/bar.log until it is rolled over at midnight. 327,329c330,332 < '.'yyyy-MM-dd-HH < Rollover at the top of every hour. < At approximately 11:00.000 o'clock on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-10. Logging for the 11th hour of the 9th of March will be output to /foo/bar.log until it is rolled over at the beginning of the next hour. --- > '.'yyyy-MM-dd-HH > Rollover at the top of every hour. > At approximately 11:00.000 o'clock on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-10. Logging for the 11th hour of the 9th of March will be output to /foo/bar.log until it is rolled over at the beginning of the next hour. 332,334c335,337 < '.'yyyy-MM-dd-HH-mm < Rollover at the beginning of every minute. < At approximately 11:23,000, on March 9th, 2001, /foo/bar.log will be copied to /foo/bar.log.2001-03-09-10-22. Logging for the minute of 11:23 (9th of March) will be output to /foo/bar.log until it is rolled over the next minute. --- > '.'yyyy-MM-dd-HH-mm > Rollover at the beginning of every minute. > At approximately 11:23,000, on March 9th, 2001, /foo/bar.log will be copied to /foo/bar.log.2001-03-09-10-22. Logging for the minute of 11:23 (9th of March) will be output to /foo/bar.log until it is rolled over the next minute. 339,340c342,343 <

    Note that when using Scheduled Rotation purging of old log files can be disabled by setting the property org.apache.sling.commons.log.file.number to '0'.

    <
    Size Rotation
    --- >

    Note that when using Scheduled Rotation purging of old log files can be disabled by setting the property org.apache.sling.commons.log.file.number to '0'.

    >
    Size Rotation
    343c346 <

    Logback Integration

    --- >

    Logback Integration

    354c357 <

    TurboFilters as OSGi Services

    --- >

    TurboFilters as OSGi Services

    365c368 < if(logger.getName().equals("turbofilter.foo.bar")){ --- > if(logger.getName().equals("turbofilter.foo.bar")){ 373c376 <

    Filters as OSGi services

    --- >

    Filters as OSGi services

    379c382 < props.put("appenders", "TestAppender"); --- > props.put("appenders", "TestAppender"); 386c389 < if(event.getLoggerName().equals("filter.foo.bar")){ --- > if(event.getLoggerName().equals("filter.foo.bar")){ 394c397 <

    Appenders as OSGi services

    --- >

    Appenders as OSGi services

    399,400c402,403 < "foo.bar:DEBUG", < "foo.bar.zoo:INFO", --- > "foo.bar:DEBUG", > "foo.bar.zoo:INFO", 403c406 < props.put("loggers",loggers); --- > props.put("loggers",loggers); 406c409 <

    Logback Config Fragment Support

    --- >

    Logback Config Fragment Support

    408c411 <

    Logback config fragments as String objects

    --- >

    Logback config fragments as String objects

    411c414 < props.setProperty("logbackConfig","true"); --- > props.setProperty("logbackConfig","true"); 413,425c416,428 < String config = "<included>\n" + < " <appender name=\"FOOFILE\" class=\"ch.qos.logback.core.FileAppender\">\n" + < " <file>${sling.home}/logs/foo.log</file>\n" + < " <encoder>\n" + < " <pattern>%d %-5level %logger{35} - %msg %n</pattern>\n" + < " </encoder>\n" + < " </appender>\n" + < "\n" + < " <logger name=\"foo.bar.include\" level=\"INFO\">\n" + < " <appender-ref ref=\"FOOFILE\" />\n" + < " </logger>\n" + < "\n" + < "</included>"; --- > String config = "<included>\n" + > " <appender name=\"FOOFILE\" class=\"ch.qos.logback.core.FileAppender\">\n" + > " <file>${sling.home}/logs/foo.log</file>\n" + > " <encoder>\n" + > " <pattern>%d %-5level %logger{35} - %msg %n</pattern>\n" + > " </encoder>\n" + > " </appender>\n" + > "\n" + > " <logger name=\"foo.bar.include\" level=\"INFO\">\n" + > " <appender-ref ref=\"FOOFILE\" />\n" + > " </logger>\n" + > "\n" + > "</included>"; 430c433 <

    Logback config fragments as ConfigProvider instances

    --- >

    Logback config fragments as ConfigProvider instances

    436c439 < return new InputSource(getClass().getClassLoader().getResourceAsStream("foo-config.xml")); --- > return new InputSource(getClass().getClassLoader().getResourceAsStream("foo-config.xml")); 441c444 <
    eventAdmin.sendEvent(new Event("org/apache/sling/commons/log/RESET",new Properties()));
    ---
    > 
    eventAdmin.sendEvent(new Event("org/apache/sling/commons/log/RESET",new Properties()));
    443c446
    < 

    External Config File

    --- >

    External Config File

    450,453c453,456 <
    <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"/>
    ---
    > 
    <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"/>
    457c460
    < 

    Java Util Logging (JUL) Integration

    --- >

    Java Util Logging (JUL) Integration

    462,463c465,466 <

    If org.apache.sling.commons.log.julenabled is found to be true then LevelChangePropagator would be registered automatically with Logback

    <

    Configuring OSGi appenders in the Logback Config

    --- >

    If org.apache.sling.commons.log.julenabled is found to be true then LevelChangePropagator would be registered automatically with Logback

    >

    Configuring OSGi appenders in the Logback Config

    466,470c469,473 <
    org.apache.sling.commons.log.file="logs/error.log"
    < org.apache.sling.commons.log.level="INFO"
    < org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
    < 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}"
    ---
    > 
    org.apache.sling.commons.log.file="logs/error.log"
    > org.apache.sling.commons.log.level="INFO"
    > org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
    > 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}"
    473c476
    < 
    <appender name="/logs/error.log" class="ch.qos.logback.core.FileAppender">
    ---
    > 
    <appender name="/logs/error.log" class="ch.qos.logback.core.FileAppender">
    482,483c485,486
    < 

    Using Slf4j API 1.7

    <

    With Slf4j API 1.7 onwards its possible to use logger methods with varargs i.e. log n arguments without constructing an object array e.g. log.info("This is a test {} , {}, {}, {}",1,2,3,4). Without var args you need to construct an object array log.info("This is a test {} , {}, {}, {}",new Object[] {1,2,3,4}). To make use of this API and still be able to use your bundle on Sling systems which package older version of the API jar, follow the below steps. (See SLING-3243) for more details.

    --- >

    Using Slf4j API 1.7

    >

    With Slf4j API 1.7 onwards its possible to use logger methods with varargs i.e. log n arguments without constructing an object array e.g. log.info("This is a test {} , {}, {}, {}",1,2,3,4). Without var args you need to construct an object array log.info("This is a test {} , {}, {}, {}",new Object[] {1,2,3,4}). To make use of this API and still be able to use your bundle on Sling systems which package older version of the API jar, follow the below steps. (See SLING-3243) for more details.

    485c488,490 <
  • Update the api version in the pom:

    <dependencies>
    ---
    >   
  • >

    Update the api version in the pom:

    >
    <dependencies>
    494,495c499,503
    < 
  • <
  • Add an Import-Package instruction with a custom version range:

    <build>
    ---
    > 
    >
  • >
  • >

    Add an Import-Package instruction with a custom version range:

    >
    <build>
    505c513
    <               org.slf4j;version="[1.5,2)",
    ---
    >               org.slf4j;version="[1.5,2)",
    514c522,523
    < 
  • --- >
    >
  • 518c527 <

    Log Tracer

    --- >

    Log Tracer

    521c530 <

    Slf4j MDC

    --- >

    Slf4j MDC

    535,539c544,547 <

    MDC Filter Config

    <

    < <

    Including MDC in Log Message

    <

    To include the MDC value in log message you MUST use the Logback pattern based on Logback and not the old MessageFormat based pattern.

    --- >

    MDC Filter Config

    > >

    Including MDC in Log Message

    >

    To include the MDC value in log message you MUST use the Logback pattern based on Logback and not the old MessageFormat based pattern.

    542c550 <

    Installation

    --- >

    Installation

    550c558 <

    Logback Groovy Fragment

    --- >

    Logback Groovy Fragment

    552,553c560,561 <
    <?xml version="1.0" encoding="UTF-8"?>
    < <configuration scan="true" scanPeriod="1 second">
    ---
    > 
    <?xml version="1.0" encoding="UTF-8"?>
    > <configuration scan="true" scanPeriod="1 second">
    555,556c563,564
    <   <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"/>
    ---
    >   <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"/>
    559,561c567,569
    <    <appender name="OAK" class="ch.qos.logback.core.FileAppender">
    <     <filter class="ch.qos.logback.core.filter.EvaluatorFilter">      
    <       <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> 
    ---
    >    <appender name="OAK" class="ch.qos.logback.core.FileAppender">
    >     <filter class="ch.qos.logback.core.filter.EvaluatorFilter">      
    >       <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> 
    563c571
    <             return e.getThreadName().contains("JobHandler");
    ---
    >             return e.getThreadName().contains("JobHandler");
    576,577c584,585
    <   <logger name="org.apache.jackrabbit.oak.jcr.operations" level="DEBUG" additivity="false">
    <       <appender-ref ref="OAK"/>
    ---
    >   <logger name="org.apache.jackrabbit.oak.jcr.operations" level="DEBUG" additivity="false">
    >       <appender-ref ref="OAK"/>
    582c590
    < 

    Installation

    --- >

    Installation

    590,591c598,599 <

    FAQ

    <
    Q. Can Sling Commons Log bundle be used in non Sling environments
    --- >

    FAQ

    >
    Q. Can Sling Commons Log bundle be used in non Sling environments
    601c609 <
    Q. How to start Sling with an external logback.xml file
    --- >
    Q. How to start Sling with an external logback.xml file
    diff -b -B -r ./documentation/development/maven-archetypes.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/maven-archetypes.html 97c97 <

    sling-launchpad-standalone-archetype

    --- >

    sling-launchpad-standalone-archetype

    99c99 <

    sling-launchpad-webapp-archetype

    --- >

    sling-launchpad-webapp-archetype

    101c101 <

    sling-initial-content-archetype

    --- >

    sling-initial-content-archetype

    103c103 <

    sling-servlet-archetype

    --- >

    sling-servlet-archetype

    105c105 <

    sling-bundle-archetype

    --- >

    sling-bundle-archetype

    107c107 <

    sling-jcrinstall-bundle-archetype

    --- >

    sling-jcrinstall-bundle-archetype

    diff -b -B -r ./documentation/development/maven-launchpad-plugin.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/maven-launchpad-plugin.html 97,98c97 < The launchpad plugin has been retired in favour of the provisioning model and associated tooling, see < the provisioning model documentation. --- > The launchpad plugin has been retired in favour of the provisioning model and associated tooling, see the provisioning model documentation. 111c110 <

    Maven Launchpad Plugin provides the following goals:

    --- >

    Maven Launchpad Plugin provides the following goals:

    115,116c114,115 < Goals < Description --- > Goals > Description 121,122c120,121 < launchpad:prepare-package < Create the file system structure required by Sling's Launchpad framework. --- > launchpad:prepare-package > Create the file system structure required by Sling's Launchpad framework. 125,126c124,125 < launchpad:attach-bundle-list < Attach the bundle list descriptor to the current project as a Maven artifact. --- > launchpad:attach-bundle-list > Attach the bundle list descriptor to the current project as a Maven artifact. 129,130c128,129 < launchpad:create-karaf-descriptor < Create an Apache Karaf Feature descriptor. --- > launchpad:create-karaf-descriptor > Create an Apache Karaf Feature descriptor. 133,134c132,133 < launchpad:create-bundle-jar < Create a JAR file containing the bundles in a Launchpad-structured JAR file. --- > launchpad:create-bundle-jar > Create a JAR file containing the bundles in a Launchpad-structured JAR file. 137,138c136,137 < launchpad:check-bundle-list-for-snapshots < Validate that the bundle list does not contain any SNAPSHOT versions. --- > launchpad:check-bundle-list-for-snapshots > Validate that the bundle list does not contain any SNAPSHOT versions. 141,142c140,141 < launchpad:run < Run a Launchpad application. --- > launchpad:run > Run a Launchpad application. 145,146c144,145 < launchpad:start < Start a Launchpad application. --- > launchpad:start > Start a Launchpad application. 149,150c148,149 < launchpad:stop < Stop a Launchpad application. --- > launchpad:stop > Stop a Launchpad application. 153,154c152,153 < launchpad:output-bundle-list < Output the bundle list to the console as XML. (added in version 2.0.8) --- > launchpad:output-bundle-list > Output the bundle list to the console as XML. (added in version 2.0.8) 158c157 <

    General Configuration

    --- >

    General Configuration

    169c168 <

    Framework Configuration

    --- >

    Framework Configuration

    173c172 <

    Bundle List Files

    --- >

    Bundle List Files

    175c174 <
    <?xml version="1.0"?>
    ---
    > 
    <?xml version="1.0"?>
    177c176
    <     <startLevel level="0">
    ---
    >     <startLevel level="0">
    190c189
    <     <startLevel level="10">
    ---
    >     <startLevel level="10">
    198c197
    <     <startLevel level="15">
    ---
    >     <startLevel level="15">
    209c208
    < 

    Artifact Definition

    --- >

    Artifact Definition

    249c248 <

    Integration Testing

    --- >

    Integration Testing

    251c250 <

    Bundle List Rewriting

    --- >

    Bundle List Rewriting

    diff -b -B -r ./documentation/development/maven-usage.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/maven-usage.html 97c97 <

    Parent POM

    --- >

    Parent POM

    108c108 <

    Java version

    --- >

    Java version

    115c115 <

    Dependency management

    --- >

    Dependency management

    diff -b -B -r ./documentation/development/maventipsandtricks.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/maventipsandtricks.html 97c97 <

    Maven local repository

    --- >

    Maven local repository

    102,103c102,103 <

    Maven settings

    <

    Ignore your local settings

    --- >

    Maven settings

    >

    Ignore your local settings

    110c110 < Does anyone have a similar command-line option that works under Windows? --- > Does anyone have a similar command-line option that works under Windows? 112c112 <

    MAVEN_OPTS

    --- >

    MAVEN_OPTS

    115c115 <

    Increase JVM memory if needed

    --- >

    Increase JVM memory if needed

    117c117 <
    MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=256m"
    ---
    > 
    MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=256m"
    120c120
    < 

    Debugging code launched by Maven

    --- >

    Debugging code launched by Maven

    122c122 <
    MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n"
    ---
    > 
    MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n"
    125c125
    < 

    Avoid spaces in Maven repository and workspace paths

    --- >

    Avoid spaces in Maven repository and workspace paths

    diff -b -B -r ./documentation/development/monitoring-requests.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/monitoring-requests.html 100c100 <

    --- >

    diff -b -B -r ./documentation/development/osgi-mock.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/osgi-mock.html 103c103 <

    Maven Dependency

    --- >

    Maven Dependency

    115c115 <

    Implemented mock features

    --- >

    Implemented mock features

    134,135c134,135 <

    Usage

    <

    OSGi Context JUnit Rule

    --- >

    Usage

    >

    OSGi Context JUnit Rule

    148c148 < "prop1", "value1"); --- > "prop1", "value1"); 167c167 <

    Getting OSGi mock objects

    --- >

    Getting OSGi mock objects

    175c175 < "prop1", "value1"); --- > "prop1", "value1"); 185c185 <

    Activation and Dependency Injection

    --- >

    Activation and Dependency Injection

    210c210 <

    Provide your own configuration via ConfigAdmin

    --- >

    Provide your own configuration via ConfigAdmin

    217c217 < props.put("prop1", "value1"); --- > props.put("prop1", "value1"); 220c220 <

    Context Plugins

    --- >

    Context Plugins

    224c224 <

    Example:

    --- >

    Example:

    diff -b -B -r ./documentation/development/release-management.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/release-management.html 100c100 <

    Prerequisites

    --- >

    Prerequisites

    129c129 <

    Staging the Release Candidates

    --- >

    Staging the Release Candidates

    133,135c133,140 <
  • Check that your POMs will not lose content when they are rewritten during the release process
    $ mvn release:prepare -DdryRun=true
    < 

    Compare the original pom.xml with the one called pom.xml.tag to see if the license or any other info has been removed. This has been known to happen if the starting <project> tag is not on a single line. The only things that should be different between these files are the <version> and <scm> elements. If there are any other changes, you must fix the original pom.xml file and commit before proceeding with the release.

  • <
  • Publish a snapshot

    $ mvn deploy
    ---
    >   
  • Check that your POMs will not lose content when they are rewritten during the release process >
    $ mvn release:prepare -DdryRun=true
    > 
    >

    Compare the original pom.xml with the one called pom.xml.tag to see if the license or any other info has been removed. This has been known to happen if the starting <project> tag is not on a single line. The only things that should be different between these files are the <version> and <scm> elements. If there are any other changes, you must fix the original pom.xml file and commit before proceeding with the release.

    >
  • >
  • >

    Publish a snapshot

    >
    $ mvn deploy
    146,147c151,155
    <    
  • <
  • Prepare the release

    $ mvn release:clean
    ---
    >     
    >   
  • >
  • >

    Prepare the release

    >
    $ mvn release:clean
    152,153c160,164
    <    
  • <
  • Stage the release for a vote

    $ mvn release:perform
    ---
    >     
    >   
  • >
  • >

    Stage the release for a vote

    >
    $ mvn release:perform
    158,159c169,172
    <    
  • <
  • Close the staging repository:

    --- > >
  • >
  • >

    Close the staging repository:

    162,163c175,178 <
  • <
  • Verify the staged artifacts

    --- > >
  • >
  • >

    Verify the staged artifacts

    167c182,183 <
  • --- > >
  • 169c185 <

    Starting the Vote

    --- >

    Starting the Vote

    171c187 <
    To: "Sling Developers List" <dev@sling.apache.org>
    ---
    > 
    To: "Sling Developers List" <dev@sling.apache.org>
    194,195c210,211
    <   [ ]  0 Don't care
    <   [ ] -1 Don't release, because ...
    ---
    >   [ ]  0 Don't care
    >   [ ] -1 Don't release, because ...
    199c215
    < 

    Wait for the Results

    --- >

    Wait for the Results

    206c222 <
    To: "Sling Developers List" <dev@sling.apache.org>
    ---
    > 
    To: "Sling Developers List" <dev@sling.apache.org>
    222c238
    < 

    Canceling the Release

    --- >

    Canceling the Release

    232c248,249 < --- > > 237c254,255 < --- > > 240c258 <

    Promoting the Release

    --- >

    Promoting the Release

    245c263 <
  • Commit the released artifacts to https://dist.apache.org/repos/dist/release/sling/ which is replicated to http://www.apache.org/dist/sling/ quickly via svnpubsub. Hint: use svn import to avoid having to checkout the whole folder first. The easiest to do this is to get the released artifact using the check script (check_staged_release.sh) and then simply copy the artifacts from the downloaded folder to your local checkout folder. Make sure to not add the checksum files for the signature file *.asc.*). --- >
  • Commit the released artifacts to https://dist.apache.org/repos/dist/release/sling/ which is replicated to http://www.apache.org/dist/sling/ quickly via svnpubsub. Hint: use svn import to avoid having to checkout the whole folder first. The easiest to do this is to get the released artifact using the check script (check_staged_release.sh) and then simply copy the artifacts from the downloaded folder to your local checkout folder. Make sure to not add the checksum files for the signature file *.asc.*). 249c267,268 <
  • --- > > 251c270,271 < --- > > 256c276,277 < --- > > 262c283 <

    Update JIRA

    --- >

    Update JIRA

    267c288 <

    Update the Sling Starter (fka Launchpad)

    --- >

    Update the Sling Starter (fka Launchpad)

    269c290 <

    Create an Announcement

    --- >

    Create an Announcement

    271c292 <
    To: "Sling Developers List" <dev@sling.apache.org>, "Apache Announcements" <announce@apache.org>
    ---
    > 
    To: "Sling Developers List" <dev@sling.apache.org>, "Apache Announcements" <announce@apache.org>
    302c323
    < 

    Related Links

    --- >

    Related Links

    307,310c328,331 <

    Releasing the Sling IDE Tooling

    <
    < Eclipse is very aggresive about caching artifacts with the same coordinates. Make sure that once you build the artifacts with code signing enabled you install the right ones. If you install artifacts with the same version but not signed, Eclipse will cache that version indefinitely with no known workaround except setting up a new installation of Eclipse. <
    --- >

    Releasing the Sling IDE Tooling

    >
    Eclipse is very aggresive about caching artifacts with the same coordinates. Make sure that once you build the artifacts > with code signing enabled you install the right ones. If you install artifacts with the same version but not signed, Eclipse will cache > that version indefinitely with no known workaround except setting up a new installation of Eclipse.
    312,316c333,334 <
    < While we sort out a proper location you will need to locally build install the < codesign-maven-plugin from < https://github.com/apache/sling-whiteboard/tree/master/codesign. <
    --- >
    While we sort out a proper location you will need to locally build install the codesign-maven-plugin from > https://github.com/apache/sling-whiteboard/tree/master/codesign.
    322c340 <
  • Tag the commit using git tag -a -m 'Tag 1.0.2 release' sling-ide-tooling-1.0.2
  • --- >
  • Tag the commit using git tag -a -m 'Tag 1.0.2 release' sling-ide-tooling-1.0.2
  • 334c352,353 < --- > > 339c358 <
    To: "Sling Developers List" <dev@sling.apache.org>
    ---
    > 
    To: "Sling Developers List" <dev@sling.apache.org>
    370,371c389,390
    <   [ ]  0 Don't care
    <   [ ] -1 Don't release, because ...
    ---
    >   [ ]  0 Don't care
    >   [ ] -1 Don't release, because ...
    384c403,404
    <     
    ---
    >     
    >   
    387,388c407,409
    <    
  • The timestamps in the composite xml files should be refreshed to "now", for instance by using the value of echo "`date +%s`000"
  • < --- >
  • The timestamps in the composite xml files should be refreshed to "now", for instance by using the value of echo "`date +%s`000"
  • > > 394c415 <

    Appendix A: Create and Add your key to people.apache.org

    --- >

    Appendix A: Create and Add your key to people.apache.org

    397,399c418,425 <
  • Create a public/private pair key:

    $ gpg --gen-key
    < 

    When gpg asks for e-mail linked the key you MUST USE the <committer>@apache.org one. When gpg asks for comment linked the key you SHOULD USE "CODE SIGNING KEY"

  • <
  • Add the key to https://people.apache.org/keys/group/sling.asc

    --- >
  • >

    Create a public/private pair key:

    >
    $ gpg --gen-key
    > 
    >

    When gpg asks for e-mail linked the key you MUST USE the <committer>@apache.org one. When gpg asks for comment linked the key you SHOULD USE "CODE SIGNING KEY"

    >
  • >
  • >

    Add the key to https://people.apache.org/keys/group/sling.asc

    401,406c427,440 <
  • Type the following command replacing the word <e-mail> with your Apache's one (<committer>@apache.org) to get the key signature

    $ gpg --fingerprint <e-mail>
    < 

    The key signature is in the output following the Key fingerprint = part.

  • <
  • Add the key signature into the field 'OpenPGP Public Key Primary Fingerprint' in your profile at https://id.apache.org.

  • <
  • You are DONE, but to see the changes on https://people.apache.org/keys/group/sling.asc you may need to wait a few hours;

  • < <
  • You also have to add your public key either on pool.sks-keyservers.net or pgp.mit.edu (for the staging repository). To do so you can follow these steps:

    --- >
  • >

    Type the following command replacing the word <e-mail> with your Apache's one (<committer>@apache.org) to get the key signature

    >
    $ gpg --fingerprint <e-mail>
    > 
    >

    The key signature is in the output following the Key fingerprint = part.

    >
  • >
  • >

    Add the key signature into the field 'OpenPGP Public Key Primary Fingerprint' in your profile at https://id.apache.org.

  • >
  • >

    You are DONE, but to see the changes on https://people.apache.org/keys/group/sling.asc you may need to wait a few hours;

  • > > >
  • >

    You also have to add your public key either on pool.sks-keyservers.net or pgp.mit.edu (for the staging repository). To do so you can follow these steps:

    408,409c442,447 <
  • Extract the key id from all the secret keys stored in the system:

    $ gpg --list-secret-keys.
    < 

    The output is something like this

    gpg --list-secret-keys
    ---
    >       
  • >

    Extract the key id from all the secret keys stored in the system:

    >
    $ gpg --list-secret-keys.
    > 
    >

    The output is something like this

    >
    gpg --list-secret-keys
    416,419c454,463
    < 

    The key id in this case is 455ECC7C.

  • <
  • Send the key towards e.g. pool.sks-keyservers.net via

    $ gpg --keyserver pool.sks-keyservers.net --send-key <key-id>
    < 
  • <
  • --- >
    >

    The key id in this case is 455ECC7C.

    > >
  • >

    Send the key towards e.g. pool.sks-keyservers.net via

    >
    $ gpg --keyserver pool.sks-keyservers.net --send-key <key-id>
    > 
    >
  • > > 421c465 <

    Appendix B: Deploy Maven plugin documentation (if applicable)

    --- >

    Appendix B: Deploy Maven plugin documentation (if applicable)

    432,441c476,497 <
  • Checkout the release tag of the released plugin (or reset your workspace)

  • <
  • Build and stage the maven site of the plugin locally.

    $ mvn clean site:site site:stage
    < 
  • <
  • Checkout the Sling website and navigate to the 'components' directory

    $ git clone https://github.com/apache/sling-site.git
    < 
  • <
  • Replace the content of the existing folder src/main/jbake/assets/components/<plugin-name> with the generated maven site from target/staging

  • <
  • Create a new folder src/main/jbake/assets/components/<plugin-name>-archives/<plugin-name>-<version> and copy the generated maven site there as well

  • <
  • Commit the changes

  • <
  • Publish the Sling site to production

  • <
  • Check the results at http://sling.apache.org/components/

  • --- >
  • >

    Checkout the release tag of the released plugin (or reset your workspace)

  • >
  • >

    Build and stage the maven site of the plugin locally.

    >
    $ mvn clean site:site site:stage
    > 
    >
  • >
  • >

    Checkout the Sling website and navigate to the 'components' directory

    >
    $ git clone https://github.com/apache/sling-site.git
    > 
    >
  • >
  • >

    Replace the content of the existing folder src/main/jbake/assets/components/<plugin-name> with the generated maven site from target/staging

  • >
  • >

    Create a new folder src/main/jbake/assets/components/<plugin-name>-archives/<plugin-name>-<version> and copy the generated maven site there as well

  • >
  • >

    Commit the changes

  • >
  • >

    Publish the Sling site to production

  • >
  • >

    Check the results at http://sling.apache.org/components/

  • diff -b -B -r ./documentation/development/repository-based-development.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/repository-based-development.html 98,99c98,99 <

    WebDAV Support

    <

    WebDAV support in Sling is based on the Simple WebDAV implementation of Apache Jackrabbit which is integrated in the jcr/webdav project. This bundle provides WebDAV access to Sling's repository in two flavours:

    --- >

    WebDAV Support

    >

    WebDAV support in Sling is based on the Simple WebDAV implementation of Apache Jackrabbit which is integrated in the jcr/webdav project. This bundle provides WebDAV access to Sling's repository in two flavours:

    104c104 <

    Example

    --- >

    Example

    107c107 <

    Separate URI Space WebDAV

    --- >

    Separate URI Space WebDAV

    118c118 <

    Configuration

    --- >

    Configuration

    124,125c124,125 < Default < Description --- > Default > Description 131,132c131,132 < /dav < The root path at which the Simple WebDAV Servlet is accessible. Access to the repository is provided in two ways. You may connect your WebDAV client directly to the root of the Sling web application to access the workspace of Sling directly. The other way is required if you want to connect your WebDAV client to any other workspace besides the Sling workspace. In this case you connect your WebDAV client to another a path comprised of this root path plus the name of the workspace. For example to connect to the some*other workspace, you might connect to http://slinghost/dav/some*other. --- > /dav > The root path at which the Simple WebDAV Servlet is accessible. Access to the repository is provided in two ways. You may connect your WebDAV client directly to the root of the Sling web application to access the workspace of Sling directly. The other way is required if you want to connect your WebDAV client to any other workspace besides the Sling workspace. In this case you connect your WebDAV client to another a path comprised of this root path plus the name of the workspace. For example to connect to the some*other workspace, you might connect to http://slinghost/dav/some*other. 136,137c136,137 < Sling WebDAV < The name of the HTTP Basic Authentication Realm presented to the client to ask for authentication credentials to access the repository. --- > Sling WebDAV > The name of the HTTP Basic Authentication Realm presented to the client to ask for authentication credentials to access the repository. 141,142c141,142 < nt:file, nt:resource < The JCR Node Types considered being non-collection resources by WebDAV. Any node replying true to Node.isNodeType() for one of the listed types is considered a non-collection resource. Otherwise the respective node is considered a collection resource. --- > nt:file, nt:resource > The JCR Node Types considered being non-collection resources by WebDAV. Any node replying true to Node.isNodeType() for one of the listed types is considered a non-collection resource. Otherwise the respective node is considered a collection resource. 146,147c146,147 < jcr, rep < A list of namespace prefixes indicating JCR items filtered from being reported as collection members or properties. The default list includes jcr and rep (Jackrabbit internal namespace prefix) items. Do not modify this setting unless you know exactly what you are doing. --- > jcr, rep > A list of namespace prefixes indicating JCR items filtered from being reported as collection members or properties. The default list includes jcr and rep (Jackrabbit internal namespace prefix) items. Do not modify this setting unless you know exactly what you are doing. 151,152c151,152 < n/a < Nodetype names to be used to filter child nodes. A child node can be filtered if the declaring nodetype of its definition is one of the nodetype names specified in the nodetypes Element. E.g. defining rep:root as filtered nodetype would result in jcr:system being hidden but no other child node of the root node, since those are defined by the nodetype nt:unstructered. The default is empty. Do not modify this setting unless you know exactly what you are doing. --- > n/a > Nodetype names to be used to filter child nodes. A child node can be filtered if the declaring nodetype of its definition is one of the nodetype names specified in the nodetypes Element. E.g. defining rep:root as filtered nodetype would result in jcr:system being hidden but no other child node of the root node, since those are defined by the nodetype nt:unstructered. The default is empty. Do not modify this setting unless you know exactly what you are doing. 156,157c156,157 < n/a < A list of namespace URIs indicating JCR items filtered from being reported as collection members or properties. The default list is empty. Do not modify this setting unless you know exactly what you are doing. --- > n/a > A list of namespace URIs indicating JCR items filtered from being reported as collection members or properties. The default list is empty. Do not modify this setting unless you know exactly what you are doing. 161,162c161,162 < sling:Folder < The JCR Primary Node Type to assign to nodes created to reflect WebDAV collections. You may name any primary node type here, provided it allows the creation of nodex of this type and the defined Non-Collection Primary Type below it. --- > sling:Folder > The JCR Primary Node Type to assign to nodes created to reflect WebDAV collections. You may name any primary node type here, provided it allows the creation of nodex of this type and the defined Non-Collection Primary Type below it. 166,167c166,167 < nt:file < The JCR Primary Node Type to assign to nodes created to reflect WebDAV non-collection resources. You may name any primary node type here, provided the node type is allowed to be created below nodes of the type defined for the Collection Primary Type and that a child node with the name jcr:content may be created below the non-collection resource whose type is defined by the Content Primary Type. --- > nt:file > The JCR Primary Node Type to assign to nodes created to reflect WebDAV non-collection resources. You may name any primary node type here, provided the node type is allowed to be created below nodes of the type defined for the Collection Primary Type and that a child node with the name jcr:content may be created below the non-collection resource whose type is defined by the Content Primary Type. 171,172c171,172 < nt:resource < The JCR Primary Node Type to assign to the jcr:content child node of a WebDAV non-collection resource. You may name any primary node type here, provided the node type is allowed to be created as the jcr:content child node of the node type defined by the Non-Collection Primary Type. In addition the node type must allow at least the following properties: jcr:data (binary), jcr:lastModified (date), and jcr:mimeType (string). --- > nt:resource > The JCR Primary Node Type to assign to the jcr:content child node of a WebDAV non-collection resource. You may name any primary node type here, provided the node type is allowed to be created as the jcr:content child node of the node type defined by the Non-Collection Primary Type. In addition the node type must allow at least the following properties: jcr:data (binary), jcr:lastModified (date), and jcr:mimeType (string). 176c176 <

    Advanced Technical Details

    --- >

    Advanced Technical Details

    178c178 <

    IOManager

    --- >

    IOManager

    180c180 <

    PropertyManager

    --- >

    PropertyManager

    182c182 <

    ItemFilter

    --- >

    ItemFilter

    184c184 <

    Collection Node Types

    --- >

    Collection Node Types

    186c186 <

    DavEx Support

    --- >

    DavEx Support

    188c188 <

    Eclipse plugin for JCR

    --- >

    Eclipse plugin for JCR

    diff -b -B -r ./documentation/development/resourceresolver-mock.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/resourceresolver-mock.html 99c99 <

    Maven Dependency

    --- >

    Maven Dependency

    106c106 <

    Implemented mock features

    --- >

    Implemented mock features

    121c121 <

    Usage

    --- >

    Usage

    diff -b -B -r ./documentation/development/sling-mock.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/sling-mock.html 101c101 <

    Maven Dependency

    --- >

    Maven Dependency

    113c113 <

    Implemented mock features

    --- >

    Implemented mock features

    121c121,122 < --- > > 125c126,127 < --- > > 130c132,133 < --- > > 140c143,144 < --- > > 142c146 <

    Additional features

    --- >

    Additional features

    149c153,154 < --- > > 152,153c157,158 <

    Usage

    <

    Sling Context JUnit Rule

    --- >

    Usage

    >

    Sling Context JUnit Rule

    163c168 < Resource resource = context.resourceResolver().getResource("/content/sample/en"); --- > Resource resource = context.resourceResolver().getResource("/content/sample/en"); 185c190 <

    Choosing Resource Resolver Mock Type

    --- >

    Choosing Resource Resolver Mock Type

    195c200 <

    Resource Resolver Types

    --- >

    Resource Resolver Types

    256c261 <

    Sling Resource Resolver

    --- >

    Sling Resource Resolver

    265c270 <

    Adapter Factories

    --- >

    Adapter Factories

    281c286 <

    SlingScriptHelper

    --- >

    SlingScriptHelper

    292c297 <

    To support getting OSGi services you have to register them via the BundleContext interface of the JCR Mocks before. You can use an alternative factory method for the SlingScriptHelper providing existing instances of request, response and bundle context.

    --- >

    To support getting OSGi services you have to register them via the BundleContext interface of the JCR Mocks before. You can use an alternative factory method for the SlingScriptHelper providing existing instances of request, response and bundle context.

    294c299 <

    SlingHttpServletRequest

    --- >

    SlingHttpServletRequest

    301c306 < request.setQueryString("param1=aaa&param2=bbb"); --- > request.setQueryString("param1=aaa&param2=bbb"); 305,306c310,311 < .put("param1", "aaa") < .put("param2", "bbb") --- > .put("param1", "aaa") > .put("param2", "bbb") 310c315 < request.setResource(resourceResolver.getResource("/content/sample")); --- > request.setResource(resourceResolver.getResource("/content/sample")); 314,315c319,320 < requestPathInfo.setSelectorString("selector1.selector2"); < requestPathInfo.setExtension("html"); --- > requestPathInfo.setSelectorString("selector1.selector2"); > requestPathInfo.setExtension("html"); 321c326 < request.setAttribute("attr1", "value1"); --- > request.setAttribute("attr1", "value1"); 324c329 < request.addHeader("header1", "value1"); --- > request.addHeader("header1", "value1"); 327c332 < request.addCookie(new Cookie("cookie1", "value1")); --- > request.addCookie(new Cookie("cookie1", "value1")); 329c334 <

    SlingHttpServletResponse

    --- >

    SlingHttpServletResponse

    340c345 < assertEquals("text/plain;charset=UTF-8", response.getContentType()); --- > assertEquals("text/plain;charset=UTF-8", response.getContentType()); 345,346c350,351 < assertTrue(response.containsHeader("header1")); < assertEquals("5", response.getHeader("header2")); --- > assertTrue(response.containsHeader("header1")); > assertEquals("5", response.getHeader("header2")); 354c359 <

    Import resource data from JSON file in classpath

    --- >

    Import resource data from JSON file in classpath

    358,372c363,377 < "jcr:primaryType": "app:Page", < "jcr:content": { < "jcr:primaryType": "app:PageContent", < "jcr:title": "English", < "app:template": "/apps/sample/templates/homepage", < "sling:resourceType": "sample/components/homepage", < "jcr:createdBy": "admin", < "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200", < "par": { < "jcr:primaryType": "nt:unstructured", < "sling:resourceType": "foundation/components/parsys", < "colctrl": { < "jcr:primaryType": "nt:unstructured", < "layout": "2;colctrl-lt0", < "sling:resourceType": "foundation/components/parsys/colctrl" --- > "jcr:primaryType": "app:Page", > "jcr:content": { > "jcr:primaryType": "app:PageContent", > "jcr:title": "English", > "app:template": "/apps/sample/templates/homepage", > "sling:resourceType": "sample/components/homepage", > "jcr:createdBy": "admin", > "jcr:created": "Thu Aug 07 2014 16:32:59 GMT+0200", > "par": { > "jcr:primaryType": "nt:unstructured", > "sling:resourceType": "foundation/components/parsys", > "colctrl": { > "jcr:primaryType": "nt:unstructured", > "layout": "2;colctrl-lt0", > "sling:resourceType": "foundation/components/parsys/colctrl" 379c384 <
    context.load().json("/sample-data.json", "/content/sample/en");
    ---
    > 
    context.load().json("/sample-data.json", "/content/sample/en");
    382,383c387,388
    < 

    Import binary data from file in classpath

    <

    With the ContentLoader it is possible to import a binary file stored in the classpath beneath the unit tests. The data is stored using a nt:file/nt:resource or nt:resource node type.

    --- >

    Import binary data from file in classpath

    >

    With the ContentLoader it is possible to import a binary file stored in the classpath beneath the unit tests. The data is stored using a nt:file/nt:resource or nt:resource node type.

    385c390 <
    context.load().binaryFile("/sample-file.gif", "/content/binary/sample-file.gif");
    ---
    > 
    context.load().binaryFile("/sample-file.gif", "/content/binary/sample-file.gif");
    388c393
    < 

    Building content

    --- >

    Building content

    394c399 <

    Building content using ContentBuilder

    --- >

    Building content using ContentBuilder

    397,399c402,404 <
    context.create().resource("/content/test1", ImmutableMap.<String, Object>builder()
    <         .put("prop1", "value1")
    <         .put("prop2", "value2")
    ---
    > 
    context.create().resource("/content/test1", ImmutableMap.<String, Object>builder()
    >         .put("prop1", "value1")
    >         .put("prop2", "value2")
    403,405c408,410
    < 
    context.create().resource("/content/test1",
    <         "prop1", "value1",
    <         "prop2", "value2");
    ---
    > 
    context.create().resource("/content/test1",
    >         "prop1", "value1",
    >         "prop2", "value2");
    408c413
    < 

    Building content using ResourceBuilder

    --- >

    Building content using ResourceBuilder

    411c416 <
    context.build().resource("/content/test1")
    ---
    > 
    context.build().resource("/content/test1")
    413,415c418,420
    <         .resource("test1.1", "stringParam", "configValue1.1")
    <         .resource("test1.2", "stringParam", "configValue1.2")
    <         .resource("test1.2", "stringParam", "configValue1.3");
    ---
    >         .resource("test1.1", "stringParam", "configValue1.1")
    >         .resource("test1.2", "stringParam", "configValue1.2")
    >         .resource("test1.2", "stringParam", "configValue1.3");
    418c423
    < 

    Context Plugins

    --- >

    Context Plugins

    422c427 <

    Example:

    --- >

    Example:

    diff -b -B -r ./documentation/development/sling-testing-tools.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/sling-testing-tools.html 99c99,100 < While this information is still valid, we recommend using the tools and techniques described in the newer "Junit Server-Side Tests Support" page instead, see link below. --- > While this information is still valid, we recommend using the tools and techniques described > in the newer "Junit Server-Side Tests Support" page instead, see link below. 101c102 <

    As mentioned above, this is now replaced by the Junit Server-Side Tests Support page.

    --- >

    As mentioned above, this is now replaced by the Junit Server-Side Tests Support page.

    111c112 <

    Required bundles

    --- >

    Required bundles

    113c114 <

    Server-side JUnit tests contributed by bundles

    --- >

    Server-side JUnit tests contributed by bundles

    116c117 < Note that the JUnitServlet does not require authentication, so it would allow any client to run tests. The servlet can be disabled by configuration if needed, but in general the `/system` path should not be accessible to website visitors anyway. --- > Note that the JUnitServlet does not require authentication, so it would allow any client to run tests. The servlet can be disabled by configuration if needed, but in general the `/system` path should not be accessible to website visitors anyway. 119c120 < For tighter integration with Sling, the alternate `SlingJUnitServlet` is registered with the `sling/junit/testing` resource type and `.junit` selector, if the bundle is running in a Sling system. Using this servlet instead of the plain JUnitServlet also allows Sling authentication to be used for running the tests, and the standard Sling request processing is used, including servlet filters for example. --- > For tighter integration with Sling, the alternate `SlingJUnitServlet` is registered with the `sling/junit/testing` resource type and `.junit` selector, if the bundle is running in a Sling system. Using this servlet instead of the plain JUnitServlet also allows Sling authentication to be used for running the tests, and the standard Sling request processing is used, including servlet filters for example. 121c122 <

    To try the JUnitServlet interactively, install a bundle that contains tests registered via the Sling-Test-Regexp=.*Test bundle header.

    --- >

    To try the JUnitServlet interactively, install a bundle that contains tests registered via the Sling-Test-Regexp=.*Test bundle header.

    126c127 <

    Injection of OSGi services

    --- >

    Injection of OSGi services

    128c129 <

    Curl examples

    --- >

    Curl examples

    132,133c133,134 < "INFO_TYPE": "test", < "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit3Test)" --- > "INFO_TYPE": "test", > "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit3Test)" 135,136c136,137 < "INFO_TYPE": "test", < "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit4Test)" --- > "INFO_TYPE": "test", > "description": "testPasses(org.apache.sling.testing.samples.sampletests.JUnit4Test)" 138,139c139,140 < "INFO_TYPE": "test", < "description": "testRequiresBefore(org.apache.sling.testing.samples.sampletests.JUnit4Test)" --- > "INFO_TYPE": "test", > "description": "testRequiresBefore(org.apache.sling.testing.samples.sampletests.JUnit4Test)" 146c147 <

    Scriptable server-side tests

    --- >

    Scriptable server-side tests

    165,168c166,169 < "INFO_TYPE": "test", < "description": "verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)", < "test_metadata": { < "test_execution_time_msec": 2 --- > "INFO_TYPE": "test", > "description": "verifyContent[0](org.apache.sling.junit.scriptable.TestAllPaths)", > "test_metadata": { > "test_execution_time_msec": 2 173,174c174,175 <

    Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again.

    <

    Integration tests example

    --- >

    Test failures would be included in this JSON representation - you can test that by modifying the script to fail and making the same request again.

    >

    Integration tests example

    179c180 < The information below is outdated and needs an update, please rather directly check the source files linked above. --- > The information below is outdated and needs an update, please rather directly check the source files linked above. 194c195 <

    Running tests against existing server

    --- >

    Running tests against existing server

    197c198 <

    Remote test execution

    --- >

    Remote test execution

    199c200 <

    SlingRemoteTestRunner

    --- >

    SlingRemoteTestRunner

    203c204 <

    SlingRemoteExecutionRule

    --- >

    SlingRemoteExecutionRule

    206c207 <

    Debugging ITs

    --- >

    Debugging ITs

    208,209c209,210 <

    Then the JarExecutor is forking the VM a second time to start the server (this does not happen if connecting to an already running instance). The system environment variable jar.executor.vm.options can be used to start that VM with debug options. All debug options are described at the JPDA documentation. If running

    <
    mvn test -Djar.executor.vm.options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"
    ---
    > 

    Then the JarExecutor is forking the VM a second time to start the server (this does not happen if connecting to an already running instance). The system environment variable jar.executor.vm.options can be used to start that VM with debug options. All debug options are described at the JPDA documentation. If running

    >
    mvn test -Djar.executor.vm.options="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"
    diff -b -B -r ./documentation/development/slingstart.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/slingstart.html
    103,104c103,105
    <   The 
    <  OSGi Feature Model is meant to eventually replace the Sling Provisioning Model. If you are starting a new Sling project, please ask on the Sling developers list about the status of the Feature Model to figure out which is best suited to your needs. 
    ---
    >     The OSGi Feature Model is
    >     meant to eventually replace the Sling Provisioning Model. If you are starting a new Sling project, please ask on
    >     the Sling developers list about the status of the Feature Model to figure out which is best suited to your needs.
    109c110
    < 

    The Model

    --- >

    The Model

    121c122 <

    Run Modes

    --- >

    Run Modes

    129c130 <

    Start Levels

    --- >

    Start Levels

    131c132 <

    Artifacts

    --- >

    Artifacts

    144c145 <

    Configurations

    --- >

    Configurations

    151c152 <

    Bootstrap Command File

    --- >

    Bootstrap Command File

    164c165 <

    Settings

    --- >

    Settings

    166c167 <

    Features

    --- >

    Features

    172c173 <

    Model Files

    --- >

    Model Files

    187c188 < ignoreTopics=["myTopic"] --- > ignoreTopics=["myTopic"] 204c205 < ignoreTopics=["myTopic"] --- > ignoreTopics=["myTopic"] 208c209 <
    section header ::= '[' <section name> { ' ' <parameter-name> '=' <parameter-value> } ']'
    ---
    > 
    section header ::= '[' <section name> { ' ' <parameter-name> '=' <parameter-value> } ']'
    210c211
    < 

    Feature

    --- >

    Feature

    212c213 <

    Header Parameters

    --- >

    Header Parameters

    217,220c218,221 < Description < Default Value < Mandatory < Related JIRA Issue --- > Description > Default Value > Mandatory > Related JIRA Issue 226,229c227,230 < The name of the feature. Arbitrary String, relevant for merging. < - < yes < - --- > The name of the feature. Arbitrary String, relevant for merging. > - > yes > - 233,236c234,237 < One of plain (default), osgi.subsystem.feature, osgi.subsystem.application, osgi.subsystem.composite. < plain < no < SLING-5149 --- > One of plain (default), osgi.subsystem.feature, osgi.subsystem.application, osgi.subsystem.composite. > plain > no > SLING-5149 240,243c241,244 < The version of the feature. Purely for information purposes, has no functional effect. < - < no < SLING-6181 --- > The version of the feature. Purely for information purposes, has no functional effect. > - > no > SLING-6181 247,250c248,251 < The name(s) of the run modes for which this feature is relevant. The value contains the required run modes separated by , < - < no < - --- > The name(s) of the run modes for which this feature is relevant. The value contains the required run modes separated by , > - > no > - 254c255 <

    Artifact

    --- >

    Artifact

    256c257 <

    Header Parameters

    --- >

    Header Parameters

    261,264c262,265 < Description < Default Value < Mandatory < Related JIRA Issue --- > Description > Default Value > Mandatory > Related JIRA Issue 270,273c271,274 < The start level on which to start this artifact. < 0 < no < - --- > The start level on which to start this artifact. > 0 > no > - 278c279 <

    Content

    --- >

    Content

    280c281 <
    artifactUrl ::= [ <repository-url> '!' ] <group-id> '/' <artifact-id> [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
    ---
    > 
    artifactUrl ::= [ <repository-url> '!' ] <group-id> '/' <artifact-id> [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
    288c289
    < 

    Variables

    --- >

    Variables

    290c291 <

    Content

    --- >

    Content

    292c293 <
    <variable-name> '=' <variable-value>
    ---
    > 
    <variable-name> '=' <variable-value>
    295,297c296,298
    < 

    Settings

    <

    This section defines OSGi framework properties.

    <

    Header Parameters

    --- >

    Settings

    >

    This section defines OSGi framework properties.

    >

    Header Parameters

    299c300 <

    Content

    --- >

    Content

    301c302 <
    <framework-property-name> '=' <framework-property-value>
    ---
    > 
    <framework-property-name> '=' <framework-property-value>
    303,304c304,305
    < 

    Configurations

    <

    Header Parameters

    --- >

    Configurations

    >

    Header Parameters

    306c307 <

    Content

    --- >

    Content

    308c309 <
    name ::= <pid> ( '-' <subname> )
    ---
    > 
    name ::= <pid> ( '-' <subname> )
    318c319
    < 
    Default Configuration Format
    --- >
    Default Configuration Format
    323,324c324,325 < comment ::= '#' <any> < header ::= prop '=' value --- > comment ::= '#' <any> > header ::= prop '=' value 326,330c327,331 < symbolic-name ::= token { '.' token } < token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } < value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) < values ::= simple { ',' simple } < simple ::= '"' stringsimple '"' --- > symbolic-name ::= token { '.' token } > token ::= { [ 0..9 ] | [ a..z ] | [ A..Z ] | '_' | '-' } > value ::= [ type ] ( '[' values ']' | '(' values ')' | simple ) > values ::= simple { ',' simple } > simple ::= '"' stringsimple '"' 347c348 <
    Configurations Defined through Properties
    --- >
    Configurations Defined through Properties
    353c354 <

    Additional Section

    --- >

    Additional Section

    355c356 <

    Comments

    --- >

    Comments

    357c358 <

    Slingstart and Slingfeature projects

    --- >

    Slingstart and Slingfeature projects

    370,372c371,373 <

    Model Merging

    <

    If two or more models are supplied, they are merged feature by feature, each feature being treated as a separate unit.

    <

    Within a feature each run mode is treated separately as well.

    --- >

    Model Merging

    >

    If two or more models are supplied, they are merged feature by feature, each feature being treated as a separate unit.

    >

    Within a feature each run mode is treated separately as well.

    375c376 <

    Removing and Changing of Artifacts

    --- >

    Removing and Changing of Artifacts

    402c403 <

    Removing and Changing of Configurations

    --- >

    Removing and Changing of Configurations

    406c407 < foo="bar" --- > foo="bar" 408c409 < x="y" --- > x="y" 413c414 < a="b" --- > a="b" 418c419 <

    By default if a model inherits from another and uses the same configuration pid, the configuration is overwritten! In the above example, the configuration my.special.configuration.b contains a single property named "a".

    --- >

    By default if a model inherits from another and uses the same configuration pid, the configuration is overwritten! In the above example, the configuration my.special.configuration.b contains a single property named "a".

    422c423 < a="b" --- > a="b" 426c427 <

    Starting a server

    --- >

    Starting a server

    439,442c440,443 < Type < Description < Default Value < Mandatory --- > Type > Description > Default Value > Mandatory 448,451c449,452 < String < The port on which the server is listening for HTTP requests. Arbitrary if not set. < (-) < no --- > String > The port on which the server is listening for HTTP requests. Arbitrary if not set. > (-) > no 455,458c456,459 < String < The instance id for this server. If not set the id is automatically generated from the run modes and the port. < (-) < no --- > String > The instance id for this server. If not set the id is automatically generated from the run modes and the port. > (-) > no 462,465c463,466 < String < The comma-separated list of run modes to be set for this server. Those will be set in addition to the ones being defined by the underlying model. < (-) < no --- > String > The comma-separated list of run modes to be set for this server. Those will be set in addition to the ones being defined by the underlying model. > (-) > no 469,472c470,473 < String < The context path. If not set then Sling is deployed in the root context. < (-) < no --- > String > The context path. If not set then Sling is deployed in the root context. > (-) > no 476,479c477,480 < String < The TCP control port on which the server is listening for control commands. Arbitrary if not set. < (-) < no --- > String > The TCP control port on which the server is listening for control commands. Arbitrary if not set. > (-) > no 483,486c484,487 < int < The number of instances which should be created from this server element. In this case the configuration acts as template. The port and controlPort for all servers being generated from this configuration are random (except for the first server). < 1 < no --- > int > The number of instances which should be created from this server element. In this case the configuration acts as template. The port and controlPort for all servers being generated from this configuration are random (except for the first server). > 1 > no 490,493c491,494 < String < The folder from where to start Sling. If not set is a folder in the project's build directory named like the id. < (-) < no --- > String > The folder from where to start Sling. If not set is a folder in the project's build directory named like the id. > (-) > no 497,500c498,501 < String < The JVM options to use. < -Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true < no --- > String > The JVM options to use. > -Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true > no 504,507c505,508 < String < Additional application options. < (-) < no --- > String > Additional application options. > (-) > no 511,514c512,515 < String < See below for an explanation. < (-) < no --- > String > See below for an explanation. > (-) > no 518,521c519,522 < String < The relative filename of the file which receives both the standard output (stdout) and standard error (stderr) of the server processes. If null or empty string the server process inherits stdout from the parent process (i.e. the Maven process). The given filename must be relative to the working directory of the according server. This was added with SLING-6545. < null < no --- > String > The relative filename of the file which receives both the standard output (stdout) and standard error (stderr) of the server processes. If null or empty string the server process inherits stdout from the parent process (i.e. the Maven process). The given filename must be relative to the working directory of the according server. This was added with SLING-6545. > null > no 525c526 <

    Debugging

    --- >

    Debugging

    527c528 <

    Stopping a server

    --- >

    Stopping a server

    529,530c530,531 <

    Known Issues

    <

    Support of configuration formats

    --- >

    Known Issues

    >

    Support of configuration formats

    diff -b -B -r ./documentation/development/testing-paxexam.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/testing-paxexam.html 102c102 <

    Overview

    --- >

    Overview

    107c107 <

    Features

    --- >

    Features

    114,115c114,115 <

    Getting Started

    <

    1. Add required dependencies

    --- >

    Getting Started

    >

    1. Add required dependencies

    172c172 <

    2. Configure the build artifact to use in integration testing

    --- >

    2. Configure the build artifact to use in integration testing

    211c211 <

    3. Create a test class and provide a Configuration

    --- >

    3. Create a test class and provide a Configuration

    219c219 < testBundle("bundle.filename"), // from TestSupport --- > testBundle("bundle.filename"), // from TestSupport 237c237 <

    Overriding or adding versions

    --- >

    Overriding or adding versions

    242c242 <
    SlingOptions.versionResolver.setVersion(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server", "1.1.0");
    ---
    > 
    SlingOptions.versionResolver.setVersion(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server", "1.1.0");
    245c245
    < 
    SlingOptions.versionResolver.setVersionFromProject(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server");
    ---
    > 
    SlingOptions.versionResolver.setVersionFromProject(SLING_GROUP_ID, "org.apache.sling.jcr.oak.server");
    247,249c247,249
    < 

    Examples

    <

    Set up a tailored Sling instance

    <

    The FreemarkerTestSupport below from Scripting FreeMarker shows how to set up a tailored Sling instance to test Scripting FreeMarker itself.

    --- >

    Examples

    >

    Set up a tailored Sling instance

    >

    The FreemarkerTestSupport below from Scripting FreeMarker shows how to set up a tailored Sling instance to test Scripting FreeMarker itself.

    267c267 < @Filter(value = "(names=freemarker)") --- > @Filter(value = "(names=freemarker)") 275,277c275,277 < testBundle("bundle.filename"), < mavenBundle().groupId("org.freemarker").artifactId("freemarker").versionAsInProject(), < mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.jaxp-api-1.4").versionAsInProject(), --- > testBundle("bundle.filename"), > mavenBundle().groupId("org.freemarker").artifactId("freemarker").versionAsInProject(), > mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.jaxp-api-1.4").versionAsInProject(), 280,281c280,281 < mavenBundle().groupId("org.jsoup").artifactId("jsoup").versionAsInProject(), < mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(), --- > mavenBundle().groupId("org.jsoup").artifactId("jsoup").versionAsInProject(), > mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.hamcrest").versionAsInProject(), 288,292c288,292 < testProbeBuilder.setHeader(Constants.EXPORT_PACKAGE, "org.apache.sling.scripting.freemarker.it.app"); < testProbeBuilder.setHeader("Sling-Model-Packages", "org.apache.sling.scripting.freemarker.it.app"); < testProbeBuilder.setHeader("Sling-Initial-Content", String.join(",", < "apps/freemarker;path:=/apps/freemarker;overwrite:=true;uninstall:=true", < "content;path:=/content;overwrite:=true;uninstall:=true" --- > testProbeBuilder.setHeader(Constants.EXPORT_PACKAGE, "org.apache.sling.scripting.freemarker.it.app"); > testProbeBuilder.setHeader("Sling-Model-Packages", "org.apache.sling.scripting.freemarker.it.app"); > testProbeBuilder.setHeader("Sling-Initial-Content", String.join(",", > "apps/freemarker;path:=/apps/freemarker;overwrite:=true;uninstall:=true", > "content;path:=/content;overwrite:=true;uninstall:=true" 309c309 <

    Provide additional OSGi services for testing

    --- >

    Provide additional OSGi services for testing

    316c316 < @Filter("(name=bar)") --- > @Filter("(name=bar)") 334c334 < final Object configuration = FieldUtils.readDeclaredField(scriptEngineFactory, "configuration", true); --- > final Object configuration = FieldUtils.readDeclaredField(scriptEngineFactory, "configuration", true); 336c336 < assertThat(configuration.getClass().getName(), is("org.apache.sling.scripting.freemarker.it.app.Ranked2Configuration")); --- > assertThat(configuration.getClass().getName(), is("org.apache.sling.scripting.freemarker.it.app.Ranked2Configuration")); 345,346c345,346 < "name=bar", < "service.ranking:Integer=2" --- > "name=bar", > "service.ranking:Integer=2" 357c357 <

    Testing HTML over HTTP with jsoup

    --- >

    Testing HTML over HTTP with jsoup

    366c366 < @Filter(value = "(path=/apps/freemarker/page/simple/html.ftl)") --- > @Filter(value = "(path=/apps/freemarker/page/simple/html.ftl)") 373,374c373,374 < factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter") < .put("path", "/apps/freemarker/page/simple/html.ftl") --- > factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter") > .put("path", "/apps/freemarker/page/simple/html.ftl") 381c381 < final String url = String.format("http://localhost:%s/freemarker/simple.html", httpPort()); --- > final String url = String.format("http://localhost:%s/freemarker/simple.html", httpPort()); 387c387 < assertThat(document.title(), is("freemarker simple")); --- > assertThat(document.title(), is("freemarker simple")); 392,393c392,393 < final Element name = document.getElementById("name"); < assertThat(name.text(), is("simple")); --- > final Element name = document.getElementById("name"); > assertThat(name.text(), is("simple")); 398c398 <

    Logging

    --- >

    Logging

    diff -b -B -r ./documentation/development/version-policy.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development/version-policy.html 98c98 < Please note that this page is currently in draft stage and still being discussed. --- > Please note that this page is currently in draft stage and still being discussed. 102c102 <

    Introduction

    --- >

    Introduction

    115c115 <

    Big Sling Releases

    --- >

    Big Sling Releases

    117c117 <

    Sling Bundles

    --- >

    Sling Bundles

    119c119 <

    Package Exports

    --- >

    Package Exports

    141c141 <

    Future

    --- >

    Future

    147c147 < @Export(version = "1.0") --- > @Export(version = "1.0") 152,153c152,153 <

    Version Number Syntax

    <

    As a small reminder, this is how a version number is constructed: In OSGi version numbers are composed of four (4) segments: three integers and one string named major.minor.micro.qualifier.

    --- >

    Version Number Syntax

    >

    As a small reminder, this is how a version number is constructed: In OSGi version numbers are composed of four (4) segments: three integers and one string named major._minor_._micro_._qualifier_.

    161c161 <

    Evolution of Exported Package Versions

    --- >

    Evolution of Exported Package Versions

    171c171 <

    Evolution of Bundle Versions

    --- >

    Evolution of Bundle Versions

    180,181c180,181 <

    Examples

    <

    Pure API Bundle

    --- >

    Examples

    >

    Pure API Bundle

    189,192c189,192 < Description < api package < resource package < bundle --- > Description > api package > resource package > bundle 197,200c197,200 < Initial Release < 1.0.0 < 1.0.0 < 1.0.0 --- > Initial Release > 1.0.0 > 1.0.0 > 1.0.0 203,206c203,206 < Bug fix in a resource class < 1.0.0 < 1.0.2 < 1.0.2 --- > Bug fix in a resource class > 1.0.0 > 1.0.2 > 1.0.2 209,212c209,212 < New API in the resource package < 1.0.0 < 1.1.0 < 1.1.0 --- > New API in the resource package > 1.0.0 > 1.1.0 > 1.1.0 215,218c215,218 < New API in the api package < 1.1.0 < 1.1.0 < 1.2.0 --- > New API in the api package > 1.1.0 > 1.1.0 > 1.2.0 221,224c221,224 < API breakage in the api package < 2.0.0 < 1.1.0 < 2.0.0 --- > API breakage in the api package > 2.0.0 > 1.1.0 > 2.0.0 228c228 <

    Implementation Bundle providing API

    --- >

    Implementation Bundle providing API

    234,236c234,236 < Description < engine package < bundle --- > Description > engine package > bundle 241,243c241,243 < Initial Release < 1.0.0 < 1.0.0 --- > Initial Release > 1.0.0 > 1.0.0 246,248c246,248 < Bug fix in a engine class < 1.0.2 < 1.0.2 --- > Bug fix in a engine class > 1.0.2 > 1.0.2 251,253c251,253 < Bug fix in an internal calss < 1.0.2 < 1.0.4 --- > Bug fix in an internal calss > 1.0.2 > 1.0.4 256,258c256,258 < New API in the engine package < 1.1.0 < 1.1.0 --- > New API in the engine package > 1.1.0 > 1.1.0 261,263c261,263 < Implement new API from api 1.1.0 < 1.1.0 < 1.2.0 --- > Implement new API from api 1.1.0 > 1.1.0 > 1.2.0 266,268c266,268 < Refactor internal classes < 1.1.0 < 1.3.0 --- > Refactor internal classes > 1.1.0 > 1.3.0 271,273c271,273 < Implement API from api 2.0.0 < 1.1.0 < 2.0.0 --- > Implement API from api 2.0.0 > 1.1.0 > 2.0.0 277c277 <

    Pure Implementation Bundle

    --- >

    Pure Implementation Bundle

    279c279 <

    Importing Packages

    --- >

    Importing Packages

    294c294 <

    Future

    --- >

    Future

    296c296 <

    References

    --- >

    References

    diff -b -B -r ./documentation/development.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/development.html 95c95 <

    Using Sling as your Development Framework

    --- >

    Using Sling as your Development Framework

    108c108 <

    Testing Sling-based Applications

    --- >

    Testing Sling-based Applications

    119c119 <

    Maven Stuff

    --- >

    Maven Stuff

    130c130 <

    Sling Development

    --- >

    Sling Development

    diff -b -B -r ./documentation/getting-started/discover-sling-in-15-minutes.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/getting-started/discover-sling-in-15-minutes.html 99c99 <

    See Also

    --- >

    See Also

    102c102 <

    Prerequisites

    --- >

    Prerequisites

    105c105 <

    Getting Started

    --- >

    Getting Started

    109c109 <

    Create some content

    --- >

    Create some content

    112c112 <
    curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode
    ---
    > 
    curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode
    117,118c117,118
    < 

    This returns the properties of the /content/mynode in JSON format as we have created it above.

    <
    {"title":"some title","sling:resourceType":"foo/bar","jcr:primaryType":"nt:unstructured"}
    ---
    > 

    This returns the properties of the /content/mynode in JSON format as we have created it above.

    >
    {"title":"some title","sling:resourceType":"foo/bar","jcr:primaryType":"nt:unstructured"}
    122c122
    < 

    Render your content using server-side javascript (ESP)

    --- >

    Render your content using server-side javascript (ESP)

    149c149 <

    What next?

    --- >

    What next?

    152,153c152,153 <

    Additional examples

    <

    Let Sling generate the path of a newly created node.

    --- >

    Additional examples

    >

    Let Sling generate the path of a newly created node.

    157c157 <
    curl -X POST -u admin:admin "http://localhost:8080/content/blog"
    ---
    > 
    curl -X POST -u admin:admin "http://localhost:8080/content/blog"
    160c160
    < 
    curl -D - -u admin:admin -F"title=Adventures with Sling" "http://localhost:8080/content/blog/"
    ---
    > 
    curl -D - -u admin:admin -F"title=Adventures with Sling" "http://localhost:8080/content/blog/"
    168c168
    < 

    Add a page header with sling.include

    --- >

    Add a page header with sling.include

    174,175c174,175 < <p style="color:blue;"> < <img src="/images/sling.jpg" align="right"/> --- > <p style="color:blue;"> > <img src="/images/sling.jpg" align="right"/> 185c185 <
    curl -u admin:admin -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://localhost:8080/content/header
    ---
    > 
    curl -u admin:admin -F"sling:resourceType=foo/header" -F"headline=Hello, Sling world" http://localhost:8080/content/header
    195,196c195,196
    <     <div id="header">
    <       <% sling.include("/content/header"); %>
    ---
    >     <div id="header">
    >       <% sling.include("/content/header"); %>
    diff -b -B -r ./documentation/getting-started.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/getting-started.html
    92c92
    < 

    Run the Sling Application

    --- >

    Run the Sling Application

    94c94 <

    Sling Docker Image

    --- >

    Sling Docker Image

    101c101 <

    Sling Download

    --- >

    Sling Download

    106c106 <

    Sling Karaf

    --- >

    Sling Karaf

    108c108 <

    Explore Sling

    --- >

    Explore Sling

    111,112c111,112 <

    Where to head from here

    <

    We're on the way to update the documentation to make it more easy to get in touch with Sling. We recommend you read through following topics to get as fast as possible into Sling:

    --- >

    Where to head from here

    >

    We're on the way to update the documentation to make it more easy to get in touch with Sling. We recommend you read through following topics to get as fast as possible into Sling:

    diff -b -B -r ./documentation/karaf.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/karaf.html 93c93 <

    Sling Karaf Features

    --- >

    Sling Karaf Features

    96c96 <

    Sling Karaf Configs

    --- >

    Sling Karaf Configs

    99c99 <

    Sling Karaf Distribution

    --- >

    Sling Karaf Distribution

    102c102 <

    Getting Started

    --- >

    Getting Started

    diff -b -B -r ./documentation/legacy/logging.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/legacy/logging.html 95,96c95,97 < This document is for 3.x release of Sling Commons Log components. Refer to < Logging for documentation related to newer version. --- > This document is for 3.x release of Sling Commons Log components. Refer to > Logging for documentation related > to newer version. 98c99 <

    Introduction

    --- >

    Introduction

    108c109,110 < --- > > 111c113 <

    Initial Configuration

    --- >

    Initial Configuration

    116,118c118,120 < Property < Default < Description --- > Property > Default > Description 123,125c125,127 < org.apache.sling.commons.log.level < INFO < Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. --- > org.apache.sling.commons.log.level > INFO > Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. 128,130c130,132 < org.apache.sling.commons.log.file < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. --- > org.apache.sling.commons.log.file > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. 133,135c135,137 < org.apache.sling.commons.log.file.number < 5 < The number of rotated files to keep. --- > org.apache.sling.commons.log.file.number > 5 > The number of rotated files to keep. 138,140c140,142 < org.apache.sling.commons.log.file.size < '.'yyyy-MM-dd < Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. --- > org.apache.sling.commons.log.file.size > '.'yyyy-MM-dd > Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. 143,145c145,147 < org.apache.sling.commons.log.pattern < {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} < The MessageFormat pattern to use for formatting log messages with the root logger. --- > org.apache.sling.commons.log.pattern > {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} > The MessageFormat pattern to use for formatting log messages with the root logger. 148,150c150,152 < org.apache.sling.commons.log.julenabled < n/a < Enables the java.util.logging support. --- > org.apache.sling.commons.log.julenabled > n/a > Enables the java.util.logging support. 154c156 <

    User Configuration

    --- >

    User Configuration

    156c158 <

    Logger Configuration

    --- >

    Logger Configuration

    162,165c164,167 < Property < Type < Default < Description --- > Property > Type > Default > Description 170,191c172,187 < org.apache.sling.commons.log.level < String < INFO < Sets the logging level of the loggers. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. < < < org.apache.sling.commons.log.file < String < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property should refer to the file name of a configured Log Writer (see below). If no Log Writer is configured with the same file name an implicit Log Writer configuration with default configuration is created. < < < org.apache.sling.commons.log.pattern < String < {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} < The java.util.MessageFormat pattern to use for formatting log messages with the root logger. This is a java.util.MessageFormat pattern supporting up to six arguments: {0} The timestamp of type java.util.Date, {1} the log marker, {2} the name of the current thread, {3} the name of the logger, {4} the debug level and {5} the actual debug message. If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern. < < < org.apache.sling.commons.log.names < String\[\] < -- < A list of logger names to which this configuration applies. --- > org.apache.sling.commons.log.level > String > INFO > Sets the logging level of the loggers. This may be any of the defined logging levels DEBUG, INFO, WARN, ERROR and FATAL. > > > org.apache.sling.commons.log.file > String > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property should refer to the file name of a configured Log Writer (see below). If no Log Writer is configured with the same file name an implicit Log Writer configuration with default configuration is created. > > > org.apache.sling.commons.log.pattern > String > {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* {2} {3} {5} > The java.util.MessageFormat pattern to use for formatting log messages with the root logger. This is a java.util.MessageFormat pattern supporting up to six arguments: {0} The timestamp of type java.util.Date, {1} the log marker, {2} the name of the current thread, {3} the name of the logger, {4} the debug level and {5} the actual debug message. If the log call includes a Throwable, the stacktrace is just appended to the message regardless of the pattern. 195,196c191,193 <

    Note that multiple Logger Configurations may refer to the same Log Writer Configuration. If no Log Writer Configuration exists whose file name matches the file name set on the Logger Configuration an implicit Log Writer Configuration with default setup (daily log rotation) is internally created.

    <

    Log Writer Configuration

    --- >

    | org.apache.sling.commons.log.names | String\[\] | -- | A list of logger names to which this configuration applies. |

    >

    Note that multiple Logger Configurations may refer to the same Log Writer Configuration. If no Log Writer Configuration exists whose file name matches the file name set on the Logger Configuration an implicit Log Writer Configuration with default setup (daily log rotation) is internally created.

    >

    Log Writer Configuration

    202,204c199,201 < Property < Default < Description --- > Property > Default > Description 209,211c206,208 < org.apache.sling.commons.log.file < undefined < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. --- > org.apache.sling.commons.log.file > undefined > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. 214,216c211,213 < org.apache.sling.commons.log.file.number < 5 < The number of rotated files to keep. --- > org.apache.sling.commons.log.file.number > 5 > The number of rotated files to keep. 219,221c216,218 < org.apache.sling.commons.log.file.size < '.'yyyy-MM-dd < Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. --- > org.apache.sling.commons.log.file.size > '.'yyyy-MM-dd > Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation below for full details on log file rotation. 226c223 <

    Log File Rotation

    --- >

    Log File Rotation

    228,229c225,226 <

    As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is '.'yyyy-MM-dd causing daily log rotation. Previously log rotation defaulted to a 10MB file size limit.

    <

    Scheduled Rotation

    --- >

    As of version 2.0.6 of the Sling Commons Log bundle, the default value for log file scheduling is '.'yyyy-MM-dd causing daily log rotation. Previously log rotation defaulted to a 10MB file size limit.

    >

    Scheduled Rotation

    231c228 <

    For example, if the log file is configured as /foo/bar.log and the pattern set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/bar.log will be renamed to /foo/bar.log.2001-02-16 and logging for 2001-02-17 will continue in a new /foo/bar.log file until it rolls over the next day.

    --- >

    For example, if the log file is configured as /foo/bar.log and the pattern set to '.'yyyy-MM-dd, on 2001-02-16 at midnight, the logging file /foo/bar.log will be renamed to /foo/bar.log.2001-02-16 and logging for 2001-02-17 will continue in a new /foo/bar.log file until it rolls over the next day.

    236,238c233,235 < DatePattern < Rollover schedule < Example --- > DatePattern > Rollover schedule > Example 243,245c240,242 < '.'yyyy-MM < Rollover at the beginning of each month < At midnight of May 31st, 2002 /foo/bar.log will be copied to /foo/bar.log.2002-05. Logging for the month of June will be output to /foo/bar.log until it is also rolled over the next month. --- > '.'yyyy-MM > Rollover at the beginning of each month > At midnight of May 31st, 2002 /foo/bar.log will be copied to /foo/bar.log.2002-05. Logging for the month of June will be output to /foo/bar.log until it is also rolled over the next month. 248,250c245,247 < '.'yyyy-ww < Rollover at the first day of each week. The first day of the week depends on the locale. < Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file /foo/bar.log will be copied to /foo/bar.log.2002-23. Logging for the 24th week of 2002 will be output to /foo/bar.log until it is rolled over the next week. --- > '.'yyyy-ww > Rollover at the first day of each week. The first day of the week depends on the locale. > Assuming the first day of the week is Sunday, on Saturday midnight, June 9th 2002, the file /foo/bar.log will be copied to /foo/bar.log.2002-23. Logging for the 24th week of 2002 will be output to /foo/bar.log until it is rolled over the next week. 253,255c250,252 < '.'yyyy-MM-dd < Rollover at midnight each day. < At midnight, on March 8th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-08. Logging for the 9th day of March will be output to /foo/bar.log until it is rolled over the next day. --- > '.'yyyy-MM-dd > Rollover at midnight each day. > At midnight, on March 8th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-08. Logging for the 9th day of March will be output to /foo/bar.log until it is rolled over the next day. 258,260c255,257 < '.'yyyy-MM-dd-a < Rollover at midnight and midday of each day. < at noon, on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-AM. Logging for the afternoon of the 9th will be output to /foo/bar.log until it is rolled over at midnight. --- > '.'yyyy-MM-dd-a > Rollover at midnight and midday of each day. > at noon, on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-AM. Logging for the afternoon of the 9th will be output to /foo/bar.log until it is rolled over at midnight. 263,265c260,262 < '.'yyyy-MM-dd-HH < Rollover at the top of every hour. < At approximately 11:00.000 o'clock on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-10. Logging for the 11th hour of the 9th of March will be output to /foo/bar.log until it is rolled over at the beginning of the next hour. --- > '.'yyyy-MM-dd-HH > Rollover at the top of every hour. > At approximately 11:00.000 o'clock on March 9th, 2002, /foo/bar.log will be copied to /foo/bar.log.2002-03-09-10. Logging for the 11th hour of the 9th of March will be output to /foo/bar.log until it is rolled over at the beginning of the next hour. 268,270c265,267 < '.'yyyy-MM-dd-HH-mm < Rollover at the beginning of every minute. < At approximately 11:23,000, on March 9th, 2001, /foo/bar.log will be copied to /foo/bar.log.2001-03-09-10-22. Logging for the minute of 11:23 (9th of March) will be output to /foo/bar.log until it is rolled over the next minute. --- > '.'yyyy-MM-dd-HH-mm > Rollover at the beginning of every minute. > At approximately 11:23,000, on March 9th, 2001, /foo/bar.log will be copied to /foo/bar.log.2001-03-09-10-22. Logging for the minute of 11:23 (9th of March) will be output to /foo/bar.log until it is rolled over the next minute. 276c273 <

    Size Rotation

    --- >

    Size Rotation

    diff -b -B -r ./documentation/the-sling-engine/adapters.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/adapters.html 100c100 <

    Adaptable

    --- >

    Adaptable

    124c124 <

    Listing Adaptation Possibilities

    --- >

    Listing Adaptation Possibilities

    127c127 <

    Implementing Adaptable

    --- >

    Implementing Adaptable

    137,141c137,141 < "org.apache.sling.api.resource.Resource" : { < "If the adaptable is a AuthorizableResource." : [ < "java.util.Map", < "org.apache.sling.api.resource.ValueMap", < "org.apache.jackrabbit.api.security.user.Authorizable" --- > "org.apache.sling.api.resource.Resource" : { > "If the adaptable is a AuthorizableResource." : [ > "java.util.Map", > "org.apache.sling.api.resource.ValueMap", > "org.apache.jackrabbit.api.security.user.Authorizable" 143,144c143,144 < "If the resource is an AuthorizableResource and represents a JCR User" : "org.apache.jackrabbit.api.security.user.User", < "If the resource is an AuthorizableResource and represents a JCR Group" : "org.apache.jackrabbit.api.security.user.Group" --- > "If the resource is an AuthorizableResource and represents a JCR User" : "org.apache.jackrabbit.api.security.user.User", > "If the resource is an AuthorizableResource and represents a JCR Group" : "org.apache.jackrabbit.api.security.user.Group" 149c149 <

    Extending Adapters

    --- >

    Extending Adapters

    156c156 <

    AdapterFactory

    --- >

    AdapterFactory

    187c187 <

    AdapterManager

    --- >

    AdapterManager

    209c209 <

    SlingAdaptable

    --- >

    SlingAdaptable

    diff -b -B -r ./documentation/the-sling-engine/architecture.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/architecture.html 96,101c96,101 <
  • OSGi — The Sling application is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services.
  • <
  • Sling API — To implement content based Web applications with Sling, an API has been defined, this extends the Servlet API and provides more functionality to work on the content.
  • <
  • Request Processing — Sling takes a unique approach to handling requests in that a request URL is first resolved to a resource, then based on the resource (and only the resource) it selects the actual servlet or script to handle the request.
  • <
  • Resources — The central mantra of Sling is the Resource, which represents the resource addressed by any request URL. It is the resource that is first resolved when handling a request. Based on the resource, a first servlet or script is then accessed to actually handle the request.
  • <
  • Servlets and Scripts — Servlets and Scripts are handled uniformly in that they are represented as resources themselves and are accessible by a resource path.
  • <
  • Launchpad — Sling uses a very thin launcher to integrate with an existing servlet container, launching Sling as a Web application or providing a main class to represent a standalone Java application.
  • --- >
  • OSGi — The Sling application is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services.
  • >
  • Sling API — To implement content based Web applications with Sling, an API has been defined, this extends the Servlet API and provides more functionality to work on the content.
  • >
  • Request Processing — Sling takes a unique approach to handling requests in that a request URL is first resolved to a resource, then based on the resource (and only the resource) it selects the actual servlet or script to handle the request.
  • >
  • Resources — The central mantra of Sling is the Resource, which represents the resource addressed by any request URL. It is the resource that is first resolved when handling a request. Based on the resource, a first servlet or script is then accessed to actually handle the request.
  • >
  • Servlets and Scripts — Servlets and Scripts are handled uniformly in that they are represented as resources themselves and are accessible by a resource path.
  • >
  • Launchpad — Sling uses a very thin launcher to integrate with an existing servlet container, launching Sling as a Web application or providing a main class to represent a standalone Java application.
  • 104c104 <

    OSGi

    --- >

    OSGi

    106,107c106,107 <

    OSGi Framework

    <

    The OSGi Framework is made up of three layers – Module, Lifecycle, and Services – that define how extensible applications are built and deployed. The responsibilities of the layers are:

    --- >

    OSGi Framework

    >

    The OSGi Framework is made up of three layers – Module, Lifecycle, and Services – that define how extensible applications are built and deployed. The responsibilities of the layers are:

    109,111c109,111 <
  • Module — Defines how a module, or a Bundle in OSGi-speak, is defined. Basically, a bundle is just a plain old JAR file, whose manifest file has some defined entries. These entries identify the bundle with a symbolic name, a version and more. In addition there are headers which define what a bundle provides Export-Package and what a bundle requires to be operative Import-Package and Require-Bundle.
  • <
  • Lifecycle — The lifecycle layer defines the states a bundle may be in and describes the state changes. By providing a class, which implements the BundleActivator interface and which is named in the Bundle-Activator manifest header, a bundle may hook into the lifecycle process when the bundle is started and stopped.
  • <
  • Services — For the application to be able to interact, the OSGi Core Specification defines the service layer. This describes a registry for services, which may be shared.
  • --- >
  • Module — Defines how a module, or a Bundle in OSGi-speak, is defined. Basically, a bundle is just a plain old JAR file, whose manifest file has some defined entries. These entries identify the bundle with a symbolic name, a version and more. In addition there are headers which define what a bundle provides Export-Package and what a bundle requires to be operative Import-Package and Require-Bundle.
  • >
  • Lifecycle — The lifecycle layer defines the states a bundle may be in and describes the state changes. By providing a class, which implements the BundleActivator interface and which is named in the Bundle-Activator manifest header, a bundle may hook into the lifecycle process when the bundle is started and stopped.
  • >
  • Services — For the application to be able to interact, the OSGi Core Specification defines the service layer. This describes a registry for services, which may be shared.
  • 113c113 <

    Compendium Services

    --- >

    Compendium Services

    116,121c116,121 <
  • Log Service — Sling comes with its own implementation of the OSGi Log Service specification. The respective bundle not only provides this implementation, it also exports the SLF4J, Log4J and Commons Logging APIs needed for the Sling application to perform logging.
  • <
  • Http Service — Sling leverages the OSGi Http Service to hook into a servlet container to provide the Web Application Framework mechanism.
  • <
  • Configuration Admin Service — To simplify configuration of services in Sling, the OSGi Configuration Admin service is used. This provides a uniform API to configure services and to build configuration management agents.
  • <
  • Metatype Service — The OSGi Metatype Service defines a way to describe the data types. Sling uses this service to describe the configurations that may be created using the Configuration Admin Service. These meta type descriptions are used by configuration management agents to present to user interface to manage the configurations.
  • <
  • Event Admin Service — Sling uses the OSGi EventAdmin service to dispatch events when scheduling tasks.
  • <
  • Declarative Services — One of the most important (beside the Log Service) services used by Sling is the Declarative Services Specification. This specification defines how to declaratively create components and services to have the Declarative Services runtime actually manage the lifecycle, configuration and references of components.
  • --- >
  • Log Service — Sling comes with its own implementation of the OSGi Log Service specification. The respective bundle not only provides this implementation, it also exports the SLF4J, Log4J and Commons Logging APIs needed for the Sling application to perform logging.
  • >
  • Http Service — Sling leverages the OSGi Http Service to hook into a servlet container to provide the Web Application Framework mechanism.
  • >
  • Configuration Admin Service — To simplify configuration of services in Sling, the OSGi Configuration Admin service is used. This provides a uniform API to configure services and to build configuration management agents.
  • >
  • Metatype Service — The OSGi Metatype Service defines a way to describe the data types. Sling uses this service to describe the configurations that may be created using the Configuration Admin Service. These meta type descriptions are used by configuration management agents to present to user interface to manage the configurations.
  • >
  • Event Admin Service — Sling uses the OSGi EventAdmin service to dispatch events when scheduling tasks.
  • >
  • Declarative Services — One of the most important (beside the Log Service) services used by Sling is the Declarative Services Specification. This specification defines how to declaratively create components and services to have the Declarative Services runtime actually manage the lifecycle, configuration and references of components.
  • 123c123 <

    Sling API

    --- >

    Sling API

    125c125 <

    Request Processing

    --- >

    Request Processing

    129c129 <

    Resources

    --- >

    Resources

    133c133 <

    Servlets and Scripts

    --- >

    Servlets and Scripts

    140c140 <

    Launchpad

    --- >

    Launchpad

    diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-actors.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-actors.html 99c99 <

    OSGi Http Service Specification

    --- >

    OSGi Http Service Specification

    103c103 <

    Sling Engine

    --- >

    Sling Engine

    107c107 <

    Sling Auth Core

    --- >

    Sling Auth Core

    114c114 <

    JCR Repository

    --- >

    JCR Repository

    126c126 <

    Sling Applications

    --- >

    Sling Applications

    129,130c129,132 <
  • login -- allows the application to ensure requests are authenticated. This involves selecting an AuthenticationHandler to request credentials for authentication.

  • <
  • logout -- allows the application to forget about any authentication. This involves selecting an AuthenticationHandler to forget about credentials in the request.

  • --- >
  • >

    login -- allows the application to ensure requests are authenticated. This involves selecting an AuthenticationHandler to request credentials for authentication.

  • >
  • >

    logout -- allows the application to forget about any authentication. This involves selecting an AuthenticationHandler to forget about credentials in the request.

  • 134,136c136 < If you want to know whether a request is authenticated or not, you can inspect the result of the < HttpServletRequest.getAuthType method: If this method returns < null the request is not authenticated. --- > If you want to know whether a request is authenticated or not, you can inspect the result of the HttpServletRequest.getAuthType method: If this method returns null the request is not authenticated. diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-authenticationhandler/form-based-authenticationhandler.html 111c111 <

    AuthenticationHandler implementation

    --- >

    AuthenticationHandler implementation

    117c117 <

    AuthenticationFeedbackHandler implementation

    --- >

    AuthenticationFeedbackHandler implementation

    122c122 <

    Phase 1: Form Submission

    --- >

    Phase 1: Form Submission

    142,143c142,143 < Status < Description --- > Status > Description 148,149c148,149 < 200 OK < Authentication succeeded; credentials are valid for login; the Cookie or HTTP Session attribute is now set --- > 200 OK > Authentication succeeded; credentials are valid for login; the Cookie or HTTP Session attribute is now set 152,153c152,153 < 403 FORBIDDEN < Authentication failed; credentials are invalid for login; the Cookie or HTTP Session attribute is not set (if it was set, it is now cleared) --- > 403 FORBIDDEN > Authentication failed; credentials are invalid for login; the Cookie or HTTP Session attribute is not set (if it was set, it is now cleared) 161,162c161,162 < Authentication < Description --- > Authentication > Description 167,168c167,168 < Success < Client is redirected to the authenticated resource; the Cookie or HTTP Session attribute is now set. --- > Success > Client is redirected to the authenticated resource; the Cookie or HTTP Session attribute is now set. 171,172c171,172 < Failure < The request is redirected to the login form again; the Cookie or HTTP Session attribute is not set (if it was set, it is now cleared) --- > Failure > The request is redirected to the login form again; the Cookie or HTTP Session attribute is not set (if it was set, it is now cleared) 178c178 <

    Phase 2: Authenticated Requests

    --- >

    Phase 2: Authenticated Requests

    196c196 <

    Configuration

    --- >

    Configuration

    201,203c201,203 < Parameter < Default < Description --- > Parameter > Default > Description 208,210c208,210 < form.login.form < /system/sling/form/login < The URL (without any context path prefix) to redirect the client to to present the login form. --- > form.login.form > /system/sling/form/login > The URL (without any context path prefix) to redirect the client to to present the login form. 213,215c213,215 < form.auth.storage < cookie < The type of storage used to provide the authentication state. Valid values are cookie and session. The default value also applies if any setting other than the supported values is configured. --- > form.auth.storage > cookie > The type of storage used to provide the authentication state. Valid values are cookie and session. The default value also applies if any setting other than the supported values is configured. 218,220c218,220 < form.auth.name < sling.formauth < The name of the Cookie or HTTP Session attribute providing the authentication state. --- > form.auth.name > sling.formauth > The name of the Cookie or HTTP Session attribute providing the authentication state. 223,224c223,224 < form.auth.timeout < 30 --- > form.auth.timeout > 30 228,230c228,230 < form.credentials.name < sling.formauth < The name of the SimpleCredentials attribute used to provide the authentication data to the LoginModulePlugin. --- > form.credentials.name > sling.formauth > The name of the SimpleCredentials attribute used to provide the authentication data to the LoginModulePlugin. 233,235c233,235 < form.token.file < cookie-tokens.bin < The name of the file used to persist the security tokens. --- > form.token.file > cookie-tokens.bin > The name of the file used to persist the security tokens. 238c238 < form.default.cookie.domain --- > form.default.cookie.domain 240c240 < The domain on which cookies will be set, unless overridden in the AuthenticationInfo object. --- > The domain on which cookies will be set, unless overridden in the AuthenticationInfo object. 245c245 <

    Security Considerations

    --- >

    Security Considerations

    diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-authenticationhandler/openid-authenticationhandler.html 105,106c105 < This module has been deprecated and retired. It can be found in the < Sling attic: OpenID module but is no longer maintained or supported. --- > This module has been deprecated and retired. It can be found in the Sling attic: OpenID module but is no longer maintained or supported. 111c110 <

    Credentials Extraction

    --- >

    Credentials Extraction

    114c113 <

    Phase 1: Form Submission

    --- >

    Phase 1: Form Submission

    120,121c119,120 < Request Parameter < Description --- > Request Parameter > Description 126,127c125,126 < resource < The location to which the user initially requested access and that caused the requestCredentials method to be called. This may not be set (or be set to an empty string). --- > resource > The location to which the user initially requested access and that caused the requestCredentials method to be called. This may not be set (or be set to an empty string). 130,131c129,130 < j_reason < The reason why an earlier attempt at authentication with the OpenID authentication handler failed. This request parameter is only set if the same named request attribute has been set by the extractCredentials or the authenticationFailed method. The value of the parameter is the name of one of the OpenIDFailure constants. --- > j_reason > The reason why an earlier attempt at authentication with the OpenID authentication handler failed. This request parameter is only set if the same named request attribute has been set by the extractCredentials or the authenticationFailed method. The value of the parameter is the name of one of the OpenIDFailure constants. 134,135c133,134 < j_openid_identity < The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the authenticationFailed method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. --- > j_openid_identity > The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the authenticationFailed method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. 146c145 <

    Configuration

    --- >

    Configuration

    151,153c150,152 < Parameter < Default < Description --- > Parameter > Default > Description 156,207d154 < < < path < -- < Repository path for which this authentication handler should be used by Sling. If this is empty, the authentication handler will be disabled. < < < openid.login.form < /system/sling/openid/login < This should provide a way to capture the user's OpenID identifier. This is not the OpenID Provider's login page, however, it does not have to be a local URL. If it is a local Sling URL, it must be accessible by the anonymous user. The user is HTTP Redirect'ed to this URL. This page should POST back the user's OpenID identifier (as named by the "OpenID identifier form field" property) to the originally requested URL set in the "resource" request parameter. < < < openid.login.identifier < openid_identifier < The name of the form parameter that provides the user's OpenID identifier. By convention this is openid_identifier. Only change this if you have a very good reason to do so. < < < openid.external.url.prefix < -- < The prefix of URLs generated for the ReturnTo and TrustRoot properties of the OpenID request to the OpenID provider. Thus this URL prefix should bring back the authenticated user to this Sling instance. Configuring this property is usually necessary when running Sling behind a proxy (like Apache) since proxy mapping is not performed on the OpenID ReturnTo and TrustRoot URLs as they are sent to the OpenID Provider as form parameters. If this property is empty, the URLs are generated using the hostname found in the original request. < < < openid.use.cookie < true < Whether to use a regular Cookie or an HTTP Session to cache the OpenID authentication details. By default a regular cookie is used to prevent use of HTTP Sessions. < < < openid.cookie.domain < -- < Domain of cookie used to persist authentication. This defaults to the host name of the Sling server but may be set to a different value to share the cookie amongst a server farm or if the server is running behind a proxy. Only used if 'Use Cookie' is checked. < < < openid.cookie.name < sling.openid < Name of cookie used to persist authentication. Only used if 'Use Cookie' is checked. < < < openid.cookie.secret.key < secret < Secret key used to create a signature of the cookie value to prevent tampering. Only used if 'Use Cookie' is true. < < < openid.user.attr < openid.user < Name of the JCR SimpleCredentials attribute to to set with the OpenID User data. This attribute is used by the OpenID LoginModule to validate the OpenID user authentication data. < < < openid.property.identity < openid.identity < The name of the JCR User attribute listing one or more OpenID Identity URLs with which a user is associated. The property may be a multi- or single-valued. To resolve a JCR user ID from an OpenID identity a user is searched who lists the identity in this property. < < 209,210c156,158 <

    AuthenticationHandler implementation

    <

    extractCredentials

    --- >

    | path | -- | Repository path for which this authentication handler should be used by Sling. If this is empty, the authentication handler will be disabled. | | openid.login.form | /system/sling/openid/login | This should provide a way to capture the user's OpenID identifier. This is not the OpenID Provider's login page, however, it does not have to be a local URL. If it is a local Sling URL, it must be accessible by the anonymous user. The user is HTTP Redirect'ed to this URL. This page should POST back the user's OpenID identifier (as named by the "OpenID identifier form field" property) to the originally requested URL set in the "resource" request parameter. | | openid.login.identifier | openid_identifier | The name of the form parameter that provides the user's OpenID identifier. By convention this is openid_identifier. Only change this if you have a very good reason to do so. | | openid.external.url.prefix | -- | The prefix of URLs generated for the ReturnTo and TrustRoot properties of the OpenID request to the OpenID provider. Thus this URL prefix should bring back the authenticated user to this Sling instance. Configuring this property is usually necessary when running Sling behind a proxy (like Apache) since proxy mapping is not performed on the OpenID ReturnTo and TrustRoot URLs as they are sent to the OpenID Provider as form parameters. If this property is empty, the URLs are generated using the hostname found in the original request.| | openid.use.cookie | true | Whether to use a regular Cookie or an HTTP Session to cache the OpenID authentication details. By default a regular cookie is used to prevent use of HTTP Sessions. | | openid.cookie.domain | -- | Domain of cookie used to persist authentication. This defaults to the host name of the Sling server but may be set to a different value to share the cookie amongst a server farm or if the server is running behind a proxy. Only used if 'Use Cookie' is checked. | | openid.cookie.name | sling.openid | Name of cookie used to persist authentication. Only used if 'Use Cookie' is checked. | | openid.cookie.secret.key | secret | Secret key used to create a signature of the cookie value to prevent tampering. Only used if 'Use Cookie' is true. | | openid.user.attr | openid.user | Name of the JCR SimpleCredentials attribute to to set with the OpenID User data. This attribute is used by the OpenID LoginModule to validate the OpenID user authentication data. | | openid.property.identity | openid.identity | The name of the JCR User attribute listing one or more OpenID Identity URLs with which a user is associated. The property may be a multi- or single-valued. To resolve a JCR user ID from an OpenID identity a user is searched who lists the identity in this property. |

    >

    AuthenticationHandler implementation

    >

    extractCredentials

    220c168 <

    requestCredentials

    --- >

    requestCredentials

    226,227c174,175 < Request Parameter < Description --- > Request Parameter > Description 232,233c180,181 < resource < The location to which the user initially requested access and that caused the requestCredentials method to be called. --- > resource > The location to which the user initially requested access and that caused the requestCredentials method to be called. 236,237c184,185 < j_reason < The reason why an earlier attempt at authentication with the OpenID authentication handler failed. This request parameter is only set if the same named request attribute has been set by the extractCredentials or the authenticationFailed method. The value of the parameter is the name of one of the OpenIDFailure constants. --- > j_reason > The reason why an earlier attempt at authentication with the OpenID authentication handler failed. This request parameter is only set if the same named request attribute has been set by the extractCredentials or the authenticationFailed method. The value of the parameter is the name of one of the OpenIDFailure constants. 240,241c188,189 < j_openid_identity < The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the authenticationFailed method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. --- > j_openid_identity > The OpenID identity which could not successfully be associated with an existing JCR user. This request parameter is only set if the authenticationFailed method has been called due to inability to associate an existing and validated OpenID identity with an existing JCR user. 245c193 <

    dropCredentials

    --- >

    dropCredentials

    247,248c195,196 <

    AuthenticationFeedbackHandler implementation

    <

    authenticationFailed

    --- >

    AuthenticationFeedbackHandler implementation

    >

    authenticationFailed

    253c201 <

    authenticationSucceeded

    --- >

    authenticationSucceeded

    255c203 <

    Integration with Jackrabbit

    --- >

    Integration with Jackrabbit

    258c206 <

    Security Considerations

    --- >

    Security Considerations

    diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-authenticationhandler.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-authenticationhandler.html 103,104c103,104 < Property < Description --- > Property > Description 109,110c109,110 < path < One or more (array or vector) string values indicating the request URLs to which the AuthenticationHandler is applicable. --- > path > One or more (array or vector) string values indicating the request URLs to which the AuthenticationHandler is applicable. 113,114c113,114 < authtype < The authentication type implemented by this handler. This is a string value property and should be the same as will be used as the authentication type of the AuthenticationInfo object provided by the extractCredentials method. If this property is set, the requestCredentials method of the authentication handler is only called if the sling:authRequestLogin request parameter is either not set or is set to the same value as the authtype of the handler. This property is optional. If not set, the requestCredentials method is always called regardless of the value of the sling:authRequestLogin request parameter. --- > authtype > The authentication type implemented by this handler. This is a string value property and should be the same as will be used as the authentication type of the AuthenticationInfo object provided by the extractCredentials method. If this property is set, the requestCredentials method of the authentication handler is only called if the sling:authRequestLogin request parameter is either not set or is set to the same value as the authtype of the handler. This property is optional. If not set, the requestCredentials method is always called regardless of the value of the sling:authRequestLogin request parameter. 122,125c122,125 < URL part < Scheme < Host/Port < Path --- > URL part > Scheme > Host/Port > Path 130,145c130,145 < Absolute URL < must match < must match < request URL path is prefixed with the path < < < Host/Port with Path < ignored < must match < request URL path is prefixed with the path < < < Path < ignored < ignored < request URL path is prefixed with the path --- > Absolute URL > must match > must match > request URL path is prefixed with the path > > > Host/Port with Path > ignored > must match > request URL path is prefixed with the path > > > Path > ignored > ignored > request URL path is prefixed with the path 152c152 <

    Implementations provided by Sling

    --- >

    Implementations provided by Sling

    157,158c157,158 <

    Sample implementations

    <

    HTTP Basic Authentication Handler

    --- >

    Sample implementations

    >

    HTTP Basic Authentication Handler

    165c165 <

    Form Based Authentication Handler

    --- >

    Form Based Authentication Handler

    diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-framework.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-framework.html 107c107 <

    AuthenticationSupport

    --- >

    AuthenticationSupport

    125,127c125,127 < Credentials < Login < Consequence --- > Credentials > Login > Consequence 132,134c132,134 < present < successful < Continue with an authenticated request --- > present > successful > Continue with an authenticated request 137,139c137,139 < present < failed < Select AuthenticationHandler and call requestCredentials method --- > present > failed > Select AuthenticationHandler and call requestCredentials method 142,144c142,144 < missing < anonymous allowed < Continue with a non authenticated request using anonymous access to the repository --- > missing > anonymous allowed > Continue with a non authenticated request using anonymous access to the repository 147,149c147,149 < missing < anonymous forbidden < Select AuthenticationHandler and call requestCredentials method --- > missing > anonymous forbidden > Select AuthenticationHandler and call requestCredentials method 154,156c154 < Only one < AuthenticationHandler is able to provide credentials for a given request. If the credentials provided by the handler cannot be used to login to the repository, authentication fails and no further < AuthenticationHandler is consulted. --- > Only one AuthenticationHandler is able to provide credentials for a given request. If the credentials provided by the handler cannot be used to login to the repository, authentication fails and no further AuthenticationHandler is consulted. 158c156 <

    Request Attributes on Successful Login

    --- >

    Request Attributes on Successful Login

    163,164c161,162 < Attribute < Description --- > Attribute > Description 169,170c167,168 < org.osgi.service.http.authentication.remote.user < The user ID of the JCR Session. This attribute is used by the HTTP Service implementation to implement the HttpServletRequest.getRemoteUser method. --- > org.osgi.service.http.authentication.remote.user > The user ID of the JCR Session. This attribute is used by the HTTP Service implementation to implement the HttpServletRequest.getRemoteUser method. 173,174c171,172 < org.osgi.service.http.authentication.type < The authentication type defined by the AuthenticationHandler. This attribute is used by the HTTP Service implementation to implement the HttpServletRequest.getAuthType method. --- > org.osgi.service.http.authentication.type > The authentication type defined by the AuthenticationHandler. This attribute is used by the HTTP Service implementation to implement the HttpServletRequest.getAuthType method. 177,178c175,176 < org.apache.sling.auth.core.ResourceResolver < The ResourceResolver created from the credentials and the logged in JCR Session. This attribute may be used by servlets to access the repository. Namely the SlingMainServlet uses this request attribute to provide the ResourceResolver to handle the request. --- > org.apache.sling.auth.core.ResourceResolver > The ResourceResolver created from the credentials and the logged in JCR Session. This attribute may be used by servlets to access the repository. Namely the SlingMainServlet uses this request attribute to provide the ResourceResolver to handle the request. 181,182c179,180 < javax.jcr.Session < The JCR Session. This attribute is for backwards compatibility only. Its use is deprecated and the attribute will be removed in future versions. --- > javax.jcr.Session > The JCR Session. This attribute is for backwards compatibility only. Its use is deprecated and the attribute will be removed in future versions. 185,186c183,184 < org.apache.sling.auth.core.spi.AuthenticationInfo < The AuthenticationInfo object produced from the AuthenticationHandler. --- > org.apache.sling.auth.core.spi.AuthenticationInfo > The AuthenticationInfo object produced from the AuthenticationHandler. 193c191 <

    Anonymous Login

    --- >

    Anonymous Login

    203c201 <
  • The LoginServlet contained in the Sling Auth Core bundle registers itself with the service registration property sling.auth.requirements = "-/system/sling/login" to ensure the servlet can be accessed without requiring authentication (checks for slash or dot or end of string). The following request urls would work then without authentication: --- >
  • The LoginServlet contained in the Sling Auth Core bundle registers itself with the service registration property sling.auth.requirements = "-/system/sling/login" to ensure the servlet can be accessed without requiring authentication (checks for slash or dot or end of string). The following request urls would work then without authentication: 208c206,207 <
  • --- > > 210c209,211 <

    While the following request will still require authentication

    --- >

    While the following request will still require authentication

    >
    * /system/sling/login-test 
    > 
    212,213c213 <
  • /system/sling/login-test

  • <
  • An authentication handler may register itself with the service registration property sling.auth.requirements = "-/apps/sample/loginform" to ensure the login form can be rendered without requiring authentication.

  • --- >
  • An authentication handler may register itself with the service registration property sling.auth.requirements = "-/apps/sample/loginform" to ensure the login form can be rendered without requiring authentication.
  • 215c215 <

    Authenticator implementation

    --- >

    Authenticator implementation

    227,228c227,228 < Exit State < Description --- > Exit State > Description 233,234c233,234 < Normal < An AuthenticationHandler could be selected to which the login request could be forwarded. --- > Normal > An AuthenticationHandler could be selected to which the login request could be forwarded. 237,238c237,238 < NoAuthenticationHandlerException < No AuthenticationHandler could be selected to forward the login request to. In this case, the caller can proceed as appropriate. For example a servlet, which should just login a user may send back a 403/FORBIDDEN status because login is not possible. Or a 404/NOT FOUND handler, which tried to login as a fallback, may continue and send back the regular 404/NOT FOUND response. --- > NoAuthenticationHandlerException > No AuthenticationHandler could be selected to forward the login request to. In this case, the caller can proceed as appropriate. For example a servlet, which should just login a user may send back a 403/FORBIDDEN status because login is not possible. Or a 404/NOT FOUND handler, which tried to login as a fallback, may continue and send back the regular 404/NOT FOUND response. 241,242c241,242 < IllegalStateException < The response has already been committed and the login request cannot be processed. Normally to request login, the current response must be reset and a new response has to be prepared. This is only possible if the request has not yet been committed. --- > IllegalStateException > The response has already been committed and the login request cannot be processed. Normally to request login, the current response must be reset and a new response has to be prepared. This is only possible if the request has not yet been committed. diff -b -B -r ./documentation/the-sling-engine/authentication/authentication-tasks.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication/authentication-tasks.html 99c99 <

    Extract Credentials from the Request

    --- >

    Extract Credentials from the Request

    106c106 <

    Login to the JCR Repository

    --- >

    Login to the JCR Repository

    diff -b -B -r ./documentation/the-sling-engine/authentication.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/authentication.html 97c97 <

    Let's look at generic request processing of Sling: Sling is linked into the outside world by registering the Sling Main Servlet – implemented by the SlingMainServlet class in the Sling Engine bundle – with an OSGi HttpService. This registration is accompanied with an implementation instance of the OSGi HttpContext interface, which defines a method to authenticate requests: handleSecurity.

    --- >

    Let's look at generic request processing of Sling: Sling is linked into the outside world by registering the Sling Main Servlet – implemented by the SlingMainServlet class in the Sling Engine bundle – with an OSGi HttpService. This registration is accompanied with an implementation instance of the OSGi HttpContext interface, which defines a method to authenticate requests: handleSecurity.

    99c99,101 <

    Authentication Flow

    --- > > Authentication Flow > diff -b -B -r ./documentation/the-sling-engine/dispatching-requests.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/dispatching-requests.html 96c96 <

    Main process

    --- >

    Main process

    99,102c99,106 <
  • The client sends the request

  • <
  • This step applies only if a Servlet Container is installed and Sling is embedded: Servlet Container gets request and forwards to OSGi HttpService

  • <
  • OSGi HttpService looks for responsible registered Servlet or resource (see 102.4 of the OSGi compendium)

  • <
  • OSGi HttpService calls handleSecurity of the HttpContext associated with the servlet/resource. In case of Sling this calls into SlingMainServlet.handleSecurity and then into SlingAuthenticator.authenticate

    --- >
  • >

    The client sends the request

  • >
  • >

    This step applies only if a Servlet Container is installed and Sling is embedded: Servlet Container gets request and forwards to OSGi HttpService

  • >
  • >

    OSGi HttpService looks for responsible registered Servlet or resource (see 102.4 of the OSGi compendium)

  • >
  • >

    OSGi HttpService calls handleSecurity of the HttpContext associated with the servlet/resource. In case of Sling this calls into SlingMainServlet.handleSecurity and then into SlingAuthenticator.authenticate

    104,109c108,119 <
  • SlingAuthenticator selects an authentication handler for the request and forwards the authenticate call. On success a javax.jcr.Session is created, the request attributes required by the HTTP Service spec are set (like org.osgi.service.http.authentication.remote.user and org.osgi.service.http.authentication.typeand also the javax.jcr.Session which is used later is set in the request attributes. On success, continue with step 5.

  • <
  • If authentication fails either an anonymous session is acquired (if anonymous is allowed per configuration) or the login method is called. If anonymous is allowed, continue with step 5.

  • <
  • The login method selects an AuthenticationHandler and forwards the login call to the AuthenticationHandler.requestAuthentication method to cause the client to authenticate. Request processing stops here (SlingMainServlet.handleSecurity returns false).

  • < <
  • After getting a response the HttpService either terminates the request (if authentication failed and SlingMainServlet.handleSecurity returned false) or continues by either spooling the resource or in the case of Sling calling the SlingMainServlet.service method.

  • <
  • The SlingMainServlet.service method is the entry point into the Sling proper. This method sets up the request:

    --- >
  • >

    SlingAuthenticator selects an authentication handler for the request and forwards the authenticate call. On success a javax.jcr.Session is created, the request attributes required by the HTTP Service spec are set (like org.osgi.service.http.authentication.remote.user and org.osgi.service.http.authentication.typeand also the javax.jcr.Session which is used later is set in the request attributes. On success, continue with step 5.

  • >
  • >

    If authentication fails either an anonymous session is acquired (if anonymous is allowed per configuration) or the login method is called. If anonymous is allowed, continue with step 5.

  • >
  • >

    The login method selects an AuthenticationHandler and forwards the login call to the AuthenticationHandler.requestAuthentication method to cause the client to authenticate. Request processing stops here (SlingMainServlet.handleSecurity returns false).

  • > > >
  • >

    After getting a response the HttpService either terminates the request (if authentication failed and SlingMainServlet.handleSecurity returned false) or continues by either spooling the resource or in the case of Sling calling the SlingMainServlet.service method.

  • >
  • >

    The SlingMainServlet.service method is the entry point into the Sling proper. This method sets up the request:

    116,119c126,133 <
  • <
  • After this setup, the request level filters are called (the ones registered as javax.servlet.Filter with the property filter.scope=request, see Filters for details). If any called filter doesn't call FilterChain.doFilter at the end of the Filter.doFilter method request processing stops here.

  • <
  • After having called all request level filters, the component level filters (registered with the property filter.scope=component, see Filters for details) are called.

  • <
  • After having called the component level filters, the request servlet or script is finally called to process the request.

  • --- > > >
  • >

    After this setup, the request level filters are called (the ones registered as javax.servlet.Filter with the property filter.scope=request, see Filters for details). If any called filter doesn't call FilterChain.doFilter at the end of the Filter.doFilter method request processing stops here.

  • >
  • >

    After having called all request level filters, the component level filters (registered with the property filter.scope=component, see Filters for details) are called.

  • >
  • >

    After having called the component level filters, the request servlet or script is finally called to process the request.

  • 121c135 <

    Include/Forward

    --- >

    Include/Forward

    124,128c138,147 <
  • Code in the processing servlet or script calls RequestDispatcher.include or RequestDispatcher.forward.

  • <
  • The resource is resolved though ResourceResolver.getResource (if the RequestDispatcher has not been created with a resource already)

  • <
  • The servlet or script to handle the resource is resolved calling the ServletResolver.resolverServlet method.

  • <
  • The component level filters (registered with the property filter.scope=component) are called again (see Filters for details).

  • <
  • The servlet or script is called to process the request.

  • --- >
  • >

    Code in the processing servlet or script calls RequestDispatcher.include or RequestDispatcher.forward.

  • >
  • >

    The resource is resolved though ResourceResolver.getResource (if the RequestDispatcher has not been created with a resource already)

  • >
  • >

    The servlet or script to handle the resource is resolved calling the ServletResolver.resolverServlet method.

  • >
  • >

    The component level filters (registered with the property filter.scope=component) are called again (see Filters for details).

  • >
  • >

    The servlet or script is called to process the request.

  • 131c150 <

    Included Request Attributes

    --- >

    Included Request Attributes

    136,137c155,156 < Attribute Name
    Attribute Type < Description --- > Attribute Name
    Attribute Type > Description 142,143c161,162 < org.apache.sling.api.include.servlet
    javax.servlet.Servlet < The name of the request attribute containing the Servlet which included the servlet currently being active. --- > org.apache.sling.api.include.servlet
    javax.servlet.Servlet > The name of the request attribute containing the Servlet which included the servlet currently being active. 146,147c165,166 < org.apache.sling.api.include.resource
    org.apache.sling.api.resource.Resource < The name of the request attribute containing the Resource underlying the Servlet which included the servlet currently being active. --- > org.apache.sling.api.include.resource
    org.apache.sling.api.resource.Resource > The name of the request attribute containing the Resource underlying the Servlet which included the servlet currently being active. 150,151c169,170 < org.apache.sling.api.include.request_path_info
    org.apache.sling.api.request.RequestPathInfo < The name of the request attribute containing the RequestPathInfo underlying the Servlet which included the servlet currently being active --- > org.apache.sling.api.include.request_path_info
    org.apache.sling.api.request.RequestPathInfo > The name of the request attribute containing the RequestPathInfo underlying the Servlet which included the servlet currently being active 154,155c173,174 < javax.servlet.include.request_uri
    String < The name of the request attribute containing the HttpServletRequest.getRequestURI() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    Note: In Sling, the HttpServletRequest.getRequestURI() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. --- > javax.servlet.include.request_uri
    String > The name of the request attribute containing the HttpServletRequest.getRequestURI() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    **Note:** In Sling, the HttpServletRequest.getRequestURI() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. 158,159c177,178 < javax.servlet.include.context_path
    String < The name of the request attribute containing the HttpServletRequest.getContextPath() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    Note: In Sling, the HttpServletRequest.getContextPath() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. --- > javax.servlet.include.context_path
    String > The name of the request attribute containing the HttpServletRequest.getContextPath() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    **Note:** In Sling, the HttpServletRequest.getContextPath() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. 162,163c181,182 < javax.servlet.include.servlet_path
    String < The name of the request attribute containing the HttpServletRequest.getServletPath() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    Note: In Sling, the HttpServletRequest.getServletPath() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. --- > javax.servlet.include.servlet_path
    String > The name of the request attribute containing the HttpServletRequest.getServletPath() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    **Note:** In Sling, the HttpServletRequest.getServletPath() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. 166,167c185,186 < javax.servlet.include.path_info
    String < The name of the request attribute containing the HttpServletRequest.getPathInfo() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    Note: In Sling, the HttpServletRequest.getPathInfo() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. --- > javax.servlet.include.path_info
    String > The name of the request attribute containing the HttpServletRequest.getPathInfo() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    **Note:** In Sling, the HttpServletRequest.getPathInfo() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. 170,171c189,190 < javax.servlet.include.query_string
    String < The name of the request attribute containing the HttpServletRequest.getQueryString() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    Note: In Sling, the HttpServletRequest.getQueryString() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. --- > javax.servlet.include.query_string
    String > The name of the request attribute containing the HttpServletRequest.getQueryString() of the request which included the servlet currently being active underlying the Servlet which included the servlet currently being active.
    **Note:** In Sling, the HttpServletRequest.getQueryString() method will always return the same result regardless of whether it is called from the client request processing servlet or script or from an included servlet or script. This request attribute is set for compatibility with the Servlet API specification. diff -b -B -r ./documentation/the-sling-engine/errorhandling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/errorhandling.html 102c102 <

    Resetting the Response

    --- >

    Resetting the Response

    111c111,112 < --- > > 116c117,118 < --- > > 118c120 <

    HTTP Status Codes

    --- >

    HTTP Status Codes

    130c132 <

    Uncaught Throwables

    --- >

    Uncaught Throwables

    134c136 <

    Default Handler

    --- >

    Default Handler

    141,145c143 <

    Starting with Sling Servlet Resolver version 2.0.10 the default error handler servlet is looked up using the string default as the request extension and the provided default servlet is registered as <prefix>/sling/servlet/errorhandler/default.servlet where < < is the last entry in the resource resolver search path, < /libs by default. <

    --- >

    Starting with Sling Servlet Resolver version 2.0.10 the default error handler servlet is looked up using the string default as the request extension and the provided default servlet is registered as <prefix>/sling/servlet/errorhandler/default.servlet where is the last entry in the resource resolver search path, /libs by default.

    diff -b -B -r ./documentation/the-sling-engine/featureflags.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/featureflags.html 110,111c110,111 < Property < Description --- > Property > Description 116,117c116,117 < name < Short name of this feature. This name is used to refer to this feature when checking for it to be enabled or not. This property is required and defaults to a name derived from the feature's class name and object identity. It is strongly recommended to define a useful and unique for the feature --- > name > Short name of this feature. This name is used to refer to this feature when checking for it to be enabled or not. This property is required and defaults to a name derived from the feature's class name and object identity. It is strongly recommended to define a useful and unique for the feature 120,121c120,121 < description < Description for the feature. The intent is to descibe the behaviour of the application if this feature would be enabled. It is recommended to define this property. The default value is the value of the name property. --- > description > Description for the feature. The intent is to descibe the behaviour of the application if this feature would be enabled. It is recommended to define this property. The default value is the value of the name property. 124,125c124,125 < enabled < Boolean flag indicating whether the feature is enabled or not by this configuration --- > enabled > Boolean flag indicating whether the feature is enabled or not by this configuration diff -b -B -r ./documentation/the-sling-engine/filters.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/filters.html 98,102c98,103 < See < SLING-1213, < SLING-1734, and < Registering filters with Sling for more details. The < NoPropertyFilter from our integration tests shows an example Sling Filter. --- > See SLING-1213, > SLING-1734, and > Registering filters with Sling > for more details. The > NoPropertyFilter > from our integration tests shows an example Sling Filter. 108,112c109,113 < Property < Type < Default Value < Valid Values < Description --- > Property > Type > Default Value > Valid Values > Description 117,135c118,136 < sling.filter.scope < String, String[] or Vector<String> < request < REQUEST, INCLUDE, FORWARD, ERROR, COMPONENT < Indication of which chain the filter should be added to. This property is required. If it is missing from the service, the service is ignored because it is assumed another consumer will be interested in using the service. Any unknown values of this property are also ignored causing the service to be completely ignored if none of the values provided by the property are valid. See below for the description of the filter chains. < < < sling.filter.pattern < String < (-) < Any String value < Restrict the filter to paths that match the supplied regular expression. Requires Sling Engine 2.4.0. < < < service.ranking < Integer < 0 < Any Integer value < Indication of where to place the filter in the filter chain. The higher the number the earlier in the filter chain. This value may span the whole range of integer values. Two filters with equal service.ranking property value (explicitly set or default value of zero) will be ordered according to their service.id service property as described in section 5.2.5, Service Properties, of the OSGi Core Specification R 4.2. --- > sling.filter.scope > String, String[] or Vector<String> > request > REQUEST, INCLUDE, FORWARD, ERROR, COMPONENT > Indication of which chain the filter should be added to. This property is required. If it is missing from the service, the service is ignored because it is assumed another consumer will be interested in using the service. Any unknown values of this property are also ignored causing the service to be completely ignored if none of the values provided by the property are valid. See below for the description of the filter chains. > > > sling.filter.pattern > String > (-) > Any String value > Restrict the filter to paths that match the supplied regular expression. Requires Sling Engine 2.4.0. > > > service.ranking > Integer > 0 > Any Integer value > Indication of where to place the filter in the filter chain. The higher the number the earlier in the filter chain. This value may span the whole range of integer values. Two filters with equal service.ranking property value (explicitly set or default value of zero) will be ordered according to their service.id service property as described in section 5.2.5, Service Properties, of the OSGi Core Specification R 4.2. 139c140 <

    Filter Chains

    --- >

    Filter Chains

    145,147c146,148 < sling.filter.scope < Servlet API Correspondence < Description --- > sling.filter.scope > Servlet API Correspondence > Description 152,154c153,155 < REQUEST < REQUEST < Filters are called once per request hitting Sling from the outside. These filters are called after the resource addressed by the request URL and the Servlet or script to process the request has been resolved before the COMPONENT filters (if any) and the Servlet or script are called. --- > REQUEST > REQUEST > Filters are called once per request hitting Sling from the outside. These filters are called after the resource addressed by the request URL and the Servlet or script to process the request has been resolved before the COMPONENT filters (if any) and the Servlet or script are called. 157,159c158,160 < INCLUDE < INCLUDE < Filters are called upon calling the RequestDispatcher.include method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. --- > INCLUDE > INCLUDE > Filters are called upon calling the RequestDispatcher.include method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. 162,164c163,165 < FORWARD < FORWARD < Filters are called upon calling the RequestDispatcher.forward method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. --- > FORWARD > FORWARD > Filters are called upon calling the RequestDispatcher.forward method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called. 167,169c168,170 < ERROR < ERROR < Filters are called upon HttpServletResponse.sendError or any uncaught Throwable before resolving the error handler Servlet or script. --- > ERROR > ERROR > Filters are called upon HttpServletResponse.sendError or any uncaught Throwable before resolving the error handler Servlet or script. 172,174c173,175 < COMPONENT < REQUEST,INCLUDE,FORWARD < The COMPONENT scoped filters are present for backwards compatibility with earlier Sling Engine releases. These filters will be called among the INCLUDE and FORWARD filters upon RequestDispatcher.include or RequestDispatcher.forward as well as before calling the request level Servlet or script after the REQUEST filters. --- > COMPONENT > REQUEST,INCLUDE,FORWARD > The COMPONENT scoped filters are present for backwards compatibility with earlier Sling Engine releases. These filters will be called among the INCLUDE and FORWARD filters upon RequestDispatcher.include or RequestDispatcher.forward as well as before calling the request level Servlet or script after the REQUEST filters. 179c180 <

    Filter Processing

    --- >

    Filter Processing

    188c189,190 < --- > > 196c198,199 < --- > > 206c209,210 < --- > > 209c213 <

    Disabling Filters

    --- >

    Disabling Filters

    211c215 <

    Troubleshooting

    --- >

    Troubleshooting

    213c217 <

    Recent Requests plugin

    --- >

    Recent Requests plugin

    229c233 <

    Config Status plugin

    --- >

    Config Status plugin

    252c256 <

    Support in Sling Engine 2.1.0

    --- >

    Support in Sling Engine 2.1.0

    diff -b -B -r ./documentation/the-sling-engine/mappings-for-resource-resolution.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/mappings-for-resource-resolution.html 100,101c100,101 <

    Configuration

    <

    Properties

    --- >

    Configuration

    >

    Properties

    105,109c105,109 <
  • sling:match – This property when set on a node in the /etc/map tree (see below) defines a partial regular expression which is used instead of the node's name to match the incoming request. This property is only needed if the regular expression includes characters which are not valid JCR name characters. The list of invalid characters for JCR names is: /, :, [, ], *, ', ", \, | and any whitespace except blank space. In addition a name without a name space may not be . or .. and a blank space is only allowed inside the name.
  • <
  • sling:redirect – This property when set on a node in the /etc/map tree (see below) causes a redirect response to be sent to the client, which causes the client to send in a new request with the modified location. The value of this property is applied to the actual request and sent back as the value of Location response header.
  • <
  • sling:status – This property defines the HTTP status code sent to the client with the sling:redirect response. If this property is not set, it defaults to 302 (Found). Other status codes supported are 300 (Multiple Choices), 301 (Moved Permanently), 303 (See Other), and 307 (Temporary Redirect).
  • <
  • sling:internalRedirect – This property when set on a node in the /etc/map tree (see below) causes the current path to be modified internally to continue with resource resolution. This is a multi-value property, i.e. multiple paths can be given here, which are tried one after another until one resolved to a resource.
  • <
  • sling:alias – The property may be set on any resource to indicate an alias name for the resource. For example the resource /content/visitors may have the sling:alias property set to besucher allowing the resource to be addressed in an URL as /content/besucher.
  • --- >
  • sling:match – This property when set on a node in the /etc/map tree (see below) defines a partial regular expression which is used instead of the node's name to match the incoming request. This property is only needed if the regular expression includes characters which are not valid JCR name characters. The list of invalid characters for JCR names is: /, :, [, ], *, ', ", \, | and any whitespace except blank space. In addition a name without a name space may not be . or .. and a blank space is only allowed inside the name.
  • >
  • sling:redirect – This property when set on a node in the /etc/map tree (see below) causes a redirect response to be sent to the client, which causes the client to send in a new request with the modified location. The value of this property is applied to the actual request and sent back as the value of Location response header.
  • >
  • sling:status – This property defines the HTTP status code sent to the client with the sling:redirect response. If this property is not set, it defaults to 302 (Found). Other status codes supported are 300 (Multiple Choices), 301 (Moved Permanently), 303 (See Other), and 307 (Temporary Redirect).
  • >
  • sling:internalRedirect – This property when set on a node in the /etc/map tree (see below) causes the current path to be modified internally to continue with resource resolution. This is a multi-value property, i.e. multiple paths can be given here, which are tried one after another until one resolved to a resource.
  • >
  • sling:alias – The property may be set on any resource to indicate an alias name for the resource. For example the resource /content/visitors may have the sling:alias property set to besucher allowing the resource to be addressed in an URL as /content/besucher.
  • 111c111 <

    Limitation of sling:alias for Principal with a limited access

    --- >

    Limitation of sling:alias for Principal with a limited access

    119c119 <

    Node Types

    --- >

    Node Types

    122,124c122,124 <
  • sling:ResourceAlias – This mixin node type defines the sling:alias property and may be attached to any node, which does not otherwise allow setting a property named sling:alias
  • <
  • sling:MappingSpec – This mixin node type defines the sling:match, sling:redirect, sling:status, and sling:internaleRedirect properties to define a matching and redirection inside the /etc/map hierarchy.
  • <
  • sling:Mapping – Primary node type which may be used to easily construct entries in the /etc/map tree. The node type extends the sling:MappingSpec mixin node type to allow setting the required matching and redirection. In addition the sling:Resource mixin node type is extended to allow setting a resource type and the nt:hierarchyNode node type is extended to allow locating nodes of this node type below nt:folder nodes.
  • --- >
  • sling:ResourceAlias – This mixin node type defines the sling:alias property and may be attached to any node, which does not otherwise allow setting a property named sling:alias
  • >
  • sling:MappingSpec – This mixin node type defines the sling:match, sling:redirect, sling:status, and sling:internaleRedirect properties to define a matching and redirection inside the /etc/map hierarchy.
  • >
  • sling:Mapping – Primary node type which may be used to easily construct entries in the /etc/map tree. The node type extends the sling:MappingSpec mixin node type to allow setting the required matching and redirection. In addition the sling:Resource mixin node type is extended to allow setting a resource type and the nt:hierarchyNode node type is extended to allow locating nodes of this node type below nt:folder nodes.
  • 127,128c127,128 <

    Namespace Mangling

    <

    There are systems accessing Sling, which have a hard time handling URLs containing colons – : – in the path part correctly. Since URLs produced and supported by Sling may contain colons because JCR Item based resources may be namespaced (e.g. jcr:content), a special namespace mangling feature is built into the ResourceResolver.resolve and ResourceResolver(map) methods.

    --- >

    Namespace Mangling

    >

    There are systems accessing Sling, which have a hard time handling URLs containing colons – : – in the path part correctly. Since URLs produced and supported by Sling may contain colons because JCR Item based resources may be namespaced (e.g. jcr:content), a special namespace mangling feature is built into the ResourceResolver.resolve and ResourceResolver(map) methods.

    132,133c132,133 <

    Example: The path /content/*a*sample/*jcr*content/*jcr*data.png{*} is modified by namespace mangling in the {*}resolve{*} method to get */content/*a*sample/jcr:content/jcr:data.png{*}{}. The prefix *\*a{*}{}{} is not modified because there is no registered namespace with prefix a. On the other hand the prefix {*}jcr{*} is modified because there is of course a registered namespace with prefix jcr.

    <

    Root Level Mappings

    --- >

    Example: The path /content/*a*sample/*jcr*content/*jcr*data.png{*} is modified by namespace mangling in the {*}resolve{*} method to get */content/*a*sample/jcr:content/jcr:data.png{*}{}*. The prefix* *\*a{*}{}{} is not modified because there is no registered namespace with prefix a. On the other hand the prefix {*}jcr{*} is modified because there is of course a registered namespace with prefix jcr.

    >

    Root Level Mappings

    135c135 <

    Mapping Entry Specification

    --- >

    Mapping Entry Specification

    142c142 < | +-- sling:redirect = "http://www.example.com/" --- > | +-- sling:redirect = "http://www.example.com/" 144c144 < | +-- sling:internalRedirect = "/example" --- > | +-- sling:internalRedirect = "/example" 146,147c146,147 < | +-- sling:match = ".+\.example\.com\.80" < | +-- sling:redirect = "http://www.example.com/" --- > | +-- sling:match = ".+\.example\.com\.80" > | +-- sling:redirect = "http://www.example.com/" 149,150c149,150 < | +-- sling:match = "localhost\.\d*" < | +-- sling:internalRedirect = "/content" --- > | +-- sling:match = "localhost\.\d*" > | +-- sling:internalRedirect = "/content" 152c152 < | | +-- sling:internalRedirect = "/scripts" --- > | | +-- sling:internalRedirect = "/scripts" 154c154 < | | +-- sling:internalRedirect = "http://gbiv.com" --- > | | +-- sling:internalRedirect = "http://gbiv.com" 156c156 < | +-- sling:internalRedirect = "/anecdotes/$1" --- > | +-- sling:internalRedirect = "/anecdotes/$1" 158,159c158,159 < +-- sling:match = "$1.example.com/$2" < +-- sling:internalRedirect = "/content/([^/]+)/(.*)" --- > +-- sling:match = "$1.example.com/$2" > +-- sling:internalRedirect = "/content/([^/]+)/(.*)" 165,168c165,168 < Regular Expression < Redirect < Internal < Description --- > Regular Expression > Redirect > Internal > Description 173,176c173,176 < http/example.com.80 < http://www.example.com < no < Redirect all requests to the Second Level Domain to www --- > http/example.com.80 > http://www.example.com > no > Redirect all requests to the Second Level Domain to www 179,182c179,182 < http/www.example.com.80 < /example < yes < Prefix the URI paths of the requests sent to this domain with the string /example --- > http/www.example.com.80 > /example > yes > Prefix the URI paths of the requests sent to this domain with the string /example 185,188c185,188 < http/.+.example.com.80 < http://www.example.com < no < Redirect all requests to sub domains to www. The actual regular expression for the host.port segment is taken from the sling:match property. --- > http/.+.example.com.80 > http://www.example.com > no > Redirect all requests to sub domains to www. The actual regular expression for the host.port segment is taken from the sling:match property. 191,194c191,194 < http/localhost.\d* < /content < yes < Prefix the URI paths with /content for requests to localhost, regardless of actual port the request was received on. This entry only applies if the URI path does not start with /cgi-bin, gateway or stories because there are longer match entries. The actual regular expression for the host.port segment is taken from the sling:match property. --- > http/localhost.\d* > /content > yes > Prefix the URI paths with /content for requests to localhost, regardless of actual port the request was received on. This entry only applies if the URI path does not start with /cgi-bin, gateway or stories because there are longer match entries. The actual regular expression for the host.port segment is taken from the sling:match property. 197,200c197,200 < http/localhost.\d*/cgi-bin < /scripts < yes < Replace the /cgi-bin prefix in the URI path with /scripts for requests to localhost, regardless of actual port the request was received on. --- > http/localhost.\d*/cgi-bin > /scripts > yes > Replace the /cgi-bin prefix in the URI path with /scripts for requests to localhost, regardless of actual port the request was received on. 203,206c203,206 < http/localhost.\d*/gateway < http://gbiv.com < yes < Replace the /gateway prefix in the URI path with http://gbiv.com for requests to localhost, regardless of actual port the request was received on. --- > http/localhost.\d*/gateway > http://gbiv.com > yes > Replace the /gateway prefix in the URI path with http://gbiv.com for requests to localhost, regardless of actual port the request was received on. 209,212c209,212 < http/localhost.\d*/(stories) < /anecdotes/stories < yes < Prepend the URI paths starting with /stories with /anecdotes for requests to localhost, regardless of actual port the request was received on. --- > http/localhost.\d*/(stories) > /anecdotes/stories > yes > Prepend the URI paths starting with /stories with /anecdotes for requests to localhost, regardless of actual port the request was received on. 216c216 <

    Regular Expression Matching

    --- >

    Regular Expression Matching

    219,220c219,220 <
    String path = request.getScheme + "/" + request.getServerName()
    <         + "." + request.getServerPort() + "/" + request.getPathInfo();
    ---
    > 
    String path = request.getScheme + "/" + request.getServerName()
    >         + "." + request.getServerPort() + "/" + request.getPathInfo();
    235,238c235,238
    < 

    Regular Expressions for Reverse Mappings

    <

    By default using regular expressions with wildcards will prevent to use the mapping entry for reverse mappings (see above).

    <

    There is one exception though: If there is a sling:internalRedirect property containing a regular expression the map entry will be exclusively used for reverse mappings (i.e. used only for ResourceResolver.map(...)) (see also SLING-2560). The same resource may carry a sling:match property with wildcards and groups referring to the groups being defined in the sling:internalRedirect property.

    <

    This example

    --- >

    Regular Expressions for Reverse Mappings

    >

    By default using regular expressions with wildcards will prevent to use the mapping entry for reverse mappings (see above).

    >

    There is one exception though: If there is a sling:internalRedirect property containing a regular expression the map entry will be exclusively used for reverse mappings (i.e. used only for ResourceResolver.map(...)) (see also SLING-2560). The same resource may carry a sling:match property with wildcards and groups referring to the groups being defined in the sling:internalRedirect property.

    >

    This example

    242,243c242,243 < | +-- sling:internalRedirect = "/content/([^/]+)/home/(.*)" < | +-- sling:match = "$1/index/$2" --- > | +-- sling:internalRedirect = "/content/([^/]+)/home/(.*)" > | +-- sling:match = "$1/index/$2" 249,250c249,250 < Pattern < Replacement --- > Pattern > Replacement 255,256c255,256 < /content/([^/]+)/home/(.*) < http://example.com/$1/index/$2 --- > /content/([^/]+)/home/(.*) > http://example.com/$1/index/$2 260c260 <

    Redirection Values

    --- >

    Redirection Values

    270,271c270,271 <

    Resource Tree Access

    <

    The result of Root Level Mapping is an absolute or relative path to a resource. If the path is relative – e.g. myproject/docroot/sample.gif – the resource resolver search path (ResourceResolver.getSearchPath() is used to build absolute paths and resolve the resource. In this case the first resource found is used. If the result of Root Level Mapping is an absolute path, the path is used as is.

    --- >

    Resource Tree Access

    >

    The result of Root Level Mapping is an absolute or relative path to a resource. If the path is relative – e.g. myproject/docroot/sample.gif – the resource resolver search path (ResourceResolver.getSearchPath() is used to build absolute paths and resolve the resource. In this case the first resource found is used. If the result of Root Level Mapping is an absolute path, the path is used as is.

    279c279 <

    Drilling Down the Resource Tree

    --- >

    Drilling Down the Resource Tree

    283,284c283,284 < Resource current = getResource("/"); < String[] segments = path.split("/"); --- > Resource current = getResource("/"); > String[] segments = path.split("/"); 306c306 <

    Rebuild The Vanity Bloom Filter

    --- >

    Rebuild The Vanity Bloom Filter

    316c316 <

    Debugging Issues

    --- >

    Debugging Issues

    diff -b -B -r ./documentation/the-sling-engine/request-listeners.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/request-listeners.html 99c99 < static final String SERVICE_NAME = "org.apache.sling.api.request.SlingRequestListener"; --- > static final String SERVICE_NAME = "org.apache.sling.api.request.SlingRequestListener"; 113,114c113,114 <

    There are no special properties to set.

    <

    Supported types of events

    --- >

    There are no special properties to set.

    >

    Supported types of events

    119,120c119,120 < events types (SlingRequestEvent.EventType) < point in time --- > events types (SlingRequestEvent.EventType) > point in time 125,126c125,126 < EVENT_INIT < after entering the service method in SlingMainServlet. Note that this will be after the handleSecurity call. --- > EVENT_INIT > after entering the service method in SlingMainServlet. Note that this will be after the handleSecurity call. 129,130c129,130 < EVENT_DESTROY < at the end of the service method in SlingMainServlet --- > EVENT_DESTROY > at the end of the service method in SlingMainServlet diff -b -B -r ./documentation/the-sling-engine/request-parameters.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/request-parameters.html 96c96 <

    Servlet API

    --- >

    Servlet API

    101,102c101,102 < Method < Description --- > Method > Description 107,108c107,108 < HttpServletRequest.getQueryString() < Returns the query part of the request URL --- > HttpServletRequest.getQueryString() > Returns the query part of the request URL 111,112c111,112 < ServletRequest.getParameter(String) < Returns the (first) named parameter --- > ServletRequest.getParameter(String) > Returns the (first) named parameter 115,116c115,116 < ServletRequest.getParameterValues(String) < Returns all parameters of that name --- > ServletRequest.getParameterValues(String) > Returns all parameters of that name 119,120c119,120 < ServletRequest.getParameterMap() < Returns all parameters as a map of String[] --- > ServletRequest.getParameterMap() > Returns all parameters as a map of String[] 123,124c123,124 < ServletRequest.getParameterNames() < Returns an enumeration of the names of the parameters --- > ServletRequest.getParameterNames() > Returns an enumeration of the names of the parameters 127,128c127,128 < ServletRequest.getParts() < Returns all parts of the multipart request (since v3.0) --- > ServletRequest.getParts() > Returns all parts of the multipart request (since v3.0) 131,132c131,132 < ServletRequest.getPart(String) < Returns the request part with that name in case of multipart requests (since v3.0) --- > ServletRequest.getPart(String) > Returns the request part with that name in case of multipart requests (since v3.0) 136,137c136,137 <

    The actual encoding of the parameters is all but safe because the encoding of URLs is not very well defined and browsers do not set the character encoding when sending post data. Fortunately, they use the same character encoding for sending back form content as was used by the server to send the form.

    <

    Sling API

    --- >

    The actual encoding of the parameters is all but safe because the encoding of URLs is not very well defined and browsers do not set the character encoding when sending post data. Fortunately, they use the same character encoding for sending back form content as was used by the server to send the form.

    >

    Sling API

    142,143c142,143 < Type < Description --- > Type > Description 148,149c148,149 < Raw Content < Byte array and InputStream representation of the request parameter values. You will generally use the InputStream to handle uploaded files. --- > Raw Content > Byte array and InputStream representation of the request parameter values. You will generally use the InputStream to handle uploaded files. 152,153c152,153 < String Content < Access the values as strings is some given encoding (see below) or by requesting the conversion using an explicit encoding. --- > String Content > Access the values as strings is some given encoding (see below) or by requesting the conversion using an explicit encoding. 156,157c156,157 < File Uploads < Find out whether a parameter is a file upload, get the size in bytes of the parameter value and client side file name as sent by the browser. --- > File Uploads > Find out whether a parameter is a file upload, get the size in bytes of the parameter value and client side file name as sent by the browser. 165,166c165,166 < Method < Description --- > Method > Description 171,172c171,172 < getRequestParameter(String) < Returns the (first) named parameter as a RequestParameter instance --- > getRequestParameter(String) > Returns the (first) named parameter as a RequestParameter instance 175,176c175,176 < getRequestParameters(String) < Returns the named parameter as an array of RequestParameter instances --- > getRequestParameters(String) > Returns the named parameter as an array of RequestParameter instances 179,180c179,180 < getRequestParameterMap() < Returns RequestParameterMap being a map of RequestParameter arrays indexed by parameter names --- > getRequestParameterMap() > Returns RequestParameterMap being a map of RequestParameter arrays indexed by parameter names 191c191 <

    Effects of Sling on Servlet API parameter methods

    --- >

    Effects of Sling on Servlet API parameter methods

    203c203 <

    Character Encoding

    --- >

    Character Encoding

    217,223c217,218 < Up to and including Sling Engine 2.2.2 request parameters are always decoded with ISO-8859-1 encoding if the < _charset_ request parameter is missing. As of Sling Engine 2.2.4 the < _charset_ request parameter is optional. As of this version the Sling Main Servlet supports a configuration setting which allows to change the default character encoding used if the < _charset_ request parameter is missing. To enable this functionality set the < sling.default.parameter.encoding parameter of the Sling Main Servlet (PID < org.apache.sling.engine.impl.SlingMainServlet) configuration (for Sling Engine < 2.3.0) or the same parameter of the Sling Request Parameter Handling (PID < org.apache.sling.engine.parameters) configuration (for Sling Engine >= 2.3.0 ) to the desired encoding, which of course must be supported by the actual Java Platform. --- > Up to and including Sling Engine 2.2.2 request parameters are always decoded with ISO-8859-1 encoding if the _charset_ request parameter is missing. As of Sling Engine 2.2.4 the _charset_ request parameter is optional. As of this version the Sling Main Servlet supports a configuration setting which allows to change the default character encoding used if the _charset_ request parameter is missing. > To enable this functionality set the sling.default.parameter.encoding parameter of the Sling Main Servlet (PID org.apache.sling.engine.impl.SlingMainServlet) configuration (for Sling Engine < 2.3.0) or the same parameter of the Sling Request Parameter Handling (PID org.apache.sling.engine.parameters) configuration (for Sling Engine >= 2.3.0 ) to the desired encoding, which of course must be supported by the actual Java Platform. diff -b -B -r ./documentation/the-sling-engine/resources.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/resources.html 98c98 <

    What is a Resource

    --- >

    What is a Resource

    100c100 <

    Resource Properties

    --- >

    Resource Properties

    105,106c105,106 < Property < Description --- > Property > Description 111,112c111,112 < Path < Resources are part of a Resource Tree. As such each Resource has a path which is formed by concatenating the names of all Resources along the root to the Resource separated by a slash. Ok, really, this is much like a URL path or a file system path where the slash (/) is the separator character. --- > Path > Resources are part of a Resource Tree. As such each Resource has a path which is formed by concatenating the names of all Resources along the root to the Resource separated by a slash. Ok, really, this is much like a URL path or a file system path where the slash (/) is the separator character. 115,116c115,116 < Name < The name of the Resource is the last element (or segment) in the path. --- > Name > The name of the Resource is the last element (or segment) in the path. 119,120c119,120 < Resource Type < Each resource has a resource type which is used by the Servlet and Script resolver to find the appropriate Servlet or Script to handle the request for the Resource. --- > Resource Type > Each resource has a resource type which is used by the Servlet and Script resolver to find the appropriate Servlet or Script to handle the request for the Resource. 123,124c123,124 < Resource Super Type < The (optional explicit) super type of the Resource. See the section Resource Types below for more details. --- > Resource Super Type > The (optional explicit) super type of the Resource. See the section Resource Types below for more details. 127,128c127,128 < Adapters < Resources are always Adaptable and therefore can be adapted to a different view. See the section Resource Adapters below for more details. --- > Adapters > Resources are always Adaptable and therefore can be adapted to a different view. See the section Resource Adapters below for more details. 131,132c131,132 < Metadata < Resources in general support link text providing access to values such as the length of a binary resource (which can be streamed) or the Resource's content type. --- > Metadata > Resources in general support link text providing access to values such as the length of a binary resource (which can be streamed) or the Resource's content type. 137c137 <

    Resource Types

    --- >

    Resource Types

    142,144c142,144 < Provider < Resource Type < Resource Super Type --- > Provider > Resource Type > Resource Super Type 149,151c149,151 < JCR < The value of the sling:resourceType property or the primary node type if the property is not set (a namespace separator colon is replaced by a slash, e.g. the nt:file primary node type is mapped to the nt/file resource type < The value of the sling:resourceSuperType of the Resource node or resource super type of the resource pointed to by the resource type (when accessed with ResourceResolver.getResource(String) --- > JCR > The value of the sling:resourceType property or the primary node type if the property is not set (a namespace separator colon is replaced by a slash, e.g. the nt:file primary node type is mapped to the nt/file resource type > The value of the sling:resourceSuperType of the Resource node or resource super type of the resource pointed to by the resource type (when accessed with ResourceResolver.getResource(String) 154,156c154,156 < File System < File based resources are of type nt/file; folder based resources are of type nt/folder corresponding to the respective JCR primary node type < none --- > File System > File based resources are of type nt/file; folder based resources are of type nt/folder corresponding to the respective JCR primary node type > none 159,161c159,161 < Bundle < File based resources are of type nt/file; folder based resources are of type nt/folder corresponding to the respective JCR primary node type < none --- > Bundle > File based resources are of type nt/file; folder based resources are of type nt/folder corresponding to the respective JCR primary node type > none 164,166c164,166 < Servlet < The absolute path of the resource appended with the suffix .servlet < sling/bundle/resource --- > Servlet > The absolute path of the resource appended with the suffix .servlet > sling/bundle/resource 171c171 <

    Adapters

    --- >

    Adapters

    174c174 <

    How to get a Resource

    --- >

    How to get a Resource

    182c182 <

    Absolute Path Mapping

    --- >

    Absolute Path Mapping

    189c189 <
  • If no mapping created a mapped path addressing an existing Resource, the method fails and returns a NonExistingResource (for the
    resolve(String) and resolve(HttpServletRequest,String)) or null (for the getResource(String path) and getResource(Resource base, String path) methods).
  • --- >
  • If no mapping created a mapped path addressing an existing Resource, the method fails and returns a NonExistingResource (for the
    resolve(String) and resolve(HttpServletRequest,String)) or null (for the getResource(String path) and getResource(Resource base, String path) methods).
  • 195c195 <

    Relative Path Resolution

    --- >

    Relative Path Resolution

    199c199 <

    Querying Resources

    --- >

    Querying Resources

    208c208 <

    Providing Resources

    --- >

    Providing Resources

    218c218 <

    JCR-based Resources

    --- >

    JCR-based Resources

    220c220 <

    Bundle-based Resources

    --- >

    Bundle-based Resources

    222c222 <

    The BundleResourceProvider supporting bundle-based Resources provides directories as Resources of type nt:folder and files as Resources of type nt:file. This matches the default primary node types intended to be used for directories and files in JCR repositories.

    --- >

    The BundleResourceProvider supporting bundle-based Resources provides directories as Resources of type nt:folder and files as Resources of type nt:file. This matches the default primary node types intended to be used for directories and files in JCR repositories.

    224c224 <

    Servlet Resources

    --- >

    Servlet Resources

    226,227c226,227 <

    File System Resources

    <

    The Filesystem Resource Provider provides access to the operating system's filesystem through the Sling ResourceResolver. Multiple locations may be mapped into the resource tree by configuring the filesystem location and the resource tree root path for each location to be mapped.

    --- >

    File System Resources

    >

    The Filesystem Resource Provider provides access to the operating system's filesystem through the Sling ResourceResolver. Multiple locations may be mapped into the resource tree by configuring the filesystem location and the resource tree root path for each location to be mapped.

    229c229 <

    Merged Resources

    --- >

    Merged Resources

    232c232 <

    Custom Resource providers

    --- >

    Custom Resource providers

    235c235 <

    Writeable Resources

    --- >

    Writeable Resources

    239c239 <

    Resource Observation

    --- >

    Resource Observation

    241c241 <

    Resource Observation API (ResourceChangeListener)

    --- >

    Resource Observation API (ResourceChangeListener)

    244,245c244,245 <

    OSGi Event Admin

    <

    Resource events are sent out via the OSGi Event Admin. You can subscribe to those event by registering an OSGi service for org.osgi.service.event.EventHandler. Several properties should be used to restrict the subscription to only the relevant event. The event topics which are used for resources are listed as constants in org.apache.sling.api.SlingConstants starting with the prefix TOPIC_.

    --- >

    OSGi Event Admin

    >

    Resource events are sent out via the OSGi Event Admin. You can subscribe to those event by registering an OSGi service for org.osgi.service.event.EventHandler. Several properties should be used to restrict the subscription to only the relevant event. The event topics which are used for resources are listed as constants in org.apache.sling.api.SlingConstants starting with the prefix TOPIC_.

    248c248 <

    Wrap/Decorate Resources

    --- >

    Wrap/Decorate Resources

    diff -b -B -r ./documentation/the-sling-engine/service-authentication.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/service-authentication.html 98c98 <

    Problem

    --- >

    Problem

    100c100 <

    On the other hand there are also some background tasks to be executed with access to the resources. Such tasks cannot in general be configured with user names and passwords: Neither hard coding the passwords in the code nor having the passwords in – more or less – plain text in some configuration is considered good practice.

    --- >

    On the other hand there are also some background tasks to be executed with access to the resources. Such tasks cannot in general be configured with user names and passwords: Neither hard coding the passwords in the code nor having the passwords in – more or less – plain text in some configuration is considered good practice.

    109c109 <

    Concept

    --- >

    Concept

    114c114 <
    service-id = service-name [ ":" subservice-name ] .
    ---
    > 
    service-id = service-name [ ":" subservice-name ] .
    117c117
    < 

    Example: Tenant Administration

    --- >

    Example: Tenant Administration

    119c119 <

    Example: Mail Transfer System

    --- >

    Example: Mail Transfer System

    122c122 <
  • Accepting mail for processing — for example the SMTP server daemon
  • --- >
  • Accepting mail for processing — for example the SMTP server daemon
  • 128,129c128,129 <

    Thus the SMTP server daemon would be represented by a user for the mta:smtp Service. queueing with mta:queue, and delivery with mta:deliver.

    <

    Implementation

    --- >

    Thus the SMTP server daemon would be represented by a user for the mta:smtp Service. queueing with mta:queue, and delivery with mta:deliver.

    >

    Implementation

    131c131 <

    ServiceUserMapper

    --- >

    ServiceUserMapper

    143c143 <

    ResourceResolverFactory

    --- >

    ResourceResolverFactory

    151c151 <

    SlingRepository

    --- >

    SlingRepository

    157,158c157,158 <

    Configuration

    <

    Service User Mappings

    --- >

    Configuration

    >

    Service User Mappings

    166,167c166,167 < // 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. --- > // 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. 169c169 < @Reference(name ="scriptsServiceUser", target="(subServiceName=my-subservice-name)", service=ServiceUserMapped.class) --- > @Reference(name ="scriptsServiceUser", target="(subServiceName=my-subservice-name)", service=ServiceUserMapped.class) 175c175 <

    Deprecation of administrative authentication

    --- >

    Deprecation of administrative authentication

    185,188c185,188 <

    Whitelisting bundles for administrative login

    <

    In order to be able to manage few (hopefully legit) uses of the above deprecated methods, a whitelisting mechanism was introduced with SLING-5153 (JCR Base 2.4.2).

    <

    The recommended way to whitelist a bundle for administrative login is via a whitelist fragment configuration. It can be created as an OSGi factory configuration with the factoryPID org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment. E.g. a typical configuration file might be called org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-myapp.config and could look as follows:

    <
    whitelist.name="myapp"
    ---
    > 

    Whitelisting bundles for administrative login

    >

    In order to be able to manage few (hopefully legit) uses of the above deprecated methods, a whitelisting mechanism was introduced with SLING-5153 (*JCR Base 2.4.2*).

    >

    The recommended way to whitelist a bundle for administrative login is via a whitelist fragment configuration. It can be created as an OSGi factory configuration with the factoryPID org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment. E.g. a typical configuration file might be called org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-myapp.config and could look as follows:

    >
    whitelist.name="myapp"
    190,191c190,191
    <     "com.myapp.core",
    <     "com.myapp.commons"
    ---
    >     "com.myapp.core",
    >     "com.myapp.commons"
    197,200c197,200
    <     Property 
    <     Type 
    <     Default 
    <     Description 
    ---
    >       Property 
    >       Type 
    >       Default 
    >       Description 
    205,208c205,208
    <     whitelist.name 
    <     String 
    <     [unnamed] 
    <     Purely informational property that allows easy identification of different fragments. 
    ---
    >       whitelist.name 
    >       String 
    >       [unnamed] 
    >       Purely informational property that allows easy identification of different fragments. 
    211,214c211,214
    <     whitelist.bundles 
    <     String[] 
    <     [] 
    <     An array of bundle symbolic names that should be allowed to make use of the administrative login functionality. 
    ---
    >       whitelist.bundles 
    >       String[] 
    >       [] 
    >       An array of bundle symbolic names that should be allowed to make use of the administrative login functionality. 
    223,224c223,224
    < 
    whitelist.bypass=B"false"
    < whitelist.bundles.regexp="^PAXEXAM.*$"
    ---
    > 
    whitelist.bypass=B"false"
    > whitelist.bundles.regexp="^PAXEXAM.*$"
    230,233c230,233
    <     Property 
    <     Type 
    <     Default 
    <     Description 
    ---
    >       Property 
    >       Type 
    >       Default 
    >       Description 
    238,241c238,241
    <     whitelist.bypass 
    <     Boolean 
    <     false 
    <     Allow all bundles to use administrative login. This is NOT recommended for production and warnings will be logged. 
    ---
    >       whitelist.bypass 
    >       Boolean 
    >       false 
    >       Allow all bundles to use administrative login. This is NOT recommended for production and warnings will be logged. 
    244,247c244,247
    <     whitelist.bundles.regexp 
    <     String 
    <     "" 
    <     A regular expression that whitelists all matching bundle symbolic names. This is NOT recommended for production and warnings will be logged. 
    ---
    >       whitelist.bundles.regexp 
    >       String 
    >       "" 
    >       A regular expression that whitelists all matching bundle symbolic names. This is NOT recommended for production and warnings will be logged. 
    diff -b -B -r ./documentation/the-sling-engine/servlets.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/servlets.html
    99c99
    < 

    Servlet Registration

    --- >

    Servlet Registration

    104,105c104,105 < Name < Description --- > Name > Description 110,111c110,111 < sling.servlet.paths < A list of absolute paths under which the servlet is accessible as a Resource. The property value must either be a single String, an array of Strings or a Vector of Strings.
    A servlet using this property might be ignored unless its path is included in the Execution Paths (servletresolver.paths) configuration setting of the SlingServletResolver service. Either this property or the sling.servlet.resourceTypes property must be set, or the servlet is ignored. If both are set, the servlet is registered using both ways.
    Binding resources by paths is discouraged, see caveats when binding servlets by path below. --- > sling.servlet.paths > A list of absolute paths under which the servlet is accessible as a Resource. The property value must either be a single String, an array of Strings or a Vector of Strings.
    A servlet using this property might be ignored unless its path is included in the Execution Paths (servletresolver.paths) configuration setting of the SlingServletResolver service. Either this property or the sling.servlet.resourceTypes property must be set, or the servlet is ignored. If both are set, the servlet is registered using both ways.
    Binding resources by paths is discouraged, see caveats when binding servlets by path below. 114,115c114,115 < sling.servlet.resourceTypes < The resource type(s) supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. Either this property or the sling.servlet.paths property must be set, or the servlet is ignored. If both are set, the servlet is registered using both ways. --- > sling.servlet.resourceTypes > The resource type(s) supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. Either this property or the sling.servlet.paths property must be set, or the servlet is ignored. If both are set, the servlet is registered using both ways. 118,119c118,119 < sling.servlet.selectors < The request URL selectors supported by the servlet. The selectors must be configured as they would be specified in the URL that is as a list of dot-separated strings such as print.a4. In case this is not empty the first selector(s) (i.e. the one(s) on the left) in the request URL must match, otherwise the servlet is not executed. After that may follow arbitrarily many non-registered selectors. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. --- > sling.servlet.selectors > The request URL selectors supported by the servlet. The selectors must be configured as they would be specified in the URL that is as a list of dot-separated strings such as print.a4. In case this is not empty the first selector(s) (i.e. the one(s) on the left) in the request URL must match, otherwise the servlet is not executed. After that may follow arbitrarily many non-registered selectors. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. 122,123c122,123 < sling.servlet.extensions < The request URL extensions supported by the servlet for requests. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. --- > sling.servlet.extensions > The request URL extensions supported by the servlet for requests. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. 126,127c126,127 < sling.servlet.methods < The request methods supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. If this property is missing, the value defaults to GET and HEAD, regardless of which methods are actually implemented/handled by the servlet. --- > sling.servlet.methods > The request methods supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is only considered for the registration with sling.servlet.resourceTypes. If this property is missing, the value defaults to GET and HEAD, regardless of which methods are actually implemented/handled by the servlet. 130,131c130,131 < sling.servlet.prefix < The prefix or numeric index to make relative paths absolute. If the value of this property is a number (int), it defines the index of the search path entries from the resource resolver to be used as the prefix. The defined search path is used as a prefix to mount this servlet. The number can be -1 which always points to the last search entry. If the specified value is higher than than the highest index of the search paths, the last entry is used. The index starts with 0. If the value of this property is a string and parseable as a number, the value is treated as if it would be a number. If the value of this property is a string starting with "/", this value is applied as a prefix, regardless of the configured search paths! If the value is anything else, it is ignored. If this property is not specified, it defaults to the default configuration of the sling servlet resolver. --- > sling.servlet.prefix > The prefix or numeric index to make relative paths absolute. If the value of this property is a number (int), it defines the index of the search path entries from the resource resolver to be used as the prefix. The defined search path is used as a prefix to mount this servlet. The number can be -1 which always points to the last search entry. If the specified value is higher than than the highest index of the search paths, the last entry is used. The index starts with 0. If the value of this property is a string and parseable as a number, the value is treated as if it would be a number. If the value of this property is a string starting with "/", this value is applied as a prefix, regardless of the configured search paths! If the value is anything else, it is ignored. If this property is not specified, it defaults to the default configuration of the sling servlet resolver. 139c139 <

    Caveats when binding servlets by path

    --- >

    Caveats when binding servlets by path

    147,149c147,149 <

    Given these drawbacks it is strongly recommended to bind servlets to resource types rather than paths.

    <

    Registering a Servlet using Java Annotations

    <

    If you are working with the default Apache Sling development stack you can either use

    --- >

    Given these drawbacks it is strongly recommended to bind servlets to resource types rather than paths.

    >

    Registering a Servlet using Java Annotations

    >

    If you are working with the default Apache Sling development stack you can either use

    157c157,159 <
  • OSGi DS 1.4 (R7) component property type annotations for Sling Servlets (recommended)

    @Component(
    ---
    >   
  • >

    OSGi DS 1.4 (R7) component property type annotations for Sling Servlets (recommended)

    >
    @Component(
    160,163c162,165
    <     resourceTypes="/apps/my/type", 
    <     methods= "GET",
    <     extensions="html",
    <     selectors="hello")
    ---
    >     resourceTypes="/apps/my/type", 
    >     methods= "GET",
    >     extensions="html",
    >     selectors="hello")
    171c173,175
    < 

    This is only supported though with if you use bnd-maven-plugin 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 bnd-maven-plugin should look like this in your pom.xml

    <build>
    ---
    > 
    >

    This is only supported though with if you use bnd-maven-plugin 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 bnd-maven-plugin should look like this in your pom.xml

    >
    <build>
    201,202c205,210
    < 

    Please refer to the Javadoc of the package for other related annotations.

  • <
  • Simple OSGi DS 1.2 annotations (use only if you cannot use approach 1.)

    @Component(
    ---
    > 
    >

    Please refer to the Javadoc of the package for other related annotations.

    >
  • >
  • >

    Simple OSGi DS 1.2 annotations (use only if you cannot use approach 1.)

    >
    @Component(
    205,208c213,216
    <     SLING_SERVLET_RESOURCE_TYPES + "=/apps/my/type"
    <     SLING_SERVLET_METHODS + "=GET",
    <     SLING_SERVLET_EXTENSIONS + "=html",
    <     SLING_SERVLET_SELECTORS + "=hello",
    ---
    >     SLING_SERVLET_RESOURCE_TYPES + "=/apps/my/type"
    >     SLING_SERVLET_METHODS + "=GET",
    >     SLING_SERVLET_EXTENSIONS + "=html",
    >     SLING_SERVLET_SELECTORS + "=hello",
    218,223c226,234
    < 
  • <
  • The @SlingServlet annotation (evaluated by maven-scr-plugin, use only if you can neither use 1. nor 2.)

    @SlingServlet(
    <     resourceTypes = "/apps/my/type",
    <     selectors = "hello",
    <     extensions = "html",
    <     methods = "GET")
    ---
    > 
    >
  • >
  • >

    The @SlingServlet annotation (evaluated by maven-scr-plugin, use only if you can neither use 1. nor 2.)

    >
    @SlingServlet(
    >     resourceTypes = "/apps/my/type",
    >     selectors = "hello",
    >     extensions = "html",
    >     methods = "GET")
    231c242,243
    < 
  • --- >
    >
  • 233c245 <

    Automated tests

    --- >

    Automated tests

    237,240c249,252 <

    Example: Registration by Path

    <
    sling.servlet.paths = [ "/libs/sling/sample/html", "/libs/sling/sample/txt" ]
    < sling.servlet.selectors = [ "img" ]
    < sling.servlet.extensions = [ "html", "txt", "json" ]
    ---
    > 

    Example: Registration by Path

    >
    sling.servlet.paths = [ "/libs/sling/sample/html", "/libs/sling/sample/txt" ]
    > sling.servlet.selectors = [ "img" ]
    > sling.servlet.extensions = [ "html", "txt", "json" ]
    248,251c260,263
    < 

    Example: Registration by Resource Type etc.

    <
    sling.servlet.resourceTypes = [ "sling/unused" ]
    < sling.servlet.selectors = [ "img", "tab" ]
    < sling.servlet.extensions = [ "html", "txt", "json" ]
    ---
    > 

    Example: Registration by Resource Type etc.

    >
    sling.servlet.resourceTypes = [ "sling/unused" ]
    > sling.servlet.selectors = [ "img", "tab" ]
    > sling.servlet.extensions = [ "html", "txt", "json" ]
    264c276
    < 

    Servlet Lifecycle Issues

    --- >

    Servlet Lifecycle Issues

    276c288 <

    Scripts are Servlets

    --- >

    Scripts are Servlets

    280c292 <

    Default Servlet(s)

    --- >

    Default Servlet(s)

    288c300 <

    OptingServlet interface

    --- >

    OptingServlet interface

    292c304 <

    Error Handler Servlet(s) or Scripts

    --- >

    Error Handler Servlet(s) or Scripts

    diff -b -B -r ./documentation/the-sling-engine/sling-api-crud-support.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/sling-api-crud-support.html 98c98 <

    Apache Sling API Support

    --- >

    Apache Sling API Support

    109c109 <

    Comparing Sling API CRUD to Sling Post Servlet

    --- >

    Comparing Sling API CRUD to Sling Post Servlet

    111c111 <

    Updating a Property

    --- >

    Updating a Property

    114,116c114,116 <
    <form action="/myresource" method="POST">
    <   <input type="text" name="title">
    <   <textarea name="body">
    ---
    > 
    <form action="/myresource" method="POST">
    >   <input type="text" name="title">
    >   <textarea name="body">
    120c120
    < 
    Resource myResource = resourceResolver.getResource("/myresource");
    ---
    > 
    Resource myResource = resourceResolver.getResource("/myresource");
    122,123c122,123
    < properties.put("title", {TITLE});
    < properties.put("body", {BODY});
    ---
    > properties.put("title", {TITLE});
    > properties.put("body", {BODY});
    126c126
    < 

    Create New Resource

    --- >

    Create New Resource

    129,130c129,130 <
    <form action="/myresource/" method="POST">
    <   <input type="text" name="dummy">
    ---
    > 
    <form action="/myresource/" method="POST">
    >   <input type="text" name="dummy">
    134c134
    < 
    Resource myResource = resourceResolver.getResource("/myresource");
    ---
    > 
    Resource myResource = resourceResolver.getResource("/myresource");
    136,138c136,138
    < properties.put("jcr:primaryType", "nt:unstructured");
    < properties.put("sling:resourceType", "myapp/components/mytype");
    < Resource dummy = resourceResolver.create(myResource, "dummy", properties);
    ---
    > properties.put("jcr:primaryType", "nt:unstructured");
    > properties.put("sling:resourceType", "myapp/components/mytype");
    > Resource dummy = resourceResolver.create(myResource, "dummy", properties);
    141c141
    < 

    Remove a Property

    --- >

    Remove a Property

    144,145c144,145 <
    <form action="/myresource" method="POST">
    <   <input type="hidden" name="title@Delete">
    ---
    > 
    <form action="/myresource" method="POST">
    >   <input type="hidden" name="title@Delete">
    149c149
    < 
    Resource myResource = resourceResolver.getResource("/myresource");
    ---
    > 
    Resource myResource = resourceResolver.getResource("/myresource");
    151c151
    < properties.remove("title");
    ---
    > properties.remove("title");
    154c154
    < 

    Copy a Resource

    --- >

    Copy a Resource

    157,160c157,160 <
    <form action="/myresource" method="POST">
    <   <input type="hidden" name=":operation" value="copy">
    <   <input type="hidden" name=":dest" value="/myresource2">
    <   <input type="hidden" name=":replace" value="true">
    ---
    > 
    <form action="/myresource" method="POST">
    >   <input type="hidden" name=":operation" value="copy">
    >   <input type="hidden" name=":dest" value="/myresource2">
    >   <input type="hidden" name=":replace" value="true">
    165c165
    < Resource myResource2 = resourceResolver.create(null, "myresource2", properties);
    ---
    > Resource myResource2 = resourceResolver.create(null, "myresource2", properties);
    168c168
    < 

    Move a Resource

    --- >

    Move a Resource

    171,173c171,173 <
    <form action="/myresource2" method="POST">
    <   <input type="hidden" name=":operation" value="move">
    <   <input type="hidden" name=":dest" value="/myresource3">
    ---
    > 
    <form action="/myresource2" method="POST">
    >   <input type="hidden" name=":operation" value="move">
    >   <input type="hidden" name=":dest" value="/myresource3">
    177c177
    < 
    Resource myResource2 = resourceResolver.getResource("/myresource2");
    ---
    > 
    Resource myResource2 = resourceResolver.getResource("/myresource2");
    179c179
    < Resource myResource3 = resourceResolver.create(null, "myresource3", properties);
    ---
    > Resource myResource3 = resourceResolver.create(null, "myresource3", properties);
    183c183
    < 

    Setting non-String Value

    --- >

    Setting non-String Value

    186,188c186,188 <
    <form action="/myresource3" method="POST">
    <   <input type="text" name="date" value="2008-06-13T18:55:00">
    <   <input type="hidden" name="date@TypeHint" value="Date">
    ---
    > 
    <form action="/myresource3" method="POST">
    >   <input type="text" name="date" value="2008-06-13T18:55:00">
    >   <input type="hidden" name="date@TypeHint" value="Date">
    192c192
    < 
    Resource myResource3 = resourceResolver.getResource("/myresource3");
    ---
    > 
    Resource myResource3 = resourceResolver.getResource("/myresource3");
    195c195
    < properties.put("date", calendar);
    ---
    > properties.put("date", calendar);
    198c198
    < 

    Delete a Resource

    --- >

    Delete a Resource

    201,202c201,202 <
    <form action="/myresource" method="POST">
    <   <input type="hidden" name=":operation" value="delete">
    ---
    > 
    <form action="/myresource" method="POST">
    >   <input type="hidden" name=":operation" value="delete">
    206c206
    < 
    Resource myResource = resourceResolver.getResource("/myresource");
    ---
    > 
    Resource myResource = resourceResolver.getResource("/myresource");
    210c210
    < 

    Value Class Support

    --- >

    Value Class Support

    diff -b -B -r ./documentation/the-sling-engine/sling-properties.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/sling-properties.html 100c100 <

    Sling Setup Properties

    --- >

    Sling Setup Properties

    104,106c104,106 < Property < Default Value < Description --- > Property > Default Value > Description 111,126c111,126 < sling.home < sling < Path to the main Sling Directory; relative path is resolved against current working directory as defined in the user.dir system property. Can also be set with the -c command line option. < Launchpad < < < sling.launchpad < ${sling.home} < Location for the Sling launchpad JAR file and the startup folder containing bundles to be installed by the Bootstrap Installer. Can also be set with the -i command line option. < Launchpad < < < sling.properties < ${sling.home}/sling.properties < Path to the sling.properties file; relative path is resolved against ${sling.home} < Launchpad --- > sling.home > sling > Path to the main Sling Directory; relative path is resolved against current working directory as defined in the user.dir system property. Can also be set with the -c command line option. > Launchpad > > > sling.launchpad > ${sling.home} > Location for the Sling launchpad JAR file and the startup folder containing bundles to be installed by the Bootstrap Installer. Can also be set with the -i command line option. > Launchpad > > > sling.properties > ${sling.home}/sling.properties > Path to the sling.properties file; relative path is resolved against ${sling.home} > Launchpad 130c130 <

    Server Control Port Properties

    --- >

    Server Control Port Properties

    134,136c134,136 < Property < Default Value < Description --- > Property > Default Value > Description 141,150c141,144 < sling.control.socket < 127.0.0.1:0 < Specification of the control port. Can also be set with the -j command line option. This property is only used by the Standalone Sling Application. < Launchpad < < < sling.control.action < -- < Action to execute. This is the same as specifying start, status, or stop on the command line. This property is only used by the Standalone Sling Application. < Launchpad --- > sling.control.socket > 127.0.0.1:0 > Specification of the control port. Can also be set with the -j command line option. This property is only used by the Standalone Sling Application. > Launchpad 154c148,149 <

    Logging Configuration

    --- >

    | sling.control.action | -- | Action to execute. This is the same as specifying start, status, or stop on the command line. This property is only used by the Standalone Sling Application. | Launchpad |

    >

    Logging Configuration

    159,161c154,156 < Property < Default Value < Description --- > Property > Default Value > Description 166,168c161,163 < org.apache.sling.commons.log.level < INFO < Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, or ERROR. This property can also be set with the -l command line option. --- > org.apache.sling.commons.log.level > INFO > Sets the initial logging level of the root logger. This may be any of the defined logging levels DEBUG, INFO, WARN, or ERROR. This property can also be set with the -l command line option. 171,173c166,168 < org.apache.sling.commons.log.file < ${sling.home}/logs/error.log < Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property can also be set with the -f command line option. --- > org.apache.sling.commons.log.file > ${sling.home}/logs/error.log > Sets the log file to which log messages are written. If this property is empty or missing, log messages are written to System.out. This property can also be set with the -f command line option. 176,178c171,173 < org.apache.sling.commons.log.file.number < 5 < The number of rotated files to keep. --- > org.apache.sling.commons.log.file.number > 5 > The number of rotated files to keep. 181,183c176,178 < org.apache.sling.commons.log.file.size < '.'yyyy-MM-dd < Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation for full details on log file rotation. --- > org.apache.sling.commons.log.file.size > '.'yyyy-MM-dd > Defines how the log file is rotated (by schedule or by size) and when to rotate. See the section Log File Rotation for full details on log file rotation. 186,188c181,183 < org.apache.sling.commons.log.pattern < {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3} {5} < The MessageFormat pattern to use for formatting log messages with the root logger. --- > org.apache.sling.commons.log.pattern > {0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3} {5} > The MessageFormat pattern to use for formatting log messages with the root logger. 191,193c186,188 < org.apache.sling.commons.log.julenabled < false < Enables the java.util.logging support. --- > org.apache.sling.commons.log.julenabled > false > Enables the java.util.logging support. 198c193 <

    Http Service Properties

    --- >

    Http Service Properties

    202,204c197,199 < Property < Default Value < Description --- > Property > Default Value > Description 209,211c204,206 < org.apache.felix.http.context_path < / < The servlet context path for the Http Service of the embedded servlet container. This property requires support by the Http Service bundle. --- > org.apache.felix.http.context_path > / > The servlet context path for the Http Service of the embedded servlet container. This property requires support by the Http Service bundle. 214,216c209,211 < org.apache.felix.http.host < 0.0.0.0 < The host interface to bind the HTTP Server to. This property requires support by the Http Service bundle. --- > org.apache.felix.http.host > 0.0.0.0 > The host interface to bind the HTTP Server to. This property requires support by the Http Service bundle. 219,221c214,216 < org.osgi.service.http.port < 8080 < The port to listen on for HTTP requests. This property requires support by the Http Service bundle. --- > org.osgi.service.http.port > 8080 > The port to listen on for HTTP requests. This property requires support by the Http Service bundle. diff -b -B -r ./documentation/the-sling-engine/the-sling-launchpad.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/the-sling-launchpad.html 99c99 <

    Sling Home

    --- >

    Sling Home

    111c111 <

    Command Line Options

    --- >

    Command Line Options

    116,118c116,118 < Option < Argument < Description --- > Option > Argument > Description 123,125c123,125 < start < (-) < Open a TCP/IP server socket when starting Sling. Uses option -j to define the local socket address. --- > start > (-) > Open a TCP/IP server socket when starting Sling. Uses option -j to define the local socket address. 128,130c128,130 < status < (-) < Check whether a (remote) Sling application is running. Uses option -j to define the address of the Sling instance to check. Note, that the Sling application terminates after checking for the (remote) Sling status. --- > status > (-) > Check whether a (remote) Sling application is running. Uses option -j to define the address of the Sling instance to check. Note, that the Sling application terminates after checking for the (remote) Sling status. 133,135c133,135 < stop < (-) < Stop a (remote) Sling application is running. Uses option -j to define the address of the Sling instance to stop. Note, that the Sling application tesrminates after stopping the (remote) Sling instance. --- > stop > (-) > Stop a (remote) Sling application is running. Uses option -j to define the address of the Sling instance to stop. Note, that the Sling application tesrminates after stopping the (remote) Sling instance. 138,140c138,140 < -j < [ host ":" ] port < The socket address to listen on for control connections (start or to use as the remote endpoint for the control connection (status and stop. If this parameter has no arguments or is not specified, the address defaults to any free port on localhost/127.0.0.1. If only the port is specified localhost/127.0.0.1 is used as the host part of the address. --- > -j > [ host ":" ] port > The socket address to listen on for control connections (start or to use as the remote endpoint for the control connection (status and stop. If this parameter has no arguments or is not specified, the address defaults to any free port on localhost/127.0.0.1. If only the port is specified localhost/127.0.0.1 is used as the host part of the address. 143,145c143,145 < -c < slinghome < The directory in which Sling locates its initial configuration file sling.properties and where files of Sling itself such as the Apache Felix bundle archive or the JCR repository files are stored. This defaults to the sling folder in the current working directory. This is the value which is commonly refered to as $\{sling.home}. --- > -c > slinghome > The directory in which Sling locates its initial configuration file sling.properties and where files of Sling itself such as the Apache Felix bundle archive or the JCR repository files are stored. This defaults to the sling folder in the current working directory. This is the value which is commonly refered to as $\{sling.home}. 148,150c148,150 < -i < launchpadhome < The launchpad directory. If not set, this is the same as $\{sling.home}. (since Sling Launchpad 2.4.0) --- > -i > launchpadhome > The launchpad directory. If not set, this is the same as $\{sling.home}. (since Sling Launchpad 2.4.0) 153,155c153,155 < -l < loglevel < Sets the initial loglevel as an integer in the range 0 to 4 or as one of the well known level strings ERROR, WARN, INFO, or DEBUG. This option overwrites the org.apache.sling.osg.log.level setting the sling.properties file. The default is INFO. --- > -l > loglevel > Sets the initial loglevel as an integer in the range 0 to 4 or as one of the well known level strings ERROR, WARN, INFO, or DEBUG. This option overwrites the org.apache.sling.osg.log.level setting the sling.properties file. The default is INFO. 158,160c158,160 < -f < logfile < The log file to use or - to log to standard out. This option overwrites the org.apache.sling.osg.log.file setting in the sling.properties file. The default is $\{sling.home}/logs/error.log. --- > -f > logfile > The log file to use or - to log to standard out. This option overwrites the org.apache.sling.osg.log.file setting in the sling.properties file. The default is $\{sling.home}/logs/error.log. 163,165c163,165 < -a < address < The interfact to bind to (use 0.0.0.0 for any). This option overwrites the org.apache.felix.http.host setting in the sling.properties file and requires the embedded Http Service implementation to honor this property. (supported since Sling Launchpad 2.4.0) --- > -a > address > The interfact to bind to (use 0.0.0.0 for any). This option overwrites the org.apache.felix.http.host setting in the sling.properties file and requires the embedded Http Service implementation to honor this property. (supported since Sling Launchpad 2.4.0) 168,170c168,170 < -p < port < The port to listen (default 8080) to handle HTTP requests. This option overwrites the org.osgi.service.http.port setting in the sling.properties file. --- > -p > port > The port to listen (default 8080) to handle HTTP requests. This option overwrites the org.osgi.service.http.port setting in the sling.properties file. 173,175c173,175 < -r < path < The root servlet context path for the Http Service (default is /). This option overwrites the org.apache.felix.http.context_path setting in the sling.properties file and requires the embedded Http Service implementation to honor this property. (since Sling Launchpad 2.4.0) --- > -r > path > The root servlet context path for the Http Service (default is /). This option overwrites the org.apache.felix.http.context_path setting in the sling.properties file and requires the embedded Http Service implementation to honor this property. (since Sling Launchpad 2.4.0) 178,180c178,180 < -D < n=v < Sets the property n to the value v. This option can be added repeatedly setting additional properties. Any property set in this manner overwrites same named properties in the sling.properties file. (since Sling Launchpad 2.4.0) --- > -D > n=v > Sets the property n to the value v. This option can be added repeatedly setting additional properties. Any property set in this manner overwrites same named properties in the sling.properties file. (since Sling Launchpad 2.4.0) 183,185c183,185 < -n < (-) < Don't install the shutdown hook. See Shutdown Hook below. (since Sling Launchpad 2.5.2) --- > -n > (-) > Don't install the shutdown hook. See Shutdown Hook below. (since Sling Launchpad 2.5.2) 188,190c188,190 < -h < (-) < Prints a simple usage message listing all available command line options. --- > -h > (-) > Prints a simple usage message listing all available command line options. 201c201 <

    Control Port

    --- >

    Control Port

    234c234 < Escape character is '^]'. --- > Escape character is '^]'. 241c241 <

    Shutdown Hook

    --- >

    Shutdown Hook

    245c245 <

    Servlet Parameters

    --- >

    Servlet Parameters

    252,253c252,253 < Servlet Context < Default sling.home --- > Servlet Context > Default sling.home 258,259c258,259 < root < sling/_ --- > root > sling/_ 262,263c262,263 < /sling < sling/_sling --- > /sling > sling/_sling 266,267c266,267 < /sling/instance1 < sling/_sling/instance1 --- > /sling/instance1 > sling/_sling/instance1 276,277c276,277 < Servlet Context < Default sling.home --- > Servlet Context > Default sling.home 282,283c282,283 < root < /var/sling/_ --- > root > /var/sling/_ 286,287c286,287 < /sling < /var/sling/_sling --- > /sling > /var/sling/_sling 290,291c290,291 < /sling/instance1 < /var/sling/_sling/instance1 --- > /sling/instance1 > /var/sling/_sling/instance1 295c295 <

    sling.properties

    --- >

    sling.properties

    300c300 <

    Components

    --- >

    Components

    302c302 <

    Launchpad Base

    --- >

    Launchpad Base

    305,308c305,314 <
  • Launcher JAR -- The primary artifact of the Base project contains the actual support to launch the Apache Felix OSGi Framework and install bundles, which are packaged with the application. It also contains the Apache Felix Framework together with the OSGi R4.1 Core and Compendium libraries as well as the Equinox HttpService bridge and the Servlet API.

  • <
  • App JAR -- The secondary artifact with classifier app is a minimal Standalone Java Application which may be started by simply typing

    $ java -jar org.apache.sling.launchpad.base-app.jar

  • <
  • Web App Archive -- The secondary artifact with classifier webapp is a minimal Web Application, which may simply be deployed into your favirourite servlet container, provided it supports at least Servlet API 2.4.

  • <
  • Source JAR -- The secondary artifact with the classifier sources is simple the source of the Launchpad Base project.

  • --- >
  • >

    Launcher JAR -- The primary artifact of the Base project contains the actual support to launch the Apache Felix OSGi Framework and install bundles, which are packaged with the application. It also contains the Apache Felix Framework together with the OSGi R4.1 Core and Compendium libraries as well as the Equinox HttpService bridge and the Servlet API.

  • >
  • >

    App JAR -- The secondary artifact with classifier app is a minimal Standalone Java Application which may be started by simply typing

    >

    $ java -jar org.apache.sling.launchpad.base-app.jar

    >
  • >
  • >

    Web App Archive -- The secondary artifact with classifier webapp is a minimal Web Application, which may simply be deployed into your favirourite servlet container, provided it supports at least Servlet API 2.4.

  • >
  • >

    Source JAR -- The secondary artifact with the classifier sources is simple the source of the Launchpad Base project.

  • 311c317 <

    Launchpad App and Launchpad WebApp

    --- >

    Launchpad App and Launchpad WebApp

    diff -b -B -r ./documentation/the-sling-engine/url-decomposition.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/url-decomposition.html 98,99c98,99 <

    Overview

    <

    During the Resource Resolution step, the client request URI (as being returned by HttpServletRequest.getRequestURI()) is decomposed into the following parts (in exactly this order):

    --- >

    Overview

    >

    During the Resource Resolution step, the client request URI (as being returned by [HttpServletRequest.getRequestURI()](http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getRequestURI())) is decomposed into the following parts (in exactly this order):

    108c108 <

    Examples

    --- >

    Examples

    113,118c113,118 < URI < Resource Path < Selectors < Extension < Suffix < Resource Found --- > URI > Resource Path > Selectors > Extension > Suffix > Resource Found 123,232c123,232 < /a/b < /a/b < null < null < null < yes < < < /a/b.html < /a/b < null < html < null < yes < < < /a/b.s1.html < /a/b < s1 < html < null < yes < < < /a/b.s1.s2.html < /a/b < s1.s2 < html < null < yes < < < /a/b/c/d < /a/b/c/d < null < null < null < no! < < < /a/c.html/s.txt < /a/c < null < html < /s.txt < no! < < < /a/b./c/d < /a/b < null < null < /c/d < yes < < < /a/b.html/c/d < /a/b < null < html < /c/d < yes < < < /a/b.s1.html/c/d < /a/b < s1 < html < /c/d < yes < < < /a/b.s1.s2.html/c/d < /a/b < s1.s2 < html < /c/d < yes < < < /a/b/c/d.s.txt < /a/b/c/d < s < txt < null < no! < < < /a/b.html/c/d.s.txt < /a/b < null < html < /c/d.s.txt < yes < < < /a/b.s1.html/c/d.s.txt < /a/b < s1 < html < /c/d.s.txt < yes < < < /a/b.s1.s2.html/c/d.s.txt < /a/b < s1.s2 < html < /c/d.s.txt < yes --- > /a/b > /a/b > null > null > null > yes > > > /a/b.html > /a/b > null > html > null > yes > > > /a/b.s1.html > /a/b > s1 > html > null > yes > > > /a/b.s1.s2.html > /a/b > s1.s2 > html > null > yes > > > /a/b/c/d > /a/b/c/d > null > null > null > no! > > > /a/c.html/s.txt > /a/c > null > html > /s.txt > no! > > > /a/b./c/d > /a/b > null > null > /c/d > yes > > > /a/b.html/c/d > /a/b > null > html > /c/d > yes > > > /a/b.s1.html/c/d > /a/b > s1 > html > /c/d > yes > > > /a/b.s1.s2.html/c/d > /a/b > s1.s2 > html > /c/d > yes > > > /a/b/c/d.s.txt > /a/b/c/d > s > txt > null > no! > > > /a/b.html/c/d.s.txt > /a/b > null > html > /c/d.s.txt > yes > > > /a/b.s1.html/c/d.s.txt > /a/b > s1 > html > /c/d.s.txt > yes > > > /a/b.s1.s2.html/c/d.s.txt > /a/b > s1.s2 > html > /c/d.s.txt > yes 236c236 <

    Automated Tests

    --- >

    Automated Tests

    diff -b -B -r ./documentation/the-sling-engine/url-to-script-resolution.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/url-to-script-resolution.html 100c100 <

    This page explains how Sling maps URLs to a script or and servlet.

    --- >

    This page explains how Sling maps URLs to a script or and servlet.

    103c103 <

    Scripts and servlets are itself resources in Sling and thus have a resource path: this is either the location in the JCR repository, the resource type in a servlet component configuration or the "virtual" bundle resource path (if a script is provided inside a bundle without being installed into the JCR repository).

    --- >

    Scripts and servlets are itself resources in Sling and thus have a resource path: this is either the location in the JCR repository, the resource type in a servlet component configuration or the "virtual" bundle resource path (if a script is provided inside a bundle without being installed into the JCR repository).

    105,113c105,113 <

    TODO: explain super types, servlet path mappings, node type resource types (my:type -> my/type)

    <

    Fundamental: Scripts and Servlets are equal

    <

    In the following discussion, I will write about scripts. This will always include servlets as well. In fact, internally, Sling only handles with Servlets, whereas scripts are packed inside a Servlet wrapping and representing the script.

    <

    Base: Resource Type Inheritance

    <

    While not exactly part of our discussion, resource type inheritance as implemented for SLING-278 plays a vital role in script resolution.

    <

    Each resource type may have a resource super type, which may be defined in various ways. One example is having a sling:resourceSuperType property in the node addressed by the resource type. See http://www.mail-archive.com/sling-dev@incubator.apache.org/msg02365.html and SLING-278 for more details.

    <

    If a resource type has no explicit resource super type, the resource super type is assumed to be "sling/servlet/default". That is the resource type used for default script selection is also acting as a basic resource type much like java.lang.Object does for other types in the Java language.

    <

    Script Locations

    <

    Scripts are looked up in a series of locations defined by the ResourceResolver.getSearchPath() and the resource type (and resource super types) of the requested resource:

    --- >

    TODO: explain super types, servlet path mappings, node type resource types (my:type -> my/type)

    >

    Fundamental: Scripts and Servlets are equal

    >

    In the following discussion, I will write about scripts. This will always include servlets as well. In fact, internally, Sling only handles with Servlets, whereas scripts are packed inside a Servlet wrapping and representing the script.

    >

    Base: Resource Type Inheritance

    >

    While not exactly part of our discussion, resource type inheritance as implemented for SLING-278 plays a vital role in script resolution.

    >

    Each resource type may have a resource super type, which may be defined in various ways. One example is having a sling:resourceSuperType property in the node addressed by the resource type. See http://www.mail-archive.com/sling-dev@incubator.apache.org/msg02365.html and SLING-278 for more details.

    >

    If a resource type has no explicit resource super type, the resource super type is assumed to be "sling/servlet/default". That is the resource type used for default script selection is also acting as a basic resource type much like java.lang.Object does for other types in the Java language.

    >

    Script Locations

    >

    Scripts are looked up in a series of locations defined by the ResourceResolver.getSearchPath() and the resource type (and resource super types) of the requested resource:

    116c116 <

    The pseudo code for iterating the locations would be something like:

    --- >

    The pseudo code for iterating the locations would be something like:

    134,139c134,139 <

    All requests are NOT equal

    <

    GET and HEAD request methods are treated differently than the other request methods. Only for GET and HEAD requests will the request selectors and extension be considered for script selection. For other requests the servlet or script name (without the script extension) must exactly match the request method.

    <

    That is for a PUT request, the script must be PUT.esp or PUT.jsp. For a GET request with a request extension of html, the script name may be html.esp or GET.esp.

    <

    Scripts for GET requests

    <

    Apart for supporting scripts named after the request method, scripts handling GET and HEAD requests may be named differently for Sling to support a more elaborate processing order.

    <

    Depending on whether request selectors are considered, a script may have two forms:

    --- >

    All requests are NOT equal

    >

    GET and HEAD request methods are treated differently than the other request methods. Only for GET and HEAD requests will the request selectors and extension be considered for script selection. For other requests the servlet or script name (without the script extension) must exactly match the request method.

    >

    That is for a PUT request, the script must be PUT.esp or PUT.jsp. For a GET request with a request extension of html, the script name may be html.esp or GET.esp.

    >

    Scripts for GET requests

    >

    Apart for supporting scripts named after the request method, scripts handling GET and HEAD requests may be named differently for Sling to support a more elaborate processing order.

    >

    Depending on whether request selectors are considered, a script may have two forms:

    144c144 <

    The constituents of these script names are as follows:

    --- >

    The constituents of these script names are as follows:

    149c149 <
  • {selectorStringPath} - The selector string converted to a path, along the lines of selectorString.replace('.', '/'). If less selectors are specified in the script name than given in the request, the script will only be taken into consideration if the given selectors are the first selectors in the request. This means sel1/sel2.html.jsp will be a candidate for the request url /content/test.sel1.sel2.sel3.html but not for /content/test.sel3.sel1.sel2.html. So the order of selectors is relevant!
  • --- >
  • {selectorStringPath} - The selector string converted to a path, along the lines of selectorString.replace('.', '/'). If less selectors are specified in the script name than given in the request, the script will only be taken into consideration if the given selectors are the first selectors in the request. This means sel1/sel2.html.jsp will be a candidate for the request url /content/test.sel1.sel2.sel3.html but not for /content/test.sel3.sel1.sel2.html. So the order of selectors is relevant!
  • 151,152c151,152 <

    Priority

    <

    The rules for script path priorization is defined as follows:

    --- >

    Priority

    >

    The rules for script path priorization is defined as follows:

    158,159c158,159 <

    Examples

    <

    Let's consider the following script paths for a request of a resource whose resource type is sling\sample and the request selectors are print.a4 and the request extension is html:

    --- >

    Examples

    >

    Let's consider the following script paths for a request of a resource whose resource type is sling\sample and the request selectors are print.a4 and the request extension is html:

    diff -b -B -r ./documentation/the-sling-engine/wrap-or-decorate-resources.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine/wrap-or-decorate-resources.html 94c94 <

    Introduction

    --- >

    Introduction

    96c96 <

    --- >

    ##

    107c107 <

    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 ResourceWrapper to wrap the original Resource). If the service does not want to decorate the resource, it should return the original resource or null.

    --- >

    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 ResourceWrapper to wrap the original Resource). If the service does not want to decorate the resource, it should return the original resource or null.

    diff -b -B -r ./documentation/the-sling-engine.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/the-sling-engine.html 92c92 <

    General

    --- >

    General

    98c98 <

    Request Handling

    --- >

    Request Handling

    109c109 <

    Resources

    --- >

    Resources

    116c116 <

    Misc

    --- >

    Misc

    diff -b -B -r ./documentation/tutorials-how-tos/46-line-blog.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/46-line-blog.html 97c97 <

    Audience

    --- >

    Audience

    99c99 <

    Step 0: Start, configure and login to Sling

    --- >

    Step 0: Start, configure and login to Sling

    103c103 <

    Step 1: Creating content

    --- >

    Step 1: Creating content

    110c110 < <form method="POST"> --- > <form method="POST"> 112c112 < <input type="text" name="title" style="width:100%"/> --- > <input type="text" name="title" style="width:100%"/> 115c115 < <textarea style="width:100%" name="text"></textarea> --- > <textarea style="width:100%" name="text"></textarea> 118,119c118,119 < <input type="submit" value="save"/> < <input type="hidden" name=":redirect" value="*.html"/> --- > <input type="submit" value="save"/> > <input type="hidden" name=":redirect" value="*.html"/> 122c122 < <input type="hidden" name="_charset_" value="UTF-8"/> --- > <input type="hidden" name="_charset_" value="UTF-8"/> 135c135 < If you get an error saying _javax.jcr.AccessDeniedException: ...not allowed to add or modify item_ it means that you are not logged in as user _admin_. See instructions above for logging in. --- > If you get an error saying _javax.jcr.AccessDeniedException: ...not allowed to add or modify item_ it means that you are not logged in as user _admin_. See instructions above for logging in. 138c138 <

    Step 2: Where's my content?

    --- >

    Step 2: Where's my content?

    141,143c141,143 < "jcr:primaryType": "nt:unstructured", < "text": "This is the foo text", < "title": "foo" --- > "jcr:primaryType": "nt:unstructured", > "text": "This is the foo text", > "title": "foo" 149c149 < <script src="/system/sling.js"></script> --- > <script src="/system/sling.js"></script> 157,158c157,158 <

    We can now create and edit posts; let's add some navigation, using more of the sling.js functionality.

    <

    Step 3: Navigation

    --- >

    We can now create and edit posts; let's add some navigation, using more of the sling.js functionality.

    >

    Step 3: Navigation

    163c163 < <li><em><a href="/content/blog/*.html">[Create new post]</a></em></li> --- > <li><em><a href="/content/blog/*.html">[Create new post]</a></em></li> 165c165 < var posts = Sling.getContent("/content/blog", 2); --- > var posts = Sling.getContent("/content/blog", 2); 167,168c167,168 < document.write("<li>" < + "<a href='/content/blog/" + i + ".html'>" --- > document.write("<li>" > + "<a href='/content/blog/" + i + ".html'>" 170c170 < + "</a></li>"); --- > + "</a></li>"); 175c175 <

    The first link to /content/blog/* brings us back to our content creating form, which is nothing else than the editing form reading empty values and posting to the "magic star" URL.

    --- >

    The first link to /content/blog/* brings us back to our content creating form, which is nothing else than the editing form reading empty values and posting to the "magic star" URL.

    179c179 <

    Step 4: Data first, structure later

    --- >

    Step 4: Data first, structure later

    184c184 < <input type="author" name="author" style="width:100%"/> --- > <input type="author" name="author" style="width:100%"/> 187c187 <

    I want my ESP!

    --- >

    I want my ESP!

    191c191 <

    That's the power of Sling

    --- >

    That's the power of Sling

    diff -b -B -r ./documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/getting-resources-and-properties-in-sling.html 97c97 <

    Within an OSGI Service/Component

    --- >

    Within an OSGI Service/Component

    104c104 < String resourcePath = "path/to/resource"; --- > String resourcePath = "path/to/resource"; 115c115 <

    Within a Servlet

    --- >

    Within a Servlet

    121c121 <
    String resourcePath = "path/to/resource";
    ---
    > 
    String resourcePath = "path/to/resource";
    126,127c126,127
    < 

    Within a JSP file

    <

    When you use the <sling:defineObjects> tag in a JSP file, you have access to a few handy objects, one of them is resource, the resource that is resolved from the URL. Another one is resourceResolver, the ResourceResolver defined through the SlingHttpServletRequest.

    --- >

    Within a JSP file

    >

    When you use the <sling:defineObjects> tag in a JSP file, you have access to a few handy objects, one of them is resource, the resource that is resolved from the URL. Another one is resourceResolver, the ResourceResolver defined through the SlingHttpServletRequest.

    131c131 < String resourcePath = "path/to/resource"; --- > String resourcePath = "path/to/resource"; 139c139 <

    Accessing a Property

    --- >

    Accessing a Property

    diff -b -B -r ./documentation/tutorials-how-tos/how-to-manage-events-in-sling.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/how-to-manage-events-in-sling.html 102c102 <

    Introduction

    --- >

    Introduction

    120c120 <

    Listening to OSGI Events

    --- >

    Listening to OSGI Events

    127c127 <

    Starting a job

    --- >

    Starting a job

    131c131 < payload.put("resourcePath", resourcePath); --- > payload.put("resourcePath", resourcePath); 149c149 < public static final String JOB_TOPIC = "com/sling/eventing/dropbox/job"; --- > public static final String JOB_TOPIC = "com/sling/eventing/dropbox/job"; 160c160,161 < --- > > 162c163,164 < --- > > 171c173 < if ( propPath.startsWith("/tmp/dropbox") && "nt:file".equals(propResType) ) { --- > if ( propPath.startsWith("/tmp/dropbox") && "nt:file".equals(propResType) ) { 174c176 < payload.put("resourcePath", propPath); --- > payload.put("resourcePath", propPath); 177c179 < logger.info("the dropbox job has been started for: {}", propPath); --- > logger.info("the dropbox job has been started for: {}", propPath); 182c184 <

    Consuming Job Events

    --- >

    Consuming Job Events

    185c187 <
    @Property(name="job.topics",
    ---
    > 
    @Property(name="job.topics",
    204,207c206,209
    < private final static String IMAGES_PATH = "/dropbox/images/";
    < private final static String MUSIC_PATH = "/dropbox/music/";
    < private final static String MOVIES_PATH = "/dropbox/movies/";
    < private final static String OTHER_PATH = "/dropbox/other/";
    ---
    > private final static String IMAGES_PATH = "/dropbox/images/";
    > private final static String MUSIC_PATH = "/dropbox/music/";
    > private final static String MOVIES_PATH = "/dropbox/movies/";
    > private final static String OTHER_PATH = "/dropbox/other/";
    223,224c225,226
    <         final String resourcePath = (String) job.getProperty("resourcePath");
    < 		final String resourceName = resourcePath.substring(resourcePath.lastIndexOf("/") + 1);
    ---
    >         final String resourcePath = (String) job.getProperty("resourcePath");
    >        final String resourceName = resourcePath.substring(resourcePath.lastIndexOf("/") + 1);
    227c229
    < 		if ( res.isResourceType("nt:file") ) {
    ---
    >        if ( res.isResourceType("nt:file") ) {
    230c232
    <         	if (mimeType.equals("image/png")) {
    ---
    >             if (mimeType.equals("image/png")) {
    233c235
    <         	else if (mimeType.equals("audio/mpeg")) {
    ---
    >             else if (mimeType.equals("audio/mpeg")) {
    236c238
    <         	else if (mimeType.equals("video/x-msvideo")) {
    ---
    >             else if (mimeType.equals("video/x-msvideo")) {
    245c247
    <         	logger.info("The file {} has been moved to {}", resourceName, destDir);
    ---
    >             logger.info("The file {} has been moved to {}", resourceName, destDir);
    249c251
    < 		logger.error("Exception: " + e, e);
    ---
    >        logger.error("Exception: " + e, e);
    diff -b -B -r ./documentation/tutorials-how-tos/installing-and-upgrading-bundles.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/installing-and-upgrading-bundles.html
    97,98c97
    <   We recommend to use the Apache Felix Web Console. The documentation below describes the old Sling Management Console, which isn't in use any more. Please refer to the documentation of the 
    <  Apache Felix Web Console. 
    ---
    > We recommend to use the Apache Felix Web Console. The documentation below describes the old Sling Management Console, which isn't in use any more. Please refer to the documentation of the Apache Felix Web Console.
    102c101
    < 

    Sling Management Console

    --- >

    Sling Management Console

    106c105 <

    Installing and upgrading bundles by Upload

    --- >

    Installing and upgrading bundles by Upload

    117c116 <

    Installing and upgrading bundles from the Bundle Repository

    --- >

    Installing and upgrading bundles from the Bundle Repository

    120c119 <

    The Bundle Repository page

    --- >

    The Bundle Repository page

    123c122 <

    The Bundles page

    --- >

    The Bundles page

    125c124 <

    Managing OSGi Bundle Repositories

    --- >

    Managing OSGi Bundle Repositories

    diff -b -B -r ./documentation/tutorials-how-tos/jackrabbit-persistence.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/jackrabbit-persistence.html 99,100c99,101 < Recent versions of Apache Sling no longer use Apache Jackrabbit as their persistence engine, but Apache Jackrabbit Oak. Oak is configured in a different, more OSGi-friendly way. For more details, see < The Jackrabbit Oak documentation. The Jackrabbit integration has also been moved to the attic and is no longer maintained. --- > Recent versions of Apache Sling no longer use Apache Jackrabbit as their persistence engine, but > Apache Jackrabbit Oak. Oak is configured in a different, more OSGi-friendly way. For more details, > see The Jackrabbit Oak documentation. The Jackrabbit integration has also been moved to the attic and is no longer maintained. 104c105 <

    Management Summary

    --- >

    Management Summary

    112c113 <

    JDBC Driver

    --- >

    JDBC Driver

    117c118,119 <
  • Wrap the JDBC driver library into an OSGi bundle:
    # Example for PostgreSQL JDBC 3 driver 8.4-701
    ---
    >   
  • Wrap the JDBC driver library into an OSGi bundle: >
    # Example for PostgreSQL JDBC 3 driver 8.4-701
    120,121c122,126
    < 
  • <
  • 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)

    $ mvn install:install-file \  
    ---
    > 
    >
  • >
  • >

    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)

    >
    $ mvn install:install-file \  
    124c129,130
    < 
  • --- >
    >
  • 127c133 <

    Replace Derby in a running Sling Instance

    --- >

    Replace Derby in a running Sling Instance

    132c138 <
  • Stop the Jackrabbit Embedded Repository bundle
    This needs to be reconfigured and restarted anyway. So lets just stop it to prevent failures in the next step.
  • --- >
  • Stop the Jackrabbit Embedded Repository bundle
    This needs to be reconfigured and restarted anyway. So lets just stop it to prevent failures in the next step.
  • 136c142 <

    Reconfiguring Jackrabbit

    --- >

    Reconfiguring Jackrabbit

    143c149 < <Workspace name="${wsp.name}"> --- > <Workspace name="${wsp.name}"> 145,152c151,158 < <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> < <param name="driver" value="org.postgresql.Driver"/> < <param name="url" value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/> < <param name="schema" value="postgresql"/> < <param name="user" value="YOUR_USER_HERE"/> < <param name="password" value="YOUR_PASSWORD_HERE"/> < <param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/> < <param name="externalBLOBs" value="false"/> --- > <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> > <param name="driver" value="org.postgresql.Driver"/> > <param name="url" value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/> > <param name="schema" value="postgresql"/> > <param name="user" value="YOUR_USER_HERE"/> > <param name="password" value="YOUR_PASSWORD_HERE"/> > <param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/> > <param name="externalBLOBs" value="false"/> 157c163 < <Versioning rootPath="${rep.home}/version"> --- > <Versioning rootPath="${rep.home}/version"> 159,166c165,172 < <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> < <param name="driver" value="org.postgresql.Driver"/> < <param name="url" value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/> < <param name="schema" value="postgresql"/> < <param name="user" value="YOUR_USER_HERE"/> < <param name="password" value="YOUR_PASSWORD_HERE"/> < <param name="schemaObjectPrefix" value="version_"/> < <param name="externalBLOBs" value="false"/> --- > <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager"> > <param name="driver" value="org.postgresql.Driver"/> > <param name="url" value="jdbc:postgresql://localhost:5432/YOUR_DB_NAME_HERE"/> > <param name="schema" value="postgresql"/> > <param name="user" value="YOUR_USER_HERE"/> > <param name="password" value="YOUR_PASSWORD_HERE"/> > <param name="schemaObjectPrefix" value="version_"/> > <param name="externalBLOBs" value="false"/> 175c181 <

    Credits

    --- >

    Credits

    diff -b -B -r ./documentation/tutorials-how-tos/testing-sling-based-applications.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation/tutorials-how-tos/testing-sling-based-applications.html 100,101c100,101 <

    Unit tests

    <

    When possible, unit tests are obviously the fastest executing ones, and it's easy to keep them close to the code that they're testing.

    --- >

    Unit tests

    >

    When possible, unit tests are obviously the fastest executing ones, and it's easy to keep them close to the code that they're testing.

    103c103 <

    Tests that use a JCR repository

    --- >

    Tests that use a JCR repository

    107c107 <

    Mock classes and services

    --- >

    Mock classes and services

    112c112 <

    Side note: injecting services in private fields

    --- >

    Side note: injecting services in private fields

    119c119 < final java.lang.reflect.Field resolverField = resolverClass.getDeclaredField("resourceResolverFactory"); --- > final java.lang.reflect.Field resolverField = resolverClass.getDeclaredField("resourceResolverFactory"); 123c123 <

    Pax Exam

    --- >

    Pax Exam

    127,129c127,129 <

    Server-side JUnit tests

    <

    The tools described on the JUnit server-side testing support page allow for running JUnit tests on an live Sling instance, as part of the normal integration testing cycle.

    <

    HTTP-based integration tests

    --- >

    Server-side JUnit tests

    >

    The tools described on the JUnit server-side testing support page allow for running JUnit tests on an live Sling instance, as part of the normal integration testing cycle.

    >

    HTTP-based integration tests

    132c132 <

    Starting an Integration Test

    --- >

    Starting an Integration Test

    135c135 <

    Maven Dependency

    --- >

    Maven Dependency

    142c142 <

    Simple Example using SlingInstanceRule

    --- >

    Simple Example using SlingInstanceRule

    154,156c154,156 < client.createNode("/content/myNode", "nt:unstructured"); < Assert.assertTrue("Node should be there", client.exists("/content/myNode")); < //client.adaptTo(OsgiConsoleClient.class).editConfigurationWithWait(10, "MYPID", null, myMap); --- > client.createNode("/content/myNode", "nt:unstructured"); > Assert.assertTrue("Node should be there", client.exists("/content/myNode")); > //client.adaptTo(OsgiConsoleClient.class).editConfigurationWithWait(10, "MYPID", null, myMap); 160c160 <

    Summary

    --- >

    Summary

    diff -b -B -r ./documentation.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/documentation.html 96c96 <

    Overview

    --- >

    Overview

    108c108 <

    How you can contribute

    --- >

    How you can contribute

    110c110 <

    How the documentation is generated

    --- >

    How the documentation is generated

    119c119 <

    The Sling Website

    --- >

    The Sling Website

    121,123c121,123 <

    The Public Wiki

    <

    The public wiki of Sling is available at http://cwiki.apache.org/SLING and is maintained in the Confluence space SLING. Everyone can create an account there. To gain edit rights please ask via the mailing list. Any of the administrators listed in the Space Overview can give you access.

    <

    The JavaDoc

    --- >

    The Public Wiki

    >

    The public wiki of Sling is available at http://cwiki.apache.org/SLING and is maintained in the Confluence space SLING. Everyone can create an account there. To gain edit rights please ask via the mailing list. Any of the administrators listed in the Space Overview can give you access.

    >

    The JavaDoc

    126c126 <

    The Maven Plugin Documentation

    --- >

    The Maven Plugin Documentation

    diff -b -B -r ./downloads.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/downloads.html 91c91 <

    How to validate the downloaded files

    --- >

    How to validate the downloaded files

    93c93 <

    Mirrors

    --- >

    Mirrors

    97,100c97,109 <

    Other mirrors:

    < < <

    Sling Application

    --- >

    Other mirrors:

    > >

    Sling Application

    diff -b -B -r ./errors/403.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/errors/403.html 95c95 <

    If you came to this page by following a broken link on our site, you can report the problem here.

    --- >

    If you came to this page by following a broken link on our site, you can report the problem here.

    diff -b -B -r ./errors/404.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/errors/404.html 96c96 <

    If you came to this page by following a broken link on our site, you can report the problem here.

    --- >

    If you came to this page by following a broken link on our site, you can report the problem here.

    diff -b -B -r ./index.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/index.html 90c90 <

    Apache Sling™ is a framework for RESTful web-applications based on an extensible content tree.

    --- >

    Apache Sling™ is a framework for RESTful web-applications based on an extensible content tree.

    95c95 <

    News

    --- >

    News

    diff -b -B -r ./links.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/links.html 93c93 <

    Articles

    --- >

    Articles

    99c99 <

    About Sling

    --- >

    About Sling

    108c108 <

    Projects using Sling

    --- >

    Projects using Sling

    112c112 <

    Sling Presentations and Screencasts

    --- >

    Sling Presentations and Screencasts

    121c121 <

    From ApacheCon EU 08

    --- >

    From ApacheCon EU 08

    126c126 <

    From ApacheCon US 07

    --- >

    From ApacheCon US 07

    131,132c131,132 <

    Technology used by Sling

    <

    JSR 170 - Content Repository for Java{tm} technology API

    --- >

    Technology used by Sling

    >

    JSR 170 - Content Repository for Java{tm} technology API

    134c134 <

    Apache Jackrabbit

    --- >

    Apache Jackrabbit

    136c136 <

    The OSGi Alliance

    --- >

    The OSGi Alliance

    138c138 <

    Apache Felix

    --- >

    Apache Felix

    diff -b -B -r ./news/sling-10-released.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news/sling-10-released.html 94c94 <

    Java 9 and 10 support

    --- >

    Java 9 and 10 support

    96c96 <

    Change of artifactId for the main Sling artifact

    --- >

    Change of artifactId for the main Sling artifact

    99c99 <

    Migrated from tika-bundle to tika-parsers

    --- >

    Migrated from tika-bundle to tika-parsers

    102c102 <

    Direct access to a DataStore binary when the repository allows it

    --- >

    Direct access to a DataStore binary when the repository allows it

    105c105 <

    Exception stack traces now contain the originating bundle

    --- >

    Exception stack traces now contain the originating bundle

    108,110c108,110 <

    Update to Oak 1.6.8

    <

    We use the latest stable Oak version from the 1.6 stream, bringing in over 140 fixes and improvements. See the [full list of resolved issues][oak-fixes].

    <

    Service user web console page added

    --- >

    Update to Oak 1.6.8

    >

    We use the latest stable Oak version from the 1.6 stream, bringing in over 140 fixes and improvements. See the full list of resolved issues.

    >

    Service user web console page added

    112c112 <

    service users in web console

    --- >

    service users in web console

    114c114 <

    Service user privilege declaration based on principal names

    --- >

    Service user privilege declaration based on principal names

    119c119 < "org.apache.sling.resourceresolver:mapping\=[repository-reader-service]" --- > "org.apache.sling.resourceresolver:mapping\=[repository-reader-service]" 123c123 <

    Enhancements to the repoinit language

    --- >

    Enhancements to the repoinit language

    132c132 <

    Support for mounting JSON files in the bundle resource provider

    --- >

    Support for mounting JSON files in the bundle resource provider

    135,136c135 <

    See the Bundle resources documentation for more details.

    <

    [oak-fixes]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20OAK%20AND%20resolution%20is%20not%20empty%20and%20fixVersion%20in%20(1.6.2%2C1.6.3%2C1.6.4%2C1.6.5%2C1.6.6%2C1.6.7%2C1.6.8)%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC)

    --- >

    See the Bundle resources documentation for more details.

    diff -b -B -r ./news/sling-ide-tooling-11-released.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news/sling-ide-tooling-11-released.html 95c95 <

    Sightly support

    --- >

    Sightly support

    103c103 <

    Sightly Editor

    --- >

    Sightly Editor

    105c105 <

    Automatic configuration of debug classpath based on the bundles deployed on the server

    --- >

    Automatic configuration of debug classpath based on the bundles deployed on the server

    107c107 <

    Debugging

    --- >

    Debugging

    109c109 <

    Maven configurator for content-package projects

    --- >

    Maven configurator for content-package projects

    111c111 <

    Other minor improvements

    --- >

    Other minor improvements

    diff -b -B -r ./news/sling-ide-tooling-12-released.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news/sling-ide-tooling-12-released.html 95c95 <

    Custom contribution for provisioning model feature files

    --- >

    Custom contribution for provisioning model feature files

    97,98c97,98 <

    Slingstart Project

    <

    Enhanced error reporting for content projects

    --- >

    Slingstart Project

    >

    Enhanced error reporting for content projects

    100c100 <

    Content navigator warnings

    --- >

    Content navigator warnings

    102,103c102,103 <

    Content navigator XML validation

    <

    More fine-grained control over the Maven project configurators

    --- >

    Content navigator XML validation

    >

    More fine-grained control over the Maven project configurators

    106,107c106,107 <

    Maven Project Configurator preferences

    <

    Support for the bnd-maven-plugin

    --- >

    Maven Project Configurator preferences

    >

    Support for the bnd-maven-plugin

    109c109 <

    Support for the new Jackrabbit filevault-package-maven-plugin

    --- >

    Support for the new Jackrabbit filevault-package-maven-plugin

    diff -b -B -r ./news/sling-launchpad-8-released.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news/sling-launchpad-8-released.html 93c93 <

    Switched to Apache Jackrabbit Oak

    --- >

    Switched to Apache Jackrabbit Oak

    95c95 <

    Provisioning model

    --- >

    Provisioning model

    97c97 <

    Sightly

    --- >

    Sightly

    106c106 <

    Versioning support in the Resource API

    --- >

    Versioning support in the Resource API

    108c108 <

    Improved testing tools

    --- >

    Improved testing tools

    110c110 <

    Servlet API 3.0

    --- >

    Servlet API 3.0

    112c112 <

    Performance

    --- >

    Performance

    114c114 <

    Dependency updates

    --- >

    Dependency updates

    diff -b -B -r ./news/sling-launchpad-9-released.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news/sling-launchpad-9-released.html 93c93 <

    Updated to Oak 1.6.1 and segment-tar persistence

    --- >

    Updated to Oak 1.6.1 and segment-tar persistence

    96c96 <

    The Sling Explorer is replaced with Composum

    --- >

    The Sling Explorer is replaced with Composum

    98c98 <

    The Slingshot sample is included

    --- >

    The Slingshot sample is included

    100c100 <

    New Resource Provider and Observation API

    --- >

    New Resource Provider and Observation API

    103c103 <

    New modules added: Validation, Context-Aware Configuration, Repository Initialization Language

    --- >

    New modules added: Validation, Context-Aware Configuration, Repository Initialization Language

    110c110 <

    Tooling: HTL Maven Plugin

    --- >

    Tooling: HTL Maven Plugin

    112c112 <

    Streaming Upload Support

    --- >

    Streaming Upload Support

    116c116 <

    Discovery: added Oak-based discovery implementation

    --- >

    Discovery: added Oak-based discovery implementation

    118c118 <

    Security: loginAdministrative deprecation

    --- >

    Security: loginAdministrative deprecation

    121c121 <

    Removed org.apache.sling.commons.json and org.json bundles

    --- >

    Removed org.apache.sling.commons.json and org.json bundles

    diff -b -B -r ./news.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/news.html 112c112 <

    History

    --- >

    History

    diff -b -B -r ./old-stuff/assembly.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/assembly.html 97c97 <

    Introduction

    --- >

    Introduction

    101c101 <

    Bundles

    --- >

    Bundles

    104c104 <

    Assemblies

    --- >

    Assemblies

    107c107 <

    Assembly manifest headers

    --- >

    Assembly manifest headers

    113c113 <

    Assembly Lifecycle

    --- >

    Assembly Lifecycle

    124c124 <

    Bundles referenced by multiple Assembly Bundles

    --- >

    Bundles referenced by multiple Assembly Bundles

    133c133 <

    Bundle Installation

    --- >

    Bundle Installation

    136,137c136,137 <
    Assembly-Bundles = Bundle { "," Bundle } .
    < Bundle = Symbolic-Name { ";" Parameter } .
    ---
    > 
    Assembly-Bundles = Bundle { "," Bundle } .
    > Bundle = Symbolic-Name { ";" Parameter } .
    139c139
    < Parameter = ParameterName "=" ParameterValue .
    ---
    > Parameter = ParameterName "=" ParameterValue .
    143c143
    <  
  • version - The version of the bundle to install. This is a version range specification as per chapter 3.2.5 Version Ranges of the OSGi core specification. When this parameter is declared as a single version - eg. 1.2.3 - it is interpreted as the version range [1.2.3,∞). The default value is [0.0.0,∞) to install the most recent version of the bundle available.
  • --- >
  • version - The version of the bundle to install. This is a version range specification as per chapter 3.2.5 Version Ranges of the OSGi core specification. When this parameter is declared as a single version - eg. 1.2.3 - it is interpreted as the version range [1.2.3,∞). The default value is [0.0.0,∞) to install the most recent version of the bundle available.
  • 149c149 <

    Bundle Location

    --- >

    Bundle Location

    162,163c162,163 <

    Best Practices

    <

    Size of Bundles

    --- >

    Best Practices

    >

    Size of Bundles

    171c171 <

    Nomen est Omen

    --- >

    Nomen est Omen

    diff -b -B -r ./old-stuff/request-processing.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/request-processing.html 95c95 < 2008-02-13: this page is *out of sync* with the current codebase, needs to be reviewed and updated. --- > 2008-02-13: this page is *out of sync* with the current codebase, needs to be reviewed and updated. 98c98 <

    Core Request Processing

    --- >

    Core Request Processing

    119c119 <

    Resolving Content

    --- >

    Resolving Content

    129c129 <

    Registering Components

    --- >

    Registering Components

    132c132 <

    Reqistering Filters

    --- >

    Reqistering Filters

    138,139c138,139 <
    < --- > > 144,145c144,145 < < --- > > 148,149c148,149 < < --- > > 153c153 <

    Content is a Java Object

    --- >

    Content is a Java Object

    157c157 <
    RequestDispatcher rd = request.getRequestDispatcher("navigation");
    ---
    > 
    RequestDispatcher rd = request.getRequestDispatcher("navigation");
    161c161
    < 
    Content navigation = request.getContent("navigation");
    ---
    > 
    Content navigation = request.getContent("navigation");
    170c170
    <         return request.getContent().getPath() + "/navigation";
    ---
    >         return request.getContent().getPath() + "/navigation";
    182c182
    < 
    Content navigation = request.getContent("navigation");
    ---
    > 
    Content navigation = request.getContent("navigation");
    186c186
    <             return request.getContent().getPath() + "/navigation";
    ---
    >             return request.getContent().getPath() + "/navigation";
    diff -b -B -r ./old-stuff/run-modes-org-apache-sling-runmode.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/run-modes-org-apache-sling-runmode.html
    95,97c95,98
    <   As of Sling 6 the 
    <  org.apache.sling.runmode bundle is replaced by the new 
    <  Sling Settings (org.apache.sling.settings) 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. 
    ---
    > As of Sling 6 the org.apache.sling.runmode bundle is replaced
    > by the new Sling Settings (org.apache.sling.settings)
    > 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.
    99c100
    < 

    Overview

    --- >

    Overview

    103c104 <

    Installation

    --- >

    Installation

    105c106 <

    Configuration

    --- >

    Configuration

    107,109c108,110 <

    Using -Dsling.run.modes=foo,bar on the JVM command-line, for example, activates the foo and bar run modes.

    <

    This command-line parameter takes precedence over a similar definition (sling.run.modes=dev,staging) that might be present in the sling.properties file found in the Sling home directory.

    <

    Getting the current list of run modes

    --- >

    Using -Dsling.run.modes=foo,bar on the JVM command-line, for example, activates the foo and bar run modes.

    >

    This command-line parameter takes precedence over a similar definition (*sling.run.modes=dev,staging*) that might be present in the sling.properties file found in the Sling home directory.

    >

    Getting the current list of run modes

    114c115 < String [] expectedRunModes = { "foo", "wii" }; --- > String [] expectedRunModes = { "foo", "wii" }; 120c121 <

    See also

    --- >

    See also

    diff -b -B -r ./old-stuff/scriptengineintegration/groovy-support.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/scriptengineintegration/groovy-support.html 108c108 <

    Testing

    --- >

    Testing

    110,111c110,111 <
    response.setContentType("text/plain");
    < response.setCharacterEncoding("UTF-8");
    ---
    > 
    response.setContentType("text/plain");
    > response.setCharacterEncoding("UTF-8");
    113,115c113,115
    < println "Hello World !"
    < println "This is Groovy Speaking"
    < println "You requested the Resource ${resource} (yes, this is a GString)"
    ---
    > println "Hello World !"
    > println "This is Groovy Speaking"
    > println "You requested the Resource ${resource} (yes, this is a GString)"
    129c129
    < 

    References

    --- >

    References

    diff -b -B -r ./old-stuff/scriptengineintegration/xslt-processing-pipeline.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/scriptengineintegration/xslt-processing-pipeline.html 97c97 <

    Intro

    --- >

    Intro

    102,103c102,103 <

    How to Install

    <

    Install the org.apache.sling.scripting.xproc bundle in order to work with XProc.

    --- >

    How to Install

    >

    Install the org.apache.sling.scripting.xproc bundle in order to work with XProc.

    112c112 <

    How it works

    --- >

    How it works

    120c120 <

    Samples

    --- >

    Samples

    123,128c123,133 <
  • Create some content

    #!bash
    < $ curl -u admin:admin -F sling:resourceType=xproc -F title="some title" \
    < -F text="And some text" http://localhost:8080/foo
    < 
  • <
  • Use WebDAV or curl to create a pipeline script at /apps/xproc/xproc.xpl :

    <?xml version="1.0" encoding="UTF-8"?>
    < <p:pipeline xmlns:p="http://www.w3.org/ns/xproc">
    ---
    >   
  • >

    Create some content

    >
    #!bash
    > $ curl -u admin:admin -F sling:resourceType=xproc -F title="some title" \
    > -F text="And some text" http://localhost:8080/foo
    > 
    >
  • >
  • >

    Use WebDAV or curl to create a pipeline script at /apps/xproc/xproc.xpl :

    >
    <?xml version="1.0" encoding="UTF-8"?>
    > <p:pipeline xmlns:p="http://www.w3.org/ns/xproc">
    131,132c136,137
    <     <p:input port="stylesheet">
    <       <p:document href="/apps/xproc/one.xsl"/>
    ---
    >     <p:input port="stylesheet">
    >       <p:document href="/apps/xproc/one.xsl"/>
    137,138c142,143
    <     <p:input port="stylesheet">
    <       <p:document href="/apps/xproc/two.xsl"/>
    ---
    >     <p:input port="stylesheet">
    >       <p:document href="/apps/xproc/two.xsl"/>
    143,145c148,154
    < 
  • <
  • Store the XSLT transforms in the repository:

    /apps/xproc/one.xsl

    <xsl:stylesheet version="1.0"
    <     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    ---
    > 
    >
  • >
  • >

    Store the XSLT transforms in the repository:

    >

    /apps/xproc/one.xsl

    >
    <xsl:stylesheet version="1.0"
    >     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    147c156
    <     <xsl:template match="/">
    ---
    >     <xsl:template match="/">
    149c158
    <         <xsl:copy-of select="."/>
    ---
    >         <xsl:copy-of select="."/>
    154,155c163,166
    < 

    /apps/xproc/two.xsl

    <xsl:stylesheet version="1.0"
    <     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    ---
    > 
    >

    /apps/xproc/two.xsl

    >
    <xsl:stylesheet version="1.0"
    >     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    157c168
    <     <xsl:template match="/">
    ---
    >     <xsl:template match="/">
    159c170
    <         <xsl:copy-of select="."/>
    ---
    >         <xsl:copy-of select="."/>
    164,165c175,179
    < 
  • <
  • Request foo.html to execute the pipeline:

    #!bash
    ---
    > 
    >
  • >
  • >

    Request foo.html to execute the pipeline:

    >
    #!bash
    168c182
    < <?xml version="1.0" encoding="UTF-8"?>
    ---
    > <?xml version="1.0" encoding="UTF-8"?>
    171c185
    <     <foo ...sling:resourceType="xproc" text="And some text" title="some title"/>
    ---
    >     <foo ...sling:resourceType="xproc" text="And some text" title="some title"/>
    174,175c188,193
    < 

    In this case, the node's document view has been the pipeline's source.

  • <
  • Now, store a static XML in the repository at /foo.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    ---
    > 
    >

    In this case, the node's document view has been the pipeline's source.

    >
  • >
  • >

    Now, store a static XML in the repository at /foo.xml:

    >
    <?xml version="1.0" encoding="UTF-8"?>
    181,182c199,203
    < 
  • <
  • Again, request foo.html to execute the pipeline:

    #!bash
    ---
    > 
    >
  • >
  • >

    Again, request foo.html to execute the pipeline:

    >
    #!bash
    185c206
    < <?xml version="1.0" encoding="UTF-8"?>
    ---
    > <?xml version="1.0" encoding="UTF-8"?>
    195,196c216,221
    < 

    This time the pipeline's source has been a static XML file.

  • <
  • Store a script in the repository at /apps/xproc/xproc.xml.esp

    <?xml version="1.0" encoding="UTF-8"?>
    ---
    > 
    >

    This time the pipeline's source has been a static XML file.

    >
  • >
  • >

    Store a script in the repository at /apps/xproc/xproc.xml.esp

    >
    <?xml version="1.0" encoding="UTF-8"?>
    202,204c227,233
    < 
  • <
  • Delete the previously created static xml file /foo.xml.

  • <
  • Request foo.html to execute the pipeline:

    #!bash
    ---
    > 
    >
  • >
  • >

    Delete the previously created static xml file /foo.xml.

  • >
  • >

    Request foo.html to execute the pipeline:

    >
    #!bash
    207c236
    < <?xml version="1.0" encoding="UTF-8"?>
    ---
    > <?xml version="1.0" encoding="UTF-8"?>
    217c246,248
    < 

    This time the pipeline's source has been a dinamically generated XML.

  • --- >
    >

    This time the pipeline's source has been a dinamically generated XML.

    >
  • 219c250 <

    References

    --- >

    References

    diff -b -B -r ./old-stuff/scriptengineintegration.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/scriptengineintegration.html 102c102,103 < --- > > diff -b -B -r ./old-stuff/servlet-resolution.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/servlet-resolution.html 95,96c95,97 < Please note that the description on this page is out of sync with the most recent developments going on as part of implementing issue [SLING-387]({{ refs.https://issues.apache.org/jira/browse/SLING-387.path }}). See the links to integration tests at the end of this page for the Current Truth. <

    Please see the new [Servlets]({{ refs.servlets.path }}) page.

    --- > Please note that the description on this page is out of sync with the most recent developments going on as part of implementing issue [SLING-387]({{ refs.https://issues.apache.org/jira/browse/SLING-387.path }}). See the links to integration tests at the end of this page for the Current Truth. > > Please see the new [Servlets]({{ refs.servlets.path }}) page. 100c101 <

    Servlets are Resources

    --- >

    Servlets are Resources

    107,108c108,109 <
    < --- > > 113,114c114,115 < < --- > > 117,118c118,119 < < --- > > 121,122c122,123 < < --- > > 125,126c126,127 < < --- > > 129,130c130,131 < < --- > > 133,134c134,135 < < --- > > 145,149c146,150 <

    Example: Registration by Path

    <
    sling.servlet.paths = [ "/libs/sling/sample/html", "/libs/sling/sample/txt" ]
    < sling.servlet.resourceTypes = [ "sling/unused" ]
    < sling.servlet.selectors = [ "img" ]
    < sling.servlet.extensions = [ "html", "txt", "json" ]
    ---
    > 

    Example: Registration by Path

    >
    sling.servlet.paths = [ "/libs/sling/sample/html", "/libs/sling/sample/txt" ]
    > sling.servlet.resourceTypes = [ "sling/unused" ]
    > sling.servlet.selectors = [ "img" ]
    > sling.servlet.extensions = [ "html", "txt", "json" ]
    157,160c158,161
    < 

    Example: Registration by Resource Type etc.

    <
    sling.servlet.resourceTypes = [ "sling/unused" ]
    < sling.servlet.selectors = [ "img", "tab" ]
    < sling.servlet.extensions = [ "html", "txt", "json" ]
    ---
    > 

    Example: Registration by Resource Type etc.

    >
    sling.servlet.resourceTypes = [ "sling/unused" ]
    > sling.servlet.selectors = [ "img", "tab" ]
    > sling.servlet.extensions = [ "html", "txt", "json" ]
    172c173
    < 

    Scripts are Servlets

    --- >

    Scripts are Servlets

    177c178 <

    Resolution Process

    --- >

    Resolution Process

    190c191 < resourceType = resourceType.replaceAll("\\:", "/"); --- > resourceType = resourceType.replaceAll("\\:", "/"); 193c194 < if (("GET".equals(request.getMethod()) || "HEAD".equals(request.getMethod()) --- > if (("GET".equals(request.getMethod()) || "HEAD".equals(request.getMethod()) 202c203 < selectors = selectors.replace('.', '/'); --- > selectors = selectors.replace('.', '/'); 204c205 < String path = resourceType + "/" + selectors + "/" + baseName; --- > String path = resourceType + "/" + selectors + "/" + baseName; 210c211 < int lastSlash = selectors.lastIndexOf('/'); --- > int lastSlash = selectors.lastIndexOf('/'); 219c220 < String path = resourceType + "/" + baseName; --- > String path = resourceType + "/" + baseName; 229c230 <

    Default Servlet(s)

    --- >

    Default Servlet(s)

    238c239 <

    Error Handler Servlet(s)

    --- >

    Error Handler Servlet(s)

    241c242 <
  • HTTP Status Code Handling: To handle HTTP status code as used by the HttpServletResponse.sendError methods, status code is used as the Servlet name. For example to provide a handler for status code 404 (NOTFOUND), you could create a script prefix/sling/servlet/errorhandler/404.esp or for a status code 500 (INTERNALSERVER_ERRROR), you might want to register a Servlet at prefix/sling/servlet/errorhandler/500.
  • --- >
  • HTTP Status Code Handling: To handle HTTP status code as used by the HttpServletResponse.sendError methods, status code is used as the Servlet name. For example to provide a handler for status code 404 (NOT*FOUND), you could create a script prefix/sling/servlet/errorhandler/404.esp or for a status code 500 (INTERNAL*SERVER_ERRROR), you might want to register a Servlet at prefix/sling/servlet/errorhandler/500.
  • 244,245c245,246 <

    Integration tests

    <

    A set of simple example servlets is available in the [launchpad/test-services module]({{ refs.http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/test-services.path }}).

    --- >

    Integration tests

    >

    A set of simple example servlets is available in the [launchpad/test-services module]({{ refs.http://svn.apache.org/repos/asf/incubator/sling/trunk/launchpad/test-services.path }}).

    diff -b -B -r ./old-stuff/sling-api.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff/sling-api.html 95c95 < The contents of this page is being created at the moment. It contains incomplete and partially wrong information as the text is adapted from the contents of the [Component API]({{ refs.component-api.path }}) documentation page. --- > The contents of this page is being created at the moment. It contains incomplete and partially wrong information as the text is adapted from the contents of the [Component API]({{ refs.component-api.path }}) documentation page. 97c97 <

    Introduction

    --- >

    Introduction

    105c105 <

    Going Resource Centric

    --- >

    Going Resource Centric

    108c108 <

    Comparsion to the Servlet API

    --- >

    Comparsion to the Servlet API

    111c111 <

    Comparision to the Portlet API

    --- >

    Comparision to the Portlet API

    113c113 <

    To Iterator or To Enumeration

    --- >

    To Iterator or To Enumeration

    115c115 <

    Request Processing

    --- >

    Request Processing

    122c122 <

    URL decomposition

    --- >

    URL decomposition

    134,138c134,138 <
    < < < < --- > > > > > 143,147c143,147 < < < < < --- > > > > > 150,154c150,154 < < < < < --- > > > > > 157,161c157,161 < < < < < --- > > > > > 164,168c164,168 < < < < < --- > > > > > 171,175c171,175 < < < < < --- > > > > > 178,182c178,182 < < < < < --- > > > > > 185,189c185,189 < < < < < --- > > > > > 192,196c192,196 < < < < < --- > > > > > 199,203c199,203 < < < < < --- > > > > > 206,210c206,210 < < < < < --- > > > > > 213,217c213,217 < < < < < --- > > > > > 220,224c220,224 < < < < < --- > > > > > 229c229 < The [SlingRequestPathInfoTest]({{ refs.http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/test/java/org/apache/sling/engine/impl/request/SlingRequestPathInfoTest.java.path }}) demonstrates and tests this decomposition. Feel free to suggest additional tests that help clarify how this works! --- > The [SlingRequestPathInfoTest]({{ refs.http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/test/java/org/apache/sling/engine/impl/request/SlingRequestPathInfoTest.java.path }}) demonstrates and tests this decomposition. Feel free to suggest additional tests that help clarify how this works! 231c231 <

    The SlingHttpServletRequest

    --- >

    The SlingHttpServletRequest

    243c243 <

    The SlingHttpServletResponse

    --- >

    The SlingHttpServletResponse

    245c245 <

    The Resource

    --- >

    The Resource

    251,254c251 <
  • adaptTo(Class < < type) < - Returns alternative representations of the Resource. The concrete supported classes to which the Resource may be adapted depends on the implementation. For example a Resource based on a JCR Node may support being adapted to the underlying Node, an InputStream, an URL or even to a mapped object through JCR Object Content Mapping.
  • --- >
  • adaptTo(Class type) - Returns alternative representations of the Resource. The concrete supported classes to which the Resource may be adapted depends on the implementation. For example a Resource based on a JCR Node may support being adapted to the underlying Node, an InputStream, an URL or even to a mapped object through JCR Object Content Mapping.
  • 256,257c253,254 <
    <

    The Component

    --- >
    >

    The Component

    259c256 <

    Processing the Request

    --- >

    Processing the Request

    261c258 <

    Content and its Component

    --- >

    Content and its Component

    264c261 <

    Component Lifecylce

    --- >

    Component Lifecylce

    269c266 <

    The ComponentExtension

    --- >

    The ComponentExtension

    274c271 <

    Request Processing Filters

    --- >

    Request Processing Filters

    278c275 <

    Sessions

    --- >

    Sessions

    284c281 <

    Dispatching Requests

    --- >

    Dispatching Requests

    292,294c289,291 <
    < < --- > > > 299,301c296,298 < < < --- > > > 304,306c301,303 < < < --- > > > 310c307 <

    Error Handling

    --- >

    Error Handling

    329,331c326,328 <
    < < --- > > > 336,338c333,335 < < < --- > > > 341,343c338,340 < < < --- > > > 346,348c343,345 < < < --- > > > 351,353c348,350 < < < --- > > > 356,358c353,355 < < < --- > > > 361,363c358,360 < < < --- > > > 366,368c363,365 < < < --- > > > 372c369,371 <

    * If the Component Framework decides to not handle the error itself, the exception must be forwarded to the servlet container as a ComponentException wrapping the original exception as its root cause.

    --- >
      >
    • If the Component Framework decides to not handle the error itself, the exception must be forwarded to the servlet container as a ComponentException wrapping the original exception as its root cause.
    • >
    diff -b -B -r ./old-stuff.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/old-stuff.html 92,98c92,98 <
  • Assembly
  • <
  • Launch Sling
  • <
  • Request Processing
  • <
  • Run Modes (org.apache.sling.runmode)
  • <
  • Integrating Scripting Languages
  • <
  • Servlet Resolution
  • <
  • Sling API
  • --- >
  • Assembly
  • >
  • Launch Sling
  • >
  • Request Processing
  • >
  • Run Modes (org.apache.sling.runmode)
  • >
  • Integrating Scripting Languages
  • >
  • Servlet Resolution
  • >
  • Sling API
  • diff -b -B -r ./project-information/apache-sling-community-roles-and-processes.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/project-information/apache-sling-community-roles-and-processes.html 95,96c95,96 <

    Roles

    <

    There are different roles with which Sling community members may be associated: User, Contributor, Committer, and PMC (Project Management Committee) Member. These roles are assigned and assumed based on merit.

    --- >

    Roles

    >

    There are different roles with which Sling community members may be associated: User, Contributor, Committer, and PMC (Project Management Committee) Member. These roles are assigned and assumed based on merit.

    99c99 <

    Users

    --- >

    Users

    101c101 <

    Contributors

    --- >

    Contributors

    103c103 <

    Committers

    --- >

    Committers

    105c105 <

    PMC Members

    --- >

    PMC Members

    107,108c107,108 <

    Processes

    <

    Becoming a User or Contributor

    --- >

    Processes

    >

    Becoming a User or Contributor

    110c110 <

    Becoming a Committer

    --- >

    Becoming a Committer

    114c114 <

    Becoming a PMC Member

    --- >

    Becoming a PMC Member

    diff -b -B -r ./project-information/project-team.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/project-information/project-team.html 96c96 <

    Committers and PMC members

    --- >

    Committers and PMC members

    100c100 <

    Emeritus Committers and PMC members

    --- >

    Emeritus Committers and PMC members

    105,108c105,108 <
    < < < --- > > > > 113,114c113,114 < < --- > > 116c116 < --- > 119,122c119,122 < < < < --- > > > > 127c127 <

    Emeritus PMC members

    --- >

    Emeritus PMC members

    132,135c132,135 <
    < < < --- > > > > 140,141c140,141 < < --- > > 143c143 < --- > 147c147 <

    Special Thanks

    --- >

    Special Thanks

    150c150 <

    Contributors

    --- >

    Contributors

    diff -b -B -r ./project-information/security.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/project-information/security.html 94c94 <

    Reporting New Security Problems with Apache Sling

    --- >

    Reporting New Security Problems with Apache Sling

    110c110 <

    Errors and omissions

    --- >

    Errors and omissions

    diff -b -B -r ./project-information.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/project-information.html 109c109 <

    Mailing Lists

    --- >

    Mailing Lists

    115,120c115,120 <
    < < < < < --- > > > > > > 125,130c125,130 < < < < < < --- > > > > > > 133,138c133,138 < < < < < < --- > > > > > > 141,143c141,143 < < < --- > > > 145,146c145,146 < < --- > > 150c150 <

    Issue Tracking

    --- >

    Issue Tracking

    153c153 <

    Source Repository

    --- >

    Source Repository

    156,157c156,157 <

    Web Access

    <

    The source code can be accessed using either the GitHub or GitBox setup.

    --- >

    Web Access

    >

    The source code can be accessed using either the GitHub or GitBox setup.

    159c159 <

    Attic

    --- >

    Attic

    162c162 <

    Continuous Integration

    --- >

    Continuous Integration

    170c170 <

    Documentation Repository

    --- >

    Documentation Repository

    172,173c172,173 <

    Submitting a patch to the Sling Site project

    <

    Create a Git patch:

    --- >

    Submitting a patch to the Sling Site project

    >

    Create a Git patch:

    179c179 <

    Submit your changes:

    --- >

    Submit your changes:

    187,188c187,188 <

    Submitting a pull request to the GitHub Sling Site mirror

    <

    Create the Pull Request:

    --- >

    Submitting a pull request to the GitHub Sling Site mirror

    >

    Create the Pull Request:

    diff -b -B -r ./releases.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/releases.html 90c90 <

    July 2018

    --- >

    July 2018

    95c95 <

    June 2018

    --- >

    June 2018

    103c103 <

    May 2018

    --- >

    May 2018

    121c121 <

    April 2018

    --- >

    April 2018

    127c127 <

    March 2018

    --- >

    March 2018

    138c138 <

    February 2018

    --- >

    February 2018

    148c148 <

    January 2018

    --- >

    January 2018

    160c160 <

    December 2017

    --- >

    December 2017

    172c172 <

    November 2017

    --- >

    November 2017

    180c180 <

    October 2017

    --- >

    October 2017

    189c189 <

    September 2017

    --- >

    September 2017

    217c217 <

    August 2017

    --- >

    August 2017

    236c236 <

    July 2017

    --- >

    July 2017

    250c250 <

    June 2017

    --- >

    June 2017

    289c289 <

    May 2017

    --- >

    May 2017

    360c360 <

    April 2017

    --- >

    April 2017

    369c369 <

    March 2017

    --- >

    March 2017

    413c413 <

    February 2017

    --- >

    February 2017

    429c429 <

    January 2017

    --- >

    January 2017

    458c458 <

    December

    --- >

    December

    507c507 <

    November 2016

    --- >

    November 2016

    539c539 <

    October 2016

    --- >

    October 2016

    581c581 <

    September 2016

    --- >

    September 2016

    609c609 <

    August 2016

    --- >

    August 2016

    637c637 <

    July 2016

    --- >

    July 2016

    660c660 <

    June 2016

    --- >

    June 2016

    676c676 <

    May 2016

    --- >

    May 2016

    680c680 <

    April 2016

    --- >

    April 2016

    691c691 <

    March 2016

    --- >

    March 2016

    709c709 <

    February 2016

    --- >

    February 2016

    744c744 <

    January 2016

    --- >

    January 2016

    765c765 <

    December 2015

    --- >

    December 2015

    777c777 <

    November 2015

    --- >

    November 2015

    805c805 <

    October 2015

    --- >

    October 2015

    842c842 <

    September 2015

    --- >

    September 2015

    865c865 <

    August 2015

    --- >

    August 2015

    890c890 <

    July 2015

    --- >

    July 2015

    911c911 <

    June 2015

    --- >

    June 2015

    930c930 <

    May 2015

    --- >

    May 2015

    940c940 <

    April 2015

    --- >

    April 2015

    966c966 <

    March 2015

    --- >

    March 2015

    993c993 <

    February 2015

    --- >

    February 2015

    1011c1011 <

    January 2015

    --- >

    January 2015

    1034c1034 <

    December 2014

    --- >

    December 2014

    1046c1046 <

    November 2014

    --- >

    November 2014

    1058c1058 <

    October 2014

    --- >

    October 2014

    1081c1081 <

    September 2014

    --- >

    September 2014

    1118c1118 <

    August 2014

    --- >

    August 2014

    1142c1142 <

    July 2014

    --- >

    July 2014

    1163c1163 <

    June 2014

    --- >

    June 2014

    1174c1174 <

    May 2014

    --- >

    May 2014

    1182c1182 <

    April 2014

    --- >

    April 2014

    1192c1192 <

    March 2014

    --- >

    March 2014

    1227c1227 <

    February 2014

    --- >

    February 2014

    1237c1237 <

    January 2014

    --- >

    January 2014

    1248c1248 <

    December 2013

    --- >

    December 2013

    1254c1254 <

    November 2013

    --- >

    November 2013

    1258c1258 <

    October 2013

    --- >

    October 2013

    1273c1273 <

    September 2013

    --- >

    September 2013

    1284c1284 <

    August 2013

    --- >

    August 2013

    1294c1294 <

    July 2013

    --- >

    July 2013

    1304c1304 <

    May 2013

    --- >

    May 2013

    1313c1313 <

    April 2013

    --- >

    April 2013

    1327c1327 <

    March 2013

    --- >

    March 2013

    1332c1332 <

    February 2013

    --- >

    February 2013

    1350c1350 <

    December 2012

    --- >

    December 2012

    1359c1359 <

    November 2012

    --- >

    November 2012

    1388c1388 <

    October 2012

    --- >

    October 2012

    1396c1396 <

    August 2012

    --- >

    August 2012

    1403c1403 <

    July 2012

    --- >

    July 2012

    1409c1409 <

    June 2012

    --- >

    June 2012

    1420c1420 <

    May 2012

    --- >

    May 2012

    1437c1437 <

    February 2012

    --- >

    February 2012

    1449c1449 <

    January 2012

    --- >

    January 2012

    1476c1476 <

    November 2011

    --- >

    November 2011

    1480c1480 <

    October 2011

    --- >

    October 2011

    1484c1484 <

    September 2011

    --- >

    September 2011

    1488c1488 <

    August 2011

    --- >

    August 2011

    1503c1503 <

    July 2011

    --- >

    July 2011

    1512c1512 <

    June 2011

    --- >

    June 2011

    1516c1516 <

    May 2011

    --- >

    May 2011

    1523c1523 <

    April 2011

    --- >

    April 2011

    1534c1534 <

    March 2011

    --- >

    March 2011

    1542c1542 <

    February 2011

    --- >

    February 2011

    1559c1559 <

    January 2011

    --- >

    January 2011

    1576c1576 <

    December 2010

    --- >

    December 2010

    1600c1600 <

    November 2010

    --- >

    November 2010

    1609c1609 <

    October 2010

    --- >

    October 2010

    1618c1618 <

    September 2010

    --- >

    September 2010

    1631c1631 <

    August 2010

    --- >

    August 2010

    1639c1639 <

    July 2010

    --- >

    July 2010

    1643c1643 <

    April 2010

    --- >

    April 2010

    1649c1649 <

    March 2010

    --- >

    March 2010

    1656c1656 <

    February 2010

    --- >

    February 2010

    1671c1671 <

    January 2010

    --- >

    January 2010

    1675c1675 <

    December 2009

    --- >

    December 2009

    1689c1689 <

    November 2009

    --- >

    November 2009

    1700c1700 <

    October 2009

    --- >

    October 2009

    1716c1716 <

    August 2009

    --- >

    August 2009

    diff -b -B -r ./sitemap.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/sitemap.html 141d140 <
  • HTL Maven Plugin
  • 142a142 >
  • HTL Maven Plugin
  • diff -b -B -r ./sitemap.xml /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/sitemap.xml 139d138 <
  • HTL Maven Plugin
  • 140a140 >
  • HTL Maven Plugin
  • diff -b -B -r ./tags/development.html /Users/bert/Desktop/sling-site-0.1-SNAPSHOT/tags/development.html 80c80 <
    Property Description Property Description filter.scope Defines the chain to which the filter is added. Supported values are component for component level filters and request for request level filters. If this property is missing or set to an unknown value the filter is added to the request level filter chain. filter.scope Defines the chain to which the filter is added. Supported values are component for component level filters and request for request level filters. If this property is missing or set to an unknown value the filter is added to the request level filter chain. filter.order Defines the weight of the filter to resolve the processing order. This property must be an java.lang.Integer. If not set or not an Integer the order defaults to Integer.MAX_VALUE. The lower the order number the earlier in the filter chain will the filter be inserted. If two filters are registered with the same order value, the filter with the lower service.id value is called first. filter.order Defines the weight of the filter to resolve the processing order. This property must be an java.lang.Integer. If not set or not an Integer the order defaults to Integer.MAX_VALUE. The lower the order number the earlier in the filter chain will the filter be inserted. If two filters are registered with the same order value, the filter with the lower service.id value is called first. Name Description Name Description sling.servlet.paths A list of absolute paths under which the servlet is accessible as a Resource. The property value must either be a single String, an array of Strings or a Vector of Strings. sling.servlet.paths A list of absolute paths under which the servlet is accessible as a Resource. The property value must either be a single String, an array of Strings or a Vector of Strings. sling.servlet.resourceTypes The resource type(s) supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.resourceTypes The resource type(s) supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.selectors The request URL selectors supported by the servlet. The selectors must be configured as they would be specified in the URL that is as a list of dot-separated strings such as print.a4. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.selectors The request URL selectors supported by the servlet. The selectors must be configured as they would be specified in the URL that is as a list of dot-separated strings such as print.a4. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.extensions The request URL extensions supported by the servlet for GET requests. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.extensions The request URL extensions supported by the servlet for GET requests. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.methods The request methods supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.methods The request methods supported by the servlet. The property value must either be a single String, an array of Strings or a Vector of Strings. This property is ignored if the sling.servlet.paths property is set. sling.servlet.prefix The absolute prefix to make relative paths absolute. This property is a String and is optional. If it is not set, the actual prefix used is derived from the search path of the ResourceResolver at the time of registration. sling.servlet.prefix The absolute prefix to make relative paths absolute. This property is a String and is optional. If it is not set, the actual prefix used is derived from the search path of the ResourceResolver at the time of registration. URI Resource Path Selectors Extension Suffix URI Resource Path Selectors Extension Suffix /a/b /a/b null null null /a/b /a/b null null null /a/b.html /a/b null html null /a/b.html /a/b null html null /a/b.s1.html /a/b s1 html null /a/b.s1.html /a/b s1 html null /a/b.s1.s2.html /a/b s1.s2 html null /a/b.s1.s2.html /a/b s1.s2 html null /a/b/c/d /a/b null null /c/d /a/b/c/d /a/b null null /c/d /a/b.html/c/d /a/b null html /c/d /a/b.html/c/d /a/b null html /c/d /a/b.s1.html/c/d /a/b s1 html /c/d /a/b.s1.html/c/d /a/b s1 html /c/d /a/b.s1.s2.html/c/d /a/b s1.s2 html /c/d /a/b.s1.s2.html/c/d /a/b s1.s2 html /c/d /a/b/c/d.s.txt /a/b null null /c/d.s.txt /a/b/c/d.s.txt /a/b null null /c/d.s.txt /a/b.html/c/d.s.txt /a/b null html /c/d.s.txt /a/b.html/c/d.s.txt /a/b null html /c/d.s.txt /a/b.s1.html/c/d.s.txt /a/b s1 html /c/d.s.txt /a/b.s1.html/c/d.s.txt /a/b s1 html /c/d.s.txt /a/b.s1.s2.html/c/d.s.txt /a/b s1.s2 html /c/d.s.txt /a/b.s1.s2.html/c/d.s.txt /a/b s1.s2 html /c/d.s.txt Request Attributes Type Description Request Attributes Type Description org.apache.sling.component.request.content String The Content instance to which the client URL resolved. This attribute is set when included Components are being rendered and it is not set for the Component directly addressed by the client request. org.apache.sling.component.request.content String The Content instance to which the client URL resolved. This attribute is set when included Components are being rendered and it is not set for the Component directly addressed by the client request. org.apache.sling.component.request.component String The Component instance for the Content object to which the client URL resolved. This attribute is set when included Components are being rendered and it is not set for the Component directly addressed by the client request. org.apache.sling.component.request.component String The Component instance for the Content object to which the client URL resolved. This attribute is set when included Components are being rendered and it is not set for the Component directly addressed by the client request. Request Attributes Type Description Request Attributes Type Description javax.servlet.error.status_code java.lang.Integer The status code of the response. In the case of an exception thrown from the service, the code is defined by the Component Framework. javax.servlet.error.status_code java.lang.Integer The status code of the response. In the case of an exception thrown from the service, the code is defined by the Component Framework. javax.servlet.error.exception_type java.lang.Class The fully qualified name of the exception class thrown. This attribute does not exist, if error handling does not result from an exception. This attribute is maintained for backwards compatibility according to the Servlet API Specification. javax.servlet.error.exception_type java.lang.Class The fully qualified name of the exception class thrown. This attribute does not exist, if error handling does not result from an exception. This attribute is maintained for backwards compatibility according to the Servlet API Specification. javax.servlet.error.message java.lang.String The message of the exception thrown. This attribute does not exist, if error handling does not result from an exception. This attribute is maintained for backwards compatibility according to the Servlet API Specification. javax.servlet.error.message java.lang.String The message of the exception thrown. This attribute does not exist, if error handling does not result from an exception. This attribute is maintained for backwards compatibility according to the Servlet API Specification. javax.servlet.error.exception java.lang.Throwable The exception thrown. This attribute does not exist, if error handling does not result from an exception. javax.servlet.error.exception java.lang.Throwable The exception thrown. This attribute does not exist, if error handling does not result from an exception. javax.servlet.error.request_uri java.lang.String The request URL whose processing resulted in the error. javax.servlet.error.request_uri java.lang.String The request URL whose processing resulted in the error. javax.servlet.error.servlet_name java.lang.String The name of the servlet which yielded the error. The servlet name will generally not have any significance inside the Component Framework. javax.servlet.error.servlet_name java.lang.String The name of the servlet which yielded the error. The servlet name will generally not have any significance inside the Component Framework. org.apache.sling.component.error.componentId java.lang.String The identifier of the Component whose service method has caused the error. This attribute does not exist, if the Component Framework itself caused the error processing. org.apache.sling.component.error.componentId java.lang.String The identifier of the Component whose service method has caused the error. This attribute does not exist, if the Component Framework itself caused the error processing. Id Name Organization Roles Id Name Organization Roles farra J Aaron Farr farra J Aaron Farr Mentor Mentor jukka Jukka Zitting Adobe Champion, Mentor jukka Jukka Zitting Adobe Champion, Mentor Id Name Organization Roles Id Name Organization Roles vramdal Vidar Ramdal vramdal Vidar Ramdal Java Developer Java Developer Name Subscribe Unsubscribe Post Archive Other Archives Name Subscribe Unsubscribe Post Archive Other Archives Sling Users List Subscribe Unsubscribe users at sling.apache.org lists.apache.org www.mail-archive.com MarkMail Nabble Sling Users List Subscribe Unsubscribe users at sling.apache.org lists.apache.org www.mail-archive.com MarkMail Nabble Sling Developers List Subscribe Unsubscribe dev at sling.apache.org lists.apache.org www.mail-archive.com MarkMail Nabble Sling Developers List Subscribe Unsubscribe dev at sling.apache.org lists.apache.org www.mail-archive.com MarkMail Nabble Sling Source Control List Subscribe Unsubscribe Sling Source Control List Subscribe Unsubscribe lists.apache.org www.mail-archive.com MarkMail lists.apache.org www.mail-archive.com MarkMail